Changeset 282397 in webkit


Ignore:
Timestamp:
Sep 14, 2021 11:38:58 AM (10 months ago)
Author:
mmaxfield@apple.com
Message:

Implement text-decoration-skip-ink
https://bugs.webkit.org/show_bug.cgi?id=230244

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
  • web-platform-tests/css/css-pseudo/parsing/marker-supported-properties-expected.txt:
  • web-platform-tests/css/css-pseudo/parsing/marker-supported-properties-in-animation-expected.txt:
  • web-platform-tests/css/css-text-decor/inheritance-expected.txt:
  • web-platform-tests/css/css-text-decor/parsing/text-decoration-skip-ink-computed-expected.txt:
  • web-platform-tests/css/css-text-decor/parsing/text-decoration-skip-ink-valid-expected.txt:
  • web-platform-tests/css/css-text-decor/text-decoration-skip-ink-expected.txt:
  • web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:
  • web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:

Source/WebCore:

First, there was "text-decoration-skip: ink", and that was what we implemented in WebKit. That had a
problem, though, which was that you couldn't add a value into the set without resetting the entire
property, so the CSSWG split it up into a bunch of constituent properties:

  • text-decoration-skip-self
  • text-decoration-skip-box
  • text-decoration-skip-inset
  • text-decoration-skip-spaces
  • text-decoration-skip-ink

text-decoration-skip was turned into a shorthand for all of these constituent properties.

Chrome and Firefox, however, implemented text-decoration-skip-ink rather than text-decoration-skip.
From what I understand, Firefox isn't interested in implementing the shorthand until they implement
all the longhands. Therefore, because WebKit implements only the shorthand and Firefox implements only
the longhand, authors have to write two different properties in their style for the two different
browsers. That's unfortunate, so this patch makes WebKit follow the CSSWG, and turns
text-decoration-skip into a shorthand, and adds support for text-decoration-skip-ink. Therefore,
there's no new behavior here; it's just a new way of accessing the same functionality we already have.

The spec actually removed the "ink" value from the text-decoration-skip shorthand, but we have to
maintain it because of compat. So, this patch maps "text-decoration-skip: ink" to
"text-decoration-skip-ink: auto". There's an issue in the spec about this:
https://drafts.csswg.org/css-text-decor-4/#issue-070668ae

Back when we implemented text-decoration-skip: ink, we only implemented the "ink" value, and none of
the other values. This patch also doesn't implement the other values.

Also, previously, we used to parse "text-decoration-skip: objects" but we didn't do anything with it.
This patch removes parsing support for that, so @supports works properly.

Covered by existing tests.

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::renderTextDecorationSkipToCSSValue):
(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):
(WebCore::renderTextDecorationSkipFlagsToCSSValue): Deleted.

  • css/CSSPrimitiveValueMappings.h:

(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator TextDecorationSkipInk const):

  • css/CSSProperties.json:
  • css/StyleProperties.cpp:

(WebCore::StyleProperties::getPropertyValue const):
(WebCore::StyleProperties::textDecorationSkipValue const):

  • css/StyleProperties.h:
  • css/html.css:

(ins, del):

  • css/parser/CSSParserFastPaths.cpp:

(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
(WebCore::CSSParserFastPaths::isKeywordPropertyID):

  • css/parser/CSSPropertyParser.cpp:

(WebCore::CSSPropertyParser::consumeTextDecorationSkip):
(WebCore::CSSPropertyParser::parseSingleValue):
(WebCore::CSSPropertyParser::parseShorthand):
(WebCore::consumeTextDecorationSkip): Deleted.

  • css/parser/CSSPropertyParser.h:
  • rendering/TextDecorationPainter.cpp:

(WebCore::TextDecorationPainter::paintTextDecoration):

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::changeRequiresRepaintIfTextOrBorderOrOutline const):

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::textDecorationSkipInk const):
(WebCore::RenderStyle::setTextDecorationSkipInk):
(WebCore::RenderStyle::initialTextDecorationSkipInk):
(WebCore::RenderStyle::textDecorationSkip const): Deleted.
(WebCore::RenderStyle::setTextDecorationSkip): Deleted.
(WebCore::RenderStyle::initialTextDecorationSkip): Deleted.

  • rendering/style/RenderStyleConstants.cpp:

(WebCore::operator<<):

  • rendering/style/RenderStyleConstants.h:
  • rendering/style/StyleRareInheritedData.cpp:

(WebCore::StyleRareInheritedData::StyleRareInheritedData):
(WebCore::StyleRareInheritedData::operator== const):

  • rendering/style/StyleRareInheritedData.h:
  • style/InlineTextBoxStyle.cpp:

(WebCore::minLogicalTopForTextDecorationLine):
(WebCore::maxLogicalBottomForTextDecorationLine):

  • style/PropertyCascade.cpp:

(WebCore::Style::shouldApplyPropertyInParseOrder):

  • style/StyleBuilderConverter.h:

(WebCore::Style::BuilderConverter::valueToDecorationSkip): Deleted.
(WebCore::Style::BuilderConverter::convertTextDecorationSkip): Deleted.

LayoutTests:

  • fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-roundtrip-expected.txt:
  • fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-roundtrip.html:
  • platform/ios-wk2/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:
  • platform/ios-wk2/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:
Location:
trunk
Files:
35 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r282396 r282397  
     12021-09-14  Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        Implement text-decoration-skip-ink
     4        https://bugs.webkit.org/show_bug.cgi?id=230244
     5
     6        Reviewed by Antti Koivisto.
     7
     8        * fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-roundtrip-expected.txt:
     9        * fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-roundtrip.html:
     10        * platform/ios-wk2/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:
     11        * platform/ios-wk2/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:
     12
    1132021-09-14  Sam Sneddon  <gsnedders@apple.com>
    214
  • trunk/LayoutTests/fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-roundtrip-expected.txt

    r208733 r282397  
     1Test 1
    12PASS cssRule.type is cssRule.STYLE_RULE
    23PASS declaration.length is 0
    34PASS declaration.getPropertyValue('-webkit-text-decoration-skip') is ""
    4 PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is "auto"
     5PASS declaration.getPropertyValue('text-decoration-skip') is ""
     6PASS declaration.getPropertyValue('text-decoration-skip-ink') is ""
     7PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is "auto"
     8PASS computedStyle.getPropertyCSSValue('text-decoration-skip').cssText is "auto"
     9PASS computedStyle.getPropertyCSSValue('text-decoration-skip-ink').cssText is "auto"
     10Test 2
    511PASS cssRule.type is cssRule.STYLE_RULE
    612PASS declaration.length is 1
    713PASS declaration.getPropertyValue('-webkit-text-decoration-skip') is "initial"
    8 PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is "auto"
    9 PASS cssRule.type is cssRule.STYLE_RULE
    10 PASS declaration.length is 1
    11 PASS declaration.getPropertyValue('-webkit-text-decoration-skip') is "ink"
    12 PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is "ink"
    13 PASS cssRule.type is cssRule.STYLE_RULE
    14 PASS declaration.length is 0
    15 PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is "auto"
    16 PASS cssRule.type is cssRule.STYLE_RULE
    17 PASS declaration.length is 0
    18 PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is "auto"
    19 PASS cssRule.type is cssRule.STYLE_RULE
    20 PASS declaration.length is 0
    21 PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is "auto"
    22 PASS cssRule.type is cssRule.STYLE_RULE
    23 PASS declaration.length is 0
    24 PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is "auto"
    25 PASS cssRule.type is cssRule.STYLE_RULE
    26 PASS declaration.length is 0
    27 PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is "auto"
    28 PASS cssRule.type is cssRule.STYLE_RULE
    29 PASS declaration.length is 0
    30 PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is "auto"
    31 PASS cssRule.type is cssRule.STYLE_RULE
    32 PASS declaration.length is 1
    33 PASS declaration.getPropertyValue('-webkit-text-decoration-skip') is "objects"
    34 PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is "objects"
    35 PASS cssRule.type is cssRule.STYLE_RULE
    36 PASS declaration.length is 0
    37 PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is "auto"
    38 PASS cssRule.type is cssRule.STYLE_RULE
    39 PASS declaration.length is 0
    40 PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is "auto"
    41 PASS cssRule.type is cssRule.STYLE_RULE
    42 PASS declaration.length is 0
    43 PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is "auto"
    44 PASS cssRule.type is cssRule.STYLE_RULE
    45 PASS declaration.length is 0
    46 PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is "auto"
    47 PASS cssRule.type is cssRule.STYLE_RULE
    48 PASS declaration.length is 0
    49 PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is "auto"
     14PASS declaration.getPropertyValue('text-decoration-skip') is "initial"
     15PASS declaration.getPropertyValue('text-decoration-skip-ink') is "initial"
     16PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is "auto"
     17PASS computedStyle.getPropertyCSSValue('text-decoration-skip').cssText is "auto"
     18PASS computedStyle.getPropertyCSSValue('text-decoration-skip-ink').cssText is "auto"
     19PASS cssRule.type is cssRule.STYLE_RULE
     20PASS declaration.length is 1
     21PASS declaration.getPropertyValue('-webkit-text-decoration-skip') is "initial"
     22PASS declaration.getPropertyValue('text-decoration-skip') is "initial"
     23PASS declaration.getPropertyValue('text-decoration-skip-ink') is "initial"
     24PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is "auto"
     25PASS computedStyle.getPropertyCSSValue('text-decoration-skip').cssText is "auto"
     26PASS computedStyle.getPropertyCSSValue('text-decoration-skip-ink').cssText is "auto"
     27PASS cssRule.type is cssRule.STYLE_RULE
     28PASS declaration.length is 1
     29PASS declaration.getPropertyValue('-webkit-text-decoration-skip') is "initial"
     30PASS declaration.getPropertyValue('text-decoration-skip') is "initial"
     31PASS declaration.getPropertyValue('text-decoration-skip-ink') is "initial"
     32PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is "auto"
     33PASS computedStyle.getPropertyCSSValue('text-decoration-skip').cssText is "auto"
     34PASS computedStyle.getPropertyCSSValue('text-decoration-skip-ink').cssText is "auto"
     35Test 3
     36PASS cssRule.type is cssRule.STYLE_RULE
     37PASS declaration.length is 1
     38PASS declaration.getPropertyValue('-webkit-text-decoration-skip') is "auto"
     39PASS declaration.getPropertyValue('text-decoration-skip') is "auto"
     40PASS declaration.getPropertyValue('text-decoration-skip-ink') is "auto"
     41PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is "auto"
     42PASS computedStyle.getPropertyCSSValue('text-decoration-skip').cssText is "auto"
     43PASS computedStyle.getPropertyCSSValue('text-decoration-skip-ink').cssText is "auto"
     44PASS cssRule.type is cssRule.STYLE_RULE
     45PASS declaration.length is 1
     46PASS declaration.getPropertyValue('-webkit-text-decoration-skip') is "auto"
     47PASS declaration.getPropertyValue('text-decoration-skip') is "auto"
     48PASS declaration.getPropertyValue('text-decoration-skip-ink') is "auto"
     49PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is "auto"
     50PASS computedStyle.getPropertyCSSValue('text-decoration-skip').cssText is "auto"
     51PASS computedStyle.getPropertyCSSValue('text-decoration-skip-ink').cssText is "auto"
     52PASS cssRule.type is cssRule.STYLE_RULE
     53PASS declaration.length is 1
     54PASS declaration.getPropertyValue('-webkit-text-decoration-skip') is "auto"
     55PASS declaration.getPropertyValue('text-decoration-skip') is "auto"
     56PASS declaration.getPropertyValue('text-decoration-skip-ink') is "auto"
     57PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is "auto"
     58PASS computedStyle.getPropertyCSSValue('text-decoration-skip').cssText is "auto"
     59PASS computedStyle.getPropertyCSSValue('text-decoration-skip-ink').cssText is "auto"
     60Test 4
     61PASS cssRule.type is cssRule.STYLE_RULE
     62PASS declaration.length is 0
     63PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is "auto"
     64PASS computedStyle.getPropertyCSSValue('text-decoration-skip').cssText is "auto"
     65PASS computedStyle.getPropertyCSSValue('text-decoration-skip-ink').cssText is "auto"
     66PASS cssRule.type is cssRule.STYLE_RULE
     67PASS declaration.length is 0
     68PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is "auto"
     69PASS computedStyle.getPropertyCSSValue('text-decoration-skip').cssText is "auto"
     70PASS computedStyle.getPropertyCSSValue('text-decoration-skip-ink').cssText is "auto"
     71PASS cssRule.type is cssRule.STYLE_RULE
     72PASS declaration.length is 0
     73PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is "auto"
     74PASS computedStyle.getPropertyCSSValue('text-decoration-skip').cssText is "auto"
     75PASS computedStyle.getPropertyCSSValue('text-decoration-skip-ink').cssText is "auto"
     76Test 5
     77PASS cssRule.type is cssRule.STYLE_RULE
     78PASS declaration.length is 0
     79PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is "auto"
     80PASS computedStyle.getPropertyCSSValue('text-decoration-skip').cssText is "auto"
     81PASS computedStyle.getPropertyCSSValue('text-decoration-skip-ink').cssText is "auto"
     82PASS cssRule.type is cssRule.STYLE_RULE
     83PASS declaration.length is 0
     84PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is "auto"
     85PASS computedStyle.getPropertyCSSValue('text-decoration-skip').cssText is "auto"
     86PASS computedStyle.getPropertyCSSValue('text-decoration-skip-ink').cssText is "auto"
     87PASS cssRule.type is cssRule.STYLE_RULE
     88PASS declaration.length is 0
     89PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is "auto"
     90PASS computedStyle.getPropertyCSSValue('text-decoration-skip').cssText is "auto"
     91PASS computedStyle.getPropertyCSSValue('text-decoration-skip-ink').cssText is "auto"
     92Test 6
     93PASS cssRule.type is cssRule.STYLE_RULE
     94PASS declaration.length is 0
     95PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is "auto"
     96PASS computedStyle.getPropertyCSSValue('text-decoration-skip').cssText is "auto"
     97PASS computedStyle.getPropertyCSSValue('text-decoration-skip-ink').cssText is "auto"
     98PASS cssRule.type is cssRule.STYLE_RULE
     99PASS declaration.length is 0
     100PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is "auto"
     101PASS computedStyle.getPropertyCSSValue('text-decoration-skip').cssText is "auto"
     102PASS computedStyle.getPropertyCSSValue('text-decoration-skip-ink').cssText is "auto"
     103PASS cssRule.type is cssRule.STYLE_RULE
     104PASS declaration.length is 0
     105PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is "auto"
     106PASS computedStyle.getPropertyCSSValue('text-decoration-skip').cssText is "auto"
     107PASS computedStyle.getPropertyCSSValue('text-decoration-skip-ink').cssText is "auto"
     108Test 7
     109PASS cssRule.type is cssRule.STYLE_RULE
     110PASS declaration.length is 0
     111PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is "auto"
     112PASS computedStyle.getPropertyCSSValue('text-decoration-skip').cssText is "auto"
     113PASS computedStyle.getPropertyCSSValue('text-decoration-skip-ink').cssText is "auto"
     114PASS cssRule.type is cssRule.STYLE_RULE
     115PASS declaration.length is 0
     116PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is "auto"
     117PASS computedStyle.getPropertyCSSValue('text-decoration-skip').cssText is "auto"
     118PASS computedStyle.getPropertyCSSValue('text-decoration-skip-ink').cssText is "auto"
     119PASS cssRule.type is cssRule.STYLE_RULE
     120PASS declaration.length is 0
     121PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is "auto"
     122PASS computedStyle.getPropertyCSSValue('text-decoration-skip').cssText is "auto"
     123PASS computedStyle.getPropertyCSSValue('text-decoration-skip-ink').cssText is "auto"
     124Test 8
     125PASS cssRule.type is cssRule.STYLE_RULE
     126PASS declaration.length is 0
     127PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is "auto"
     128PASS computedStyle.getPropertyCSSValue('text-decoration-skip').cssText is "auto"
     129PASS computedStyle.getPropertyCSSValue('text-decoration-skip-ink').cssText is "auto"
     130PASS cssRule.type is cssRule.STYLE_RULE
     131PASS declaration.length is 0
     132PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is "auto"
     133PASS computedStyle.getPropertyCSSValue('text-decoration-skip').cssText is "auto"
     134PASS computedStyle.getPropertyCSSValue('text-decoration-skip-ink').cssText is "auto"
     135PASS cssRule.type is cssRule.STYLE_RULE
     136PASS declaration.length is 0
     137PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is "auto"
     138PASS computedStyle.getPropertyCSSValue('text-decoration-skip').cssText is "auto"
     139PASS computedStyle.getPropertyCSSValue('text-decoration-skip-ink').cssText is "auto"
     140Test 9
     141PASS cssRule.type is cssRule.STYLE_RULE
     142PASS declaration.length is 0
     143PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is "auto"
     144PASS computedStyle.getPropertyCSSValue('text-decoration-skip').cssText is "auto"
     145PASS computedStyle.getPropertyCSSValue('text-decoration-skip-ink').cssText is "auto"
     146PASS cssRule.type is cssRule.STYLE_RULE
     147PASS declaration.length is 0
     148PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is "auto"
     149PASS computedStyle.getPropertyCSSValue('text-decoration-skip').cssText is "auto"
     150PASS computedStyle.getPropertyCSSValue('text-decoration-skip-ink').cssText is "auto"
     151PASS cssRule.type is cssRule.STYLE_RULE
     152PASS declaration.length is 0
     153PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is "auto"
     154PASS computedStyle.getPropertyCSSValue('text-decoration-skip').cssText is "auto"
     155PASS computedStyle.getPropertyCSSValue('text-decoration-skip-ink').cssText is "auto"
     156Test 10
    50157PASS cssRule.type is cssRule.STYLE_RULE
    51158PASS declaration.length is 1
    52159PASS declaration.getPropertyValue('-webkit-text-decoration-skip') is "none"
     160PASS declaration.getPropertyValue('text-decoration-skip') is "none"
     161PASS declaration.getPropertyValue('text-decoration-skip-ink') is "none"
    53162PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is "none"
    54 PASS cssRule.type is cssRule.STYLE_RULE
    55 PASS declaration.length is 0
    56 PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is "auto"
     163PASS computedStyle.getPropertyCSSValue('text-decoration-skip').cssText is "none"
     164PASS computedStyle.getPropertyCSSValue('text-decoration-skip-ink').cssText is "none"
     165PASS cssRule.type is cssRule.STYLE_RULE
     166PASS declaration.length is 1
     167PASS declaration.getPropertyValue('-webkit-text-decoration-skip') is "none"
     168PASS declaration.getPropertyValue('text-decoration-skip') is "none"
     169PASS declaration.getPropertyValue('text-decoration-skip-ink') is "none"
     170PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is "none"
     171PASS computedStyle.getPropertyCSSValue('text-decoration-skip').cssText is "none"
     172PASS computedStyle.getPropertyCSSValue('text-decoration-skip-ink').cssText is "none"
     173PASS cssRule.type is cssRule.STYLE_RULE
     174PASS declaration.length is 1
     175PASS declaration.getPropertyValue('-webkit-text-decoration-skip') is "none"
     176PASS declaration.getPropertyValue('text-decoration-skip') is "none"
     177PASS declaration.getPropertyValue('text-decoration-skip-ink') is "none"
     178PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is "none"
     179PASS computedStyle.getPropertyCSSValue('text-decoration-skip').cssText is "none"
     180PASS computedStyle.getPropertyCSSValue('text-decoration-skip-ink').cssText is "none"
     181Test 11
     182PASS cssRule.type is cssRule.STYLE_RULE
     183PASS declaration.length is 0
     184PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is "auto"
     185PASS computedStyle.getPropertyCSSValue('text-decoration-skip').cssText is "auto"
     186PASS computedStyle.getPropertyCSSValue('text-decoration-skip-ink').cssText is "auto"
     187PASS cssRule.type is cssRule.STYLE_RULE
     188PASS declaration.length is 0
     189PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is "auto"
     190PASS computedStyle.getPropertyCSSValue('text-decoration-skip').cssText is "auto"
     191PASS computedStyle.getPropertyCSSValue('text-decoration-skip-ink').cssText is "auto"
     192PASS cssRule.type is cssRule.STYLE_RULE
     193PASS declaration.length is 0
     194PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is "auto"
     195PASS computedStyle.getPropertyCSSValue('text-decoration-skip').cssText is "auto"
     196PASS computedStyle.getPropertyCSSValue('text-decoration-skip-ink').cssText is "auto"
    57197PASS successfullyParsed is true
    58198
  • trunk/LayoutTests/fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-roundtrip.html

    r208733 r282397  
    22<html>
    33<head>
    4 <script src="../../../../resources/js-test-pre.js"></script>
     4<script src="../../../../resources/js-test.js"></script>
    55</head>
    66<body>
     
    1212      declaration = cssRule.style;
    1313      shouldBe("declaration.length", "1");
    14       shouldBeEqualToString("declaration.getPropertyValue('-webkit-text-decoration-skip')", "ink");
     14      shouldBeEqualToString("declaration.getPropertyValue('-webkit-text-decoration-skip')", "auto");
     15      shouldBeEqualToString("declaration.getPropertyValue('text-decoration-skip')", "auto");
     16      shouldBeEqualToString("declaration.getPropertyValue('text-decoration-skip-ink')", "auto");
    1517      computedStyle = window.getComputedStyle(target, null);
    16       shouldBeEqualToString("computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText", "ink");
     18      shouldBeEqualToString("computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText", "auto");
     19      shouldBeEqualToString("computedStyle.getPropertyCSSValue('text-decoration-skip').cssText", "auto");
     20      shouldBeEqualToString("computedStyle.getPropertyCSSValue('text-decoration-skip-ink').cssText", "auto");
    1721      stylesheet.deleteRule(0);
    1822    }
    1923
    20     function testObjectsIsValid(stylesheet, target) {
    21       cssRule = stylesheet.cssRules.item(0);
    22       shouldBe("cssRule.type", "cssRule.STYLE_RULE");
    23       declaration = cssRule.style;
    24       shouldBe("declaration.length", "1");
    25       shouldBeEqualToString("declaration.getPropertyValue('-webkit-text-decoration-skip')", "objects");
    26       computedStyle = window.getComputedStyle(target, null);
    27       shouldBeEqualToString("computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText", "objects");
    28       stylesheet.deleteRule(0);
    29     }
    30 
    31     function testEmptyIsObjects(stylesheet, target) {
     24    function testEmpty(stylesheet, target) {
    3225      cssRule = stylesheet.cssRules.item(0);
    3326      shouldBe("cssRule.type", "cssRule.STYLE_RULE");
     
    3528      shouldBe("declaration.length", "0");
    3629      shouldBeEqualToString("declaration.getPropertyValue('-webkit-text-decoration-skip')", "");
     30      shouldBeEqualToString("declaration.getPropertyValue('text-decoration-skip')", "");
     31      shouldBeEqualToString("declaration.getPropertyValue('text-decoration-skip-ink')", "");
    3732      computedStyle = window.getComputedStyle(target, null);
    3833      shouldBeEqualToString("computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText", "auto");
     34      shouldBeEqualToString("computedStyle.getPropertyCSSValue('text-decoration-skip').cssText", "auto");
     35      shouldBeEqualToString("computedStyle.getPropertyCSSValue('text-decoration-skip-ink').cssText", "auto");
    3936      stylesheet.deleteRule(0);
    4037    }
     
    4643      shouldBe("declaration.length", "1");
    4744      shouldBeEqualToString("declaration.getPropertyValue('-webkit-text-decoration-skip')",  "initial");
     45      shouldBeEqualToString("declaration.getPropertyValue('text-decoration-skip')",  "initial");
     46      shouldBeEqualToString("declaration.getPropertyValue('text-decoration-skip-ink')",  "initial");
    4847      computedStyle = window.getComputedStyle(target, null);
    4948      shouldBeEqualToString("computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText", "auto");
     49      shouldBeEqualToString("computedStyle.getPropertyCSSValue('text-decoration-skip').cssText", "auto");
     50      shouldBeEqualToString("computedStyle.getPropertyCSSValue('text-decoration-skip-ink').cssText", "auto");
    5051      stylesheet.deleteRule(0);
    5152    }
     
    5859      computedStyle = window.getComputedStyle(target, null);
    5960      shouldBeEqualToString("computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText", "auto");
     61      shouldBeEqualToString("computedStyle.getPropertyCSSValue('text-decoration-skip').cssText", "auto");
     62      shouldBeEqualToString("computedStyle.getPropertyCSSValue('text-decoration-skip-ink').cssText", "auto");
    6063      stylesheet.deleteRule(0);
    6164    }
     
    6770      shouldBe("declaration.length", "1");
    6871      shouldBeEqualToString("declaration.getPropertyValue('-webkit-text-decoration-skip')", "none");
     72      shouldBeEqualToString("declaration.getPropertyValue('text-decoration-skip')", "none");
     73      shouldBeEqualToString("declaration.getPropertyValue('text-decoration-skip-ink')", "none");
    6974      computedStyle = window.getComputedStyle(target, null);
    7075      shouldBeEqualToString("computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText", "none");
     76      shouldBeEqualToString("computedStyle.getPropertyCSSValue('text-decoration-skip').cssText", "none");
     77      shouldBeEqualToString("computedStyle.getPropertyCSSValue('text-decoration-skip-ink').cssText", "none");
    7178      stylesheet.deleteRule(0);
    7279    }
     
    7784    var target = document.getElementsByClassName("p")[0];
    7885
     86    debug("Test 1");
    7987    stylesheet.insertRule(".p { }", 0);
    80     testEmptyIsObjects(stylesheet, target);
     88    testEmpty(stylesheet, target);
    8189
     90    debug("Test 2");
    8291    stylesheet.insertRule(".p { -webkit-text-decoration-skip: initial; }", 0);
    8392    testInitialIsAuto(stylesheet, target);
     93    stylesheet.insertRule(".p { text-decoration-skip: initial; }", 0);
     94    testInitialIsAuto(stylesheet, target);
     95    stylesheet.insertRule(".p { text-decoration-skip-ink: initial; }", 0);
     96    testInitialIsAuto(stylesheet, target);
    8497
     98    debug("Test 3");
    8599    stylesheet.insertRule(".p { -webkit-text-decoration-skip: ink; }", 0);
    86100    testInkIsValid(stylesheet, target);
     101    stylesheet.insertRule(".p { text-decoration-skip: ink; }", 0);
     102    testInkIsValid(stylesheet, target);
     103    stylesheet.insertRule(".p { text-decoration-skip-ink: auto; }", 0);
     104    testInkIsValid(stylesheet, target);
    87105
     106    debug("Test 4");
    88107    stylesheet.insertRule(".p { -webkit-text-decoration-skip: ink ink ink ink ink; }", 0);
    89108    testInvalidRule(stylesheet, target);
     109    stylesheet.insertRule(".p { text-decoration-skip: ink ink ink ink ink; }", 0);
     110    testInvalidRule(stylesheet, target);
     111    stylesheet.insertRule(".p { text-decoration-skip-ink: auto auto auto auto auto; }", 0);
     112    testInvalidRule(stylesheet, target);
    90113
     114    debug("Test 5");
    91115    stylesheet.insertRule(".p { -webkit-text-decoration-skip: garbage; }", 0);
    92116    testInvalidRule(stylesheet, target);
     117    stylesheet.insertRule(".p { text-decoration-skip: garbage; }", 0);
     118    testInvalidRule(stylesheet, target);
     119    stylesheet.insertRule(".p { text-decoration-skip-ink: garbage; }", 0);
     120    testInvalidRule(stylesheet, target);
    93121
     122    debug("Test 6");
    94123    stylesheet.insertRule(".p { -webkit-text-decoration-skip: garbage ink; }", 0);
    95124    testInvalidRule(stylesheet, target);
     125    stylesheet.insertRule(".p { text-decoration-skip: garbage ink; }", 0);
     126    testInvalidRule(stylesheet, target);
     127    stylesheet.insertRule(".p { text-decoration-skip-ink: garbage auto; }", 0);
     128    testInvalidRule(stylesheet, target);
    96129
     130    debug("Test 7");
    97131    stylesheet.insertRule(".p { -webkit-text-decoration-skip: ink garbage; }", 0);
    98132    testInvalidRule(stylesheet, target);
     133    stylesheet.insertRule(".p { text-decoration-skip: ink garbage; }", 0);
     134    testInvalidRule(stylesheet, target);
     135    stylesheet.insertRule(".p { text-decoration-skip-ink: auto garbage; }", 0);
     136    testInvalidRule(stylesheet, target);
    99137   
     138    debug("Test 8");
    100139    stylesheet.insertRule(".p { -webkit-text-decoration-skip: garbage ink garbage; }", 0);
    101140    testInvalidRule(stylesheet, target);
     141    stylesheet.insertRule(".p { text-decoration-skip: garbage ink garbage; }", 0);
     142    testInvalidRule(stylesheet, target);
     143    stylesheet.insertRule(".p { text-decoration-skip-ink: garbage auto garbage; }", 0);
     144    testInvalidRule(stylesheet, target);
    102145   
     146    debug("Test 9");
    103147    stylesheet.insertRule(".p { -webkit-text-decoration-skip: ink garbage ink; }", 0);
    104148    testInvalidRule(stylesheet, target);
     149    stylesheet.insertRule(".p { text-decoration-skip: ink garbage ink; }", 0);
     150    testInvalidRule(stylesheet, target);
     151    stylesheet.insertRule(".p { text-decoration-skip-ink: auto garbage auto; }", 0);
     152    testInvalidRule(stylesheet, target);
    105153   
    106     stylesheet.insertRule(".p { -webkit-text-decoration-skip: objects; }", 0);
    107     testObjectsIsValid(stylesheet, target);
    108 
    109     stylesheet.insertRule(".p { -webkit-text-decoration-skip: objects objects objects objects objects; }", 0);
    110     testInvalidRule(stylesheet, target);
    111 
    112     stylesheet.insertRule(".p { -webkit-text-decoration-skip: garbage objects; }", 0);
    113     testInvalidRule(stylesheet, target);
    114 
    115     stylesheet.insertRule(".p { -webkit-text-decoration-skip: objects garbage; }", 0);
    116     testInvalidRule(stylesheet, target);
    117 
    118     stylesheet.insertRule(".p { -webkit-text-decoration-skip: garbage objects garbage; }", 0);
    119     testInvalidRule(stylesheet, target);
    120 
    121     stylesheet.insertRule(".p { -webkit-text-decoration-skip: objects garbage objects; }", 0);
    122     testInvalidRule(stylesheet, target);
    123 
     154    debug("Test 10");
    124155    stylesheet.insertRule(".p { -webkit-text-decoration-skip: none; }", 0);
    125156    testNoneIsValid(stylesheet, target);
     157    stylesheet.insertRule(".p { text-decoration-skip: none; }", 0);
     158    testNoneIsValid(stylesheet, target);
     159    stylesheet.insertRule(".p { text-decoration-skip-ink: none; }", 0);
     160    testNoneIsValid(stylesheet, target);
    126161   
     162    debug("Test 11");
    127163    stylesheet.insertRule(".p { -webkit-text-decoration-skip: ; }", 0);
    128164    testInvalidRule(stylesheet, target);
     165    stylesheet.insertRule(".p { text-decoration-skip: ; }", 0);
     166    testInvalidRule(stylesheet, target);
     167    stylesheet.insertRule(".p { text-decoration-skip-ink: ; }", 0);
     168    testInvalidRule(stylesheet, target);
    129169  </script>
    130 <script src="../../../../resources/js-test-post.js"></script>
    131170</body>
    132171</html>
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r282396 r282397  
     12021-09-14  Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        Implement text-decoration-skip-ink
     4        https://bugs.webkit.org/show_bug.cgi?id=230244
     5
     6        Reviewed by Antti Koivisto.
     7
     8        * web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
     9        * web-platform-tests/css/css-pseudo/parsing/marker-supported-properties-expected.txt:
     10        * web-platform-tests/css/css-pseudo/parsing/marker-supported-properties-in-animation-expected.txt:
     11        * web-platform-tests/css/css-text-decor/inheritance-expected.txt:
     12        * web-platform-tests/css/css-text-decor/parsing/text-decoration-skip-ink-computed-expected.txt:
     13        * web-platform-tests/css/css-text-decor/parsing/text-decoration-skip-ink-valid-expected.txt:
     14        * web-platform-tests/css/css-text-decor/text-decoration-skip-ink-expected.txt:
     15        * web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:
     16        * web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:
     17
    1182021-09-14  Sam Sneddon  <gsnedders@apple.com>
    219
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt

    r282143 r282397  
    271271PASS text-decoration-line
    272272PASS text-decoration-skip
     273PASS text-decoration-skip-ink
    273274PASS text-decoration-style
    274275PASS text-decoration-thickness
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-pseudo/parsing/marker-supported-properties-expected.txt

    r282195 r282397  
    4545FAIL Property word-break value 'break-word' in ::marker assert_equals: expected "break-word" but got "normal"
    4646FAIL Property word-spacing value '10px' in ::marker assert_equals: expected "10px" but got "0px"
    47 FAIL Property text-decoration-skip-ink value 'none' in ::marker assert_true: text-decoration-skip-ink doesn't seem to be supported in the computed style expected true got false
     47FAIL Property text-decoration-skip-ink value 'none' in ::marker assert_equals: expected "none" but got "auto"
    4848FAIL Property text-emphasis value 'dot rgb(0, 255, 0)' in ::marker assert_equals: expected "dot rgb(0, 255, 0)" but got ""
    4949FAIL Property text-emphasis-color value 'rgb(0, 255, 0)' in ::marker assert_equals: expected "rgb(0, 255, 0)" but got "rgb(0, 0, 0)"
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-pseudo/parsing/marker-supported-properties-in-animation-expected.txt

    r282195 r282397  
    3131FAIL Animation of word-break in ::marker assert_equals: expected "break-word" but got "normal"
    3232FAIL Animation of word-spacing in ::marker assert_equals: expected "10px" but got "0px"
    33 FAIL Animation of text-decoration-skip-ink in ::marker assert_true: text-decoration-skip-ink doesn't seem to be supported in the computed style expected true got false
     33FAIL Animation of text-decoration-skip-ink in ::marker assert_equals: expected "none" but got "auto"
    3434FAIL Animation of text-emphasis in ::marker assert_equals: expected "triangle rgb(50, 100, 100)" but got ""
    3535FAIL Animation of text-emphasis-color in ::marker assert_equals: expected "rgb(50, 100, 100)" but got "rgb(0, 0, 0)"
     
    7575FAIL Transition of word-break in ::marker assert_equals: expected "break-word" but got "normal"
    7676FAIL Transition of word-spacing in ::marker assert_equals: expected "10px" but got "0px"
    77 FAIL Transition of text-decoration-skip-ink in ::marker assert_true: text-decoration-skip-ink doesn't seem to be supported in the computed style expected true got false
     77FAIL Transition of text-decoration-skip-ink in ::marker assert_equals: expected "none" but got "auto"
    7878FAIL Transition of text-emphasis in ::marker assert_equals: expected "triangle rgb(50, 100, 100)" but got ""
    7979FAIL Transition of text-emphasis-color in ::marker assert_equals: expected "rgb(50, 100, 100)" but got "rgb(0, 0, 0)"
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/inheritance-expected.txt

    r267650 r282397  
    1616PASS Property text-underline-position has initial value auto
    1717PASS Property text-underline-position inherits
    18 FAIL Property text-decoration-skip-ink has initial value auto assert_true: text-decoration-skip-ink doesn't seem to be supported in the computed style expected true got false
    19 FAIL Property text-decoration-skip-ink inherits assert_true: text-decoration-skip-ink doesn't seem to be supported in the computed style expected true got false
     18PASS Property text-decoration-skip-ink has initial value auto
     19PASS Property text-decoration-skip-ink inherits
    2020
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/parsing/text-decoration-skip-ink-computed-expected.txt

    r264456 r282397  
    11
    2 FAIL Property text-decoration-skip-ink value 'auto' assert_true: text-decoration-skip-ink doesn't seem to be supported in the computed style expected true got false
    3 FAIL Property text-decoration-skip-ink value 'none' assert_true: text-decoration-skip-ink doesn't seem to be supported in the computed style expected true got false
     2PASS Property text-decoration-skip-ink value 'auto'
     3PASS Property text-decoration-skip-ink value 'none'
    44
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/parsing/text-decoration-skip-ink-valid-expected.txt

    r251689 r282397  
    11
    2 FAIL e.style['text-decoration-skip-ink'] = "auto" should set the property value assert_not_equals: property should be set got disallowed value ""
    3 FAIL e.style['text-decoration-skip-ink'] = "none" should set the property value assert_not_equals: property should be set got disallowed value ""
     2PASS e.style['text-decoration-skip-ink'] = "auto" should set the property value
     3PASS e.style['text-decoration-skip-ink'] = "none" should set the property value
    44
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-skip-ink-expected.txt

    r264522 r282397  
    11
    2 FAIL Body must have text-decoration-skip-ink auto by default. assert_equals: Must be set to value auto as initial value. expected (string) "auto" but got (undefined) undefined
    3 FAIL Property text-decoration-skip-ink must support values auto, none and all. assert_true: Text-decoration-skip-ink must allow setting the value auto. expected true got false
     2PASS Body must have text-decoration-skip-ink auto by default.
     3PASS Property text-decoration-skip-ink must support values auto, none and all.
    44
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt

    r282143 r282397  
    1010FAIL Shorthands aren't serialized if there are other properties with different logical groups in between assert_equals: expected "margin-top: 10px; margin-right: 10px; margin-left: 10px; margin-inline-start: 10px; margin-block: 10px; margin-inline-end: 10px; margin-bottom: 10px;" but got "margin: 10px; margin-inline: 10px; margin-block: 10px;"
    1111PASS Shorthands _are_ serialized if there are no other properties with different logical groups in between
    12 FAIL cssText on computed style declaration returns the empty string assert_equals: cssText is empty expected "" but got "align-content: normal; align-items: normal; align-self: auto; alignment-baseline: auto; all: ; alt: \"\"; animation-delay: 0s; animation-direction: normal; animation-duration: 0s; animation-fill-mode: none; animation-iteration-count: 1; animation-name: none; animation-play-state: running; animation-timing-function: ease; aspect-ratio: auto; backface-visibility: visible; background-attachment: scroll; background-blend-mode: normal; background-clip: border-box; background-color: rgba(0, 0, 0, 0); background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; baseline-shift: baseline; block-size: 0px; border-block-end-color: rgb(255, 0, 0); border-block-end-style: none; border-block-end-width: 0px; border-block-start-color: rgb(255, 0, 0); border-block-start-style: none; border-block-start-width: 0px; border-bottom-color: rgb(255, 0, 0); border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-bottom-style: none; border-bottom-width: 0px; border-collapse: separate; border-end-end-radius: 0px; border-end-start-radius: 0px; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; border-inline-end-color: rgb(255, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(255, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(255, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(255, 0, 0); border-right-style: none; border-right-width: 0px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-color: rgb(255, 0, 0); border-top-left-radius: 0px; border-top-right-radius: 0px; border-top-style: none; border-top-width: 0px; bottom: auto; box-shadow: none; box-sizing: content-box; break-after: auto; break-before: auto; break-inside: auto; buffered-rendering: auto; caption-side: top; caret-color: rgb(255, 0, 0); clear: none; clip: auto; clip-path: none; clip-rule: nonzero; color: rgb(255, 0, 0); color-interpolation: sRGB; color-interpolation-filters: linearRGB; color-rendering: auto; color-scheme: auto; column-count: auto; column-fill: balance; column-gap: normal; column-rule-color: rgb(255, 0, 0); column-rule-style: none; column-rule-width: 0px; column-span: none; column-width: auto; contain: none; content: ; counter-increment: none; counter-reset: none; cursor: auto; cx: 0px; cy: 0px; direction: ltr; display: block; dominant-baseline: auto; empty-cells: show; fill: rgb(0, 0, 0); fill-opacity: 1; fill-rule: nonzero; filter: none; flex-basis: auto; flex-direction: row; flex-grow: 0; flex-shrink: 1; flex-wrap: nowrap; float: none; flood-color: rgb(0, 0, 0); flood-opacity: 1; font-family: -webkit-standard; font-feature-settings: normal; font-optical-sizing: auto; font-size: 13.333333015441895px; font-stretch: normal; font-style: normal; font-synthesis: style weight small-caps; font-variant-alternates: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; font-weight: normal; glyph-orientation-horizontal: 0deg; glyph-orientation-vertical: auto; grid-auto-columns: auto; grid-auto-flow: row; grid-auto-rows: auto; grid-column-end: auto; grid-column-start: auto; grid-row-end: auto; grid-row-start: auto; grid-template-areas: none; grid-template-columns: none; grid-template-rows: none; hanging-punctuation: none; height: 0px; image-orientation: from-image; image-rendering: auto; inline-size: 784px; inset-block-end: auto; inset-block-start: auto; inset-inline-end: auto; inset-inline-start: auto; isolation: auto; justify-content: normal; justify-items: normal; justify-self: auto; kerning: 0; left: auto; letter-spacing: normal; lighting-color: rgb(255, 255, 255); line-break: auto; line-height: normal; list-style-image: none; list-style-position: outside; list-style-type: disc; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; marker-end: none; marker-mid: none; marker-start: none; mask: none; mask-type: luminance; math-style: normal; max-block-size: none; max-height: none; max-inline-size: none; max-width: none; min-block-size: 0px; min-height: 0px; min-inline-size: 0px; min-width: 0px; mix-blend-mode: normal; object-fit: fill; object-position: 50% 50%; opacity: 1; order: 0; orphans: auto; outline-color: rgb(255, 0, 0); outline-offset: 0px; outline-style: none; outline-width: 0px; overflow-wrap: normal; overflow-x: visible; overflow-y: visible; overscroll-behavior-x: auto; overscroll-behavior-y: auto; padding-block-end: 0px; padding-block-start: 0px; padding-bottom: 0px; padding-inline-end: 0px; padding-inline-start: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; page-break-after: auto; page-break-before: auto; page-break-inside: auto; paint-order: normal; perspective: none; perspective-origin-x: ; perspective-origin-y: ; pointer-events: auto; position: static; quotes: auto; r: 0px; resize: none; right: auto; rotate: none; row-gap: normal; rx: auto; ry: auto; scale: none; scroll-behavior: auto; scroll-margin-block: 0px; scroll-margin-bottom: 0px; scroll-margin-inline: 0px; scroll-margin-left: 0px; scroll-margin-right: 0px; scroll-margin-top: 0px; scroll-padding-block: auto; scroll-padding-bottom: auto; scroll-padding-inline: auto; scroll-padding-left: auto; scroll-padding-right: auto; scroll-padding-top: auto; scroll-snap-align: none; scroll-snap-stop: normal; scroll-snap-type: none; shape-image-threshold: 0; shape-margin: 0px; shape-outside: none; shape-rendering: auto; size: ; speak-as: normal; stop-color: rgb(0, 0, 0); stop-opacity: 1; stroke: none; stroke-color: rgba(0, 0, 0, 0); stroke-dasharray: none; stroke-dashoffset: 0px; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 4; stroke-opacity: 1; stroke-width: 1px; tab-size: 8; table-layout: auto; text-align: start; text-anchor: start; text-decoration: none; text-decoration-color: rgb(255, 0, 0); text-decoration-line: none; text-decoration-skip: auto; text-decoration-style: solid; text-decoration-thickness: auto; text-indent: 0px; text-orientation: mixed; text-overflow: clip; text-rendering: auto; text-shadow: none; text-transform: none; text-underline-offset: auto; text-underline-position: auto; top: auto; touch-action: auto; transform: none; transform-box: view-box; transform-origin-x: ; transform-origin-y: ; transform-origin-z: ; transform-style: flat; transition-delay: 0s; transition-duration: 0s; transition-property: all; transition-timing-function: ease; translate: none; unicode-bidi: normal; vector-effect: none; vertical-align: baseline; visibility: visible; white-space: normal; widows: auto; width: 784px; will-change: auto; word-break: normal; word-spacing: 0px; word-wrap: normal; writing-mode: horizontal-tb; x: 0px; y: 0px; z-index: auto; zoom: 1; -apple-color-filter: none; -apple-pay-button-style: black; -apple-pay-button-type: plain; -apple-trailing-word: auto; -webkit-appearance: none; -webkit-backdrop-filter: none; -webkit-background-clip: border-box; -webkit-background-composite: source-over; -webkit-background-origin: padding-box; -webkit-background-size: auto; -webkit-border-fit: border; -webkit-border-horizontal-spacing: 0px; -webkit-border-image: none; -webkit-border-vertical-spacing: 0px; -webkit-box-align: stretch; -webkit-box-decoration-break: slice; -webkit-box-direction: normal; -webkit-box-flex: 0; -webkit-box-flex-group: 1; -webkit-box-lines: single; -webkit-box-ordinal-group: 1; -webkit-box-orient: horizontal; -webkit-box-pack: start; -webkit-box-reflect: none; -webkit-box-shadow: none; -webkit-column-axis: auto; -webkit-column-break-after: auto; -webkit-column-break-before: auto; -webkit-column-break-inside: auto; -webkit-column-progression: normal; -webkit-cursor-visibility: auto; -webkit-font-kerning: auto; -webkit-font-smoothing: auto; -webkit-hyphenate-character: auto; -webkit-hyphenate-limit-after: auto; -webkit-hyphenate-limit-before: auto; -webkit-hyphenate-limit-lines: no-limit; -webkit-hyphens: manual; -webkit-initial-letter: normal; -webkit-line-align: none; -webkit-line-box-contain: block inline replaced; -webkit-line-clamp: none; -webkit-line-grid: none; -webkit-line-snap: none; -webkit-locale: auto; -webkit-margin-after-collapse: collapse; -webkit-margin-before-collapse: collapse; -webkit-margin-bottom-collapse: collapse; -webkit-margin-top-collapse: collapse; -webkit-mask-box-image: none; -webkit-mask-box-image-outset: 0; -webkit-mask-box-image-repeat: stretch; -webkit-mask-box-image-slice: 0 fill; -webkit-mask-box-image-source: none; -webkit-mask-box-image-width: auto; -webkit-mask-clip: border-box; -webkit-mask-composite: source-over; -webkit-mask-image: none; -webkit-mask-mode: match-source; -webkit-mask-origin: border-box; -webkit-mask-position-x: 0%; -webkit-mask-position-y: 0%; -webkit-mask-repeat: repeat; -webkit-mask-size: auto; -webkit-mask-source-type: alpha; -webkit-nbsp-mode: normal; -webkit-print-color-adjust: economy; -webkit-rtl-ordering: logical; -webkit-ruby-position: before; -webkit-text-combine: none; -webkit-text-emphasis-color: rgb(255, 0, 0); -webkit-text-emphasis-position: over right; -webkit-text-emphasis-style: none; -webkit-text-fill-color: rgb(255, 0, 0); -webkit-text-orientation: mixed; -webkit-text-security: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-color: rgb(255, 0, 0); -webkit-text-stroke-width: 0px; -webkit-text-zoom: normal; -webkit-transform-style: flat; -webkit-user-drag: auto; -webkit-user-modify: read-only; -webkit-user-select: text;"
     12FAIL cssText on computed style declaration returns the empty string assert_equals: cssText is empty expected "" but got "align-content: normal; align-items: normal; align-self: auto; alignment-baseline: auto; all: ; alt: \"\"; animation-delay: 0s; animation-direction: normal; animation-duration: 0s; animation-fill-mode: none; animation-iteration-count: 1; animation-name: none; animation-play-state: running; animation-timing-function: ease; aspect-ratio: auto; backface-visibility: visible; background-attachment: scroll; background-blend-mode: normal; background-clip: border-box; background-color: rgba(0, 0, 0, 0); background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; baseline-shift: baseline; block-size: 0px; border-block-end-color: rgb(255, 0, 0); border-block-end-style: none; border-block-end-width: 0px; border-block-start-color: rgb(255, 0, 0); border-block-start-style: none; border-block-start-width: 0px; border-bottom-color: rgb(255, 0, 0); border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-bottom-style: none; border-bottom-width: 0px; border-collapse: separate; border-end-end-radius: 0px; border-end-start-radius: 0px; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; border-inline-end-color: rgb(255, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(255, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(255, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(255, 0, 0); border-right-style: none; border-right-width: 0px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-color: rgb(255, 0, 0); border-top-left-radius: 0px; border-top-right-radius: 0px; border-top-style: none; border-top-width: 0px; bottom: auto; box-shadow: none; box-sizing: content-box; break-after: auto; break-before: auto; break-inside: auto; buffered-rendering: auto; caption-side: top; caret-color: rgb(255, 0, 0); clear: none; clip: auto; clip-path: none; clip-rule: nonzero; color: rgb(255, 0, 0); color-interpolation: sRGB; color-interpolation-filters: linearRGB; color-rendering: auto; color-scheme: auto; column-count: auto; column-fill: balance; column-gap: normal; column-rule-color: rgb(255, 0, 0); column-rule-style: none; column-rule-width: 0px; column-span: none; column-width: auto; contain: none; content: ; counter-increment: none; counter-reset: none; cursor: auto; cx: 0px; cy: 0px; direction: ltr; display: block; dominant-baseline: auto; empty-cells: show; fill: rgb(0, 0, 0); fill-opacity: 1; fill-rule: nonzero; filter: none; flex-basis: auto; flex-direction: row; flex-grow: 0; flex-shrink: 1; flex-wrap: nowrap; float: none; flood-color: rgb(0, 0, 0); flood-opacity: 1; font-family: -webkit-standard; font-feature-settings: normal; font-optical-sizing: auto; font-size: 13.333333015441895px; font-stretch: normal; font-style: normal; font-synthesis: style weight small-caps; font-variant-alternates: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; font-weight: normal; glyph-orientation-horizontal: 0deg; glyph-orientation-vertical: auto; grid-auto-columns: auto; grid-auto-flow: row; grid-auto-rows: auto; grid-column-end: auto; grid-column-start: auto; grid-row-end: auto; grid-row-start: auto; grid-template-areas: none; grid-template-columns: none; grid-template-rows: none; hanging-punctuation: none; height: 0px; image-orientation: from-image; image-rendering: auto; inline-size: 784px; inset-block-end: auto; inset-block-start: auto; inset-inline-end: auto; inset-inline-start: auto; isolation: auto; justify-content: normal; justify-items: normal; justify-self: auto; kerning: 0; left: auto; letter-spacing: normal; lighting-color: rgb(255, 255, 255); line-break: auto; line-height: normal; list-style-image: none; list-style-position: outside; list-style-type: disc; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; marker-end: none; marker-mid: none; marker-start: none; mask: none; mask-type: luminance; math-style: normal; max-block-size: none; max-height: none; max-inline-size: none; max-width: none; min-block-size: 0px; min-height: 0px; min-inline-size: 0px; min-width: 0px; mix-blend-mode: normal; object-fit: fill; object-position: 50% 50%; opacity: 1; order: 0; orphans: auto; outline-color: rgb(255, 0, 0); outline-offset: 0px; outline-style: none; outline-width: 0px; overflow-wrap: normal; overflow-x: visible; overflow-y: visible; overscroll-behavior-x: auto; overscroll-behavior-y: auto; padding-block-end: 0px; padding-block-start: 0px; padding-bottom: 0px; padding-inline-end: 0px; padding-inline-start: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; page-break-after: auto; page-break-before: auto; page-break-inside: auto; paint-order: normal; perspective: none; perspective-origin-x: ; perspective-origin-y: ; pointer-events: auto; position: static; quotes: auto; r: 0px; resize: none; right: auto; rotate: none; row-gap: normal; rx: auto; ry: auto; scale: none; scroll-behavior: auto; scroll-margin-block: 0px; scroll-margin-bottom: 0px; scroll-margin-inline: 0px; scroll-margin-left: 0px; scroll-margin-right: 0px; scroll-margin-top: 0px; scroll-padding-block: auto; scroll-padding-bottom: auto; scroll-padding-inline: auto; scroll-padding-left: auto; scroll-padding-right: auto; scroll-padding-top: auto; scroll-snap-align: none; scroll-snap-stop: normal; scroll-snap-type: none; shape-image-threshold: 0; shape-margin: 0px; shape-outside: none; shape-rendering: auto; size: ; speak-as: normal; stop-color: rgb(0, 0, 0); stop-opacity: 1; stroke: none; stroke-color: rgba(0, 0, 0, 0); stroke-dasharray: none; stroke-dashoffset: 0px; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 4; stroke-opacity: 1; stroke-width: 1px; tab-size: 8; table-layout: auto; text-align: start; text-anchor: start; text-decoration: none; text-decoration-color: rgb(255, 0, 0); text-decoration-line: none; text-decoration-skip: auto; text-decoration-skip-ink: auto; text-decoration-style: solid; text-decoration-thickness: auto; text-indent: 0px; text-orientation: mixed; text-overflow: clip; text-rendering: auto; text-shadow: none; text-transform: none; text-underline-offset: auto; text-underline-position: auto; top: auto; touch-action: auto; transform: none; transform-box: view-box; transform-origin-x: ; transform-origin-y: ; transform-origin-z: ; transform-style: flat; transition-delay: 0s; transition-duration: 0s; transition-property: all; transition-timing-function: ease; translate: none; unicode-bidi: normal; vector-effect: none; vertical-align: baseline; visibility: visible; white-space: normal; widows: auto; width: 784px; will-change: auto; word-break: normal; word-spacing: 0px; word-wrap: normal; writing-mode: horizontal-tb; x: 0px; y: 0px; z-index: auto; zoom: 1; -apple-color-filter: none; -apple-pay-button-style: black; -apple-pay-button-type: plain; -apple-trailing-word: auto; -webkit-appearance: none; -webkit-backdrop-filter: none; -webkit-background-clip: border-box; -webkit-background-composite: source-over; -webkit-background-origin: padding-box; -webkit-background-size: auto; -webkit-border-fit: border; -webkit-border-horizontal-spacing: 0px; -webkit-border-image: none; -webkit-border-vertical-spacing: 0px; -webkit-box-align: stretch; -webkit-box-decoration-break: slice; -webkit-box-direction: normal; -webkit-box-flex: 0; -webkit-box-flex-group: 1; -webkit-box-lines: single; -webkit-box-ordinal-group: 1; -webkit-box-orient: horizontal; -webkit-box-pack: start; -webkit-box-reflect: none; -webkit-box-shadow: none; -webkit-column-axis: auto; -webkit-column-break-after: auto; -webkit-column-break-before: auto; -webkit-column-break-inside: auto; -webkit-column-progression: normal; -webkit-cursor-visibility: auto; -webkit-font-kerning: auto; -webkit-font-smoothing: auto; -webkit-hyphenate-character: auto; -webkit-hyphenate-limit-after: auto; -webkit-hyphenate-limit-before: auto; -webkit-hyphenate-limit-lines: no-limit; -webkit-hyphens: manual; -webkit-initial-letter: normal; -webkit-line-align: none; -webkit-line-box-contain: block inline replaced; -webkit-line-clamp: none; -webkit-line-grid: none; -webkit-line-snap: none; -webkit-locale: auto; -webkit-margin-after-collapse: collapse; -webkit-margin-before-collapse: collapse; -webkit-margin-bottom-collapse: collapse; -webkit-margin-top-collapse: collapse; -webkit-mask-box-image: none; -webkit-mask-box-image-outset: 0; -webkit-mask-box-image-repeat: stretch; -webkit-mask-box-image-slice: 0 fill; -webkit-mask-box-image-source: none; -webkit-mask-box-image-width: auto; -webkit-mask-clip: border-box; -webkit-mask-composite: source-over; -webkit-mask-image: none; -webkit-mask-mode: match-source; -webkit-mask-origin: border-box; -webkit-mask-position-x: 0%; -webkit-mask-position-y: 0%; -webkit-mask-repeat: repeat; -webkit-mask-size: auto; -webkit-mask-source-type: alpha; -webkit-nbsp-mode: normal; -webkit-print-color-adjust: economy; -webkit-rtl-ordering: logical; -webkit-ruby-position: before; -webkit-text-combine: none; -webkit-text-emphasis-color: rgb(255, 0, 0); -webkit-text-emphasis-position: over right; -webkit-text-emphasis-style: none; -webkit-text-fill-color: rgb(255, 0, 0); -webkit-text-orientation: mixed; -webkit-text-security: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-color: rgb(255, 0, 0); -webkit-text-stroke-width: 0px; -webkit-text-zoom: normal; -webkit-transform-style: flat; -webkit-user-drag: auto; -webkit-user-modify: read-only; -webkit-user-select: text;"
    1313
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt

    r282143 r282397  
    11
    22PASS getComputedStyle returns no style for detached element
    3 FAIL getComputedStyle returns no style for element in non-rendered iframe (display: none) assert_equals: expected 0 but got 391
    4 FAIL getComputedStyle returns no style for element in non-rendered iframe (display: none) from iframe's window assert_equals: expected 0 but got 391
    5 FAIL getComputedStyle returns no style for element outside the flat tree assert_equals: expected 0 but got 391
    6 FAIL getComputedStyle returns no style for descendant outside the flat tree assert_equals: expected 0 but got 391
     3FAIL getComputedStyle returns no style for element in non-rendered iframe (display: none) assert_equals: expected 0 but got 392
     4FAIL getComputedStyle returns no style for element in non-rendered iframe (display: none) from iframe's window assert_equals: expected 0 but got 392
     5FAIL getComputedStyle returns no style for element outside the flat tree assert_equals: expected 0 but got 392
     6FAIL getComputedStyle returns no style for descendant outside the flat tree assert_equals: expected 0 but got 392
    77PASS getComputedStyle returns no style for shadow tree outside of flattened tree
    88
  • trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt

    r282143 r282397  
    1010FAIL Shorthands aren't serialized if there are other properties with different logical groups in between assert_equals: expected "margin-top: 10px; margin-right: 10px; margin-left: 10px; margin-inline-start: 10px; margin-block: 10px; margin-inline-end: 10px; margin-bottom: 10px;" but got "margin: 10px; margin-inline: 10px; margin-block: 10px;"
    1111PASS Shorthands _are_ serialized if there are no other properties with different logical groups in between
    12 FAIL cssText on computed style declaration returns the empty string assert_equals: cssText is empty expected "" but got "align-content: normal; align-items: normal; align-self: auto; alignment-baseline: auto; all: ; alt: \"\"; animation-delay: 0s; animation-direction: normal; animation-duration: 0s; animation-fill-mode: none; animation-iteration-count: 1; animation-name: none; animation-play-state: running; animation-timing-function: ease; aspect-ratio: auto; backface-visibility: visible; background-attachment: scroll; background-blend-mode: normal; background-clip: border-box; background-color: rgba(0, 0, 0, 0); background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; baseline-shift: baseline; block-size: 0px; border-block-end-color: rgb(255, 0, 0); border-block-end-style: none; border-block-end-width: 0px; border-block-start-color: rgb(255, 0, 0); border-block-start-style: none; border-block-start-width: 0px; border-bottom-color: rgb(255, 0, 0); border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-bottom-style: none; border-bottom-width: 0px; border-collapse: separate; border-end-end-radius: 0px; border-end-start-radius: 0px; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; border-inline-end-color: rgb(255, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(255, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(255, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(255, 0, 0); border-right-style: none; border-right-width: 0px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-color: rgb(255, 0, 0); border-top-left-radius: 0px; border-top-right-radius: 0px; border-top-style: none; border-top-width: 0px; bottom: auto; box-shadow: none; box-sizing: content-box; break-after: auto; break-before: auto; break-inside: auto; buffered-rendering: auto; caption-side: top; caret-color: rgb(255, 0, 0); clear: none; clip: auto; clip-path: none; clip-rule: nonzero; color: rgb(255, 0, 0); color-interpolation: sRGB; color-interpolation-filters: linearRGB; color-rendering: auto; color-scheme: auto; column-count: auto; column-fill: balance; column-gap: normal; column-rule-color: rgb(255, 0, 0); column-rule-style: none; column-rule-width: 0px; column-span: none; column-width: auto; contain: none; content: ; counter-increment: none; counter-reset: none; cursor: auto; cx: 0px; cy: 0px; direction: ltr; display: block; dominant-baseline: auto; empty-cells: show; fill: rgb(0, 0, 0); fill-opacity: 1; fill-rule: nonzero; filter: none; flex-basis: auto; flex-direction: row; flex-grow: 0; flex-shrink: 1; flex-wrap: nowrap; float: none; flood-color: rgb(0, 0, 0); flood-opacity: 1; font-family: -webkit-standard; font-feature-settings: normal; font-optical-sizing: auto; font-size: 13.333333015441895px; font-stretch: normal; font-style: normal; font-synthesis: style weight small-caps; font-variant-alternates: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; font-weight: normal; glyph-orientation-horizontal: 0deg; glyph-orientation-vertical: auto; grid-auto-columns: auto; grid-auto-flow: row; grid-auto-rows: auto; grid-column-end: auto; grid-column-start: auto; grid-row-end: auto; grid-row-start: auto; grid-template-areas: none; grid-template-columns: none; grid-template-rows: none; hanging-punctuation: none; height: 0px; image-orientation: from-image; image-rendering: auto; inline-size: 784px; inset-block-end: auto; inset-block-start: auto; inset-inline-end: auto; inset-inline-start: auto; isolation: auto; justify-content: normal; justify-items: normal; justify-self: auto; kerning: 0; left: auto; letter-spacing: normal; lighting-color: rgb(255, 255, 255); line-break: auto; line-height: normal; list-style-image: none; list-style-position: outside; list-style-type: disc; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; marker-end: none; marker-mid: none; marker-start: none; mask: none; mask-type: luminance; math-style: normal; max-block-size: none; max-height: none; max-inline-size: none; max-width: none; min-block-size: 0px; min-height: 0px; min-inline-size: 0px; min-width: 0px; mix-blend-mode: normal; object-fit: fill; object-position: 50% 50%; opacity: 1; order: 0; orphans: auto; outline-color: rgb(255, 0, 0); outline-offset: 0px; outline-style: none; outline-width: 0px; overflow-wrap: normal; overflow-x: visible; overflow-y: visible; overscroll-behavior-x: auto; overscroll-behavior-y: auto; padding-block-end: 0px; padding-block-start: 0px; padding-bottom: 0px; padding-inline-end: 0px; padding-inline-start: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; page-break-after: auto; page-break-before: auto; page-break-inside: auto; paint-order: normal; perspective: none; perspective-origin-x: ; perspective-origin-y: ; pointer-events: auto; position: static; quotes: auto; r: 0px; resize: none; right: auto; rotate: none; row-gap: normal; rx: auto; ry: auto; scale: none; scroll-behavior: auto; scroll-margin-block: 0px; scroll-margin-bottom: 0px; scroll-margin-inline: 0px; scroll-margin-left: 0px; scroll-margin-right: 0px; scroll-margin-top: 0px; scroll-padding-block: auto; scroll-padding-bottom: auto; scroll-padding-inline: auto; scroll-padding-left: auto; scroll-padding-right: auto; scroll-padding-top: auto; scroll-snap-align: none; scroll-snap-stop: normal; scroll-snap-type: none; shape-image-threshold: 0; shape-margin: 0px; shape-outside: none; shape-rendering: auto; size: ; speak-as: normal; stop-color: rgb(0, 0, 0); stop-opacity: 1; stroke: none; stroke-color: rgba(0, 0, 0, 0); stroke-dasharray: none; stroke-dashoffset: 0px; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 4; stroke-opacity: 1; stroke-width: 1px; tab-size: 8; table-layout: auto; text-align: start; text-anchor: start; text-decoration: none; text-decoration-color: rgb(255, 0, 0); text-decoration-line: none; text-decoration-skip: auto; text-decoration-style: solid; text-decoration-thickness: auto; text-indent: 0px; text-orientation: mixed; text-overflow: clip; text-rendering: auto; text-shadow: none; text-transform: none; text-underline-offset: auto; text-underline-position: auto; top: auto; touch-action: auto; transform: none; transform-box: view-box; transform-origin-x: ; transform-origin-y: ; transform-origin-z: ; transform-style: flat; transition-delay: 0s; transition-duration: 0s; transition-property: all; transition-timing-function: ease; translate: none; unicode-bidi: normal; vector-effect: none; vertical-align: baseline; visibility: visible; white-space: normal; widows: auto; width: 784px; will-change: auto; word-break: normal; word-spacing: 0px; word-wrap: normal; writing-mode: horizontal-tb; x: 0px; y: 0px; z-index: auto; zoom: 1; -apple-color-filter: none; -apple-pay-button-style: black; -apple-pay-button-type: plain; -apple-trailing-word: auto; -webkit-appearance: none; -webkit-backdrop-filter: none; -webkit-background-clip: border-box; -webkit-background-composite: source-over; -webkit-background-origin: padding-box; -webkit-background-size: auto; -webkit-border-fit: border; -webkit-border-horizontal-spacing: 0px; -webkit-border-image: none; -webkit-border-vertical-spacing: 0px; -webkit-box-align: stretch; -webkit-box-decoration-break: slice; -webkit-box-direction: normal; -webkit-box-flex: 0; -webkit-box-flex-group: 1; -webkit-box-lines: single; -webkit-box-ordinal-group: 1; -webkit-box-orient: horizontal; -webkit-box-pack: start; -webkit-box-reflect: none; -webkit-box-shadow: none; -webkit-column-axis: auto; -webkit-column-break-after: auto; -webkit-column-break-before: auto; -webkit-column-break-inside: auto; -webkit-column-progression: normal; -webkit-cursor-visibility: auto; -webkit-font-kerning: auto; -webkit-font-smoothing: auto; -webkit-hyphenate-character: auto; -webkit-hyphenate-limit-after: auto; -webkit-hyphenate-limit-before: auto; -webkit-hyphenate-limit-lines: no-limit; -webkit-hyphens: manual; -webkit-initial-letter: normal; -webkit-line-align: none; -webkit-line-box-contain: block inline replaced; -webkit-line-clamp: none; -webkit-line-grid: none; -webkit-line-snap: none; -webkit-locale: auto; -webkit-margin-after-collapse: collapse; -webkit-margin-before-collapse: collapse; -webkit-margin-bottom-collapse: collapse; -webkit-margin-top-collapse: collapse; -webkit-mask-box-image: none; -webkit-mask-box-image-outset: 0; -webkit-mask-box-image-repeat: stretch; -webkit-mask-box-image-slice: 0 fill; -webkit-mask-box-image-source: none; -webkit-mask-box-image-width: auto; -webkit-mask-clip: border-box; -webkit-mask-composite: source-over; -webkit-mask-image: none; -webkit-mask-mode: match-source; -webkit-mask-origin: border-box; -webkit-mask-position-x: 0%; -webkit-mask-position-y: 0%; -webkit-mask-repeat: repeat; -webkit-mask-size: auto; -webkit-mask-source-type: alpha; -webkit-nbsp-mode: normal; -webkit-overflow-scrolling: auto; -webkit-print-color-adjust: economy; -webkit-rtl-ordering: logical; -webkit-ruby-position: before; -webkit-text-combine: none; -webkit-text-emphasis-color: rgb(255, 0, 0); -webkit-text-emphasis-position: over right; -webkit-text-emphasis-style: none; -webkit-text-fill-color: rgb(255, 0, 0); -webkit-text-orientation: mixed; -webkit-text-security: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-color: rgb(255, 0, 0); -webkit-text-stroke-width: 0px; -webkit-text-zoom: normal; -webkit-touch-callout: default; -webkit-transform-style: flat; -webkit-user-drag: auto; -webkit-user-modify: read-only; -webkit-user-select: text;"
     12FAIL cssText on computed style declaration returns the empty string assert_equals: cssText is empty expected "" but got "align-content: normal; align-items: normal; align-self: auto; alignment-baseline: auto; all: ; alt: \"\"; animation-delay: 0s; animation-direction: normal; animation-duration: 0s; animation-fill-mode: none; animation-iteration-count: 1; animation-name: none; animation-play-state: running; animation-timing-function: ease; aspect-ratio: auto; backface-visibility: visible; background-attachment: scroll; background-blend-mode: normal; background-clip: border-box; background-color: rgba(0, 0, 0, 0); background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; baseline-shift: baseline; block-size: 0px; border-block-end-color: rgb(255, 0, 0); border-block-end-style: none; border-block-end-width: 0px; border-block-start-color: rgb(255, 0, 0); border-block-start-style: none; border-block-start-width: 0px; border-bottom-color: rgb(255, 0, 0); border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-bottom-style: none; border-bottom-width: 0px; border-collapse: separate; border-end-end-radius: 0px; border-end-start-radius: 0px; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; border-inline-end-color: rgb(255, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(255, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(255, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(255, 0, 0); border-right-style: none; border-right-width: 0px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-color: rgb(255, 0, 0); border-top-left-radius: 0px; border-top-right-radius: 0px; border-top-style: none; border-top-width: 0px; bottom: auto; box-shadow: none; box-sizing: content-box; break-after: auto; break-before: auto; break-inside: auto; buffered-rendering: auto; caption-side: top; caret-color: rgb(255, 0, 0); clear: none; clip: auto; clip-path: none; clip-rule: nonzero; color: rgb(255, 0, 0); color-interpolation: sRGB; color-interpolation-filters: linearRGB; color-rendering: auto; color-scheme: auto; column-count: auto; column-fill: balance; column-gap: normal; column-rule-color: rgb(255, 0, 0); column-rule-style: none; column-rule-width: 0px; column-span: none; column-width: auto; contain: none; content: ; counter-increment: none; counter-reset: none; cursor: auto; cx: 0px; cy: 0px; direction: ltr; display: block; dominant-baseline: auto; empty-cells: show; fill: rgb(0, 0, 0); fill-opacity: 1; fill-rule: nonzero; filter: none; flex-basis: auto; flex-direction: row; flex-grow: 0; flex-shrink: 1; flex-wrap: nowrap; float: none; flood-color: rgb(0, 0, 0); flood-opacity: 1; font-family: -webkit-standard; font-feature-settings: normal; font-optical-sizing: auto; font-size: 13.333333015441895px; font-stretch: normal; font-style: normal; font-synthesis: style weight small-caps; font-variant-alternates: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; font-weight: normal; glyph-orientation-horizontal: 0deg; glyph-orientation-vertical: auto; grid-auto-columns: auto; grid-auto-flow: row; grid-auto-rows: auto; grid-column-end: auto; grid-column-start: auto; grid-row-end: auto; grid-row-start: auto; grid-template-areas: none; grid-template-columns: none; grid-template-rows: none; hanging-punctuation: none; height: 0px; image-orientation: from-image; image-rendering: auto; inline-size: 784px; inset-block-end: auto; inset-block-start: auto; inset-inline-end: auto; inset-inline-start: auto; isolation: auto; justify-content: normal; justify-items: normal; justify-self: auto; kerning: 0; left: auto; letter-spacing: normal; lighting-color: rgb(255, 255, 255); line-break: auto; line-height: normal; list-style-image: none; list-style-position: outside; list-style-type: disc; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; marker-end: none; marker-mid: none; marker-start: none; mask: none; mask-type: luminance; math-style: normal; max-block-size: none; max-height: none; max-inline-size: none; max-width: none; min-block-size: 0px; min-height: 0px; min-inline-size: 0px; min-width: 0px; mix-blend-mode: normal; object-fit: fill; object-position: 50% 50%; opacity: 1; order: 0; orphans: auto; outline-color: rgb(255, 0, 0); outline-offset: 0px; outline-style: none; outline-width: 0px; overflow-wrap: normal; overflow-x: visible; overflow-y: visible; overscroll-behavior-x: auto; overscroll-behavior-y: auto; padding-block-end: 0px; padding-block-start: 0px; padding-bottom: 0px; padding-inline-end: 0px; padding-inline-start: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; page-break-after: auto; page-break-before: auto; page-break-inside: auto; paint-order: normal; perspective: none; perspective-origin-x: ; perspective-origin-y: ; pointer-events: auto; position: static; quotes: auto; r: 0px; resize: none; right: auto; rotate: none; row-gap: normal; rx: auto; ry: auto; scale: none; scroll-behavior: auto; scroll-margin-block: 0px; scroll-margin-bottom: 0px; scroll-margin-inline: 0px; scroll-margin-left: 0px; scroll-margin-right: 0px; scroll-margin-top: 0px; scroll-padding-block: auto; scroll-padding-bottom: auto; scroll-padding-inline: auto; scroll-padding-left: auto; scroll-padding-right: auto; scroll-padding-top: auto; scroll-snap-align: none; scroll-snap-stop: normal; scroll-snap-type: none; shape-image-threshold: 0; shape-margin: 0px; shape-outside: none; shape-rendering: auto; size: ; speak-as: normal; stop-color: rgb(0, 0, 0); stop-opacity: 1; stroke: none; stroke-color: rgba(0, 0, 0, 0); stroke-dasharray: none; stroke-dashoffset: 0px; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 4; stroke-opacity: 1; stroke-width: 1px; tab-size: 8; table-layout: auto; text-align: start; text-anchor: start; text-decoration: none; text-decoration-color: rgb(255, 0, 0); text-decoration-line: none; text-decoration-skip: auto; text-decoration-skip-ink: auto; text-decoration-style: solid; text-decoration-thickness: auto; text-indent: 0px; text-orientation: mixed; text-overflow: clip; text-rendering: auto; text-shadow: none; text-transform: none; text-underline-offset: auto; text-underline-position: auto; top: auto; touch-action: auto; transform: none; transform-box: view-box; transform-origin-x: ; transform-origin-y: ; transform-origin-z: ; transform-style: flat; transition-delay: 0s; transition-duration: 0s; transition-property: all; transition-timing-function: ease; translate: none; unicode-bidi: normal; vector-effect: none; vertical-align: baseline; visibility: visible; white-space: normal; widows: auto; width: 784px; will-change: auto; word-break: normal; word-spacing: 0px; word-wrap: normal; writing-mode: horizontal-tb; x: 0px; y: 0px; z-index: auto; zoom: 1; -apple-color-filter: none; -apple-pay-button-style: black; -apple-pay-button-type: plain; -apple-trailing-word: auto; -webkit-appearance: none; -webkit-backdrop-filter: none; -webkit-background-clip: border-box; -webkit-background-composite: source-over; -webkit-background-origin: padding-box; -webkit-background-size: auto; -webkit-border-fit: border; -webkit-border-horizontal-spacing: 0px; -webkit-border-image: none; -webkit-border-vertical-spacing: 0px; -webkit-box-align: stretch; -webkit-box-decoration-break: slice; -webkit-box-direction: normal; -webkit-box-flex: 0; -webkit-box-flex-group: 1; -webkit-box-lines: single; -webkit-box-ordinal-group: 1; -webkit-box-orient: horizontal; -webkit-box-pack: start; -webkit-box-reflect: none; -webkit-box-shadow: none; -webkit-column-axis: auto; -webkit-column-break-after: auto; -webkit-column-break-before: auto; -webkit-column-break-inside: auto; -webkit-column-progression: normal; -webkit-cursor-visibility: auto; -webkit-font-kerning: auto; -webkit-font-smoothing: auto; -webkit-hyphenate-character: auto; -webkit-hyphenate-limit-after: auto; -webkit-hyphenate-limit-before: auto; -webkit-hyphenate-limit-lines: no-limit; -webkit-hyphens: manual; -webkit-initial-letter: normal; -webkit-line-align: none; -webkit-line-box-contain: block inline replaced; -webkit-line-clamp: none; -webkit-line-grid: none; -webkit-line-snap: none; -webkit-locale: auto; -webkit-margin-after-collapse: collapse; -webkit-margin-before-collapse: collapse; -webkit-margin-bottom-collapse: collapse; -webkit-margin-top-collapse: collapse; -webkit-mask-box-image: none; -webkit-mask-box-image-outset: 0; -webkit-mask-box-image-repeat: stretch; -webkit-mask-box-image-slice: 0 fill; -webkit-mask-box-image-source: none; -webkit-mask-box-image-width: auto; -webkit-mask-clip: border-box; -webkit-mask-composite: source-over; -webkit-mask-image: none; -webkit-mask-mode: match-source; -webkit-mask-origin: border-box; -webkit-mask-position-x: 0%; -webkit-mask-position-y: 0%; -webkit-mask-repeat: repeat; -webkit-mask-size: auto; -webkit-mask-source-type: alpha; -webkit-nbsp-mode: normal; -webkit-overflow-scrolling: auto; -webkit-print-color-adjust: economy; -webkit-rtl-ordering: logical; -webkit-ruby-position: before; -webkit-text-combine: none; -webkit-text-emphasis-color: rgb(255, 0, 0); -webkit-text-emphasis-position: over right; -webkit-text-emphasis-style: none; -webkit-text-fill-color: rgb(255, 0, 0); -webkit-text-orientation: mixed; -webkit-text-security: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-color: rgb(255, 0, 0); -webkit-text-stroke-width: 0px; -webkit-text-zoom: normal; -webkit-touch-callout: default; -webkit-transform-style: flat; -webkit-user-drag: auto; -webkit-user-modify: read-only; -webkit-user-select: text;"
    1313
  • trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt

    r282143 r282397  
    11
    22PASS getComputedStyle returns no style for detached element
    3 FAIL getComputedStyle returns no style for element in non-rendered iframe (display: none) assert_equals: expected 0 but got 393
    4 FAIL getComputedStyle returns no style for element in non-rendered iframe (display: none) from iframe's window assert_equals: expected 0 but got 393
    5 FAIL getComputedStyle returns no style for element outside the flat tree assert_equals: expected 0 but got 393
    6 FAIL getComputedStyle returns no style for descendant outside the flat tree assert_equals: expected 0 but got 393
     3FAIL getComputedStyle returns no style for element in non-rendered iframe (display: none) assert_equals: expected 0 but got 394
     4FAIL getComputedStyle returns no style for element in non-rendered iframe (display: none) from iframe's window assert_equals: expected 0 but got 394
     5FAIL getComputedStyle returns no style for element outside the flat tree assert_equals: expected 0 but got 394
     6FAIL getComputedStyle returns no style for descendant outside the flat tree assert_equals: expected 0 but got 394
    77PASS getComputedStyle returns no style for shadow tree outside of flattened tree
    88
  • trunk/Source/WebCore/ChangeLog

    r282396 r282397  
     12021-09-14  Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        Implement text-decoration-skip-ink
     4        https://bugs.webkit.org/show_bug.cgi?id=230244
     5
     6        Reviewed by Antti Koivisto.
     7
     8        First, there was "text-decoration-skip: ink", and that was what we implemented in WebKit. That had a
     9        problem, though, which was that you couldn't add a value into the set without resetting the entire
     10        property, so the CSSWG split it up into a bunch of constituent properties:
     11        - text-decoration-skip-self
     12        - text-decoration-skip-box
     13        - text-decoration-skip-inset
     14        - text-decoration-skip-spaces
     15        - text-decoration-skip-ink
     16        text-decoration-skip was turned into a shorthand for all of these constituent properties.
     17
     18        Chrome and Firefox, however, implemented text-decoration-skip-ink rather than text-decoration-skip.
     19        From what I understand, Firefox isn't interested in implementing the shorthand until they implement
     20        all the longhands. Therefore, because WebKit implements only the shorthand and Firefox implements only
     21        the longhand, authors have to write two different properties in their style for the two different
     22        browsers. That's unfortunate, so this patch makes WebKit follow the CSSWG, and turns
     23        text-decoration-skip into a shorthand, and adds support for text-decoration-skip-ink. Therefore,
     24        there's no new behavior here; it's just a new way of accessing the same functionality we already have.
     25
     26        The spec actually removed the "ink" value from the text-decoration-skip shorthand, but we have to
     27        maintain it because of compat. So, this patch maps "text-decoration-skip: ink" to
     28        "text-decoration-skip-ink: auto". There's an issue in the spec about this:
     29        https://drafts.csswg.org/css-text-decor-4/#issue-070668ae
     30
     31        Back when we implemented text-decoration-skip: ink, we only implemented the "ink" value, and none of
     32        the other values. This patch also doesn't implement the other values.
     33
     34        Also, previously, we used to parse "text-decoration-skip: objects" but we didn't do anything with it.
     35        This patch removes parsing support for that, so @supports works properly.
     36
     37        Covered by existing tests.
     38
     39        * css/CSSComputedStyleDeclaration.cpp:
     40        (WebCore::renderTextDecorationSkipToCSSValue):
     41        (WebCore::ComputedStyleExtractor::valueForPropertyInStyle):
     42        (WebCore::renderTextDecorationSkipFlagsToCSSValue): Deleted.
     43        * css/CSSPrimitiveValueMappings.h:
     44        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
     45        (WebCore::CSSPrimitiveValue::operator TextDecorationSkipInk const):
     46        * css/CSSProperties.json:
     47        * css/StyleProperties.cpp:
     48        (WebCore::StyleProperties::getPropertyValue const):
     49        (WebCore::StyleProperties::textDecorationSkipValue const):
     50        * css/StyleProperties.h:
     51        * css/html.css:
     52        (ins, del):
     53        * css/parser/CSSParserFastPaths.cpp:
     54        (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
     55        (WebCore::CSSParserFastPaths::isKeywordPropertyID):
     56        * css/parser/CSSPropertyParser.cpp:
     57        (WebCore::CSSPropertyParser::consumeTextDecorationSkip):
     58        (WebCore::CSSPropertyParser::parseSingleValue):
     59        (WebCore::CSSPropertyParser::parseShorthand):
     60        (WebCore::consumeTextDecorationSkip): Deleted.
     61        * css/parser/CSSPropertyParser.h:
     62        * rendering/TextDecorationPainter.cpp:
     63        (WebCore::TextDecorationPainter::paintTextDecoration):
     64        * rendering/style/RenderStyle.cpp:
     65        (WebCore::RenderStyle::changeRequiresRepaintIfTextOrBorderOrOutline const):
     66        * rendering/style/RenderStyle.h:
     67        (WebCore::RenderStyle::textDecorationSkipInk const):
     68        (WebCore::RenderStyle::setTextDecorationSkipInk):
     69        (WebCore::RenderStyle::initialTextDecorationSkipInk):
     70        (WebCore::RenderStyle::textDecorationSkip const): Deleted.
     71        (WebCore::RenderStyle::setTextDecorationSkip): Deleted.
     72        (WebCore::RenderStyle::initialTextDecorationSkip): Deleted.
     73        * rendering/style/RenderStyleConstants.cpp:
     74        (WebCore::operator<<):
     75        * rendering/style/RenderStyleConstants.h:
     76        * rendering/style/StyleRareInheritedData.cpp:
     77        (WebCore::StyleRareInheritedData::StyleRareInheritedData):
     78        (WebCore::StyleRareInheritedData::operator== const):
     79        * rendering/style/StyleRareInheritedData.h:
     80        * style/InlineTextBoxStyle.cpp:
     81        (WebCore::minLogicalTopForTextDecorationLine):
     82        (WebCore::maxLogicalBottomForTextDecorationLine):
     83        * style/PropertyCascade.cpp:
     84        (WebCore::Style::shouldApplyPropertyInParseOrder):
     85        * style/StyleBuilderConverter.h:
     86        (WebCore::Style::BuilderConverter::valueToDecorationSkip): Deleted.
     87        (WebCore::Style::BuilderConverter::convertTextDecorationSkip): Deleted.
     88
    1892021-09-14  Sam Sneddon  <gsnedders@apple.com>
    290
  • trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp

    r282379 r282397  
    16201620}
    16211621
    1622 static Ref<CSSValue> renderTextDecorationSkipFlagsToCSSValue(OptionSet<TextDecorationSkip> textDecorationSkip)
    1623 {
    1624     // FIXME: This should probably return a CSSValueList with the set of all TextDecorationSkips.
    1625     switch (static_cast<TextDecorationSkip>(textDecorationSkip.toRaw())) {
    1626     case TextDecorationSkip::Auto:
     1622static RefPtr<CSSValue> renderTextDecorationSkipToCSSValue(TextDecorationSkipInk textDecorationSkipInk)
     1623{
     1624    switch (textDecorationSkipInk) {
     1625    case TextDecorationSkipInk::None:
     1626        return CSSValuePool::singleton().createIdentifierValue(CSSValueNone);
     1627    case TextDecorationSkipInk::Auto:
    16271628        return CSSValuePool::singleton().createIdentifierValue(CSSValueAuto);
    1628     case TextDecorationSkip::None:
    1629         return CSSValuePool::singleton().createIdentifierValue(CSSValueNone);
    1630     case TextDecorationSkip::Ink:
    1631         return CSSValuePool::singleton().createIdentifierValue(CSSValueInk);
    1632     case TextDecorationSkip::Objects:
    1633         return CSSValuePool::singleton().createIdentifierValue(CSSValueObjects);
     1629    case TextDecorationSkipInk::All:
     1630        return nullptr;
    16341631    }
    16351632
     
    32343231            return currentColorOrValidColor(&style, style.textDecorationColor());
    32353232        case CSSPropertyTextDecorationSkip:
    3236             return renderTextDecorationSkipFlagsToCSSValue(style.textDecorationSkip());
     3233            return renderTextDecorationSkipToCSSValue(style.textDecorationSkipInk());
     3234        case CSSPropertyTextDecorationSkipInk:
     3235            return cssValuePool.createValue(style.textDecorationSkipInk());
    32373236        case CSSPropertyTextUnderlinePosition:
    32383237            return cssValuePool.createValue(style.textUnderlinePosition());
  • trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h

    r281259 r282397  
    25342534    ASSERT_NOT_REACHED();
    25352535    return TextSecurity::None;
     2536}
     2537
     2538template<> inline CSSPrimitiveValue::CSSPrimitiveValue(TextDecorationSkipInk e)
     2539    : CSSValue(PrimitiveClass)
     2540{
     2541    setPrimitiveUnitType(CSSUnitType::CSS_VALUE_ID);
     2542    switch (e) {
     2543    case TextDecorationSkipInk::None:
     2544        m_value.valueID = CSSValueNone;
     2545        break;
     2546    case TextDecorationSkipInk::Auto:
     2547        m_value.valueID = CSSValueAuto;
     2548        break;
     2549    case TextDecorationSkipInk::All:
     2550        m_value.valueID = CSSValueAll;
     2551        break;
     2552    }
     2553}
     2554
     2555template<> inline CSSPrimitiveValue::operator TextDecorationSkipInk() const
     2556{
     2557    ASSERT(isValueID());
     2558
     2559    switch (m_value.valueID) {
     2560    case CSSValueNone:
     2561        return TextDecorationSkipInk::None;
     2562    case CSSValueAuto:
     2563        return TextDecorationSkipInk::Auto;
     2564    case CSSValueAll:
     2565        return TextDecorationSkipInk::All;
     2566    default:
     2567        break;
     2568    }
     2569
     2570    ASSERT_NOT_REACHED();
     2571    return TextDecorationSkipInk::None;
    25362572}
    25372573
  • trunk/Source/WebCore/css/CSSProperties.json

    r282158 r282397  
    67366736            "inherited": true,
    67376737            "codegen-properties": {
    6738                 "converter": "TextDecorationSkip",
    67396738                "aliases": [
    67406739                    "-webkit-text-decoration-skip"
     6740                ],
     6741                "longhands": [
     6742                    "text-decoration-skip-ink"
    67416743                ]
    67426744            },
     
    67446746                "category": "css-text-decor",
    67456747                "url": "https://www.w3.org/TR/css-text-decor-3/#text-decoration-skip"
     6748            }
     6749        },
     6750        "text-decoration-skip-ink": {
     6751            "inherited": true,
     6752            "values": [
     6753                "auto",
     6754                "none",
     6755                "all"
     6756            ],
     6757            "specification": {
     6758                "category": "css-text-decor",
     6759                "url": "https://drafts.csswg.org/css-text-decor-4/#text-decoration-skip-ink-property"
    67466760            }
    67476761        },
  • trunk/Source/WebCore/css/StyleProperties.cpp

    r279070 r282397  
    240240    case CSSPropertyFontVariant:
    241241        return fontVariantValue();
     242    case CSSPropertyTextDecorationSkip:
     243        return textDecorationSkipValue();
    242244    case CSSPropertyInset:
    243245        return get4Values(insetShorthand());
     
    420422}
    421423
     424String StyleProperties::textDecorationSkipValue() const
     425{
     426    int textDecorationSkipInkPropertyIndex = findPropertyIndex(CSSPropertyTextDecorationSkipInk);
     427    if (textDecorationSkipInkPropertyIndex == -1)
     428        return emptyString();
     429    PropertyReference textDecorationSkipInkProperty = propertyAt(textDecorationSkipInkPropertyIndex);
     430    if (textDecorationSkipInkProperty.isImplicit())
     431        return emptyString();
     432    return textDecorationSkipInkProperty.value()->cssText();
     433}
     434
    422435String StyleProperties::fontVariantValue() const
    423436{
  • trunk/Source/WebCore/css/StyleProperties.h

    r279070 r282397  
    174174    String fontValue() const;
    175175    String fontVariantValue() const;
     176    String textDecorationSkipValue() const;
    176177    void appendFontLonghandValueIfExplicit(CSSPropertyID, StringBuilder& result, String& value) const;
    177178
  • trunk/Source/WebCore/css/html.css

    r280927 r282397  
    14061406    img, picture, video { filter: invert(100%); } /* Images and videos double-inverted. */
    14071407}
     1408
     1409/* https://drafts.csswg.org/css-text-decor-4/#text-decoration-skipping */
     1410ins, del {
     1411    text-decoration-skip: none;
     1412}
  • trunk/Source/WebCore/css/parser/CSSParserFastPaths.cpp

    r281512 r282397  
    902902        return valueID == CSSValueAuto || valueID == CSSValueNone;
    903903#endif
     904    case CSSPropertyTextDecorationSkipInk:
     905        return valueID == CSSValueAuto || valueID == CSSValueNone || valueID == CSSValueAll;
    904906    default:
    905907        ASSERT_NOT_REACHED();
     
    10621064#endif
    10631065    case CSSPropertyMathStyle:
     1066    case CSSPropertyTextDecorationSkipInk:
    10641067        return true;
    10651068    default:
  • trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp

    r282359 r282397  
    16771677}
    16781678
    1679 static RefPtr<CSSValue> consumeTextDecorationSkip(CSSParserTokenRange& range)
    1680 {
    1681     CSSValueID id = range.peek().id();
    1682     if (id == CSSValueNone)
    1683         return consumeIdent(range);
    1684 
    1685     RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
    1686     while (true) {
    1687         auto ident = consumeIdent<CSSValueAuto, CSSValueInk, CSSValueObjects>(range);
    1688         if (!ident)
    1689             break;
    1690         if (list->hasValue(ident.get()))
    1691             return nullptr;
    1692         list->append(ident.releaseNonNull());
    1693     }
    1694 
    1695     if (!list->length())
    1696         return nullptr;
    1697     return list;
     1679bool CSSPropertyParser::consumeTextDecorationSkip(bool important)
     1680{
     1681    if (RefPtr<CSSPrimitiveValue> skip = consumeIdent<CSSValueNone, CSSValueAuto, CSSValueInk>(m_range)) {
     1682        switch (skip->valueID()) {
     1683        case CSSValueNone:
     1684            addProperty(CSSPropertyTextDecorationSkipInk, CSSPropertyTextDecorationSkip, skip.releaseNonNull(), important);
     1685            return m_range.atEnd();
     1686        case CSSValueAuto:
     1687            addProperty(CSSPropertyTextDecorationSkipInk, CSSPropertyTextDecorationSkip, skip.releaseNonNull(), important);
     1688            return m_range.atEnd();
     1689        case CSSValueInk:
     1690            addProperty(CSSPropertyTextDecorationSkipInk, CSSPropertyTextDecorationSkip, CSSValuePool::singleton().createIdentifierValue(CSSValueAuto), important);
     1691            return m_range.atEnd();
     1692        default:
     1693            ASSERT_NOT_REACHED();
     1694            return false;
     1695        }
     1696    }
     1697    return false;
    16981698}
    16991699
     
    41934193    case CSSPropertyTextDecorationColor:
    41944194        return consumeColor(m_range, m_context);
    4195     case CSSPropertyTextDecorationSkip:
    4196         return consumeTextDecorationSkip(m_range);
    41974195    case CSSPropertyWebkitTextStrokeWidth:
    41984196        return consumeTextStrokeWidth(m_range, m_context.mode);
     
    61666164    case CSSPropertyPlaceSelf:
    61676165        return consumePlaceSelfShorthand(important);
     6166    case CSSPropertyTextDecorationSkip:
     6167        return consumeTextDecorationSkip(important);
    61686168    default:
    61696169        return false;
  • trunk/Source/WebCore/css/parser/CSSPropertyParser.h

    r276152 r282397  
    104104
    105105    bool consumeFont(bool important);
     106    bool consumeTextDecorationSkip(bool important);
    106107    bool consumeFontVariantShorthand(bool important);
    107108    bool consumeSystemFont(bool important);
  • trunk/Source/WebCore/rendering/TextDecorationPainter.cpp

    r281241 r282397  
    224224            strokeWavyTextDecoration(m_context, rect, m_lineStyle.computedFontPixelSize());
    225225        else if (decoration == TextDecoration::Underline || decoration == TextDecoration::Overline) {
    226             if ((m_lineStyle.textDecorationSkip() == TextDecorationSkip::Ink || m_lineStyle.textDecorationSkip() == TextDecorationSkip::Auto) && m_isHorizontal) {
     226            if ((m_lineStyle.textDecorationSkipInk() == TextDecorationSkipInk::Auto || m_lineStyle.textDecorationSkipInk() == TextDecorationSkipInk::All) && m_isHorizontal) {
    227227                if (!m_context.paintingDisabled()) {
    228228                    FloatRect underlineBoundingBox = m_context.computeUnderlineBoundsForText(rect, m_isPrinting);
  • trunk/Source/WebCore/rendering/style/RenderStyle.cpp

    r281737 r282397  
    11621162        || m_rareNonInheritedData->textDecorationStyle != other.m_rareNonInheritedData->textDecorationStyle
    11631163        || m_rareNonInheritedData->textDecorationColor != other.m_rareNonInheritedData->textDecorationColor
    1164         || m_rareInheritedData->textDecorationSkip != other.m_rareInheritedData->textDecorationSkip
     1164        || m_rareInheritedData->textDecorationSkipInk != other.m_rareInheritedData->textDecorationSkipInk
    11651165        || m_rareInheritedData->textFillColor != other.m_rareInheritedData->textFillColor
    11661166        || m_rareInheritedData->textStrokeColor != other.m_rareInheritedData->textStrokeColor
  • trunk/Source/WebCore/rendering/style/RenderStyle.h

    r281724 r282397  
    374374    OptionSet<TextDecoration> textDecoration() const { return OptionSet<TextDecoration>::fromRaw(m_visualData->textDecoration); }
    375375    TextDecorationStyle textDecorationStyle() const { return static_cast<TextDecorationStyle>(m_rareNonInheritedData->textDecorationStyle); }
    376     OptionSet<TextDecorationSkip> textDecorationSkip() const { return OptionSet<TextDecorationSkip>::fromRaw(m_rareInheritedData->textDecorationSkip); }
     376    TextDecorationSkipInk textDecorationSkipInk() const { return static_cast<TextDecorationSkipInk>(m_rareInheritedData->textDecorationSkipInk); }
    377377    TextUnderlinePosition textUnderlinePosition() const { return static_cast<TextUnderlinePosition>(m_rareInheritedData->textUnderlinePosition); }
    378378    TextUnderlineOffset textUnderlineOffset() const { return m_rareInheritedData->textUnderlineOffset; }
     
    980980    void setTextDecoration(OptionSet<TextDecoration> v) { SET_VAR(m_visualData, textDecoration, v.toRaw()); }
    981981    void setTextDecorationStyle(TextDecorationStyle v) { SET_VAR(m_rareNonInheritedData, textDecorationStyle, static_cast<unsigned>(v)); }
    982     void setTextDecorationSkip(OptionSet<TextDecorationSkip> skip) { SET_VAR(m_rareInheritedData, textDecorationSkip, skip.toRaw()); }
     982    void setTextDecorationSkipInk(TextDecorationSkipInk skipInk) { SET_VAR(m_rareInheritedData, textDecorationSkipInk, static_cast<unsigned>(skipInk)); }
    983983    void setTextUnderlinePosition(TextUnderlinePosition position) { SET_VAR(m_rareInheritedData, textUnderlinePosition, static_cast<unsigned>(position)); }
    984984    void setTextUnderlineOffset(TextUnderlineOffset textUnderlineOffset) { SET_VAR(m_rareInheritedData, textUnderlineOffset, textUnderlineOffset); }
     
    15981598    static OptionSet<TextDecoration> initialTextDecoration() { return OptionSet<TextDecoration> { }; }
    15991599    static TextDecorationStyle initialTextDecorationStyle() { return TextDecorationStyle::Solid; }
    1600     static OptionSet<TextDecorationSkip> initialTextDecorationSkip() { return TextDecorationSkip::Auto; }
     1600    static TextDecorationSkipInk initialTextDecorationSkipInk() { return TextDecorationSkipInk::Auto; }
    16011601    static TextUnderlinePosition initialTextUnderlinePosition() { return TextUnderlinePosition::Auto; }
    16021602    static TextUnderlineOffset initialTextUnderlineOffset() { return TextUnderlineOffset::createWithAuto(); }
  • trunk/Source/WebCore/rendering/style/RenderStyleConstants.cpp

    r282379 r282397  
    10711071}
    10721072
    1073 TextStream& operator<<(TextStream& ts, TextDecorationSkip skip)
     1073TextStream& operator<<(TextStream& ts, TextDecorationSkipInk skip)
    10741074{
    10751075    switch (skip) {
    1076     case TextDecorationSkip::None: ts << "none"; break;
    1077     case TextDecorationSkip::Ink: ts << "ink"; break;
    1078     case TextDecorationSkip::Objects: ts << "objects"; break;
    1079     case TextDecorationSkip::Auto: ts << "auto"; break;
     1076    case TextDecorationSkipInk::None: ts << "none"; break;
     1077    case TextDecorationSkipInk::Auto: ts << "auto"; break;
     1078    case TextDecorationSkipInk::All: ts << "all"; break;
    10801079    }
    10811080    return ts;
  • trunk/Source/WebCore/rendering/style/RenderStyleConstants.h

    r282379 r282397  
    783783#endif // CSS3_TEXT
    784784
    785 enum class TextDecorationSkip : uint8_t {
    786     None      = 0,
    787     Ink       = 1 << 0,
    788     Objects   = 1 << 1,
    789     Auto      = 1 << 2
     785enum class TextDecorationSkipInk : uint8_t {
     786    None,
     787    Auto,
     788    All
    790789};
    791790
     
    13431342WTF::TextStream& operator<<(WTF::TextStream&, TextCombine);
    13441343WTF::TextStream& operator<<(WTF::TextStream&, TextDecoration);
    1345 WTF::TextStream& operator<<(WTF::TextStream&, TextDecorationSkip);
     1344WTF::TextStream& operator<<(WTF::TextStream&, TextDecorationSkipInk);
    13461345WTF::TextStream& operator<<(WTF::TextStream&, TextDecorationStyle);
    13471346WTF::TextStream& operator<<(WTF::TextStream&, TextEmphasisFill);
  • trunk/Source/WebCore/rendering/style/StyleRareInheritedData.cpp

    r277538 r282397  
    120120    , textJustify(static_cast<unsigned>(RenderStyle::initialTextJustify()))
    121121#endif
    122     , textDecorationSkip(RenderStyle::initialTextDecorationSkip().toRaw())
     122    , textDecorationSkipInk(static_cast<unsigned>(RenderStyle::initialTextDecorationSkipInk()))
    123123    , textUnderlinePosition(static_cast<unsigned>(RenderStyle::initialTextUnderlinePosition()))
    124124    , rubyPosition(static_cast<unsigned>(RenderStyle::initialRubyPosition()))
     
    217217    , textJustify(o.textJustify)
    218218#endif
    219     , textDecorationSkip(o.textDecorationSkip)
     219    , textDecorationSkipInk(o.textDecorationSkipInk)
    220220    , textUnderlinePosition(o.textUnderlinePosition)
    221221    , rubyPosition(o.rubyPosition)
     
    342342        && textJustify == o.textJustify
    343343#endif // CSS3_TEXT
    344         && textDecorationSkip == o.textDecorationSkip
     344        && textDecorationSkipInk == o.textDecorationSkipInk
    345345        && textUnderlinePosition == o.textUnderlinePosition
    346346        && rubyPosition == o.rubyPosition
  • trunk/Source/WebCore/rendering/style/StyleRareInheritedData.h

    r281259 r282397  
    140140    unsigned textJustify : 2; // TextJustify
    141141#endif
    142     unsigned textDecorationSkip : 5; // TextDecorationSkip
     142    unsigned textDecorationSkipInk : 2; // TextDecorationSkipInk
    143143    unsigned textUnderlinePosition : 2; // TextUnderlinePosition
    144144    unsigned rubyPosition : 2; // RubyPosition
  • trunk/Source/WebCore/style/InlineTextBoxStyle.cpp

    r281241 r282397  
    6262            continue;
    6363
    64         if (run->isText() || run->style().textDecorationSkip().isEmpty())
     64        if (run->isText() || run->style().textDecorationSkipInk() == TextDecorationSkipInk::None)
    6565            minLogicalTop = std::min<float>(minLogicalTop, run->logicalTop());
    6666    }
     
    7979            continue;
    8080
    81         if (run->isText() || run->style().textDecorationSkip().isEmpty())
     81        if (run->isText() || run->style().textDecorationSkipInk() == TextDecorationSkipInk::None)
    8282            maxLogicalBottom = std::max<float>(maxLogicalBottom, run->logicalBottom());
    8383    }
  • trunk/Source/WebCore/style/PropertyCascade.cpp

    r269774 r282397  
    6060    case CSSPropertyTextDecorationColor:
    6161    case CSSPropertyTextDecorationSkip:
     62    case CSSPropertyTextDecorationSkipInk:
    6263    case CSSPropertyTextUnderlinePosition:
    6364    case CSSPropertyTextUnderlineOffset:
  • trunk/Source/WebCore/style/StyleBuilderConverter.h

    r279218 r282397  
    108108    static float convertTextStrokeWidth(BuilderState&, const CSSValue&);
    109109    static OptionSet<LineBoxContain> convertLineBoxContain(BuilderState&, const CSSValue&);
    110     static OptionSet<TextDecorationSkip> convertTextDecorationSkip(BuilderState&, const CSSValue&);
    111110    static RefPtr<ShapeValue> convertShapeValue(BuilderState&, CSSValue&);
    112111    static ScrollSnapType convertScrollSnapType(BuilderState&, const CSSValue&);
     
    173172    static Length convertToRadiusLength(CSSToLengthConversionData&, const CSSPrimitiveValue&);
    174173    static OptionSet<TextEmphasisPosition> valueToEmphasisPosition(const CSSPrimitiveValue&);
    175     static OptionSet<TextDecorationSkip> valueToDecorationSkip(const CSSPrimitiveValue&);
    176174    static Length parseSnapCoordinate(BuilderState&, const CSSValue&);
    177175
     
    819817
    820818    return downcast<CSSLineBoxContainValue>(value).value();
    821 }
    822 
    823 inline OptionSet<TextDecorationSkip> BuilderConverter::valueToDecorationSkip(const CSSPrimitiveValue& primitiveValue)
    824 {
    825     ASSERT(primitiveValue.isValueID());
    826 
    827     switch (primitiveValue.valueID()) {
    828     case CSSValueAuto:
    829         return TextDecorationSkip::Auto;
    830     case CSSValueNone:
    831         return OptionSet<TextDecorationSkip> { };
    832     case CSSValueInk:
    833         return TextDecorationSkip::Ink;
    834     case CSSValueObjects:
    835         return TextDecorationSkip::Objects;
    836     default:
    837         break;
    838     }
    839 
    840     ASSERT_NOT_REACHED();
    841     return OptionSet<TextDecorationSkip> { };
    842 }
    843 
    844 inline OptionSet<TextDecorationSkip> BuilderConverter::convertTextDecorationSkip(BuilderState&, const CSSValue& value)
    845 {
    846     if (is<CSSPrimitiveValue>(value))
    847         return valueToDecorationSkip(downcast<CSSPrimitiveValue>(value));
    848 
    849     OptionSet<TextDecorationSkip> skip;
    850     for (auto& currentValue : downcast<CSSValueList>(value))
    851         skip.add(valueToDecorationSkip(downcast<CSSPrimitiveValue>(currentValue.get())));
    852     return skip;
    853819}
    854820
Note: See TracChangeset for help on using the changeset viewer.