Title: [292994] branches/safari-613-branch/Source/WebCore
Revision
292994
Author
[email protected]
Date
2022-04-18 17:49:57 -0700 (Mon, 18 Apr 2022)

Log Message

Cherry-pick r292560. rdar://problem/90924861

    Iterate over copy of animated properties in WebCore::WebAnimation::commitStyles
    https://bugs.webkit.org/show_bug.cgi?id=238940

    Reviewed by Antoine Quint.

    WebAnimation::resolve can end up clearing the animated properties during iteration.

    The proposal here will make a copy of the properties before applying the steps
    outlined in the spec.

    * animation/WebAnimation.cpp:
    (WebCore::WebAnimation::commitStyles):

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@292560 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-613-branch/Source/WebCore/ChangeLog (292993 => 292994)


--- branches/safari-613-branch/Source/WebCore/ChangeLog	2022-04-19 00:49:53 UTC (rev 292993)
+++ branches/safari-613-branch/Source/WebCore/ChangeLog	2022-04-19 00:49:57 UTC (rev 292994)
@@ -1,5 +1,40 @@
 2022-04-18  Kocsen Chung  <[email protected]>
 
+        Cherry-pick r292560. rdar://problem/90924861
+
+    Iterate over copy of animated properties in WebCore::WebAnimation::commitStyles
+    https://bugs.webkit.org/show_bug.cgi?id=238940
+    
+    Reviewed by Antoine Quint.
+    
+    WebAnimation::resolve can end up clearing the animated properties during iteration.
+    
+    The proposal here will make a copy of the properties before applying the steps
+    outlined in the spec.
+    
+    * animation/WebAnimation.cpp:
+    (WebCore::WebAnimation::commitStyles):
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@292560 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2022-04-07  Gabriel Nava Marino  <[email protected]>
+
+            Iterate over copy of animated properties in WebCore::WebAnimation::commitStyles
+            https://bugs.webkit.org/show_bug.cgi?id=238940
+
+            Reviewed by Antoine Quint.
+
+            WebAnimation::resolve can end up clearing the animated properties during iteration.
+
+            The proposal here will make a copy of the properties before applying the steps
+            outlined in the spec.
+
+            * animation/WebAnimation.cpp:
+            (WebCore::WebAnimation::commitStyles):
+
+2022-04-18  Kocsen Chung  <[email protected]>
+
         Cherry-pick r292522. rdar://problem/91130503
 
     NBSP characters drawn in fonts that don't support the space character turn into boxes

Modified: branches/safari-613-branch/Source/WebCore/animation/WebAnimation.cpp (292993 => 292994)


--- branches/safari-613-branch/Source/WebCore/animation/WebAnimation.cpp	2022-04-19 00:49:53 UTC (rev 292993)
+++ branches/safari-613-branch/Source/WebCore/animation/WebAnimation.cpp	2022-04-19 00:49:57 UTC (rev 292994)
@@ -1461,9 +1461,10 @@
     inlineStyle->setCssText(styledElement.getAttribute("style"));
 
     auto& keyframeStack = styledElement.ensureKeyframeEffectStack(PseudoId::None);
-
+    // During iteration resolve() could clear the underlying properties so we use a copy
+    auto properties = effect->animatedProperties();
     // 2.5 For each property, property, in targeted properties:
-    for (auto property : effect->animatedProperties()) {
+    for (auto property : properties) {
         // 1. Let partialEffectStack be a copy of the effect stack for property on target.
         // 2. If animation's replace state is removed, add all animation effects associated with animation whose effect target is target and which include
         // property as a target property to partialEffectStack.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to