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, 2007 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> |
4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> | 4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> |
5 * Copyright (C) 2008 Apple Inc. All rights reserved. | 5 * Copyright (C) 2008 Apple Inc. All rights reserved. |
6 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> | 6 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> |
7 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 7 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
8 * | 8 * |
9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
361 { | 361 { |
362 DEFINE_STATIC_LOCAL(const AtomicString, sum, ("sum", AtomicString::Construct FromLiteral)); | 362 DEFINE_STATIC_LOCAL(const AtomicString, sum, ("sum", AtomicString::Construct FromLiteral)); |
363 const AtomicString& value = fastGetAttribute(SVGNames::accumulateAttr); | 363 const AtomicString& value = fastGetAttribute(SVGNames::accumulateAttr); |
364 return value == sum && animationMode() != ToAnimation; | 364 return value == sum && animationMode() != ToAnimation; |
365 } | 365 } |
366 | 366 |
367 bool SVGAnimationElement::isTargetAttributeCSSProperty(SVGElement* targetElement , const QualifiedName& attributeName) | 367 bool SVGAnimationElement::isTargetAttributeCSSProperty(SVGElement* targetElement , const QualifiedName& attributeName) |
368 { | 368 { |
369 ASSERT(targetElement); | 369 ASSERT(targetElement); |
370 | 370 |
371 if (!targetElement->isPresentationAttribute(attributeName)) | |
fs
2015/02/04 13:24:53
<to be written>
fs
2015/02/05 09:37:21
Ehrm... And here I intended to write something lik
Erik Dahlström (inactive)
2015/02/05 16:09:02
Argh, yes, and now I remember why the whole ApplyC
| |
372 return false; | |
373 | |
371 return SVGElement::isAnimatableCSSProperty(attributeName); | 374 return SVGElement::isAnimatableCSSProperty(attributeName); |
372 } | 375 } |
373 | 376 |
374 SVGAnimationElement::ShouldApplyAnimation SVGAnimationElement::shouldApplyAnimat ion(SVGElement* targetElement, const QualifiedName& attributeName) | 377 SVGAnimationElement::ShouldApplyAnimation SVGAnimationElement::shouldApplyAnimat ion(SVGElement* targetElement, const QualifiedName& attributeName) |
375 { | 378 { |
376 if (!hasValidAttributeType() || !targetElement || attributeName == anyQName( )) | 379 if (!hasValidAttributeType() || !targetElement || attributeName == anyQName( )) |
377 return DontApplyAnimation; | 380 return DontApplyAnimation; |
378 | 381 |
379 // Always animate CSS properties, using the ApplyCSSAnimation code path, reg ardless of the attributeType value. | 382 // Always animate CSS properties, using the ApplyCSSAnimation code path, reg ardless of the attributeType value. |
380 if (isTargetAttributeCSSProperty(targetElement, attributeName)) | 383 if (isTargetAttributeCSSProperty(targetElement, attributeName)) |
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
708 SVGSMILElement::setAttributeName(attributeName); | 711 SVGSMILElement::setAttributeName(attributeName); |
709 checkInvalidCSSAttributeType(targetElement()); | 712 checkInvalidCSSAttributeType(targetElement()); |
710 } | 713 } |
711 | 714 |
712 void SVGAnimationElement::checkInvalidCSSAttributeType(SVGElement* target) | 715 void SVGAnimationElement::checkInvalidCSSAttributeType(SVGElement* target) |
713 { | 716 { |
714 m_hasInvalidCSSAttributeType = target && hasValidAttributeName() && attribut eType() == AttributeTypeCSS && !isTargetAttributeCSSProperty(target, attributeNa me()); | 717 m_hasInvalidCSSAttributeType = target && hasValidAttributeName() && attribut eType() == AttributeTypeCSS && !isTargetAttributeCSSProperty(target, attributeNa me()); |
715 } | 718 } |
716 | 719 |
717 } | 720 } |
OLD | NEW |