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

Unified Diff: Source/core/svg/SVGElement.cpp

Issue 148173018: [SVG] SVGAnimatedString{,List} migration to new SVG property impl. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: remove debug print Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/svg/SVGElement.h ('k') | Source/core/svg/SVGFEBlendElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGElement.cpp
diff --git a/Source/core/svg/SVGElement.cpp b/Source/core/svg/SVGElement.cpp
index 612406141a10d1531f14e8d6aa92b3acb8dcdce4..856adbe21d3ae693d7f8db1e24e23b5d475eba62 100644
--- a/Source/core/svg/SVGElement.cpp
+++ b/Source/core/svg/SVGElement.cpp
@@ -52,10 +52,8 @@
namespace WebCore {
// Animated property definitions
-DEFINE_ANIMATED_STRING(SVGElement, HTMLNames::classAttr, ClassName, className)
BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGElement)
-REGISTER_LOCAL_ANIMATED_PROPERTY(className)
END_REGISTER_ANIMATED_PROPERTIES
using namespace HTMLNames;
@@ -73,6 +71,7 @@ void mapAttributeToCSSProperty(HashMap<StringImpl*, CSSPropertyID>* propertyName
SVGElement::SVGElement(const QualifiedName& tagName, Document& document, ConstructionType constructionType)
: Element(tagName, &document, constructionType)
+ , m_className(SVGAnimatedString::create(this, HTMLNames::classAttr, SVGString::create()))
#if !ASSERT_DISABLED
, m_inRelativeLengthClientsInvalidation(false)
#endif
@@ -81,6 +80,7 @@ SVGElement::SVGElement(const QualifiedName& tagName, Document& document, Constru
, m_hasSVGRareData(false)
{
ScriptWrappable::init(this);
+ addToPropertyMap(m_className);
registerAnimatedPropertiesForSVGElement();
setHasCustomStyleCallbacks();
}
@@ -657,7 +657,9 @@ void SVGElement::parseAttribute(const QualifiedName& name, const AtomicString& v
// the className here. svgAttributeChanged actually causes the resulting
// style updates (instead of Element::parseAttribute). We don't
// tell Element about the change to avoid parsing the class list twice
- setClassNameBaseValue(value);
+ SVGParsingError parseError = NoError;
+ m_className->setBaseValueAsString(value, parseError);
+ reportAttributeParsingError(parseError, name, value);
} else if (name.matches(XMLNames::langAttr) || name.matches(XMLNames::spaceAttr)) {
} else {
// standard events
@@ -969,7 +971,7 @@ void SVGElement::svgAttributeChanged(const QualifiedName& attrName)
}
if (attrName == HTMLNames::classAttr) {
- classAttributeChanged(AtomicString(classNameCurrentValue()));
+ classAttributeChanged(AtomicString(m_className->currentValue()->value()));
SVGElementInstance::invalidateAllInstancesOfElement(this);
return;
}
« no previous file with comments | « Source/core/svg/SVGElement.h ('k') | Source/core/svg/SVGFEBlendElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698