| 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 DCHECK_EQ(HashTraits<AnimatedPropertyType>::emptyValue(), AnimatedUnknown); |
| 709 | 709 return cssPropertyMap.get(attributeName); |
| 710 return AnimatedUnknown; | |
| 711 } | 710 } |
| 712 | 711 |
| 713 void SVGElement::addToPropertyMap(SVGAnimatedPropertyBase* property) | 712 void SVGElement::addToPropertyMap(SVGAnimatedPropertyBase* property) |
| 714 { | 713 { |
| 715 m_attributeToPropertyMap.set(property->attributeName(), property); | 714 m_attributeToPropertyMap.set(property->attributeName(), property); |
| 716 } | 715 } |
| 717 | 716 |
| 718 SVGAnimatedPropertyBase* SVGElement::propertyFromAttribute(const QualifiedName&
attributeName) const | 717 SVGAnimatedPropertyBase* SVGElement::propertyFromAttribute(const QualifiedName&
attributeName) const |
| 719 { | 718 { |
| 720 AttributeToPropertyMap::const_iterator it = m_attributeToPropertyMap.find<SV
GAttributeHashTranslator>(attributeName); | 719 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); | 1208 Element::trace(visitor); |
| 1210 } | 1209 } |
| 1211 | 1210 |
| 1212 const AtomicString& SVGElement::eventParameterName() | 1211 const AtomicString& SVGElement::eventParameterName() |
| 1213 { | 1212 { |
| 1214 DEFINE_STATIC_LOCAL(const AtomicString, evtString, ("evt")); | 1213 DEFINE_STATIC_LOCAL(const AtomicString, evtString, ("evt")); |
| 1215 return evtString; | 1214 return evtString; |
| 1216 } | 1215 } |
| 1217 | 1216 |
| 1218 } // namespace blink | 1217 } // namespace blink |
| OLD | NEW |