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

Side by Side Diff: Source/core/svg/SVGAnimateElement.cpp

Issue 547823002: Track reasons for |Node::SetNeedsStyleRecalc| (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: use AtomicString Created 6 years, 2 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 | « Source/core/svg/SVGAElement.cpp ('k') | Source/core/svg/SVGCursorElement.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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 static inline void applyCSSPropertyToTarget(SVGElement* targetElement, CSSProper tyID id, const String& value) 197 static inline void applyCSSPropertyToTarget(SVGElement* targetElement, CSSProper tyID id, const String& value)
198 { 198 {
199 #if !ENABLE(OILPAN) 199 #if !ENABLE(OILPAN)
200 ASSERT_WITH_SECURITY_IMPLICATION(!targetElement->m_deletionHasBegun); 200 ASSERT_WITH_SECURITY_IMPLICATION(!targetElement->m_deletionHasBegun);
201 #endif 201 #endif
202 202
203 MutableStylePropertySet* propertySet = targetElement->ensureAnimatedSMILStyl eProperties(); 203 MutableStylePropertySet* propertySet = targetElement->ensureAnimatedSMILStyl eProperties();
204 if (!propertySet->setProperty(id, value, false, 0)) 204 if (!propertySet->setProperty(id, value, false, 0))
205 return; 205 return;
206 206
207 targetElement->setNeedsStyleRecalc(LocalStyleChange); 207 targetElement->setNeedsStyleRecalc(LocalStyleChange, StyleChangeReasonForTra cing::create(StyleChangeReason::Animation));
208 } 208 }
209 209
210 static inline void removeCSSPropertyFromTarget(SVGElement* targetElement, CSSPro pertyID id) 210 static inline void removeCSSPropertyFromTarget(SVGElement* targetElement, CSSPro pertyID id)
211 { 211 {
212 #if !ENABLE(OILPAN) 212 #if !ENABLE(OILPAN)
213 ASSERT_WITH_SECURITY_IMPLICATION(!targetElement->m_deletionHasBegun); 213 ASSERT_WITH_SECURITY_IMPLICATION(!targetElement->m_deletionHasBegun);
214 #endif 214 #endif
215 targetElement->ensureAnimatedSMILStyleProperties()->removeProperty(id); 215 targetElement->ensureAnimatedSMILStyleProperties()->removeProperty(id);
216 targetElement->setNeedsStyleRecalc(LocalStyleChange); 216 targetElement->setNeedsStyleRecalc(LocalStyleChange, StyleChangeReasonForTra cing::create(StyleChangeReason::Animation));
217 } 217 }
218 218
219 static inline void applyCSSPropertyToTargetAndInstances(SVGElement* targetElemen t, const QualifiedName& attributeName, const String& valueAsString) 219 static inline void applyCSSPropertyToTargetAndInstances(SVGElement* targetElemen t, const QualifiedName& attributeName, const String& valueAsString)
220 { 220 {
221 ASSERT(targetElement); 221 ASSERT(targetElement);
222 if (attributeName == anyQName() || !targetElement->inDocument() || !targetEl ement->parentNode()) 222 if (attributeName == anyQName() || !targetElement->inDocument() || !targetEl ement->parentNode())
223 return; 223 return;
224 224
225 CSSPropertyID id = cssPropertyID(attributeName.localName()); 225 CSSPropertyID id = cssPropertyID(attributeName.localName());
226 226
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 return m_animator.get(); 394 return m_animator.get();
395 } 395 }
396 396
397 void SVGAnimateElement::trace(Visitor* visitor) 397 void SVGAnimateElement::trace(Visitor* visitor)
398 { 398 {
399 visitor->trace(m_animator); 399 visitor->trace(m_animator);
400 SVGAnimationElement::trace(visitor); 400 SVGAnimationElement::trace(visitor);
401 } 401 }
402 402
403 } 403 }
OLDNEW
« no previous file with comments | « Source/core/svg/SVGAElement.cpp ('k') | Source/core/svg/SVGCursorElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698