Title: [252307] trunk/Source/WebCore
Revision
252307
Author
grao...@webkit.org
Date
2019-11-09 03:05:21 -0800 (Sat, 09 Nov 2019)

Log Message

[Web Animations] Optimize animation resolution to not re-compute whether effects only contain accelerated animation properties
https://bugs.webkit.org/show_bug.cgi?id=204009

Reviewed by Dean Jackson.

A KeyframeEffect already exposes whether it only affects CSS properties that can be accelerated, so use this information instead
of iterating over an effect's animated properties during resolution to get at the same information.

No tests or changes to existed test expectations as this should not yield any change in behavior.

* dom/Element.cpp:
(WebCore::Element::applyKeyframeEffects):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (252306 => 252307)


--- trunk/Source/WebCore/ChangeLog	2019-11-09 07:05:16 UTC (rev 252306)
+++ trunk/Source/WebCore/ChangeLog	2019-11-09 11:05:21 UTC (rev 252307)
@@ -1,3 +1,18 @@
+2019-11-08  Antoine Quint  <grao...@apple.com>
+
+        [Web Animations] Optimize animation resolution to not re-compute whether effects only contain accelerated animation properties
+        https://bugs.webkit.org/show_bug.cgi?id=204009
+
+        Reviewed by Dean Jackson.
+
+        A KeyframeEffect already exposes whether it only affects CSS properties that can be accelerated, so use this information instead
+        of iterating over an effect's animated properties during resolution to get at the same information. 
+
+        No tests or changes to existed test expectations as this should not yield any change in behavior.
+
+        * dom/Element.cpp:
+        (WebCore::Element::applyKeyframeEffects):
+
 2019-11-08  Chris Dumez  <cdu...@apple.com>
 
         Add back/forward cache quirk for Vimeo.com

Modified: trunk/Source/WebCore/dom/Element.cpp (252306 => 252307)


--- trunk/Source/WebCore/dom/Element.cpp	2019-11-09 07:05:16 UTC (rev 252306)
+++ trunk/Source/WebCore/dom/Element.cpp	2019-11-09 11:05:21 UTC (rev 252307)
@@ -31,7 +31,6 @@
 #include "AttributeChangeInvalidation.h"
 #include "CSSAnimationController.h"
 #include "CSSParser.h"
-#include "CSSPropertyAnimation.h"
 #include "Chrome.h"
 #include "ChromeClient.h"
 #include "ClassChangeInvalidation.h"
@@ -3703,17 +3702,8 @@
         ASSERT(effect->animation());
         effect->animation()->resolve(targetStyle);
 
-        if (hasNonAcceleratedAnimationProperty)
-            continue;
-
-        // FIXME: https://bugs.webkit.org/show_bug.cgi?id=204009
-        // KeyframeEffectStack and KeyframeEffect should indicate whether it only contains accelerated animation properties
-        for (auto cssPropertyId : effect->animatedProperties()) {
-            if (!CSSPropertyAnimation::animationOfPropertyIsAccelerated(cssPropertyId)) {
-                hasNonAcceleratedAnimationProperty = true;
-                break;
-            }
-        }
+        if (!hasNonAcceleratedAnimationProperty && !effect->isAccelerated())
+            hasNonAcceleratedAnimationProperty = true;
     }
 
     return !hasNonAcceleratedAnimationProperty;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to