Title: [271515] trunk/Source/WebCore
Revision
271515
Author
[email protected]
Date
2021-01-15 03:23:31 -0800 (Fri, 15 Jan 2021)

Log Message

REGRESSION(r269813): PLT5 regressed by 0.5%
https://bugs.webkit.org/show_bug.cgi?id=220652
<rdar://problem/71517335>

Reviewed by Antti Koivisto.

In r269813 we added support for animating more pseudo-elements besides ::after and ::before. However, the only other
pseudo-element we realistically should be supporting animations for at this juncture is ::marker. So instead of
calling Style::TreeResolver::resolvePseudoStyle() for all public pseudo-elements, we call it for ::after, ::before
and ::marker alone.

* style/StyleTreeResolver.cpp:
(WebCore::Style::TreeResolver::resolveElement):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (271514 => 271515)


--- trunk/Source/WebCore/ChangeLog	2021-01-15 10:51:27 UTC (rev 271514)
+++ trunk/Source/WebCore/ChangeLog	2021-01-15 11:23:31 UTC (rev 271515)
@@ -1,3 +1,19 @@
+2021-01-15  Antoine Quint  <[email protected]>
+
+        REGRESSION(r269813): PLT5 regressed by 0.5%
+        https://bugs.webkit.org/show_bug.cgi?id=220652
+        <rdar://problem/71517335>
+
+        Reviewed by Antti Koivisto.
+
+        In r269813 we added support for animating more pseudo-elements besides ::after and ::before. However, the only other
+        pseudo-element we realistically should be supporting animations for at this juncture is ::marker. So instead of
+        calling Style::TreeResolver::resolvePseudoStyle() for all public pseudo-elements, we call it for ::after, ::before
+        and ::marker alone.
+
+        * style/StyleTreeResolver.cpp:
+        (WebCore::Style::TreeResolver::resolveElement):
+
 2021-01-15  Rob Buis  <[email protected]>
 
         Use event loop to set title

Modified: trunk/Source/WebCore/style/StyleTreeResolver.cpp (271514 => 271515)


--- trunk/Source/WebCore/style/StyleTreeResolver.cpp	2021-01-15 10:51:27 UTC (rev 271514)
+++ trunk/Source/WebCore/style/StyleTreeResolver.cpp	2021-01-15 11:23:31 UTC (rev 271515)
@@ -249,10 +249,12 @@
     }
 
     PseudoIdToElementUpdateMap pseudoUpdates;
-    for (PseudoId pseudoId = PseudoId::FirstPublicPseudoId; pseudoId < PseudoId::FirstInternalPseudoId; pseudoId = static_cast<PseudoId>(static_cast<unsigned>(pseudoId) + 1)) {
-        if (auto elementUpdate = resolvePseudoStyle(element, update, pseudoId))
-            pseudoUpdates.set(pseudoId, WTFMove(*elementUpdate));
-    }
+    if (auto beforeElementUpdate = resolvePseudoStyle(element, update, PseudoId::Before))
+        pseudoUpdates.set(PseudoId::Before, WTFMove(*beforeElementUpdate));
+    if (auto afterElementUpdate = resolvePseudoStyle(element, update, PseudoId::After))
+        pseudoUpdates.set(PseudoId::After, WTFMove(*afterElementUpdate));
+    if (auto markerElementUpdate = resolvePseudoStyle(element, update, PseudoId::Marker))
+        pseudoUpdates.set(PseudoId::Marker, WTFMove(*markerElementUpdate));
 
 #if ENABLE(TOUCH_ACTION_REGIONS)
     // FIXME: Track this exactly.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to