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