Diff
Modified: trunk/LayoutTests/ChangeLog (134189 => 134190)
--- trunk/LayoutTests/ChangeLog 2012-11-12 06:35:20 UTC (rev 134189)
+++ trunk/LayoutTests/ChangeLog 2012-11-12 06:37:55 UTC (rev 134190)
@@ -1,3 +1,29 @@
+2012-11-11 Dongwoo Joshua Im <[email protected]>
+
+ [CSS3] Parsing the property, text-align-last.
+ https://bugs.webkit.org/show_bug.cgi?id=99439
+
+ Reviewed by Julien Chaffraix.
+
+ This patch implements the parsing side of the "text-align-last" property specified
+ in CSS3 working draft, with "-webkit-" prefix, under ENABLE_CSS3_TEXT flag.
+ Specification link : http://www.w3.org/TR/css3-text/#text-align-last
+
+ * fast/css3-text/css3-text-align-last/getComputedStyle/getComputedStyle-text-align-last-inherited.html: Added.
+ * fast/css3-text/css3-text-align-last/getComputedStyle/getComputedStyle-text-align-last.html: Added.
+ * fast/css3-text/css3-text-align-last/getComputedStyle/script-tests/getComputedStyle-text-align-last-inherited.js: Added.
+ (testComputedStyle):
+ * fast/css3-text/css3-text-align-last/getComputedStyle/script-tests/getComputedStyle-text-align-last.js: Added.
+ (testElementStyle):
+ (testComputedStyle):
+ * platform/chromium/TestExpectations:
+ * fast/css3-text/css3-text-align-last/getComputedStyle/getComputedStyle-text-align-last-expected.txt: Added.
+ * fast/css3-text/css3-text-align-last/getComputedStyle/getComputedStyle-text-align-last-inherited-expected.txt: Added.
+ * platform/mac/TestExpectations:
+ * platform/qt-4.8/TestExpectations:
+ * platform/qt-mac/TestExpectations:
+ * platform/qt/TestExpectations:
+
2012-11-11 Keishi Hattori <[email protected]>
Rebaseline month/week appearance tests
Added: trunk/LayoutTests/fast/css3-text/css3-text-align-last/getComputedStyle/getComputedStyle-text-align-last-expected.txt (0 => 134190)
--- trunk/LayoutTests/fast/css3-text/css3-text-align-last/getComputedStyle/getComputedStyle-text-align-last-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/css3-text/css3-text-align-last/getComputedStyle/getComputedStyle-text-align-last-expected.txt 2012-11-12 06:37:55 UTC (rev 134190)
@@ -0,0 +1,85 @@
+This test checks that -webkit-text-align-last parses properly the properties from CSS 3 Text.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Test the initial value:
+PASS computedStyle.webkitTextAlignLast is 'auto'
+PASS computedStyle.getPropertyCSSValue('-webkit-text-align-last').cssText is 'auto'
+
+Value 'start':
+PASS e.style.webkitTextAlignLast is 'start'
+PASS e.style.getPropertyCSSValue('-webkit-text-align-last').cssText is 'start'
+PASS computedStyle.webkitTextAlignLast is 'start'
+PASS computedStyle.getPropertyCSSValue('-webkit-text-align-last').cssText is 'start'
+
+Value 'end':
+PASS e.style.webkitTextAlignLast is 'end'
+PASS e.style.getPropertyCSSValue('-webkit-text-align-last').cssText is 'end'
+PASS computedStyle.webkitTextAlignLast is 'end'
+PASS computedStyle.getPropertyCSSValue('-webkit-text-align-last').cssText is 'end'
+
+Value 'left':
+PASS e.style.webkitTextAlignLast is 'left'
+PASS e.style.getPropertyCSSValue('-webkit-text-align-last').cssText is 'left'
+PASS computedStyle.webkitTextAlignLast is 'left'
+PASS computedStyle.getPropertyCSSValue('-webkit-text-align-last').cssText is 'left'
+
+Value 'right':
+PASS e.style.webkitTextAlignLast is 'right'
+PASS e.style.getPropertyCSSValue('-webkit-text-align-last').cssText is 'right'
+PASS computedStyle.webkitTextAlignLast is 'right'
+PASS computedStyle.getPropertyCSSValue('-webkit-text-align-last').cssText is 'right'
+
+Value 'center':
+PASS e.style.webkitTextAlignLast is 'center'
+PASS e.style.getPropertyCSSValue('-webkit-text-align-last').cssText is 'center'
+PASS computedStyle.webkitTextAlignLast is 'center'
+PASS computedStyle.getPropertyCSSValue('-webkit-text-align-last').cssText is 'center'
+
+Value 'justify':
+PASS e.style.webkitTextAlignLast is 'justify'
+PASS e.style.getPropertyCSSValue('-webkit-text-align-last').cssText is 'justify'
+PASS computedStyle.webkitTextAlignLast is 'justify'
+PASS computedStyle.getPropertyCSSValue('-webkit-text-align-last').cssText is 'justify'
+
+Value 'auto':
+PASS e.style.webkitTextAlignLast is 'auto'
+PASS e.style.getPropertyCSSValue('-webkit-text-align-last').cssText is 'auto'
+PASS computedStyle.webkitTextAlignLast is 'auto'
+PASS computedStyle.getPropertyCSSValue('-webkit-text-align-last').cssText is 'auto'
+
+Invalid value test - '-webkit-left':
+PASS e.style.webkitTextAlignLast is 'auto'
+PASS e.style.getPropertyCSSValue('-webkit-text-align-last').cssText is 'auto'
+PASS computedStyle.webkitTextAlignLast is 'auto'
+PASS computedStyle.getPropertyCSSValue('-webkit-text-align-last').cssText is 'auto'
+
+Invalid value test - '-webkit-right':
+PASS e.style.webkitTextAlignLast is 'auto'
+PASS e.style.getPropertyCSSValue('-webkit-text-align-last').cssText is 'auto'
+PASS computedStyle.webkitTextAlignLast is 'auto'
+PASS computedStyle.getPropertyCSSValue('-webkit-text-align-last').cssText is 'auto'
+
+Invalid value test - '-webkit-center':
+PASS e.style.webkitTextAlignLast is 'auto'
+PASS e.style.getPropertyCSSValue('-webkit-text-align-last').cssText is 'auto'
+PASS computedStyle.webkitTextAlignLast is 'auto'
+PASS computedStyle.getPropertyCSSValue('-webkit-text-align-last').cssText is 'auto'
+
+Invalid value test - '-webkit-match-parent':
+PASS e.style.webkitTextAlignLast is 'auto'
+PASS e.style.getPropertyCSSValue('-webkit-text-align-last').cssText is 'auto'
+PASS computedStyle.webkitTextAlignLast is 'auto'
+PASS computedStyle.getPropertyCSSValue('-webkit-text-align-last').cssText is 'auto'
+
+Invalid value test - '-webkit-auto':
+PASS e.style.webkitTextAlignLast is 'auto'
+PASS e.style.getPropertyCSSValue('-webkit-text-align-last').cssText is 'auto'
+PASS computedStyle.webkitTextAlignLast is 'auto'
+PASS computedStyle.getPropertyCSSValue('-webkit-text-align-last').cssText is 'auto'
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+hello world
Added: trunk/LayoutTests/fast/css3-text/css3-text-align-last/getComputedStyle/getComputedStyle-text-align-last-inherited-expected.txt (0 => 134190)
--- trunk/LayoutTests/fast/css3-text/css3-text-align-last/getComputedStyle/getComputedStyle-text-align-last-inherited-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/css3-text/css3-text-align-last/getComputedStyle/getComputedStyle-text-align-last-inherited-expected.txt 2012-11-12 06:37:55 UTC (rev 134190)
@@ -0,0 +1,45 @@
+This test checks that the value of -webkit-text-align-last is properly inherited to the child.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Value of ancestor is 'start':
+PASS window.getComputedStyle(ancestor).getPropertyCSSValue('-webkit-text-align-last').cssText is 'start'
+PASS window.getComputedStyle(child).getPropertyCSSValue('-webkit-text-align-last').cssText is 'start'
+
+Value of ancestor is 'end':
+PASS window.getComputedStyle(ancestor).getPropertyCSSValue('-webkit-text-align-last').cssText is 'end'
+PASS window.getComputedStyle(child).getPropertyCSSValue('-webkit-text-align-last').cssText is 'end'
+
+Value of ancestor is 'left':
+PASS window.getComputedStyle(ancestor).getPropertyCSSValue('-webkit-text-align-last').cssText is 'left'
+PASS window.getComputedStyle(child).getPropertyCSSValue('-webkit-text-align-last').cssText is 'left'
+
+Value of ancestor is 'right':
+PASS window.getComputedStyle(ancestor).getPropertyCSSValue('-webkit-text-align-last').cssText is 'right'
+PASS window.getComputedStyle(child).getPropertyCSSValue('-webkit-text-align-last').cssText is 'right'
+
+Value of ancestor is 'center':
+PASS window.getComputedStyle(ancestor).getPropertyCSSValue('-webkit-text-align-last').cssText is 'center'
+PASS window.getComputedStyle(child).getPropertyCSSValue('-webkit-text-align-last').cssText is 'center'
+
+Value of ancestor is 'justify':
+PASS window.getComputedStyle(ancestor).getPropertyCSSValue('-webkit-text-align-last').cssText is 'justify'
+PASS window.getComputedStyle(child).getPropertyCSSValue('-webkit-text-align-last').cssText is 'justify'
+
+Value of ancestor is 'auto':
+PASS window.getComputedStyle(ancestor).getPropertyCSSValue('-webkit-text-align-last').cssText is 'auto'
+PASS window.getComputedStyle(child).getPropertyCSSValue('-webkit-text-align-last').cssText is 'auto'
+
+Value of ancestor is 'start, while child is 'end':
+PASS window.getComputedStyle(ancestor).getPropertyCSSValue('-webkit-text-align-last').cssText is 'start'
+PASS window.getComputedStyle(child).getPropertyCSSValue('-webkit-text-align-last').cssText is 'end'
+
+Value of ancestor is 'left, while child is 'right':
+PASS window.getComputedStyle(ancestor).getPropertyCSSValue('-webkit-text-align-last').cssText is 'left'
+PASS window.getComputedStyle(child).getPropertyCSSValue('-webkit-text-align-last').cssText is 'right'
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+hello world
Added: trunk/LayoutTests/fast/css3-text/css3-text-align-last/getComputedStyle/getComputedStyle-text-align-last-inherited.html (0 => 134190)
--- trunk/LayoutTests/fast/css3-text/css3-text-align-last/getComputedStyle/getComputedStyle-text-align-last-inherited.html (rev 0)
+++ trunk/LayoutTests/fast/css3-text/css3-text-align-last/getComputedStyle/getComputedStyle-text-align-last-inherited.html 2012-11-12 06:37:55 UTC (rev 134190)
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <script src=""
+</head>
+<body>
+ <div id="ancestor"><div id="child">hello world</div></div>
+ <script src=""
+ <script src=""
+</body>
+</html>
Added: trunk/LayoutTests/fast/css3-text/css3-text-align-last/getComputedStyle/getComputedStyle-text-align-last.html (0 => 134190)
--- trunk/LayoutTests/fast/css3-text/css3-text-align-last/getComputedStyle/getComputedStyle-text-align-last.html (rev 0)
+++ trunk/LayoutTests/fast/css3-text/css3-text-align-last/getComputedStyle/getComputedStyle-text-align-last.html 2012-11-12 06:37:55 UTC (rev 134190)
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <script src=""
+</head>
+<body>
+ <div id="test">hello world</div>
+ <script src=""
+ <script src=""
+</body>
+</html>
Added: trunk/LayoutTests/fast/css3-text/css3-text-align-last/getComputedStyle/script-tests/getComputedStyle-text-align-last-inherited.js (0 => 134190)
--- trunk/LayoutTests/fast/css3-text/css3-text-align-last/getComputedStyle/script-tests/getComputedStyle-text-align-last-inherited.js (rev 0)
+++ trunk/LayoutTests/fast/css3-text/css3-text-align-last/getComputedStyle/script-tests/getComputedStyle-text-align-last-inherited.js 2012-11-12 06:37:55 UTC (rev 134190)
@@ -0,0 +1,37 @@
+function testComputedStyle(a_value, c_value)
+{
+ shouldBe("window.getComputedStyle(ancestor).getPropertyCSSValue('-webkit-text-align-last').cssText", "'" + a_value + "'");
+ shouldBe("window.getComputedStyle(child).getPropertyCSSValue('-webkit-text-align-last').cssText", "'" + c_value + "'");
+ debug('');
+}
+
+function ownValueTest(a_value, c_value)
+{
+ debug("Value of ancestor is '" + a_value + ", while child is '" + c_value + "':");
+ ancestor.style.webkitTextAlignLast = a_value;
+ child.style.webkitTextAlignLast = c_value;
+ testComputedStyle(a_value, c_value);
+}
+
+function inheritanceTest(a_value)
+{
+ debug("Value of ancestor is '" + a_value + "':");
+ ancestor.style.webkitTextAlignLast = a_value;
+ testComputedStyle(a_value, a_value);
+}
+
+description("This test checks that the value of -webkit-text-align-last is properly inherited to the child.");
+
+ancestor = document.getElementById('ancestor');
+child = document.getElementById('child');
+
+inheritanceTest("start");
+inheritanceTest("end");
+inheritanceTest("left");
+inheritanceTest("right");
+inheritanceTest("center");
+inheritanceTest("justify");
+inheritanceTest("auto");
+
+ownValueTest("start", "end");
+ownValueTest("left", "right");
Added: trunk/LayoutTests/fast/css3-text/css3-text-align-last/getComputedStyle/script-tests/getComputedStyle-text-align-last.js (0 => 134190)
--- trunk/LayoutTests/fast/css3-text/css3-text-align-last/getComputedStyle/script-tests/getComputedStyle-text-align-last.js (rev 0)
+++ trunk/LayoutTests/fast/css3-text/css3-text-align-last/getComputedStyle/script-tests/getComputedStyle-text-align-last.js 2012-11-12 06:37:55 UTC (rev 134190)
@@ -0,0 +1,54 @@
+function testElementStyle(propertyJS, propertyCSS, type, value)
+{
+ shouldBe("e.style." + propertyJS, "'" + value + "'");
+ shouldBe("e.style.getPropertyCSSValue('" + propertyCSS + "').cssText", "'" + value + "'");
+}
+
+function testComputedStyle(propertyJS, propertyCSS, type, value)
+{
+ computedStyle = window.getComputedStyle(e, null);
+ shouldBe("computedStyle." + propertyJS, "'" + value + "'");
+ shouldBe("computedStyle.getPropertyCSSValue('" + propertyCSS + "').cssText", "'" + value + "'");
+}
+
+function valueSettingTest(value)
+{
+ debug("Value '" + value + "':");
+ e.style.webkitTextAlignLast = value;
+ testElementStyle("webkitTextAlignLast", "-webkit-text-align-last", "[object CSSPrimitiveValue]", value);
+ testComputedStyle("webkitTextAlignLast", "-webkit-text-align-last", "[object CSSPrimitiveValue]", value);
+ debug('');
+}
+
+function invalidValueSettingTest(value, defaultValue)
+{
+ debug("Invalid value test - '" + value + "':");
+ e.style.webkitTextAlignLast = value;
+ testElementStyle("webkitTextAlignLast", "-webkit-text-align-last", "[object CSSPrimitiveValue]", defaultValue);
+ testComputedStyle("webkitTextAlignLast", "-webkit-text-align-last", "[object CSSPrimitiveValue]", defaultValue);
+ debug('');
+}
+
+description("This test checks that -webkit-text-align-last parses properly the properties from CSS 3 Text.");
+
+e = document.getElementById('test');
+
+debug("Test the initial value:");
+testComputedStyle("webkitTextAlignLast", "-webkit-text-align-last", "[object CSSPrimitiveValue]", 'auto');
+debug('');
+
+valueSettingTest('start');
+valueSettingTest('end');
+valueSettingTest('left');
+valueSettingTest('right');
+valueSettingTest('center');
+valueSettingTest('justify');
+valueSettingTest('auto');
+
+defaultValue = 'auto'
+e.style.webkitTextAlignLast = defaultValue;
+invalidValueSettingTest('-webkit-left', defaultValue);
+invalidValueSettingTest('-webkit-right', defaultValue);
+invalidValueSettingTest('-webkit-center', defaultValue);
+invalidValueSettingTest('-webkit-match-parent', defaultValue);
+invalidValueSettingTest('-webkit-auto', defaultValue);
Modified: trunk/LayoutTests/platform/chromium/TestExpectations (134189 => 134190)
--- trunk/LayoutTests/platform/chromium/TestExpectations 2012-11-12 06:35:20 UTC (rev 134189)
+++ trunk/LayoutTests/platform/chromium/TestExpectations 2012-11-12 06:37:55 UTC (rev 134190)
@@ -201,6 +201,7 @@
# CSS3 Text support is not yet enabled (needs ENABLE_CSS3_TEXT).
webkit.org/b/58491 fast/css3-text/css3-text-decoration
+webkit.org/b/76173 fast/css3-text/css3-text-align-last
# Chromium does not support smart pasting in text controls yet.
webkit.org/b/60830 editing/pasteboard/smart-paste-in-text-control.html
Modified: trunk/LayoutTests/platform/mac/TestExpectations (134189 => 134190)
--- trunk/LayoutTests/platform/mac/TestExpectations 2012-11-12 06:35:20 UTC (rev 134189)
+++ trunk/LayoutTests/platform/mac/TestExpectations 2012-11-12 06:37:55 UTC (rev 134190)
@@ -985,6 +985,7 @@
# CSS3 Text support is not yet enabled (needs ENABLE_CSS3_TEXT).
webkit.org/b/58491 fast/css3-text/css3-text-decoration
+webkit.org/b/76173 fast/css3-text/css3-text-align-last
# Our slow tests, in alphabetical order.
webkit.org/b/57672 http/tests/local/fileapi/send-sliced-dragged-file.html [ Failure Pass ]
Modified: trunk/LayoutTests/platform/qt/TestExpectations (134189 => 134190)
--- trunk/LayoutTests/platform/qt/TestExpectations 2012-11-12 06:35:20 UTC (rev 134189)
+++ trunk/LayoutTests/platform/qt/TestExpectations 2012-11-12 06:37:55 UTC (rev 134190)
@@ -351,6 +351,7 @@
# CSS3 Text support is not yet enabled (needs ENABLE_CSS3_TEXT).
webkit.org/b/58491 fast/css3-text/css3-text-decoration
+webkit.org/b/76173 fast/css3-text/css3-text-align-last
# Web Inspector: Implement support for InspectorClient::overrideDeviceMetrics() in platforms other than Chromium
# https://bugs.webkit.org/show_bug.cgi?id=82886
Modified: trunk/LayoutTests/platform/qt-4.8/TestExpectations (134189 => 134190)
--- trunk/LayoutTests/platform/qt-4.8/TestExpectations 2012-11-12 06:35:20 UTC (rev 134189)
+++ trunk/LayoutTests/platform/qt-4.8/TestExpectations 2012-11-12 06:37:55 UTC (rev 134190)
@@ -707,6 +707,7 @@
# CSS3 Text support is not yet enabled (needs ENABLE_CSS3_TEXT).
webkit.org/b/58491 fast/css3-text/css3-text-decoration
+webkit.org/b/76173 fast/css3-text/css3-text-align-last
# Needs rebaseline after bug 86441
# failing new tests
Modified: trunk/LayoutTests/platform/qt-mac/TestExpectations (134189 => 134190)
--- trunk/LayoutTests/platform/qt-mac/TestExpectations 2012-11-12 06:35:20 UTC (rev 134189)
+++ trunk/LayoutTests/platform/qt-mac/TestExpectations 2012-11-12 06:37:55 UTC (rev 134190)
@@ -5806,6 +5806,7 @@
# CSS3 Text support is not yet enabled (needs ENABLE_CSS3_TEXT).
webkit.org/b/58491 fast/css3-text/css3-text-decoration
+webkit.org/b/76173 fast/css3-text/css3-text-align-last
# Needs rebaseline after bug 86441
# failing new tests
Modified: trunk/Source/WebCore/ChangeLog (134189 => 134190)
--- trunk/Source/WebCore/ChangeLog 2012-11-12 06:35:20 UTC (rev 134189)
+++ trunk/Source/WebCore/ChangeLog 2012-11-12 06:37:55 UTC (rev 134190)
@@ -1,3 +1,43 @@
+2012-11-11 Dongwoo Joshua Im <[email protected]>
+
+ [CSS3] Parsing the property, text-align-last.
+ https://bugs.webkit.org/show_bug.cgi?id=99439
+
+ Reviewed by Julien Chaffraix.
+
+ This patch implements the parsing side of the "text-align-last" property specified
+ in CSS3 working draft, with "-webkit-" prefix, under ENABLE_CSS3_TEXT flag.
+ Specification link : http://www.w3.org/TR/css3-text/#text-align-last
+
+ Tests: fast/css3-text/css3-text-align-last/getComputedStyle/getComputedStyle-text-align-last-inherited.html
+ fast/css3-text/css3-text-align-last/getComputedStyle/getComputedStyle-text-align-last.html
+
+ * css/CSSComputedStyleDeclaration.cpp:
+ (WebCore):
+ (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Get the value of the text-align-last property.
+ * css/CSSParser.cpp:
+ (WebCore::CSSParser::parseValue): Parse the value, and check whether it is a proper value which text-align-last can have.
+ * css/CSSPrimitiveValueMappings.h:
+ (WebCore):
+ (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
+ (WebCore::CSSPrimitiveValue::operator ETextAlignLast):
+ * css/CSSProperty.cpp:
+ (WebCore::CSSProperty::isInheritedProperty):
+ * css/CSSPropertyNames.in: Add '-webkit-text-align-last' property.
+ * css/StyleBuilder.cpp:
+ (WebCore::StyleBuilder::StyleBuilder):
+ * css/StylePropertySet.cpp:
+ (WebCore):
+ * css/StyleResolver.cpp:
+ (WebCore::StyleResolver::applyProperty):
+ * rendering/style/RenderStyle.h:
+ * rendering/style/RenderStyleConstants.h:
+ * rendering/style/StyleRareInheritedData.cpp:
+ (WebCore::StyleRareInheritedData::StyleRareInheritedData):
+ (WebCore::StyleRareInheritedData::operator==):
+ * rendering/style/StyleRareInheritedData.h:
+ (StyleRareInheritedData): Add m_textAlignLast.
+
2012-11-11 Shinya Kawanaka <[email protected]>
[Refactoring] Remove shadowPseudoId() and use setPseudo() in HTMLKeygenElement
Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (134189 => 134190)
--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp 2012-11-12 06:35:20 UTC (rev 134189)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp 2012-11-12 06:37:55 UTC (rev 134190)
@@ -183,6 +183,7 @@
#if ENABLE(CSS3_TEXT)
CSSPropertyWebkitTextDecorationLine,
CSSPropertyWebkitTextDecorationStyle,
+ CSSPropertyWebkitTextAlignLast,
#endif // CSS3_TEXT
CSSPropertyTextIndent,
CSSPropertyTextRendering,
@@ -2036,6 +2037,8 @@
return renderTextDecorationFlagsToCSSValue(style->textDecoration());
case CSSPropertyWebkitTextDecorationStyle:
return renderTextDecorationStyleFlagsToCSSValue(style->textDecorationStyle());
+ case CSSPropertyWebkitTextAlignLast:
+ return cssValuePool().createValue(style->textAlignLast());
#endif // CSS3_TEXT
case CSSPropertyWebkitTextDecorationsInEffect:
return renderTextDecorationFlagsToCSSValue(style->textDecorationsInEffect());
Modified: trunk/Source/WebCore/css/CSSParser.cpp (134189 => 134190)
--- trunk/Source/WebCore/css/CSSParser.cpp 2012-11-12 06:35:20 UTC (rev 134189)
+++ trunk/Source/WebCore/css/CSSParser.cpp 2012-11-12 06:37:55 UTC (rev 134190)
@@ -1865,6 +1865,14 @@
}
break;
+#if ENABLE(CSS3_TEXT)
+ case CSSPropertyWebkitTextAlignLast:
+ // auto | start | end | left | right | center | justify
+ if ((id >= CSSValueLeft && id <= CSSValueJustify) || id == CSSValueStart || id == CSSValueEnd || id == CSSValueAuto)
+ validPrimitive = true;
+ break;
+#endif // CSS3_TEXT
+
case CSSPropertyCursor: {
// [<uri>,]* [ auto | crosshair | default | pointer | progress | move | e-resize | ne-resize |
// nw-resize | n-resize | se-resize | sw-resize | s-resize | w-resize | ew-resize |
Modified: trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h (134189 => 134190)
--- trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h 2012-11-12 06:35:20 UTC (rev 134189)
+++ trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h 2012-11-12 06:37:55 UTC (rev 134190)
@@ -2199,6 +2199,60 @@
}
}
+#if ENABLE(CSS3_TEXT)
+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ETextAlignLast e)
+ : CSSValue(PrimitiveClass)
+{
+ m_primitiveUnitType = CSS_IDENT;
+ switch (e) {
+ case TextAlignLastStart:
+ m_value.ident = CSSValueStart;
+ break;
+ case TextAlignLastEnd:
+ m_value.ident = CSSValueEnd;
+ break;
+ case TextAlignLastLeft:
+ m_value.ident = CSSValueLeft;
+ break;
+ case TextAlignLastRight:
+ m_value.ident = CSSValueRight;
+ break;
+ case TextAlignLastCenter:
+ m_value.ident = CSSValueCenter;
+ break;
+ case TextAlignLastJustify:
+ m_value.ident = CSSValueJustify;
+ break;
+ case TextAlignLastAuto:
+ m_value.ident = CSSValueAuto;
+ break;
+ }
+}
+
+template<> inline CSSPrimitiveValue::operator ETextAlignLast() const
+{
+ switch (m_value.ident) {
+ case CSSValueAuto:
+ return TextAlignLastAuto;
+ case CSSValueStart:
+ return TextAlignLastStart;
+ case CSSValueEnd:
+ return TextAlignLastEnd;
+ case CSSValueLeft:
+ return TextAlignLastLeft;
+ case CSSValueRight:
+ return TextAlignLastRight;
+ case CSSValueCenter:
+ return TextAlignLastCenter;
+ case CSSValueJustify:
+ return TextAlignLastJustify;
+ }
+
+ ASSERT_NOT_REACHED();
+ return TextAlignLastAuto;
+}
+#endif // CSS3_TEXT
+
template<> inline CSSPrimitiveValue::operator ETextDecoration() const
{
switch (m_value.ident) {
Modified: trunk/Source/WebCore/css/CSSProperty.cpp (134189 => 134190)
--- trunk/Source/WebCore/css/CSSProperty.cpp 2012-11-12 06:35:20 UTC (rev 134189)
+++ trunk/Source/WebCore/css/CSSProperty.cpp 2012-11-12 06:37:55 UTC (rev 134190)
@@ -327,6 +327,7 @@
case CSSPropertyWebkitTextCombine:
#if ENABLE(CSS3_TEXT)
case CSSPropertyWebkitTextDecorationLine:
+ case CSSPropertyWebkitTextAlignLast:
#endif // CSS3_TEXT
case CSSPropertyWebkitTextDecorationsInEffect:
case CSSPropertyWebkitTextEmphasis:
Modified: trunk/Source/WebCore/css/CSSPropertyNames.in (134189 => 134190)
--- trunk/Source/WebCore/css/CSSPropertyNames.in 2012-11-12 06:35:20 UTC (rev 134189)
+++ trunk/Source/WebCore/css/CSSPropertyNames.in 2012-11-12 06:37:55 UTC (rev 134190)
@@ -357,6 +357,7 @@
#if defined(ENABLE_CSS3_TEXT) && ENABLE_CSS3_TEXT
-webkit-text-decoration-line
-webkit-text-decoration-style
+-webkit-text-align-last
#endif
-webkit-text-decorations-in-effect
-webkit-text-emphasis
Modified: trunk/Source/WebCore/css/StyleBuilder.cpp (134189 => 134190)
--- trunk/Source/WebCore/css/StyleBuilder.cpp 2012-11-12 06:35:20 UTC (rev 134189)
+++ trunk/Source/WebCore/css/StyleBuilder.cpp 2012-11-12 06:37:55 UTC (rev 134190)
@@ -1919,6 +1919,7 @@
#if ENABLE(CSS3_TEXT)
setPropertyHandler(CSSPropertyWebkitTextDecorationLine, ApplyPropertyTextDecoration::createHandler());
setPropertyHandler(CSSPropertyWebkitTextDecorationStyle, ApplyPropertyDefault<TextDecorationStyle, &RenderStyle::textDecorationStyle, TextDecorationStyle, &RenderStyle::setTextDecorationStyle, TextDecorationStyle, &RenderStyle::initialTextDecorationStyle>::createHandler());
+ setPropertyHandler(CSSPropertyWebkitTextAlignLast, ApplyPropertyDefault<ETextAlignLast, &RenderStyle::textAlignLast, ETextAlignLast, &RenderStyle::setTextAlignLast, ETextAlignLast, &RenderStyle::initialTextAlignLast>::createHandler());
#endif // CSS3_TEXT
setPropertyHandler(CSSPropertyTextIndent, ApplyPropertyLength<&RenderStyle::textIndent, &RenderStyle::setTextIndent, &RenderStyle::initialTextIndent>::createHandler());
setPropertyHandler(CSSPropertyTextOverflow, ApplyPropertyDefault<TextOverflow, &RenderStyle::textOverflow, TextOverflow, &RenderStyle::setTextOverflow, TextOverflow, &RenderStyle::initialTextOverflow>::createHandler());
Modified: trunk/Source/WebCore/css/StylePropertySet.cpp (134189 => 134190)
--- trunk/Source/WebCore/css/StylePropertySet.cpp 2012-11-12 06:35:20 UTC (rev 134189)
+++ trunk/Source/WebCore/css/StylePropertySet.cpp 2012-11-12 06:37:55 UTC (rev 134190)
@@ -974,6 +974,9 @@
CSSPropertyWebkitRegionBreakInside,
#endif
CSSPropertyTextAlign,
+#if ENABLE(CSS3_TEXT)
+ CSSPropertyWebkitTextAlignLast,
+#endif // CSS3_TEXT
CSSPropertyTextIndent,
CSSPropertyWidows
};
Modified: trunk/Source/WebCore/css/StyleResolver.cpp (134189 => 134190)
--- trunk/Source/WebCore/css/StyleResolver.cpp 2012-11-12 06:35:20 UTC (rev 134189)
+++ trunk/Source/WebCore/css/StyleResolver.cpp 2012-11-12 06:37:55 UTC (rev 134190)
@@ -3852,6 +3852,7 @@
#if ENABLE(CSS3_TEXT)
case CSSPropertyWebkitTextDecorationLine:
case CSSPropertyWebkitTextDecorationStyle:
+ case CSSPropertyWebkitTextAlignLast:
#endif // CSS3_TEXT
case CSSPropertyWebkitTextEmphasisColor:
case CSSPropertyWebkitTextEmphasisPosition:
Modified: trunk/Source/WebCore/rendering/style/RenderStyle.h (134189 => 134190)
--- trunk/Source/WebCore/rendering/style/RenderStyle.h 2012-11-12 06:35:20 UTC (rev 134189)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.h 2012-11-12 06:37:55 UTC (rev 134190)
@@ -619,6 +619,7 @@
ETextDecoration textDecoration() const { return static_cast<ETextDecoration>(visual->textDecoration); }
#if ENABLE(CSS3_TEXT)
TextDecorationStyle textDecorationStyle() const { return static_cast<TextDecorationStyle>(rareNonInheritedData->m_textDecorationStyle); }
+ ETextAlignLast textAlignLast() const { return static_cast<ETextAlignLast>(rareInheritedData->m_textAlignLast); }
#else
TextDecorationStyle textDecorationStyle() const { return TextDecorationStyleSolid; }
#endif // CSS3_TEXT
@@ -1152,6 +1153,7 @@
void setTextDecoration(ETextDecoration v) { SET_VAR(visual, textDecoration, v); }
#if ENABLE(CSS3_TEXT)
void setTextDecorationStyle(TextDecorationStyle v) { SET_VAR(rareNonInheritedData, m_textDecorationStyle, v); }
+ void setTextAlignLast(ETextAlignLast v) { SET_VAR(rareInheritedData, m_textAlignLast, v) }
#endif // CSS3_TEXT
void setDirection(TextDirection v) { inherited_flags._direction = v; }
void setLineHeight(Length specifiedLineHeight);
@@ -1611,6 +1613,7 @@
static ETextDecoration initialTextDecoration() { return TDNONE; }
#if ENABLE(CSS3_TEXT)
static TextDecorationStyle initialTextDecorationStyle() { return TextDecorationStyleSolid; }
+ static ETextAlignLast initialTextAlignLast() { return TextAlignLastAuto; }
#endif // CSS3_TEXT
static float initialZoom() { return 1.0f; }
static int initialOutlineOffset() { return 0; }
Modified: trunk/Source/WebCore/rendering/style/RenderStyleConstants.h (134189 => 134190)
--- trunk/Source/WebCore/rendering/style/RenderStyleConstants.h 2012-11-12 06:35:20 UTC (rev 134189)
+++ trunk/Source/WebCore/rendering/style/RenderStyleConstants.h 2012-11-12 06:37:55 UTC (rev 134190)
@@ -346,6 +346,12 @@
#endif // CSS3_TEXT
};
+#if ENABLE(CSS3_TEXT)
+enum ETextAlignLast {
+ TextAlignLastAuto, TextAlignLastStart, TextAlignLastEnd, TextAlignLastLeft, TextAlignLastRight, TextAlignLastCenter, TextAlignLastJustify
+};
+#endif // CSS3_TEXT
+
enum EPageBreak {
PBAUTO, PBALWAYS, PBAVOID
};
Modified: trunk/Source/WebCore/rendering/style/StyleRareInheritedData.cpp (134189 => 134190)
--- trunk/Source/WebCore/rendering/style/StyleRareInheritedData.cpp 2012-11-12 06:35:20 UTC (rev 134189)
+++ trunk/Source/WebCore/rendering/style/StyleRareInheritedData.cpp 2012-11-12 06:37:55 UTC (rev 134190)
@@ -95,6 +95,9 @@
, m_imageResolutionSource(RenderStyle::initialImageResolutionSource())
, m_imageResolutionSnap(RenderStyle::initialImageResolutionSnap())
#endif
+#if ENABLE(CSS3_TEXT)
+ , m_textAlignLast(RenderStyle::initialTextAlignLast())
+#endif // CSS3_TEXT
, hyphenationLimitBefore(-1)
, hyphenationLimitAfter(-1)
, hyphenationLimitLines(-1)
@@ -157,6 +160,9 @@
, m_imageResolutionSource(o.m_imageResolutionSource)
, m_imageResolutionSnap(o.m_imageResolutionSnap)
#endif
+#if ENABLE(CSS3_TEXT)
+ , m_textAlignLast(o.m_textAlignLast)
+#endif // CSS3_TEXT
, hyphenationString(o.hyphenationString)
, hyphenationLimitBefore(o.hyphenationLimitBefore)
, hyphenationLimitAfter(o.hyphenationLimitAfter)
@@ -246,6 +252,9 @@
&& m_imageResolutionSnap == o.m_imageResolutionSnap
&& m_imageResolution == o.m_imageResolution
#endif
+#if ENABLE(CSS3_TEXT)
+ && m_textAlignLast == o.m_textAlignLast
+#endif // CSS3_TEXT
&& m_lineSnap == o.m_lineSnap
#if ENABLE(CSS_VARIABLES)
&& m_variables == o.m_variables
Modified: trunk/Source/WebCore/rendering/style/StyleRareInheritedData.h (134189 => 134190)
--- trunk/Source/WebCore/rendering/style/StyleRareInheritedData.h 2012-11-12 06:35:20 UTC (rev 134189)
+++ trunk/Source/WebCore/rendering/style/StyleRareInheritedData.h 2012-11-12 06:37:55 UTC (rev 134190)
@@ -110,6 +110,9 @@
unsigned m_imageResolutionSource : 1; // ImageResolutionSource
unsigned m_imageResolutionSnap : 1; // ImageResolutionSnap
#endif
+#if ENABLE(CSS3_TEXT)
+ unsigned m_textAlignLast : 3; // ETextAlignLast
+#endif // CSS3_TEXT
AtomicString hyphenationString;
short hyphenationLimitBefore;