Title: [275199] trunk
Revision
275199
Author
[email protected]
Date
2021-03-30 00:40:46 -0700 (Tue, 30 Mar 2021)

Log Message

Enable "hanging" and "each-line" keywords for the text-indent CSS property
https://bugs.webkit.org/show_bug.cgi?id=223851

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Mark all tests in the parsing-related tests as PASS results for text-indent.
The animation tests will be dealt with in bug 223914.

* web-platform-tests/css/css-text/animations/text-indent-composition-expected.txt:
* web-platform-tests/css/css-text/animations/text-indent-interpolation-expected.txt:
* web-platform-tests/css/css-text/parsing/text-indent-computed-expected.txt:
* web-platform-tests/css/css-text/parsing/text-indent-valid-expected.txt:

Source/WebCore:

We've had support for "hanging" and "each-line" behind the ENABLE_CSS3_TEXT flag. Probably by mistake,
"hanging" itself was parsed and Web-exposed by default. Presumably that was the case because that CSS
keyword existed in the context of SVG.

But LineWidth.cpp already knew how to handle these keywords, so there seems to be no reason to keep
these behind a flag.

So we remove all the ENABLE_CSS3_TEXT guards related to they keywords and address some spec compliance
issue, namely:

    1. add the text-indent length or percentage, the "hanging" and "each-line" keywords in that order
       in consumeTextIndent(),
    2. use that same order for the computed style.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):
* css/CSSValueKeywords.in:
* css/parser/CSSPropertyParser.cpp:
(WebCore::consumeTextIndent):
* layout/inlineformatting/InlineLineBuilder.cpp:
(WebCore::Layout::LineBuilder::initialConstraintsForLine const):
* rendering/line/LineWidth.cpp:
(WebCore::requiresIndent):
* rendering/style/RenderStyle.cpp:
(WebCore::rareInheritedDataChangeRequiresLayout):
* rendering/style/RenderStyle.h:
* rendering/style/RenderStyleConstants.h:
* rendering/style/StyleRareInheritedData.cpp:
(WebCore::StyleRareInheritedData::StyleRareInheritedData):
(WebCore::StyleRareInheritedData::operator== const):
* rendering/style/StyleRareInheritedData.h:
* style/StyleBuilderCustom.h:
(WebCore::Style::BuilderCustom::applyInheritTextIndent):
(WebCore::Style::BuilderCustom::applyInitialTextIndent):
(WebCore::Style::BuilderCustom::applyValueTextIndent):

Modified Paths

Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (275198 => 275199)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2021-03-30 07:23:54 UTC (rev 275198)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2021-03-30 07:40:46 UTC (rev 275199)
@@ -1,3 +1,18 @@
+2021-03-29  Antoine Quint  <[email protected]>
+
+        Enable "hanging" and "each-line" keywords for the text-indent CSS property
+        https://bugs.webkit.org/show_bug.cgi?id=223851
+
+        Reviewed by Antti Koivisto.
+
+        Mark all tests in the parsing-related tests as PASS results for text-indent.
+        The animation tests will be dealt with in bug 223914.
+
+        * web-platform-tests/css/css-text/animations/text-indent-composition-expected.txt:
+        * web-platform-tests/css/css-text/animations/text-indent-interpolation-expected.txt:
+        * web-platform-tests/css/css-text/parsing/text-indent-computed-expected.txt:
+        * web-platform-tests/css/css-text/parsing/text-indent-valid-expected.txt:
+
 2021-03-28  Antoine Quint  <[email protected]>
 
         Add support for animating the vertical-align CSS property

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-text/animations/text-indent-composition-expected.txt (275198 => 275199)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-text/animations/text-indent-composition-expected.txt	2021-03-30 07:23:54 UTC (rev 275198)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-text/animations/text-indent-composition-expected.txt	2021-03-30 07:40:46 UTC (rev 275199)
@@ -18,16 +18,16 @@
 FAIL Compositing: property <text-indent> underlying [50%] from replace [-100%] to add [50%] at (0.6) should be [20%] assert_equals: expected "20 % " but got "- 10 % "
 FAIL Compositing: property <text-indent> underlying [50%] from replace [-100%] to add [50%] at (1) should be [100%] assert_equals: expected "100 % " but got "50 % "
 FAIL Compositing: property <text-indent> underlying [50%] from replace [-100%] to add [50%] at (1.5) should be [200%] assert_equals: expected "200 % " but got "125 % "
-FAIL Compositing: property <text-indent> underlying [250px] from add [50px each-line hanging] to replace [150px hanging each-line] at (-0.3) should be [20px hanging each-line] assert_true: 'from' value should be supported expected true got false
-FAIL Compositing: property <text-indent> underlying [250px] from add [50px each-line hanging] to replace [150px hanging each-line] at (0) should be [50px hanging each-line] assert_true: 'from' value should be supported expected true got false
-FAIL Compositing: property <text-indent> underlying [250px] from add [50px each-line hanging] to replace [150px hanging each-line] at (0.3) should be [80px hanging each-line] assert_true: 'from' value should be supported expected true got false
-FAIL Compositing: property <text-indent> underlying [250px] from add [50px each-line hanging] to replace [150px hanging each-line] at (0.6) should be [110px hanging each-line] assert_true: 'from' value should be supported expected true got false
-FAIL Compositing: property <text-indent> underlying [250px] from add [50px each-line hanging] to replace [150px hanging each-line] at (1) should be [150px hanging each-line] assert_true: 'from' value should be supported expected true got false
-FAIL Compositing: property <text-indent> underlying [250px] from add [50px each-line hanging] to replace [150px hanging each-line] at (1.5) should be [200px hanging each-line] assert_true: 'from' value should be supported expected true got false
-FAIL Compositing: property <text-indent> underlying [250px each-line] from add [50px each-line] to replace [150px hanging] at (-0.3) should be [300px each-line] assert_true: 'from' value should be supported expected true got false
-FAIL Compositing: property <text-indent> underlying [250px each-line] from add [50px each-line] to replace [150px hanging] at (0) should be [300px each-line] assert_true: 'from' value should be supported expected true got false
-FAIL Compositing: property <text-indent> underlying [250px each-line] from add [50px each-line] to replace [150px hanging] at (0.3) should be [300px each-line] assert_true: 'from' value should be supported expected true got false
-FAIL Compositing: property <text-indent> underlying [250px each-line] from add [50px each-line] to replace [150px hanging] at (0.6) should be [150px hanging] assert_true: 'from' value should be supported expected true got false
-FAIL Compositing: property <text-indent> underlying [250px each-line] from add [50px each-line] to replace [150px hanging] at (1) should be [150px hanging] assert_true: 'from' value should be supported expected true got false
-FAIL Compositing: property <text-indent> underlying [250px each-line] from add [50px each-line] to replace [150px hanging] at (1.5) should be [150px hanging] assert_true: 'from' value should be supported expected true got false
+FAIL Compositing: property <text-indent> underlying [250px] from add [50px each-line hanging] to replace [150px hanging each-line] at (-0.3) should be [20px hanging each-line] assert_equals: expected "20px hanging each - line " but got "20px "
+FAIL Compositing: property <text-indent> underlying [250px] from add [50px each-line hanging] to replace [150px hanging each-line] at (0) should be [50px hanging each-line] assert_equals: expected "50px hanging each - line " but got "50px "
+FAIL Compositing: property <text-indent> underlying [250px] from add [50px each-line hanging] to replace [150px hanging each-line] at (0.3) should be [80px hanging each-line] assert_equals: expected "80px hanging each - line " but got "80px "
+FAIL Compositing: property <text-indent> underlying [250px] from add [50px each-line hanging] to replace [150px hanging each-line] at (0.6) should be [110px hanging each-line] assert_equals: expected "110px hanging each - line " but got "110px "
+FAIL Compositing: property <text-indent> underlying [250px] from add [50px each-line hanging] to replace [150px hanging each-line] at (1) should be [150px hanging each-line] assert_equals: expected "150px hanging each - line " but got "150px "
+FAIL Compositing: property <text-indent> underlying [250px] from add [50px each-line hanging] to replace [150px hanging each-line] at (1.5) should be [200px hanging each-line] assert_equals: expected "200px hanging each - line " but got "200px "
+FAIL Compositing: property <text-indent> underlying [250px each-line] from add [50px each-line] to replace [150px hanging] at (-0.3) should be [300px each-line] assert_equals: expected "300px each - line " but got "20px each - line "
+FAIL Compositing: property <text-indent> underlying [250px each-line] from add [50px each-line] to replace [150px hanging] at (0) should be [300px each-line] assert_equals: expected "300px each - line " but got "50px each - line "
+FAIL Compositing: property <text-indent> underlying [250px each-line] from add [50px each-line] to replace [150px hanging] at (0.3) should be [300px each-line] assert_equals: expected "300px each - line " but got "80px each - line "
+FAIL Compositing: property <text-indent> underlying [250px each-line] from add [50px each-line] to replace [150px hanging] at (0.6) should be [150px hanging] assert_equals: expected "150px hanging " but got "110px each - line "
+FAIL Compositing: property <text-indent> underlying [250px each-line] from add [50px each-line] to replace [150px hanging] at (1) should be [150px hanging] assert_equals: expected "150px hanging " but got "150px each - line "
+FAIL Compositing: property <text-indent> underlying [250px each-line] from add [50px each-line] to replace [150px hanging] at (1.5) should be [150px hanging] assert_equals: expected "150px hanging " but got "200px each - line "
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-text/animations/text-indent-interpolation-expected.txt (275198 => 275199)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-text/animations/text-indent-interpolation-expected.txt	2021-03-30 07:23:54 UTC (rev 275198)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-text/animations/text-indent-interpolation-expected.txt	2021-03-30 07:40:46 UTC (rev 275199)
@@ -131,96 +131,96 @@
 PASS CSS Transitions with transition: all: property <text-indent> from [0px hanging] to [50px hanging] at (0.6) should be [30px hanging]
 PASS CSS Transitions with transition: all: property <text-indent> from [0px hanging] to [50px hanging] at (1) should be [50px hanging]
 PASS CSS Transitions with transition: all: property <text-indent> from [0px hanging] to [50px hanging] at (1.5) should be [75px hanging]
-PASS CSS Animations: property <text-indent> from [0px hanging] to [50px hanging] at (-0.3) should be [-15px hanging]
-PASS CSS Animations: property <text-indent> from [0px hanging] to [50px hanging] at (0) should be [0 hanging]
-PASS CSS Animations: property <text-indent> from [0px hanging] to [50px hanging] at (0.3) should be [15px hanging]
-PASS CSS Animations: property <text-indent> from [0px hanging] to [50px hanging] at (0.6) should be [30px hanging]
-PASS CSS Animations: property <text-indent> from [0px hanging] to [50px hanging] at (1) should be [50px hanging]
-PASS CSS Animations: property <text-indent> from [0px hanging] to [50px hanging] at (1.5) should be [75px hanging]
-PASS Web Animations: property <text-indent> from [0px hanging] to [50px hanging] at (-0.3) should be [-15px hanging]
-PASS Web Animations: property <text-indent> from [0px hanging] to [50px hanging] at (0) should be [0 hanging]
-PASS Web Animations: property <text-indent> from [0px hanging] to [50px hanging] at (0.3) should be [15px hanging]
-PASS Web Animations: property <text-indent> from [0px hanging] to [50px hanging] at (0.6) should be [30px hanging]
-PASS Web Animations: property <text-indent> from [0px hanging] to [50px hanging] at (1) should be [50px hanging]
-PASS Web Animations: property <text-indent> from [0px hanging] to [50px hanging] at (1.5) should be [75px hanging]
-FAIL CSS Transitions: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (-0.3) should be [-15px hanging each-line] assert_true: 'from' value should be supported expected true got false
-FAIL CSS Transitions: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (0) should be [0 hanging each-line] assert_true: 'from' value should be supported expected true got false
-FAIL CSS Transitions: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (0.3) should be [15px hanging each-line] assert_true: 'from' value should be supported expected true got false
-FAIL CSS Transitions: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (0.6) should be [30px hanging each-line] assert_true: 'from' value should be supported expected true got false
-FAIL CSS Transitions: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (1) should be [50px hanging each-line] assert_true: 'from' value should be supported expected true got false
-FAIL CSS Transitions: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (1.5) should be [75px hanging each-line] assert_true: 'from' value should be supported expected true got false
-FAIL CSS Transitions with transition: all: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (-0.3) should be [-15px hanging each-line] assert_true: 'from' value should be supported expected true got false
-FAIL CSS Transitions with transition: all: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (0) should be [0 hanging each-line] assert_true: 'from' value should be supported expected true got false
-FAIL CSS Transitions with transition: all: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (0.3) should be [15px hanging each-line] assert_true: 'from' value should be supported expected true got false
-FAIL CSS Transitions with transition: all: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (0.6) should be [30px hanging each-line] assert_true: 'from' value should be supported expected true got false
-FAIL CSS Transitions with transition: all: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (1) should be [50px hanging each-line] assert_true: 'from' value should be supported expected true got false
-FAIL CSS Transitions with transition: all: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (1.5) should be [75px hanging each-line] assert_true: 'from' value should be supported expected true got false
-FAIL CSS Animations: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (-0.3) should be [-15px hanging each-line] assert_true: 'from' value should be supported expected true got false
-FAIL CSS Animations: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (0) should be [0 hanging each-line] assert_true: 'from' value should be supported expected true got false
-FAIL CSS Animations: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (0.3) should be [15px hanging each-line] assert_true: 'from' value should be supported expected true got false
-FAIL CSS Animations: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (0.6) should be [30px hanging each-line] assert_true: 'from' value should be supported expected true got false
-FAIL CSS Animations: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (1) should be [50px hanging each-line] assert_true: 'from' value should be supported expected true got false
-FAIL CSS Animations: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (1.5) should be [75px hanging each-line] assert_true: 'from' value should be supported expected true got false
-FAIL Web Animations: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (-0.3) should be [-15px hanging each-line] assert_true: 'from' value should be supported expected true got false
-FAIL Web Animations: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (0) should be [0 hanging each-line] assert_true: 'from' value should be supported expected true got false
-FAIL Web Animations: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (0.3) should be [15px hanging each-line] assert_true: 'from' value should be supported expected true got false
-FAIL Web Animations: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (0.6) should be [30px hanging each-line] assert_true: 'from' value should be supported expected true got false
-FAIL Web Animations: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (1) should be [50px hanging each-line] assert_true: 'from' value should be supported expected true got false
-FAIL Web Animations: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (1.5) should be [75px hanging each-line] assert_true: 'from' value should be supported expected true got false
-FAIL CSS Transitions: property <text-indent> from [0px each-line] to [50px hanging] at (-0.3) should be [50px hanging] assert_true: 'from' value should be supported expected true got false
-FAIL CSS Transitions: property <text-indent> from [0px each-line] to [50px hanging] at (0) should be [50px hanging] assert_true: 'from' value should be supported expected true got false
-FAIL CSS Transitions: property <text-indent> from [0px each-line] to [50px hanging] at (0.3) should be [50px hanging] assert_true: 'from' value should be supported expected true got false
-FAIL CSS Transitions: property <text-indent> from [0px each-line] to [50px hanging] at (0.5) should be [50px hanging] assert_true: 'from' value should be supported expected true got false
-FAIL CSS Transitions: property <text-indent> from [0px each-line] to [50px hanging] at (0.6) should be [50px hanging] assert_true: 'from' value should be supported expected true got false
-FAIL CSS Transitions: property <text-indent> from [0px each-line] to [50px hanging] at (1) should be [50px hanging] assert_true: 'from' value should be supported expected true got false
-FAIL CSS Transitions: property <text-indent> from [0px each-line] to [50px hanging] at (1.5) should be [50px hanging] assert_true: 'from' value should be supported expected true got false
-FAIL CSS Transitions with transition: all: property <text-indent> from [0px each-line] to [50px hanging] at (-0.3) should be [50px hanging] assert_true: 'from' value should be supported expected true got false
-FAIL CSS Transitions with transition: all: property <text-indent> from [0px each-line] to [50px hanging] at (0) should be [50px hanging] assert_true: 'from' value should be supported expected true got false
-FAIL CSS Transitions with transition: all: property <text-indent> from [0px each-line] to [50px hanging] at (0.3) should be [50px hanging] assert_true: 'from' value should be supported expected true got false
-FAIL CSS Transitions with transition: all: property <text-indent> from [0px each-line] to [50px hanging] at (0.5) should be [50px hanging] assert_true: 'from' value should be supported expected true got false
-FAIL CSS Transitions with transition: all: property <text-indent> from [0px each-line] to [50px hanging] at (0.6) should be [50px hanging] assert_true: 'from' value should be supported expected true got false
-FAIL CSS Transitions with transition: all: property <text-indent> from [0px each-line] to [50px hanging] at (1) should be [50px hanging] assert_true: 'from' value should be supported expected true got false
-FAIL CSS Transitions with transition: all: property <text-indent> from [0px each-line] to [50px hanging] at (1.5) should be [50px hanging] assert_true: 'from' value should be supported expected true got false
-FAIL CSS Animations: property <text-indent> from [0px each-line] to [50px hanging] at (-0.3) should be [0px each-line] assert_true: 'from' value should be supported expected true got false
-FAIL CSS Animations: property <text-indent> from [0px each-line] to [50px hanging] at (0) should be [0px each-line] assert_true: 'from' value should be supported expected true got false
-FAIL CSS Animations: property <text-indent> from [0px each-line] to [50px hanging] at (0.3) should be [0px each-line] assert_true: 'from' value should be supported expected true got false
-FAIL CSS Animations: property <text-indent> from [0px each-line] to [50px hanging] at (0.5) should be [50px hanging] assert_true: 'from' value should be supported expected true got false
-FAIL CSS Animations: property <text-indent> from [0px each-line] to [50px hanging] at (0.6) should be [50px hanging] assert_true: 'from' value should be supported expected true got false
-FAIL CSS Animations: property <text-indent> from [0px each-line] to [50px hanging] at (1) should be [50px hanging] assert_true: 'from' value should be supported expected true got false
-FAIL CSS Animations: property <text-indent> from [0px each-line] to [50px hanging] at (1.5) should be [50px hanging] assert_true: 'from' value should be supported expected true got false
-FAIL Web Animations: property <text-indent> from [0px each-line] to [50px hanging] at (-0.3) should be [0px each-line] assert_true: 'from' value should be supported expected true got false
-FAIL Web Animations: property <text-indent> from [0px each-line] to [50px hanging] at (0) should be [0px each-line] assert_true: 'from' value should be supported expected true got false
-FAIL Web Animations: property <text-indent> from [0px each-line] to [50px hanging] at (0.3) should be [0px each-line] assert_true: 'from' value should be supported expected true got false
-FAIL Web Animations: property <text-indent> from [0px each-line] to [50px hanging] at (0.5) should be [50px hanging] assert_true: 'from' value should be supported expected true got false
-FAIL Web Animations: property <text-indent> from [0px each-line] to [50px hanging] at (0.6) should be [50px hanging] assert_true: 'from' value should be supported expected true got false
-FAIL Web Animations: property <text-indent> from [0px each-line] to [50px hanging] at (1) should be [50px hanging] assert_true: 'from' value should be supported expected true got false
-FAIL Web Animations: property <text-indent> from [0px each-line] to [50px hanging] at (1.5) should be [50px hanging] assert_true: 'from' value should be supported expected true got false
-FAIL CSS Transitions: property <text-indent> from [0px] to [50px each-line hanging] at (-0.3) should be [50px each-line hanging] assert_true: 'to' value should be supported expected true got false
-FAIL CSS Transitions: property <text-indent> from [0px] to [50px each-line hanging] at (0) should be [50px each-line hanging] assert_true: 'to' value should be supported expected true got false
-FAIL CSS Transitions: property <text-indent> from [0px] to [50px each-line hanging] at (0.3) should be [50px each-line hanging] assert_true: 'to' value should be supported expected true got false
-FAIL CSS Transitions: property <text-indent> from [0px] to [50px each-line hanging] at (0.5) should be [50px each-line hanging] assert_true: 'to' value should be supported expected true got false
-FAIL CSS Transitions: property <text-indent> from [0px] to [50px each-line hanging] at (0.6) should be [50px each-line hanging] assert_true: 'to' value should be supported expected true got false
-FAIL CSS Transitions: property <text-indent> from [0px] to [50px each-line hanging] at (1) should be [50px each-line hanging] assert_true: 'to' value should be supported expected true got false
-FAIL CSS Transitions: property <text-indent> from [0px] to [50px each-line hanging] at (1.5) should be [50px each-line hanging] assert_true: 'to' value should be supported expected true got false
-FAIL CSS Transitions with transition: all: property <text-indent> from [0px] to [50px each-line hanging] at (-0.3) should be [50px each-line hanging] assert_true: 'to' value should be supported expected true got false
-FAIL CSS Transitions with transition: all: property <text-indent> from [0px] to [50px each-line hanging] at (0) should be [50px each-line hanging] assert_true: 'to' value should be supported expected true got false
-FAIL CSS Transitions with transition: all: property <text-indent> from [0px] to [50px each-line hanging] at (0.3) should be [50px each-line hanging] assert_true: 'to' value should be supported expected true got false
-FAIL CSS Transitions with transition: all: property <text-indent> from [0px] to [50px each-line hanging] at (0.5) should be [50px each-line hanging] assert_true: 'to' value should be supported expected true got false
-FAIL CSS Transitions with transition: all: property <text-indent> from [0px] to [50px each-line hanging] at (0.6) should be [50px each-line hanging] assert_true: 'to' value should be supported expected true got false
-FAIL CSS Transitions with transition: all: property <text-indent> from [0px] to [50px each-line hanging] at (1) should be [50px each-line hanging] assert_true: 'to' value should be supported expected true got false
-FAIL CSS Transitions with transition: all: property <text-indent> from [0px] to [50px each-line hanging] at (1.5) should be [50px each-line hanging] assert_true: 'to' value should be supported expected true got false
-FAIL CSS Animations: property <text-indent> from [0px] to [50px each-line hanging] at (-0.3) should be [0px] assert_true: 'to' value should be supported expected true got false
-FAIL CSS Animations: property <text-indent> from [0px] to [50px each-line hanging] at (0) should be [0px] assert_true: 'to' value should be supported expected true got false
-FAIL CSS Animations: property <text-indent> from [0px] to [50px each-line hanging] at (0.3) should be [0px] assert_true: 'to' value should be supported expected true got false
-FAIL CSS Animations: property <text-indent> from [0px] to [50px each-line hanging] at (0.5) should be [50px each-line hanging] assert_true: 'to' value should be supported expected true got false
-FAIL CSS Animations: property <text-indent> from [0px] to [50px each-line hanging] at (0.6) should be [50px each-line hanging] assert_true: 'to' value should be supported expected true got false
-FAIL CSS Animations: property <text-indent> from [0px] to [50px each-line hanging] at (1) should be [50px each-line hanging] assert_true: 'to' value should be supported expected true got false
-FAIL CSS Animations: property <text-indent> from [0px] to [50px each-line hanging] at (1.5) should be [50px each-line hanging] assert_true: 'to' value should be supported expected true got false
-FAIL Web Animations: property <text-indent> from [0px] to [50px each-line hanging] at (-0.3) should be [0px] assert_true: 'to' value should be supported expected true got false
-FAIL Web Animations: property <text-indent> from [0px] to [50px each-line hanging] at (0) should be [0px] assert_true: 'to' value should be supported expected true got false
-FAIL Web Animations: property <text-indent> from [0px] to [50px each-line hanging] at (0.3) should be [0px] assert_true: 'to' value should be supported expected true got false
-FAIL Web Animations: property <text-indent> from [0px] to [50px each-line hanging] at (0.5) should be [50px each-line hanging] assert_true: 'to' value should be supported expected true got false
-FAIL Web Animations: property <text-indent> from [0px] to [50px each-line hanging] at (0.6) should be [50px each-line hanging] assert_true: 'to' value should be supported expected true got false
-FAIL Web Animations: property <text-indent> from [0px] to [50px each-line hanging] at (1) should be [50px each-line hanging] assert_true: 'to' value should be supported expected true got false
-FAIL Web Animations: property <text-indent> from [0px] to [50px each-line hanging] at (1.5) should be [50px each-line hanging] assert_true: 'to' value should be supported expected true got false
+FAIL CSS Animations: property <text-indent> from [0px hanging] to [50px hanging] at (-0.3) should be [-15px hanging] assert_equals: expected "- 15px hanging " but got "- 15px "
+FAIL CSS Animations: property <text-indent> from [0px hanging] to [50px hanging] at (0) should be [0 hanging] assert_equals: expected "0px hanging " but got "0px "
+FAIL CSS Animations: property <text-indent> from [0px hanging] to [50px hanging] at (0.3) should be [15px hanging] assert_equals: expected "15px hanging " but got "15px "
+FAIL CSS Animations: property <text-indent> from [0px hanging] to [50px hanging] at (0.6) should be [30px hanging] assert_equals: expected "30px hanging " but got "30px "
+FAIL CSS Animations: property <text-indent> from [0px hanging] to [50px hanging] at (1) should be [50px hanging] assert_equals: expected "50px hanging " but got "50px "
+FAIL CSS Animations: property <text-indent> from [0px hanging] to [50px hanging] at (1.5) should be [75px hanging] assert_equals: expected "75px hanging " but got "75px "
+FAIL Web Animations: property <text-indent> from [0px hanging] to [50px hanging] at (-0.3) should be [-15px hanging] assert_equals: expected "- 15px hanging " but got "- 15px "
+FAIL Web Animations: property <text-indent> from [0px hanging] to [50px hanging] at (0) should be [0 hanging] assert_equals: expected "0px hanging " but got "0px "
+FAIL Web Animations: property <text-indent> from [0px hanging] to [50px hanging] at (0.3) should be [15px hanging] assert_equals: expected "15px hanging " but got "15px "
+FAIL Web Animations: property <text-indent> from [0px hanging] to [50px hanging] at (0.6) should be [30px hanging] assert_equals: expected "30px hanging " but got "30px "
+FAIL Web Animations: property <text-indent> from [0px hanging] to [50px hanging] at (1) should be [50px hanging] assert_equals: expected "50px hanging " but got "50px "
+FAIL Web Animations: property <text-indent> from [0px hanging] to [50px hanging] at (1.5) should be [75px hanging] assert_equals: expected "75px hanging " but got "75px "
+PASS CSS Transitions: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (-0.3) should be [-15px hanging each-line]
+PASS CSS Transitions: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (0) should be [0 hanging each-line]
+PASS CSS Transitions: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (0.3) should be [15px hanging each-line]
+PASS CSS Transitions: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (0.6) should be [30px hanging each-line]
+PASS CSS Transitions: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (1) should be [50px hanging each-line]
+PASS CSS Transitions: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (1.5) should be [75px hanging each-line]
+PASS CSS Transitions with transition: all: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (-0.3) should be [-15px hanging each-line]
+PASS CSS Transitions with transition: all: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (0) should be [0 hanging each-line]
+PASS CSS Transitions with transition: all: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (0.3) should be [15px hanging each-line]
+PASS CSS Transitions with transition: all: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (0.6) should be [30px hanging each-line]
+PASS CSS Transitions with transition: all: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (1) should be [50px hanging each-line]
+PASS CSS Transitions with transition: all: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (1.5) should be [75px hanging each-line]
+FAIL CSS Animations: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (-0.3) should be [-15px hanging each-line] assert_equals: expected "- 15px hanging each - line " but got "- 15px "
+FAIL CSS Animations: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (0) should be [0 hanging each-line] assert_equals: expected "0px hanging each - line " but got "0px "
+FAIL CSS Animations: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (0.3) should be [15px hanging each-line] assert_equals: expected "15px hanging each - line " but got "15px "
+FAIL CSS Animations: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (0.6) should be [30px hanging each-line] assert_equals: expected "30px hanging each - line " but got "30px "
+FAIL CSS Animations: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (1) should be [50px hanging each-line] assert_equals: expected "50px hanging each - line " but got "50px "
+FAIL CSS Animations: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (1.5) should be [75px hanging each-line] assert_equals: expected "75px hanging each - line " but got "75px "
+FAIL Web Animations: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (-0.3) should be [-15px hanging each-line] assert_equals: expected "- 15px hanging each - line " but got "- 15px "
+FAIL Web Animations: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (0) should be [0 hanging each-line] assert_equals: expected "0px hanging each - line " but got "0px "
+FAIL Web Animations: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (0.3) should be [15px hanging each-line] assert_equals: expected "15px hanging each - line " but got "15px "
+FAIL Web Animations: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (0.6) should be [30px hanging each-line] assert_equals: expected "30px hanging each - line " but got "30px "
+FAIL Web Animations: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (1) should be [50px hanging each-line] assert_equals: expected "50px hanging each - line " but got "50px "
+FAIL Web Animations: property <text-indent> from [0px hanging each-line] to [50px each-line hanging] at (1.5) should be [75px hanging each-line] assert_equals: expected "75px hanging each - line " but got "75px "
+FAIL CSS Transitions: property <text-indent> from [0px each-line] to [50px hanging] at (-0.3) should be [50px hanging] assert_equals: expected "50px hanging " but got "- 15px hanging "
+FAIL CSS Transitions: property <text-indent> from [0px each-line] to [50px hanging] at (0) should be [50px hanging] assert_equals: expected "50px hanging " but got "0px hanging "
+FAIL CSS Transitions: property <text-indent> from [0px each-line] to [50px hanging] at (0.3) should be [50px hanging] assert_equals: expected "50px hanging " but got "15px hanging "
+FAIL CSS Transitions: property <text-indent> from [0px each-line] to [50px hanging] at (0.5) should be [50px hanging] assert_equals: expected "50px hanging " but got "25px hanging "
+FAIL CSS Transitions: property <text-indent> from [0px each-line] to [50px hanging] at (0.6) should be [50px hanging] assert_equals: expected "50px hanging " but got "30px hanging "
+PASS CSS Transitions: property <text-indent> from [0px each-line] to [50px hanging] at (1) should be [50px hanging]
+FAIL CSS Transitions: property <text-indent> from [0px each-line] to [50px hanging] at (1.5) should be [50px hanging] assert_equals: expected "50px hanging " but got "75px hanging "
+FAIL CSS Transitions with transition: all: property <text-indent> from [0px each-line] to [50px hanging] at (-0.3) should be [50px hanging] assert_equals: expected "50px hanging " but got "- 15px hanging "
+FAIL CSS Transitions with transition: all: property <text-indent> from [0px each-line] to [50px hanging] at (0) should be [50px hanging] assert_equals: expected "50px hanging " but got "0px hanging "
+FAIL CSS Transitions with transition: all: property <text-indent> from [0px each-line] to [50px hanging] at (0.3) should be [50px hanging] assert_equals: expected "50px hanging " but got "15px hanging "
+FAIL CSS Transitions with transition: all: property <text-indent> from [0px each-line] to [50px hanging] at (0.5) should be [50px hanging] assert_equals: expected "50px hanging " but got "25px hanging "
+FAIL CSS Transitions with transition: all: property <text-indent> from [0px each-line] to [50px hanging] at (0.6) should be [50px hanging] assert_equals: expected "50px hanging " but got "30px hanging "
+PASS CSS Transitions with transition: all: property <text-indent> from [0px each-line] to [50px hanging] at (1) should be [50px hanging]
+FAIL CSS Transitions with transition: all: property <text-indent> from [0px each-line] to [50px hanging] at (1.5) should be [50px hanging] assert_equals: expected "50px hanging " but got "75px hanging "
+FAIL CSS Animations: property <text-indent> from [0px each-line] to [50px hanging] at (-0.3) should be [0px each-line] assert_equals: expected "0px each - line " but got "- 15px "
+FAIL CSS Animations: property <text-indent> from [0px each-line] to [50px hanging] at (0) should be [0px each-line] assert_equals: expected "0px each - line " but got "0px "
+FAIL CSS Animations: property <text-indent> from [0px each-line] to [50px hanging] at (0.3) should be [0px each-line] assert_equals: expected "0px each - line " but got "15px "
+FAIL CSS Animations: property <text-indent> from [0px each-line] to [50px hanging] at (0.5) should be [50px hanging] assert_equals: expected "50px hanging " but got "25px "
+FAIL CSS Animations: property <text-indent> from [0px each-line] to [50px hanging] at (0.6) should be [50px hanging] assert_equals: expected "50px hanging " but got "30px "
+FAIL CSS Animations: property <text-indent> from [0px each-line] to [50px hanging] at (1) should be [50px hanging] assert_equals: expected "50px hanging " but got "50px "
+FAIL CSS Animations: property <text-indent> from [0px each-line] to [50px hanging] at (1.5) should be [50px hanging] assert_equals: expected "50px hanging " but got "75px "
+FAIL Web Animations: property <text-indent> from [0px each-line] to [50px hanging] at (-0.3) should be [0px each-line] assert_equals: expected "0px each - line " but got "- 15px "
+FAIL Web Animations: property <text-indent> from [0px each-line] to [50px hanging] at (0) should be [0px each-line] assert_equals: expected "0px each - line " but got "0px "
+FAIL Web Animations: property <text-indent> from [0px each-line] to [50px hanging] at (0.3) should be [0px each-line] assert_equals: expected "0px each - line " but got "15px "
+FAIL Web Animations: property <text-indent> from [0px each-line] to [50px hanging] at (0.5) should be [50px hanging] assert_equals: expected "50px hanging " but got "25px "
+FAIL Web Animations: property <text-indent> from [0px each-line] to [50px hanging] at (0.6) should be [50px hanging] assert_equals: expected "50px hanging " but got "30px "
+FAIL Web Animations: property <text-indent> from [0px each-line] to [50px hanging] at (1) should be [50px hanging] assert_equals: expected "50px hanging " but got "50px "
+FAIL Web Animations: property <text-indent> from [0px each-line] to [50px hanging] at (1.5) should be [50px hanging] assert_equals: expected "50px hanging " but got "75px "
+FAIL CSS Transitions: property <text-indent> from [0px] to [50px each-line hanging] at (-0.3) should be [50px each-line hanging] assert_equals: expected "50px hanging each - line " but got "- 15px hanging each - line "
+FAIL CSS Transitions: property <text-indent> from [0px] to [50px each-line hanging] at (0) should be [50px each-line hanging] assert_equals: expected "50px hanging each - line " but got "0px hanging each - line "
+FAIL CSS Transitions: property <text-indent> from [0px] to [50px each-line hanging] at (0.3) should be [50px each-line hanging] assert_equals: expected "50px hanging each - line " but got "15px hanging each - line "
+FAIL CSS Transitions: property <text-indent> from [0px] to [50px each-line hanging] at (0.5) should be [50px each-line hanging] assert_equals: expected "50px hanging each - line " but got "25px hanging each - line "
+FAIL CSS Transitions: property <text-indent> from [0px] to [50px each-line hanging] at (0.6) should be [50px each-line hanging] assert_equals: expected "50px hanging each - line " but got "30px hanging each - line "
+PASS CSS Transitions: property <text-indent> from [0px] to [50px each-line hanging] at (1) should be [50px each-line hanging]
+FAIL CSS Transitions: property <text-indent> from [0px] to [50px each-line hanging] at (1.5) should be [50px each-line hanging] assert_equals: expected "50px hanging each - line " but got "75px hanging each - line "
+FAIL CSS Transitions with transition: all: property <text-indent> from [0px] to [50px each-line hanging] at (-0.3) should be [50px each-line hanging] assert_equals: expected "50px hanging each - line " but got "- 15px hanging each - line "
+FAIL CSS Transitions with transition: all: property <text-indent> from [0px] to [50px each-line hanging] at (0) should be [50px each-line hanging] assert_equals: expected "50px hanging each - line " but got "0px hanging each - line "
+FAIL CSS Transitions with transition: all: property <text-indent> from [0px] to [50px each-line hanging] at (0.3) should be [50px each-line hanging] assert_equals: expected "50px hanging each - line " but got "15px hanging each - line "
+FAIL CSS Transitions with transition: all: property <text-indent> from [0px] to [50px each-line hanging] at (0.5) should be [50px each-line hanging] assert_equals: expected "50px hanging each - line " but got "25px hanging each - line "
+FAIL CSS Transitions with transition: all: property <text-indent> from [0px] to [50px each-line hanging] at (0.6) should be [50px each-line hanging] assert_equals: expected "50px hanging each - line " but got "30px hanging each - line "
+PASS CSS Transitions with transition: all: property <text-indent> from [0px] to [50px each-line hanging] at (1) should be [50px each-line hanging]
+FAIL CSS Transitions with transition: all: property <text-indent> from [0px] to [50px each-line hanging] at (1.5) should be [50px each-line hanging] assert_equals: expected "50px hanging each - line " but got "75px hanging each - line "
+FAIL CSS Animations: property <text-indent> from [0px] to [50px each-line hanging] at (-0.3) should be [0px] assert_equals: expected "0px " but got "- 15px "
+PASS CSS Animations: property <text-indent> from [0px] to [50px each-line hanging] at (0) should be [0px]
+FAIL CSS Animations: property <text-indent> from [0px] to [50px each-line hanging] at (0.3) should be [0px] assert_equals: expected "0px " but got "15px "
+FAIL CSS Animations: property <text-indent> from [0px] to [50px each-line hanging] at (0.5) should be [50px each-line hanging] assert_equals: expected "50px hanging each - line " but got "25px "
+FAIL CSS Animations: property <text-indent> from [0px] to [50px each-line hanging] at (0.6) should be [50px each-line hanging] assert_equals: expected "50px hanging each - line " but got "30px "
+FAIL CSS Animations: property <text-indent> from [0px] to [50px each-line hanging] at (1) should be [50px each-line hanging] assert_equals: expected "50px hanging each - line " but got "50px "
+FAIL CSS Animations: property <text-indent> from [0px] to [50px each-line hanging] at (1.5) should be [50px each-line hanging] assert_equals: expected "50px hanging each - line " but got "75px "
+FAIL Web Animations: property <text-indent> from [0px] to [50px each-line hanging] at (-0.3) should be [0px] assert_equals: expected "0px " but got "- 15px "
+PASS Web Animations: property <text-indent> from [0px] to [50px each-line hanging] at (0) should be [0px]
+FAIL Web Animations: property <text-indent> from [0px] to [50px each-line hanging] at (0.3) should be [0px] assert_equals: expected "0px " but got "15px "
+FAIL Web Animations: property <text-indent> from [0px] to [50px each-line hanging] at (0.5) should be [50px each-line hanging] assert_equals: expected "50px hanging each - line " but got "25px "
+FAIL Web Animations: property <text-indent> from [0px] to [50px each-line hanging] at (0.6) should be [50px each-line hanging] assert_equals: expected "50px hanging each - line " but got "30px "
+FAIL Web Animations: property <text-indent> from [0px] to [50px each-line hanging] at (1) should be [50px each-line hanging] assert_equals: expected "50px hanging each - line " but got "50px "
+FAIL Web Animations: property <text-indent> from [0px] to [50px each-line hanging] at (1.5) should be [50px each-line hanging] assert_equals: expected "50px hanging each - line " but got "75px "
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-text/parsing/text-indent-computed-expected.txt (275198 => 275199)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-text/parsing/text-indent-computed-expected.txt	2021-03-30 07:23:54 UTC (rev 275198)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-text/parsing/text-indent-computed-expected.txt	2021-03-30 07:40:46 UTC (rev 275199)
@@ -5,8 +5,8 @@
 PASS Property text-indent value '-30px'
 PASS Property text-indent value '-40%'
 PASS Property text-indent value 'calc(10px - 0.5em)'
-FAIL Property text-indent value '10px hanging' assert_equals: expected "10px hanging" but got "10px"
-FAIL Property text-indent value '20% each-line' assert_true: '20% each-line' is a supported value for text-indent. expected true got false
-FAIL Property text-indent value 'calc(50% + 60px) hanging each-line' assert_true: 'calc(50% + 60px) hanging each-line' is a supported value for text-indent. expected true got false
-FAIL Property text-indent value 'each-line hanging calc(10px + 0.5em)' assert_true: 'each-line hanging calc(10px + 0.5em)' is a supported value for text-indent. expected true got false
+PASS Property text-indent value '10px hanging'
+PASS Property text-indent value '20% each-line'
+PASS Property text-indent value 'calc(50% + 60px) hanging each-line'
+PASS Property text-indent value 'each-line hanging calc(10px + 0.5em)'
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-text/parsing/text-indent-valid-expected.txt (275198 => 275199)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-text/parsing/text-indent-valid-expected.txt	2021-03-30 07:23:54 UTC (rev 275198)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-text/parsing/text-indent-valid-expected.txt	2021-03-30 07:40:46 UTC (rev 275199)
@@ -6,11 +6,11 @@
 PASS e.style['text-indent'] = "-30px" should set the property value
 PASS e.style['text-indent'] = "-40%" should set the property value
 PASS e.style['text-indent'] = "10px hanging" should set the property value
-FAIL e.style['text-indent'] = "20% each-line" should set the property value assert_not_equals: property should be set got disallowed value ""
-FAIL e.style['text-indent'] = "calc(2em + 3ex) hanging each-line" should set the property value assert_not_equals: property should be set got disallowed value ""
-FAIL e.style['text-indent'] = "hanging calc(50% + 60px)" should set the property value assert_equals: serialization should be canonical expected "calc(50% + 60px) hanging" but got "hanging calc(50% + 60px)"
-FAIL e.style['text-indent'] = "each-line 10px" should set the property value assert_not_equals: property should be set got disallowed value ""
-FAIL e.style['text-indent'] = "hanging 20% each-line" should set the property value assert_not_equals: property should be set got disallowed value ""
-FAIL e.style['text-indent'] = "each-line hanging calc(2em + 3ex)" should set the property value assert_not_equals: property should be set got disallowed value ""
-FAIL e.style['text-indent'] = "calc(50% + 60px) each-line hanging" should set the property value assert_not_equals: property should be set got disallowed value ""
+PASS e.style['text-indent'] = "20% each-line" should set the property value
+PASS e.style['text-indent'] = "calc(2em + 3ex) hanging each-line" should set the property value
+PASS e.style['text-indent'] = "hanging calc(50% + 60px)" should set the property value
+PASS e.style['text-indent'] = "each-line 10px" should set the property value
+PASS e.style['text-indent'] = "hanging 20% each-line" should set the property value
+PASS e.style['text-indent'] = "each-line hanging calc(2em + 3ex)" should set the property value
+PASS e.style['text-indent'] = "calc(50% + 60px) each-line hanging" should set the property value
 

Modified: trunk/Source/WebCore/ChangeLog (275198 => 275199)


--- trunk/Source/WebCore/ChangeLog	2021-03-30 07:23:54 UTC (rev 275198)
+++ trunk/Source/WebCore/ChangeLog	2021-03-30 07:40:46 UTC (rev 275199)
@@ -1,3 +1,46 @@
+2021-03-29  Antoine Quint  <[email protected]>
+
+        Enable "hanging" and "each-line" keywords for the text-indent CSS property
+        https://bugs.webkit.org/show_bug.cgi?id=223851
+
+        Reviewed by Antti Koivisto.
+
+        We've had support for "hanging" and "each-line" behind the ENABLE_CSS3_TEXT flag. Probably by mistake,
+        "hanging" itself was parsed and Web-exposed by default. Presumably that was the case because that CSS
+        keyword existed in the context of SVG.
+
+        But LineWidth.cpp already knew how to handle these keywords, so there seems to be no reason to keep
+        these behind a flag.
+
+        So we remove all the ENABLE_CSS3_TEXT guards related to they keywords and address some spec compliance
+        issue, namely:
+        
+            1. add the text-indent length or percentage, the "hanging" and "each-line" keywords in that order
+               in consumeTextIndent(),
+            2. use that same order for the computed style.
+
+        * css/CSSComputedStyleDeclaration.cpp:
+        (WebCore::ComputedStyleExtractor::valueForPropertyInStyle):
+        * css/CSSValueKeywords.in:
+        * css/parser/CSSPropertyParser.cpp:
+        (WebCore::consumeTextIndent):
+        * layout/inlineformatting/InlineLineBuilder.cpp:
+        (WebCore::Layout::LineBuilder::initialConstraintsForLine const):
+        * rendering/line/LineWidth.cpp:
+        (WebCore::requiresIndent):
+        * rendering/style/RenderStyle.cpp:
+        (WebCore::rareInheritedDataChangeRequiresLayout):
+        * rendering/style/RenderStyle.h:
+        * rendering/style/RenderStyleConstants.h:
+        * rendering/style/StyleRareInheritedData.cpp:
+        (WebCore::StyleRareInheritedData::StyleRareInheritedData):
+        (WebCore::StyleRareInheritedData::operator== const):
+        * rendering/style/StyleRareInheritedData.h:
+        * style/StyleBuilderCustom.h:
+        (WebCore::Style::BuilderCustom::applyInheritTextIndent):
+        (WebCore::Style::BuilderCustom::applyInitialTextIndent):
+        (WebCore::Style::BuilderCustom::applyValueTextIndent):
+
 2021-03-29  David Kilzer  <[email protected]>
 
         Remove unused struct WebCore::AlternativeTextController::AlternativeTextInfo

Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (275198 => 275199)


--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp	2021-03-30 07:23:54 UTC (rev 275198)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp	2021-03-30 07:40:46 UTC (rev 275199)
@@ -3234,22 +3234,16 @@
             }
             RELEASE_ASSERT_NOT_REACHED();
         case CSSPropertyTextIndent: {
-            // If CSS3_TEXT is disabled or text-indent has only one value(<length> | <percentage>),
-            // getPropertyCSSValue() returns CSSValue.
             auto textIndent = zoomAdjustedPixelValueForLength(style.textIndent(), style);
-#if ENABLE(CSS3_TEXT)
-            // If CSS3_TEXT is enabled and text-indent has -webkit-each-line or -webkit-hanging,
-            // getPropertyCSSValue() returns CSSValueList.
             if (style.textIndentLine() == TextIndentLine::EachLine || style.textIndentType() == TextIndentType::Hanging) {
                 auto list = CSSValueList::createSpaceSeparated();
                 list->append(WTFMove(textIndent));
+                if (style.textIndentType() == TextIndentType::Hanging)
+                    list->append(cssValuePool.createIdentifierValue(CSSValueHanging));
                 if (style.textIndentLine() == TextIndentLine::EachLine)
                     list->append(cssValuePool.createIdentifierValue(CSSValueEachLine));
-                if (style.textIndentType() == TextIndentType::Hanging)
-                    list->append(cssValuePool.createIdentifierValue(CSSValueHanging));
                 return list;
             }
-#endif
             return textIndent;
         }
         case CSSPropertyTextShadow:

Modified: trunk/Source/WebCore/css/CSSValueKeywords.in (275198 => 275199)


--- trunk/Source/WebCore/css/CSSValueKeywords.in	2021-03-30 07:23:54 UTC (rev 275198)
+++ trunk/Source/WebCore/css/CSSValueKeywords.in	2021-03-30 07:40:46 UTC (rev 275199)
@@ -1356,11 +1356,9 @@
 auto-flow
 dense
 
-#if defined(ENABLE_CSS3_TEXT) && ENABLE_CSS3_TEXT
 // text-indent
 each-line
 // hanging
-#endif
 
 // -webkit-column-fill
 balance

Modified: trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp (275198 => 275199)


--- trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp	2021-03-30 07:23:54 UTC (rev 275198)
+++ trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp	2021-03-30 07:40:46 UTC (rev 275199)
@@ -1170,36 +1170,26 @@
 static RefPtr<CSSValue> consumeTextIndent(CSSParserTokenRange& range, CSSParserMode cssParserMode)
 {
     // [ <length> | <percentage> ] && hanging? && each-line?
-    // Keywords only allowed when css3Text is enabled.
-    RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
+    RefPtr<CSSValue> lengthOrPercentage;
+    RefPtr<CSSPrimitiveValue> eachLine;
+    RefPtr<CSSPrimitiveValue> hanging;
 
-    bool hasLengthOrPercentage = false;
-#if ENABLE(CSS3_TEXT)
-    bool hasEachLine = false;
-#endif
-    bool hasHanging = false;
-
     do {
-        if (!hasLengthOrPercentage) {
+        if (!lengthOrPercentage) {
             if (RefPtr<CSSValue> textIndent = consumeLengthOrPercent(range, cssParserMode, ValueRangeAll, UnitlessQuirk::Allow)) {
-                list->append(*textIndent);
-                hasLengthOrPercentage = true;
+                lengthOrPercentage = textIndent;
                 continue;
             }
         }
 
         CSSValueID id = range.peek().id();
-#if ENABLE(CSS3_TEXT)
-        if (!hasEachLine && id == CSSValueEachLine) {
-            list->append(consumeIdent(range).releaseNonNull());
-            hasEachLine = true;
+        if (!eachLine && id == CSSValueEachLine) {
+            eachLine = consumeIdent(range);
             continue;
         }
-#endif
 
-        if (!hasHanging && id == CSSValueHanging) {
-            list->append(consumeIdent(range).releaseNonNull());
-            hasHanging = true;
+        if (!hanging && id == CSSValueHanging) {
+            hanging = consumeIdent(range);
             continue;
         }
 
@@ -1206,9 +1196,16 @@
         return nullptr;
     } while (!range.atEnd());
 
-    if (!hasLengthOrPercentage)
+    if (!lengthOrPercentage)
         return nullptr;
 
+    RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
+    list->append(*lengthOrPercentage);
+    if (hanging)
+        list->append(hanging.releaseNonNull());
+    if (eachLine)
+        list->append(eachLine.releaseNonNull());
+
     return list;
 }
 

Modified: trunk/Source/WebCore/layout/inlineformatting/InlineLineBuilder.cpp (275198 => 275199)


--- trunk/Source/WebCore/layout/inlineformatting/InlineLineBuilder.cpp	2021-03-30 07:23:54 UTC (rev 275198)
+++ trunk/Source/WebCore/layout/inlineformatting/InlineLineBuilder.cpp	2021-03-30 07:40:46 UTC (rev 275199)
@@ -438,10 +438,7 @@
         }
         if (!isFormattingContextRootCandidateToTextIndent)
             return { };
-        auto invertLineRange = false;
-#if ENABLE(CSS3_TEXT)
-        invertLineRange = root.style().textIndentType() == TextIndentType::Hanging;
-#endif
+        auto invertLineRange = root.style().textIndentType() == TextIndentType::Hanging;
         // text-indent: hanging inverts which lines are affected.
         // inverted line range -> all the lines except the first one.
         // !inverted line range -> first line gets the indent.

Modified: trunk/Source/WebCore/rendering/line/LineWidth.cpp (275198 => 275199)


--- trunk/Source/WebCore/rendering/line/LineWidth.cpp	2021-03-30 07:23:54 UTC (rev 275198)
+++ trunk/Source/WebCore/rendering/line/LineWidth.cpp	2021-03-30 07:40:46 UTC (rev 275199)
@@ -239,16 +239,11 @@
     IndentTextOrNot shouldIndentText = DoNotIndentText;
     if (isFirstLine)
         shouldIndentText = IndentText;
-#if ENABLE(CSS3_TEXT)
     else if (isAfterHardLineBreak && style.textIndentLine() == TextIndentLine::EachLine)
         shouldIndentText = IndentText;
 
     if (style.textIndentType() == TextIndentType::Hanging)
         shouldIndentText = shouldIndentText == IndentText ? DoNotIndentText : IndentText;
-#else
-    UNUSED_PARAM(isAfterHardLineBreak);
-    UNUSED_PARAM(style);
-#endif
     return shouldIndentText;
 }
 

Modified: trunk/Source/WebCore/rendering/style/RenderStyle.cpp (275198 => 275199)


--- trunk/Source/WebCore/rendering/style/RenderStyle.cpp	2021-03-30 07:23:54 UTC (rev 275198)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.cpp	2021-03-30 07:40:46 UTC (rev 275199)
@@ -749,8 +749,8 @@
 #if ENABLE(CSS3_TEXT)
         || first.textAlignLast != second.textAlignLast
         || first.textJustify != second.textJustify
+#endif
         || first.textIndentLine != second.textIndentLine
-#endif
         || first.effectiveZoom != second.effectiveZoom
         || first.textZoom != second.textZoom
 #if ENABLE(TEXT_AUTOSIZING)

Modified: trunk/Source/WebCore/rendering/style/RenderStyle.h (275198 => 275199)


--- trunk/Source/WebCore/rendering/style/RenderStyle.h	2021-03-30 07:23:54 UTC (rev 275198)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.h	2021-03-30 07:40:46 UTC (rev 275199)
@@ -374,9 +374,9 @@
     TextUnderlineOffset textUnderlineOffset() const { return m_rareInheritedData->textUnderlineOffset; }
     TextDecorationThickness textDecorationThickness() const { return m_rareInheritedData->textDecorationThickness; }
 
-#if ENABLE(CSS3_TEXT)
     TextIndentLine textIndentLine() const { return static_cast<TextIndentLine>(m_rareInheritedData->textIndentLine); }
     TextIndentType textIndentType() const { return static_cast<TextIndentType>(m_rareInheritedData->textIndentType); }
+#if ENABLE(CSS3_TEXT)
     TextAlignLast textAlignLast() const { return static_cast<TextAlignLast>(m_rareInheritedData->textAlignLast); }
     TextJustify textJustify() const { return static_cast<TextJustify>(m_rareInheritedData->textJustify); }
 #endif
@@ -979,9 +979,9 @@
     bool setEffectiveZoom(float);
     void setTextZoom(TextZoom v) { SET_VAR(m_rareInheritedData, textZoom, static_cast<unsigned>(v)); }
 
-#if ENABLE(CSS3_TEXT)
     void setTextIndentLine(TextIndentLine v) { SET_VAR(m_rareInheritedData, textIndentLine, static_cast<unsigned>(v)); }
     void setTextIndentType(TextIndentType v) { SET_VAR(m_rareInheritedData, textIndentType, static_cast<unsigned>(v)); }
+#if ENABLE(CSS3_TEXT)
     void setTextAlignLast(TextAlignLast v) { SET_VAR(m_rareInheritedData, textAlignLast, static_cast<unsigned>(v)); }
     void setTextJustify(TextJustify v) { SET_VAR(m_rareInheritedData, textJustify, static_cast<unsigned>(v)); }
 #endif
@@ -1688,9 +1688,9 @@
     static StyleColorScheme initialColorScheme() { return { }; }
 #endif
 
-#if ENABLE(CSS3_TEXT)
     static TextIndentLine initialTextIndentLine() { return TextIndentLine::FirstLine; }
     static TextIndentType initialTextIndentType() { return TextIndentType::Normal; }
+#if ENABLE(CSS3_TEXT)
     static TextAlignLast initialTextAlignLast() { return TextAlignLast::Auto; }
     static TextJustify initialTextJustify() { return TextJustify::Auto; }
 #endif

Modified: trunk/Source/WebCore/rendering/style/RenderStyleConstants.h (275198 => 275199)


--- trunk/Source/WebCore/rendering/style/RenderStyleConstants.h	2021-03-30 07:23:54 UTC (rev 275198)
+++ trunk/Source/WebCore/rendering/style/RenderStyleConstants.h	2021-03-30 07:40:46 UTC (rev 275199)
@@ -1079,8 +1079,6 @@
 // Reasonable maximum to prevent insane font sizes from causing crashes on some platforms (such as Windows).
 static const float maximumAllowedFontSize = 1000000.0f;
 
-#if ENABLE(CSS3_TEXT)
-
 enum class TextIndentLine : uint8_t {
     FirstLine,
     EachLine
@@ -1091,8 +1089,6 @@
     Hanging
 };
 
-#endif
-
 enum class Isolation : uint8_t {
     Auto,
     Isolate

Modified: trunk/Source/WebCore/rendering/style/StyleRareInheritedData.cpp (275198 => 275199)


--- trunk/Source/WebCore/rendering/style/StyleRareInheritedData.cpp	2021-03-30 07:23:54 UTC (rev 275198)
+++ trunk/Source/WebCore/rendering/style/StyleRareInheritedData.cpp	2021-03-30 07:40:46 UTC (rev 275199)
@@ -101,10 +101,8 @@
     , textEmphasisMark(static_cast<unsigned>(TextEmphasisMark::None))
     , textEmphasisPosition(static_cast<unsigned>(RenderStyle::initialTextEmphasisPosition().toRaw()))
     , textOrientation(static_cast<unsigned>(TextOrientation::Mixed))
-#if ENABLE(CSS3_TEXT)
     , textIndentLine(static_cast<unsigned>(RenderStyle::initialTextIndentLine()))
     , textIndentType(static_cast<unsigned>(RenderStyle::initialTextIndentType()))
-#endif
     , lineBoxContain(static_cast<unsigned>(RenderStyle::initialLineBoxContain().toRaw()))
     , imageOrientation(RenderStyle::initialImageOrientation())
     , imageRendering(static_cast<unsigned>(RenderStyle::initialImageRendering()))
@@ -199,10 +197,8 @@
     , textEmphasisMark(o.textEmphasisMark)
     , textEmphasisPosition(o.textEmphasisPosition)
     , textOrientation(o.textOrientation)
-#if ENABLE(CSS3_TEXT)
     , textIndentLine(o.textIndentLine)
     , textIndentType(o.textIndentType)
-#endif
     , lineBoxContain(o.lineBoxContain)
     , imageOrientation(o.imageOrientation)
     , imageRendering(o.imageRendering)
@@ -320,10 +316,8 @@
         && textEmphasisMark == o.textEmphasisMark
         && textEmphasisPosition == o.textEmphasisPosition
         && textOrientation == o.textOrientation
-#if ENABLE(CSS3_TEXT)
         && textIndentLine == o.textIndentLine
         && textIndentType == o.textIndentType
-#endif
         && lineBoxContain == o.lineBoxContain
 #if PLATFORM(IOS_FAMILY)
         && touchCalloutEnabled == o.touchCalloutEnabled

Modified: trunk/Source/WebCore/rendering/style/StyleRareInheritedData.h (275198 => 275199)


--- trunk/Source/WebCore/rendering/style/StyleRareInheritedData.h	2021-03-30 07:23:54 UTC (rev 275198)
+++ trunk/Source/WebCore/rendering/style/StyleRareInheritedData.h	2021-03-30 07:40:46 UTC (rev 275199)
@@ -120,10 +120,8 @@
     unsigned textEmphasisMark : 3; // TextEmphasisMark
     unsigned textEmphasisPosition : 4; // TextEmphasisPosition
     unsigned textOrientation : 2; // TextOrientation
-#if ENABLE(CSS3_TEXT)
     unsigned textIndentLine : 1; // TextIndentLine
     unsigned textIndentType : 1; // TextIndentType
-#endif
     unsigned lineBoxContain: 7; // OptionSet<LineBoxContain>
     // CSS Image Values Level 3
     unsigned imageOrientation : 1; // ImageOrientation

Modified: trunk/Source/WebCore/style/StyleBuilderCustom.h (275198 => 275199)


--- trunk/Source/WebCore/style/StyleBuilderCustom.h	2021-03-30 07:23:54 UTC (rev 275198)
+++ trunk/Source/WebCore/style/StyleBuilderCustom.h	2021-03-30 07:40:46 UTC (rev 275199)
@@ -466,38 +466,30 @@
 inline void BuilderCustom::applyInheritTextIndent(BuilderState& builderState)
 {
     builderState.style().setTextIndent(Length { builderState.parentStyle().textIndent() });
-#if ENABLE(CSS3_TEXT)
     builderState.style().setTextIndentLine(builderState.parentStyle().textIndentLine());
     builderState.style().setTextIndentType(builderState.parentStyle().textIndentType());
-#endif
 }
 
 inline void BuilderCustom::applyInitialTextIndent(BuilderState& builderState)
 {
     builderState.style().setTextIndent(RenderStyle::initialTextIndent());
-#if ENABLE(CSS3_TEXT)
     builderState.style().setTextIndentLine(RenderStyle::initialTextIndentLine());
     builderState.style().setTextIndentType(RenderStyle::initialTextIndentType());
-#endif
 }
 
 inline void BuilderCustom::applyValueTextIndent(BuilderState& builderState, CSSValue& value)
 {
     Length lengthOrPercentageValue;
-#if ENABLE(CSS3_TEXT)
     TextIndentLine textIndentLineValue = RenderStyle::initialTextIndentLine();
     TextIndentType textIndentTypeValue = RenderStyle::initialTextIndentType();
-#endif
     for (auto& item : downcast<CSSValueList>(value)) {
         auto& primitiveValue = downcast<CSSPrimitiveValue>(item.get());
         if (!primitiveValue.valueID())
             lengthOrPercentageValue = primitiveValue.convertToLength<FixedIntegerConversion | PercentConversion | CalculatedConversion>(builderState.cssToLengthConversionData());
-#if ENABLE(CSS3_TEXT)
         else if (primitiveValue.valueID() == CSSValueEachLine)
             textIndentLineValue = TextIndentLine::EachLine;
         else if (primitiveValue.valueID() == CSSValueHanging)
             textIndentTypeValue = TextIndentType::Hanging;
-#endif
     }
 
     if (lengthOrPercentageValue.isUndefined())
@@ -504,10 +496,8 @@
         return;
 
     builderState.style().setTextIndent(WTFMove(lengthOrPercentageValue));
-#if ENABLE(CSS3_TEXT)
     builderState.style().setTextIndentLine(textIndentLineValue);
     builderState.style().setTextIndentType(textIndentTypeValue);
-#endif
 }
 
 enum BorderImageType { BorderImage, WebkitMaskBoxImage };
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to