Title: [252176] trunk/Source/WebCore
Revision
252176
Author
[email protected]
Date
2019-11-06 23:21:38 -0800 (Wed, 06 Nov 2019)

Log 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):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (252175 => 252176)


--- trunk/Source/WebCore/ChangeLog	2019-11-07 07:03:17 UTC (rev 252175)
+++ trunk/Source/WebCore/ChangeLog	2019-11-07 07:21:38 UTC (rev 252176)
@@ -1,3 +1,29 @@
+2019-11-06  Devin Rousso  <[email protected]>
+
+        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):
+
 2019-11-06  Eric Liang  <[email protected]>
 
         AX: WKWebView does not shift Accessibility Focus for Catalyst (203798)

Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (252175 => 252176)


--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp	2019-11-07 07:03:17 UTC (rev 252175)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp	2019-11-07 07:21:38 UTC (rev 252176)
@@ -1679,15 +1679,6 @@
     return list;
 }
 
-static void logUnimplementedPropertyID(CSSPropertyID propertyID)
-{
-    static NeverDestroyed<HashSet<CSSPropertyID>> propertyIDSet;
-    if (!propertyIDSet.get().add(propertyID).isNewEntry)
-        return;
-
-    LOG_ERROR("WebKit does not yet implement getComputedStyle for '%s'.", getPropertyName(propertyID));
-}
-
 static Ref<CSSValueList> fontFamilyListFromStyle(const RenderStyle& style)
 {
     auto list = CSSValueList::createCommaSeparated();
@@ -3883,7 +3874,6 @@
             return nullptr;
     }
 
-    logUnimplementedPropertyID(propertyID);
     return nullptr;
 }
 

Modified: trunk/Source/WebCore/css/SVGCSSComputedStyleDeclaration.cpp (252175 => 252176)


--- trunk/Source/WebCore/css/SVGCSSComputedStyleDeclaration.cpp	2019-11-07 07:03:17 UTC (rev 252175)
+++ trunk/Source/WebCore/css/SVGCSSComputedStyleDeclaration.cpp	2019-11-07 07:21:38 UTC (rev 252176)
@@ -191,7 +191,6 @@
         // in either this switch statement or the one in CSSComputedStyleDelcaration::getPropertyCSSValue
         ASSERT_WITH_MESSAGE(0, "unimplemented propertyID: %d", propertyID);
     }
-    LOG_ERROR("unimplemented propertyID: %d", propertyID);
     return nullptr;
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to