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

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

Issue 1686483002: Oilpan: Remove most WillBe types from the code base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
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 20 matching lines...) Expand all
31 #include "core/svg/SVGDocumentExtensions.h" 31 #include "core/svg/SVGDocumentExtensions.h"
32 32
33 namespace blink { 33 namespace blink {
34 34
35 SVGAnimateElement::SVGAnimateElement(const QualifiedName& tagName, Document& doc ument) 35 SVGAnimateElement::SVGAnimateElement(const QualifiedName& tagName, Document& doc ument)
36 : SVGAnimationElement(tagName, document) 36 : SVGAnimationElement(tagName, document)
37 , m_animator(this) 37 , m_animator(this)
38 { 38 {
39 } 39 }
40 40
41 PassRefPtrWillBeRawPtr<SVGAnimateElement> SVGAnimateElement::create(Document& do cument) 41 RawPtr<SVGAnimateElement> SVGAnimateElement::create(Document& document)
42 { 42 {
43 return adoptRefWillBeNoop(new SVGAnimateElement(SVGNames::animateTag, docume nt)); 43 return (new SVGAnimateElement(SVGNames::animateTag, document));
44 } 44 }
45 45
46 SVGAnimateElement::~SVGAnimateElement() 46 SVGAnimateElement::~SVGAnimateElement()
47 { 47 {
48 } 48 }
49 49
50 bool SVGAnimateElement::isSVGAnimationAttributeSettingJavaScriptURL(const Attrib ute& attribute) const 50 bool SVGAnimateElement::isSVGAnimationAttributeSettingJavaScriptURL(const Attrib ute& attribute) const
51 { 51 {
52 if ((attribute.name() == SVGNames::fromAttr || attribute.name() == SVGNames: :toAttr) && attributeValueIsJavaScriptURL(attribute)) 52 if ((attribute.name() == SVGNames::fromAttr || attribute.name() == SVGNames: :toAttr) && attributeValueIsJavaScriptURL(attribute))
53 return true; 53 return true;
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 ASSERT(targetElement); 234 ASSERT(targetElement);
235 if (attributeName == anyQName() || !targetElement->inDocument() || !targetEl ement->parentNode()) 235 if (attributeName == anyQName() || !targetElement->inDocument() || !targetEl ement->parentNode())
236 return; 236 return;
237 237
238 CSSPropertyID id = cssPropertyID(attributeName.localName()); 238 CSSPropertyID id = cssPropertyID(attributeName.localName());
239 239
240 SVGElement::InstanceUpdateBlocker blocker(targetElement); 240 SVGElement::InstanceUpdateBlocker blocker(targetElement);
241 applyCSSPropertyToTarget(targetElement, id, valueAsString); 241 applyCSSPropertyToTarget(targetElement, id, valueAsString);
242 242
243 // If the target element has instances, update them as well, w/o requiring t he <use> tree to be rebuilt. 243 // If the target element has instances, update them as well, w/o requiring t he <use> tree to be rebuilt.
244 const WillBeHeapHashSet<RawPtrWillBeWeakMember<SVGElement>>& instances = tar getElement->instancesForElement(); 244 const HeapHashSet<WeakMember<SVGElement>>& instances = targetElement->instan cesForElement();
245 for (SVGElement* shadowTreeElement : instances) { 245 for (SVGElement* shadowTreeElement : instances) {
246 if (shadowTreeElement) 246 if (shadowTreeElement)
247 applyCSSPropertyToTarget(shadowTreeElement, id, valueAsString); 247 applyCSSPropertyToTarget(shadowTreeElement, id, valueAsString);
248 } 248 }
249 } 249 }
250 250
251 static inline void removeCSSPropertyFromTargetAndInstances(SVGElement* targetEle ment, const QualifiedName& attributeName) 251 static inline void removeCSSPropertyFromTargetAndInstances(SVGElement* targetEle ment, const QualifiedName& attributeName)
252 { 252 {
253 ASSERT(targetElement); 253 ASSERT(targetElement);
254 if (attributeName == anyQName() || !targetElement->inDocument() || !targetEl ement->parentNode()) 254 if (attributeName == anyQName() || !targetElement->inDocument() || !targetEl ement->parentNode())
255 return; 255 return;
256 256
257 CSSPropertyID id = cssPropertyID(attributeName.localName()); 257 CSSPropertyID id = cssPropertyID(attributeName.localName());
258 258
259 SVGElement::InstanceUpdateBlocker blocker(targetElement); 259 SVGElement::InstanceUpdateBlocker blocker(targetElement);
260 removeCSSPropertyFromTarget(targetElement, id); 260 removeCSSPropertyFromTarget(targetElement, id);
261 261
262 // If the target element has instances, update them as well, w/o requiring t he <use> tree to be rebuilt. 262 // If the target element has instances, update them as well, w/o requiring t he <use> tree to be rebuilt.
263 const WillBeHeapHashSet<RawPtrWillBeWeakMember<SVGElement>>& instances = tar getElement->instancesForElement(); 263 const HeapHashSet<WeakMember<SVGElement>>& instances = targetElement->instan cesForElement();
264 for (SVGElement* shadowTreeElement : instances) { 264 for (SVGElement* shadowTreeElement : instances) {
265 if (shadowTreeElement) 265 if (shadowTreeElement)
266 removeCSSPropertyFromTarget(shadowTreeElement, id); 266 removeCSSPropertyFromTarget(shadowTreeElement, id);
267 } 267 }
268 } 268 }
269 269
270 static inline void notifyTargetAboutAnimValChange(SVGElement* targetElement, con st QualifiedName& attributeName) 270 static inline void notifyTargetAboutAnimValChange(SVGElement* targetElement, con st QualifiedName& attributeName)
271 { 271 {
272 #if !ENABLE(OILPAN) 272 #if !ENABLE(OILPAN)
273 ASSERT_WITH_SECURITY_IMPLICATION(!targetElement->m_deletionHasBegun); 273 ASSERT_WITH_SECURITY_IMPLICATION(!targetElement->m_deletionHasBegun);
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 { 409 {
410 visitor->trace(m_fromProperty); 410 visitor->trace(m_fromProperty);
411 visitor->trace(m_toProperty); 411 visitor->trace(m_toProperty);
412 visitor->trace(m_toAtEndOfDurationProperty); 412 visitor->trace(m_toAtEndOfDurationProperty);
413 visitor->trace(m_animatedProperty); 413 visitor->trace(m_animatedProperty);
414 visitor->trace(m_animator); 414 visitor->trace(m_animator);
415 SVGAnimationElement::trace(visitor); 415 SVGAnimationElement::trace(visitor);
416 } 416 }
417 417
418 } // namespace blink 418 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698