Changeset 285621 in webkit


Ignore:
Timestamp:
Nov 11, 2021 12:08:25 AM (8 months ago)
Author:
graouts@webkit.org
Message:

Default computed value for "content" should be "none" for ::before and ::after
https://bugs.webkit.org/show_bug.cgi?id=232932

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-content/computed-value-expected.txt:
  • web-platform-tests/css/css-pseudo/marker-computed-content-expected.txt:
  • web-platform-tests/css/css-pseudo/parsing/marker-supported-properties-in-animation-expected.txt:

Source/WebCore:

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::contentToCSSValue):

LayoutTests:

  • platform/glib/fast/css/getComputedStyle/computed-style-expected.txt:
  • platform/glib/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
  • platform/glib/svg/css/getComputedStyle-basic-expected.txt:
  • platform/ios/fast/css/getComputedStyle/computed-style-expected.txt:
  • platform/ios/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
  • platform/ios/svg/css/getComputedStyle-basic-expected.txt:
  • platform/mac/fast/css/getComputedStyle/computed-style-expected.txt:
  • platform/mac/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
  • platform/mac/svg/css/getComputedStyle-basic-expected.txt:
Location:
trunk
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r285620 r285621  
     12021-11-11  Antoine Quint  <graouts@webkit.org>
     2
     3        Default computed value for "content" should be "none" for ::before and ::after
     4        https://bugs.webkit.org/show_bug.cgi?id=232932
     5
     6        Reviewed by Antti Koivisto.
     7
     8        * platform/glib/fast/css/getComputedStyle/computed-style-expected.txt:
     9        * platform/glib/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
     10        * platform/glib/svg/css/getComputedStyle-basic-expected.txt:
     11        * platform/ios/fast/css/getComputedStyle/computed-style-expected.txt:
     12        * platform/ios/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
     13        * platform/ios/svg/css/getComputedStyle-basic-expected.txt:
     14        * platform/mac/fast/css/getComputedStyle/computed-style-expected.txt:
     15        * platform/mac/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
     16        * platform/mac/svg/css/getComputedStyle-basic-expected.txt:
     17
    1182021-11-10  Devin Rousso  <drousso@apple.com>
    219
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r285615 r285621  
     12021-11-11  Antoine Quint  <graouts@webkit.org>
     2
     3        Default computed value for "content" should be "none" for ::before and ::after
     4        https://bugs.webkit.org/show_bug.cgi?id=232932
     5
     6        Reviewed by Antti Koivisto.
     7
     8        * web-platform-tests/css/css-content/computed-value-expected.txt:
     9        * web-platform-tests/css/css-pseudo/marker-computed-content-expected.txt:
     10        * web-platform-tests/css/css-pseudo/parsing/marker-supported-properties-in-animation-expected.txt:
     11
    1122021-11-10  Tim Nguyen  <ntim@apple.com>
    213
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-content/computed-value-expected.txt

    r266038 r285621  
    11
    2 FAIL initial computed value of content for elements is not none assert_equals: expected "none" but got ""
     2PASS initial computed value of content for elements is not none
    33
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-pseudo/marker-computed-content-expected.txt

    r284519 r285621  
    11
    2 FAIL Computed 'content' for list-item ::marker, variant default assert_equals: expected "normal" but got ""
    3 FAIL Computed 'content' for list-item ::marker, variant normal assert_equals: expected "normal" but got ""
     2PASS Computed 'content' for list-item ::marker, variant default
     3PASS Computed 'content' for list-item ::marker, variant normal
    44PASS Computed 'content' for list-item ::marker, variant string
    55PASS Computed 'content' for list-item ::marker, variant image
    6 FAIL Computed 'content' for list-item ::marker, variant none assert_equals: expected "none" but got ""
    7 FAIL Computed 'content' for non-list-item ::marker, variant default assert_equals: expected "normal" but got ""
    8 FAIL Computed 'content' for non-list-item ::marker, variant normal assert_equals: expected "normal" but got ""
     6FAIL Computed 'content' for list-item ::marker, variant none assert_equals: expected "none" but got "normal"
     7PASS Computed 'content' for non-list-item ::marker, variant default
     8PASS Computed 'content' for non-list-item ::marker, variant normal
    99PASS Computed 'content' for non-list-item ::marker, variant string
    1010PASS Computed 'content' for non-list-item ::marker, variant image
    11 FAIL Computed 'content' for non-list-item ::marker, variant none assert_equals: expected "none" but got ""
     11FAIL Computed 'content' for non-list-item ::marker, variant none assert_equals: expected "none" but got "normal"
    1212item
    1313item
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-pseudo/parsing/marker-supported-properties-in-animation-expected.txt

    r285383 r285621  
    2222PASS Animation of unicode-bidi in ::marker
    2323PASS Animation of direction in ::marker
    24 FAIL Animation of content in ::marker assert_equals: expected "\"bar\"" but got ""
     24FAIL Animation of content in ::marker assert_equals: expected "\"bar\"" but got "normal"
    2525FAIL Animation of hyphens in ::marker assert_true: hyphens doesn't seem to be supported in the computed style expected true got false
    2626FAIL Animation of letter-spacing in ::marker assert_equals: expected "10px" but got "normal"
  • trunk/LayoutTests/platform/glib/fast/css/getComputedStyle/computed-style-expected.txt

    r285383 r285621  
    5656column-span: none;
    5757column-width: auto;
    58 content: ;
     58content: normal;
    5959counter-increment: none;
    6060counter-reset: none;
  • trunk/LayoutTests/platform/glib/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt

    r285615 r285621  
    5555column-span: none
    5656column-width: auto
    57 content:
     57content: normal
    5858counter-increment: none
    5959counter-reset: none
  • trunk/LayoutTests/platform/glib/svg/css/getComputedStyle-basic-expected.txt

    r285615 r285621  
    109109rect: style.getPropertyValue(column-width) : auto
    110110rect: style.getPropertyCSSValue(column-width) : [object CSSPrimitiveValue]
    111 rect: style.getPropertyValue(content) :
     111rect: style.getPropertyValue(content) : normal
    112112rect: style.getPropertyCSSValue(content) : [object CSSValueList]
    113113rect: style.getPropertyValue(counter-increment) : none
     
    627627g: style.getPropertyValue(column-width) : auto
    628628g: style.getPropertyCSSValue(column-width) : [object CSSPrimitiveValue]
    629 g: style.getPropertyValue(content) :
     629g: style.getPropertyValue(content) : normal
    630630g: style.getPropertyCSSValue(content) : [object CSSValueList]
    631631g: style.getPropertyValue(counter-increment) : none
  • trunk/LayoutTests/platform/ios/fast/css/getComputedStyle/computed-style-expected.txt

    r285615 r285621  
    5656column-span: none;
    5757column-width: auto;
    58 content: ;
     58content: normal;
    5959counter-increment: none;
    6060counter-reset: none;
  • trunk/LayoutTests/platform/ios/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt

    r285615 r285621  
    5555column-span: none
    5656column-width: auto
    57 content:
     57content: normal
    5858counter-increment: none
    5959counter-reset: none
  • trunk/LayoutTests/platform/ios/svg/css/getComputedStyle-basic-expected.txt

    r285615 r285621  
    109109rect: style.getPropertyValue(column-width) : auto
    110110rect: style.getPropertyCSSValue(column-width) : [object CSSPrimitiveValue]
    111 rect: style.getPropertyValue(content) :
     111rect: style.getPropertyValue(content) : normal
    112112rect: style.getPropertyCSSValue(content) : [object CSSValueList]
    113113rect: style.getPropertyValue(counter-increment) : none
     
    627627g: style.getPropertyValue(column-width) : auto
    628628g: style.getPropertyCSSValue(column-width) : [object CSSPrimitiveValue]
    629 g: style.getPropertyValue(content) :
     629g: style.getPropertyValue(content) : normal
    630630g: style.getPropertyCSSValue(content) : [object CSSValueList]
    631631g: style.getPropertyValue(counter-increment) : none
  • trunk/LayoutTests/platform/mac/fast/css/getComputedStyle/computed-style-expected.txt

    r285615 r285621  
    5656column-span: none;
    5757column-width: auto;
    58 content: ;
     58content: normal;
    5959counter-increment: none;
    6060counter-reset: none;
  • trunk/LayoutTests/platform/mac/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt

    r285615 r285621  
    5555column-span: none
    5656column-width: auto
    57 content:
     57content: normal
    5858counter-increment: none
    5959counter-reset: none
  • trunk/LayoutTests/platform/mac/svg/css/getComputedStyle-basic-expected.txt

    r285615 r285621  
    109109rect: style.getPropertyValue(column-width) : auto
    110110rect: style.getPropertyCSSValue(column-width) : [object CSSPrimitiveValue]
    111 rect: style.getPropertyValue(content) :
     111rect: style.getPropertyValue(content) : normal
    112112rect: style.getPropertyCSSValue(content) : [object CSSValueList]
    113113rect: style.getPropertyValue(counter-increment) : none
     
    627627g: style.getPropertyValue(column-width) : auto
    628628g: style.getPropertyCSSValue(column-width) : [object CSSPrimitiveValue]
    629 g: style.getPropertyValue(content) :
     629g: style.getPropertyValue(content) : normal
    630630g: style.getPropertyCSSValue(content) : [object CSSValueList]
    631631g: style.getPropertyValue(counter-increment) : none
  • trunk/Source/WebCore/ChangeLog

    r285620 r285621  
     12021-11-11  Antoine Quint  <graouts@webkit.org>
     2
     3        Default computed value for "content" should be "none" for ::before and ::after
     4        https://bugs.webkit.org/show_bug.cgi?id=232932
     5
     6        Reviewed by Antti Koivisto.
     7
     8        * css/CSSComputedStyleDeclaration.cpp:
     9        (WebCore::contentToCSSValue):
     10
    1112021-11-10  Devin Rousso  <drousso@apple.com>
    212
  • trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp

    r285615 r285621  
    18171817        else if (is<TextContentData>(*contentData))
    18181818            list->append(cssValuePool.createValue(downcast<TextContentData>(*contentData).text(), CSSUnitType::CSS_STRING));
     1819    }
     1820    if (!list->length()) {
     1821        auto isBeforeOrAfter = style.styleType() == PseudoId::Before || style.styleType() == PseudoId::After;
     1822        list->append(cssValuePool.createIdentifierValue(isBeforeOrAfter ? CSSValueNone : CSSValueNormal));
    18191823    }
    18201824    return list;
Note: See TracChangeset for help on using the changeset viewer.