Changeset 252176 in webkit


Ignore:
Timestamp:
Nov 6, 2019 11:21:38 PM (4 years ago)
Author:
Devin Rousso
Message:

Remove unimplemented property error log in when getting a property value from a computed style
https://bugs.webkit.org/show_bug.cgi?id=203943

Reviewed by Simon Fraser.

In r251581, the list of computed CSS properties was changed to be autogenerated from 'CSSProperties.json'.
One issue that arose from this was that -webkit-text-decorations-in-effect was no longer part of the
CSSComputedStyleDeclaration, which caused a number of editing tests to fail, as that property is used
for holding internal state related to various editing commands (e.g. document.execCommand(...)). In
order to get around this, ComputedStyleExtractor::copyProperties() was modified to instead copy all CSS
properties, regardless of whether they're part of the set of computed CSS properties. Unfortunately, this
had a side effect of triggering a longstanding LOG_ERROR (added in r6178) when attempting to retrieve
the value of certain CSS properties (e.g. -internal-text-autosizing-status).

Since this code path can be triggered by JavaScript (e.g. getComputedStyle(node).getPropertyCSSValue("...")),
it doesn't add much benefit to have this log, especially since the code itself is already annotated with
comments/FIXMEs for CSS properties that don't have a computed value.

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):
(WebCore::logUnimplementedPropertyID): Deleted.

  • css/SVGCSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::svgPropertyValue):

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r252175 r252176  
     12019-11-06  Devin Rousso  <drousso@apple.com>
     2
     3        Remove unimplemented property error log in when getting a property value from a computed style
     4        https://bugs.webkit.org/show_bug.cgi?id=203943
     5
     6        Reviewed by Simon Fraser.
     7
     8        In r251581, the list of computed CSS properties was changed to be autogenerated from 'CSSProperties.json'.
     9        One issue that arose from this was that `-webkit-text-decorations-in-effect` was no longer part of the
     10        `CSSComputedStyleDeclaration`, which caused a number of editing tests to fail, as that property is used
     11        for holding internal state related to various editing commands (e.g. `document.execCommand(...)`). In
     12        order to get around this, `ComputedStyleExtractor::copyProperties()` was modified to instead copy all CSS
     13        properties, regardless of whether they're part of the set of computed CSS properties. Unfortunately, this
     14        had a side effect of triggering a longstanding `LOG_ERROR` (added in r6178) when attempting to retrieve
     15        the value of certain CSS properties (e.g. `-internal-text-autosizing-status`).
     16
     17        Since this code path can be triggered by JavaScript (e.g. `getComputedStyle(node).getPropertyCSSValue("...")`),
     18        it doesn't add much benefit to have this log, especially since the code itself is already annotated with
     19        comments/FIXMEs for CSS properties that don't have a computed value.
     20
     21        * css/CSSComputedStyleDeclaration.cpp:
     22        (WebCore::ComputedStyleExtractor::valueForPropertyInStyle):
     23        (WebCore::logUnimplementedPropertyID): Deleted.
     24        * css/SVGCSSComputedStyleDeclaration.cpp:
     25        (WebCore::ComputedStyleExtractor::svgPropertyValue):
     26
    1272019-11-06  Eric Liang  <ericliang@apple.com>
    228
  • trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp

    r252161 r252176  
    16781678    }
    16791679    return list;
    1680 }
    1681 
    1682 static void logUnimplementedPropertyID(CSSPropertyID propertyID)
    1683 {
    1684     static NeverDestroyed<HashSet<CSSPropertyID>> propertyIDSet;
    1685     if (!propertyIDSet.get().add(propertyID).isNewEntry)
    1686         return;
    1687 
    1688     LOG_ERROR("WebKit does not yet implement getComputedStyle for '%s'.", getPropertyName(propertyID));
    16891680}
    16901681
     
    38843875    }
    38853876
    3886     logUnimplementedPropertyID(propertyID);
    38873877    return nullptr;
    38883878}
  • trunk/Source/WebCore/css/SVGCSSComputedStyleDeclaration.cpp

    r251776 r252176  
    192192        ASSERT_WITH_MESSAGE(0, "unimplemented propertyID: %d", propertyID);
    193193    }
    194     LOG_ERROR("unimplemented propertyID: %d", propertyID);
    195194    return nullptr;
    196195}
Note: See TracChangeset for help on using the changeset viewer.