Title: [292560] trunk/Source/WebCore
- Revision
- 292560
- Author
- [email protected]
- Date
- 2022-04-07 13:28:42 -0700 (Thu, 07 Apr 2022)
Log Message
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):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (292559 => 292560)
--- trunk/Source/WebCore/ChangeLog 2022-04-07 20:26:01 UTC (rev 292559)
+++ trunk/Source/WebCore/ChangeLog 2022-04-07 20:28:42 UTC (rev 292560)
@@ -1,3 +1,18 @@
+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-07 Tim Nguyen <[email protected]>
[CSS resize property] Correct minimum size computation to allow resizing below initial size
Modified: trunk/Source/WebCore/animation/WebAnimation.cpp (292559 => 292560)
--- trunk/Source/WebCore/animation/WebAnimation.cpp 2022-04-07 20:26:01 UTC (rev 292559)
+++ trunk/Source/WebCore/animation/WebAnimation.cpp 2022-04-07 20:28:42 UTC (rev 292560)
@@ -1477,9 +1477,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