Ignore:
Timestamp:
Nov 10, 2021, 12:10:04 PM (4 years ago)
Author:
[email protected]
Message:

The cssText property for a computed style should return an empty string
https://bugs.webkit.org/show_bug.cgi?id=232943

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

  • web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:

Source/WebCore:

See https://github.com/w3c/csswg-drafts/issues/1033. This was an annoying test to fail because the output
would require a rebaseline every time we'd change something visible in the computed style.

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::CSSComputedStyleDeclaration::cssText const):

LayoutTests:

Remove all platform-specific expectations for the WPT css/cssom/cssstyledeclaration-csstext.html since the
assertion that would fail differently on various platforms now passes everywhere.

  • platform/gtk/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt: Removed.
  • platform/ios-wk2/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt: Removed.
  • platform/ios/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt: Removed.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp

    r285383 r285604  
    15281528String CSSComputedStyleDeclaration::cssText() const
    15291529{
    1530     StringBuilder result;
    1531     for (unsigned i = 0; i < numComputedPropertyIDs; i++) {
    1532         if (i)
    1533             result.append(' ');
    1534         result.append(getPropertyName(computedPropertyIDs[i]), ": ", getPropertyValue(computedPropertyIDs[i]), ';');
    1535     }
    1536     return result.toString();
     1530    return emptyString();
    15371531}
    15381532
Note: See TracChangeset for help on using the changeset viewer.