OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde
.org> | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde
.org> |
3 * Copyright (C) 2004, 2005, 2006, 2008 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006, 2008 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) 2008 Alp Toker <alp@atoker.com> | 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> |
6 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> | 6 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
715 cssPropertyMap.set(visibilityAttr, AnimatedString); | 715 cssPropertyMap.set(visibilityAttr, AnimatedString); |
716 cssPropertyMap.set(word_spacingAttr, AnimatedLength); | 716 cssPropertyMap.set(word_spacingAttr, AnimatedLength); |
717 } | 717 } |
718 | 718 |
719 if (cssPropertyMap.contains(attributeName)) | 719 if (cssPropertyMap.contains(attributeName)) |
720 return cssPropertyMap.get(attributeName); | 720 return cssPropertyMap.get(attributeName); |
721 | 721 |
722 return AnimatedUnknown; | 722 return AnimatedUnknown; |
723 } | 723 } |
724 | 724 |
725 void SVGElement::addToPropertyMap(PassRefPtr<NewSVGAnimatedPropertyBase> passPro
perty) | 725 void SVGElement::addToPropertyMap(PassRefPtr<SVGAnimatedPropertyBase> passProper
ty) |
726 { | 726 { |
727 RefPtr<NewSVGAnimatedPropertyBase> property(passProperty); | 727 RefPtr<SVGAnimatedPropertyBase> property(passProperty); |
728 QualifiedName attributeName = property->attributeName(); | 728 QualifiedName attributeName = property->attributeName(); |
729 m_newAttributeToPropertyMap.set(attributeName, property.release()); | 729 m_newAttributeToPropertyMap.set(attributeName, property.release()); |
730 } | 730 } |
731 | 731 |
732 PassRefPtr<NewSVGAnimatedPropertyBase> SVGElement::propertyFromAttribute(const Q
ualifiedName& attributeName) | 732 PassRefPtr<SVGAnimatedPropertyBase> SVGElement::propertyFromAttribute(const Qual
ifiedName& attributeName) |
733 { | 733 { |
734 return m_newAttributeToPropertyMap.get(attributeName); | 734 return m_newAttributeToPropertyMap.get(attributeName); |
735 } | 735 } |
736 | 736 |
737 bool SVGElement::isAnimatableCSSProperty(const QualifiedName& attrName) | 737 bool SVGElement::isAnimatableCSSProperty(const QualifiedName& attrName) |
738 { | 738 { |
739 return animatedPropertyTypeForCSSAttribute(attrName) != AnimatedUnknown; | 739 return animatedPropertyTypeForCSSAttribute(attrName) != AnimatedUnknown; |
740 } | 740 } |
741 | 741 |
742 bool SVGElement::isPresentationAttribute(const QualifiedName& name) const | 742 bool SVGElement::isPresentationAttribute(const QualifiedName& name) const |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
962 if (name == anyQName()) { | 962 if (name == anyQName()) { |
963 AttributeToPropertyMap::const_iterator::Values it = m_newAttributeToProp
ertyMap.values().begin(); | 963 AttributeToPropertyMap::const_iterator::Values it = m_newAttributeToProp
ertyMap.values().begin(); |
964 AttributeToPropertyMap::const_iterator::Values end = m_newAttributeToPro
pertyMap.values().end(); | 964 AttributeToPropertyMap::const_iterator::Values end = m_newAttributeToPro
pertyMap.values().end(); |
965 for (; it != end; ++it) { | 965 for (; it != end; ++it) { |
966 if ((*it)->needsSynchronizeAttribute()) | 966 if ((*it)->needsSynchronizeAttribute()) |
967 (*it)->synchronizeAttribute(); | 967 (*it)->synchronizeAttribute(); |
968 } | 968 } |
969 | 969 |
970 elementData()->m_animatedSVGAttributesAreDirty = false; | 970 elementData()->m_animatedSVGAttributesAreDirty = false; |
971 } else { | 971 } else { |
972 RefPtr<NewSVGAnimatedPropertyBase> property = m_newAttributeToPropertyMa
p.get(name); | 972 RefPtr<SVGAnimatedPropertyBase> property = m_newAttributeToPropertyMap.g
et(name); |
973 if (property && property->needsSynchronizeAttribute()) | 973 if (property && property->needsSynchronizeAttribute()) |
974 property->synchronizeAttribute(); | 974 property->synchronizeAttribute(); |
975 } | 975 } |
976 } | 976 } |
977 | 977 |
978 PassRefPtr<RenderStyle> SVGElement::customStyleForRenderer() | 978 PassRefPtr<RenderStyle> SVGElement::customStyleForRenderer() |
979 { | 979 { |
980 if (!correspondingElement()) | 980 if (!correspondingElement()) |
981 return document().ensureStyleResolver().styleForElement(this); | 981 return document().ensureStyleResolver().styleForElement(this); |
982 | 982 |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1131 animatableAttributes.add(SVGNames::zAttr); | 1131 animatableAttributes.add(SVGNames::zAttr); |
1132 } | 1132 } |
1133 | 1133 |
1134 if (name == classAttr) | 1134 if (name == classAttr) |
1135 return true; | 1135 return true; |
1136 | 1136 |
1137 return animatableAttributes.contains(name); | 1137 return animatableAttributes.contains(name); |
1138 } | 1138 } |
1139 #endif | 1139 #endif |
1140 } | 1140 } |
OLD | NEW |