Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(191)

Side by Side Diff: third_party/WebKit/Source/core/svg/SVGElement.cpp

Issue 2288583002: Reorder the AnimatedPropertyType enumeration (Closed)
Patch Set: Touch-ups Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/svg/properties/SVGPropertyInfo.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/svg/properties/SVGPropertyInfo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698