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

Side by Side Diff: third_party/WebKit/Source/core/svg/SVGAnimateElement.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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/svg/animation/SMILTimeContainer.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org>
4 * Copyright (C) 2008 Apple Inc. All rights reserved. 4 * Copyright (C) 2008 Apple Inc. All rights reserved.
5 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 5 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 // If the target element has instances, update them as well, w/o requiring t he <use> tree to be rebuilt. 279 // If the target element has instances, update them as well, w/o requiring t he <use> tree to be rebuilt.
280 for (SVGElement* element : targetElement->instancesForElement()) 280 for (SVGElement* element : targetElement->instancesForElement())
281 notifyTargetAboutAnimValChange(element, attributeName); 281 notifyTargetAboutAnimValChange(element, attributeName);
282 } 282 }
283 283
284 void SVGAnimateElement::clearAnimatedType() 284 void SVGAnimateElement::clearAnimatedType()
285 { 285 {
286 if (!m_animatedProperty) 286 if (!m_animatedProperty)
287 return; 287 return;
288 288
289 // The animated property lock is held for the "result animation" (see SMILTi meContainer::updateAnimations())
290 // while we're processing an animation group. We will very likely crash late r if we clear the animated type
291 // while the lock is held. See crbug.com/581546.
292 RELEASE_ASSERT(!animatedTypeIsLocked());
293
289 SVGElement* targetElement = this->targetElement(); 294 SVGElement* targetElement = this->targetElement();
290 if (!targetElement) { 295 if (!targetElement) {
291 m_animatedProperty.clear(); 296 m_animatedProperty.clear();
292 return; 297 return;
293 } 298 }
294 299
295 ShouldApplyAnimationType shouldApply = shouldApplyAnimation(targetElement, a ttributeName()); 300 ShouldApplyAnimationType shouldApply = shouldApplyAnimation(targetElement, a ttributeName());
296 if (shouldApply == ApplyXMLandCSSAnimation) { 301 if (shouldApply == ApplyXMLandCSSAnimation) {
297 removeCSSPropertyFromTargetAndInstances(targetElement, attributeName()); 302 removeCSSPropertyFromTargetAndInstances(targetElement, attributeName());
298 } else if (m_animator.isAnimatingCSSProperty()) { 303 } else if (m_animator.isAnimatingCSSProperty()) {
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 { 405 {
401 visitor->trace(m_fromProperty); 406 visitor->trace(m_fromProperty);
402 visitor->trace(m_toProperty); 407 visitor->trace(m_toProperty);
403 visitor->trace(m_toAtEndOfDurationProperty); 408 visitor->trace(m_toAtEndOfDurationProperty);
404 visitor->trace(m_animatedProperty); 409 visitor->trace(m_animatedProperty);
405 visitor->trace(m_animator); 410 visitor->trace(m_animator);
406 SVGAnimationElement::trace(visitor); 411 SVGAnimationElement::trace(visitor);
407 } 412 }
408 413
409 } // namespace blink 414 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/svg/animation/SMILTimeContainer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698