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 685 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
696 { text_anchorAttr, AnimatedString }, | 696 { text_anchorAttr, AnimatedString }, |
697 { text_decorationAttr, AnimatedString }, | 697 { text_decorationAttr, AnimatedString }, |
698 { text_renderingAttr, AnimatedString }, | 698 { text_renderingAttr, AnimatedString }, |
699 { vector_effectAttr, AnimatedString }, | 699 { vector_effectAttr, AnimatedString }, |
700 { visibilityAttr, AnimatedString }, | 700 { visibilityAttr, AnimatedString }, |
701 { word_spacingAttr, AnimatedLength }, | 701 { word_spacingAttr, AnimatedLength }, |
702 }; | 702 }; |
703 for (size_t i = 0; i < WTF_ARRAY_LENGTH(attrToTypes); i++) | 703 for (size_t i = 0; i < WTF_ARRAY_LENGTH(attrToTypes); i++) |
704 cssPropertyMap.set(attrToTypes[i].attr, attrToTypes[i].propType); | 704 cssPropertyMap.set(attrToTypes[i].attr, attrToTypes[i].propType); |
705 } | 705 } |
706 | 706 // If the attribute is not present in the map, this will return the "empty |
707 if (cssPropertyMap.contains(attributeName)) | 707 // value" per HashTraits - which is AnimatedUnknown. |
708 return cssPropertyMap.get(attributeName); | 708 return cssPropertyMap.get(attributeName); |
pdr.
2016/08/29 00:07:09
In addition to this comment, can you enforce it wi
| |
709 | |
710 return AnimatedUnknown; | |
711 } | 709 } |
712 | 710 |
713 void SVGElement::addToPropertyMap(SVGAnimatedPropertyBase* property) | 711 void SVGElement::addToPropertyMap(SVGAnimatedPropertyBase* property) |
714 { | 712 { |
715 m_attributeToPropertyMap.set(property->attributeName(), property); | 713 m_attributeToPropertyMap.set(property->attributeName(), property); |
716 } | 714 } |
717 | 715 |
718 SVGAnimatedPropertyBase* SVGElement::propertyFromAttribute(const QualifiedName& attributeName) const | 716 SVGAnimatedPropertyBase* SVGElement::propertyFromAttribute(const QualifiedName& attributeName) const |
719 { | 717 { |
720 AttributeToPropertyMap::const_iterator it = m_attributeToPropertyMap.find<SV GAttributeHashTranslator>(attributeName); | 718 AttributeToPropertyMap::const_iterator it = m_attributeToPropertyMap.find<SV GAttributeHashTranslator>(attributeName); |
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1209 Element::trace(visitor); | 1207 Element::trace(visitor); |
1210 } | 1208 } |
1211 | 1209 |
1212 const AtomicString& SVGElement::eventParameterName() | 1210 const AtomicString& SVGElement::eventParameterName() |
1213 { | 1211 { |
1214 DEFINE_STATIC_LOCAL(const AtomicString, evtString, ("evt")); | 1212 DEFINE_STATIC_LOCAL(const AtomicString, evtString, ("evt")); |
1215 return evtString; | 1213 return evtString; |
1216 } | 1214 } |
1217 | 1215 |
1218 } // namespace blink | 1216 } // namespace blink |
OLD | NEW |