Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1713)

Unified Diff: third_party/WebKit/Source/core/svg/animation/SMILTimeContainer.cpp

Issue 1991513003: Lock animated property type of result animation during processing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lock-animated-property-in
Patch Set: Update comment and mention bug. Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/svg/animation/SMILTimeContainer.cpp
diff --git a/third_party/WebKit/Source/core/svg/animation/SMILTimeContainer.cpp b/third_party/WebKit/Source/core/svg/animation/SMILTimeContainer.cpp
index acfa7fa8a018506048d4337ceb2c1b49d581950c..3d41d7aaa141a273189fa4dba5332db52612c28f 100644
--- a/third_party/WebKit/Source/core/svg/animation/SMILTimeContainer.cpp
+++ b/third_party/WebKit/Source/core/svg/animation/SMILTimeContainer.cpp
@@ -478,11 +478,14 @@ SMILTime SMILTimeContainer::updateAnimations(SMILTime elapsed, bool seekToTime)
ASSERT(animation->hasValidAttributeType());
// Results are accumulated to the first animation that animates and contributes to a particular element/attribute pair.
- if (!resultElement)
+ if (!resultElement) {
resultElement = animation;
+ resultElement->lockAnimatedType();
+ }
// This will calculate the contribution from the animation and add it to the resultElement.
if (!animation->progress(elapsed, resultElement, seekToTime) && resultElement == animation) {
+ resultElement->unlockAnimatedType();
resultElement->clearAnimatedType();
resultElement = nullptr;
}
@@ -492,8 +495,10 @@ SMILTime SMILTimeContainer::updateAnimations(SMILTime elapsed, bool seekToTime)
earliestFireTime = std::min(nextFireTime, earliestFireTime);
}
- if (resultElement)
+ if (resultElement) {
animationsToApply.append(resultElement);
+ resultElement->unlockAnimatedType();
+ }
}
m_scheduledAnimations.removeAll(invalidKeys);

Powered by Google App Engine
This is Rietveld 408576698