Ignore:
Timestamp:
Nov 11, 2021, 12:08:25 AM (4 years ago)
Author:
[email protected]
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:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.