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

Unified Diff: third_party/WebKit/Source/core/svg/SVGAnimationElement.cpp

Issue 2623513005: Introduce Element::AttributeModificationParams (Closed)
Patch Set: Created 3 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
Index: third_party/WebKit/Source/core/svg/SVGAnimationElement.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGAnimationElement.cpp b/third_party/WebKit/Source/core/svg/SVGAnimationElement.cpp
index 62bb324e7de2f23c1b518905e856f461384fb1fb..09b2ab8ba87171f9ac8183f44347c723c74508cc 100644
--- a/third_party/WebKit/Source/core/svg/SVGAnimationElement.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGAnimationElement.cpp
@@ -152,12 +152,13 @@ static bool parseKeySplines(const String& string,
return true;
}
-void SVGAnimationElement::parseAttribute(const QualifiedName& name,
- const AtomicString& oldValue,
- const AtomicString& value) {
+void SVGAnimationElement::parseAttribute(
+ const AttributeModificationParams& params) {
+ const QualifiedName& name = params.name;
if (name == SVGNames::valuesAttr) {
- if (!parseValues(value, m_values)) {
- reportAttributeParsingError(SVGParseStatus::ParsingFailed, name, value);
+ if (!parseValues(params.newValue, m_values)) {
+ reportAttributeParsingError(SVGParseStatus::ParsingFailed, name,
+ params.newValue);
return;
}
updateAnimationMode();
@@ -165,8 +166,10 @@ void SVGAnimationElement::parseAttribute(const QualifiedName& name,
}
if (name == SVGNames::keyTimesAttr) {
- if (!parseKeyTimes(value, m_keyTimes, true))
- reportAttributeParsingError(SVGParseStatus::ParsingFailed, name, value);
+ if (!parseKeyTimes(params.newValue, m_keyTimes, true)) {
+ reportAttributeParsingError(SVGParseStatus::ParsingFailed, name,
+ params.newValue);
+ }
return;
}
@@ -174,20 +177,24 @@ void SVGAnimationElement::parseAttribute(const QualifiedName& name,
if (isSVGAnimateMotionElement(*this)) {
// This is specified to be an animateMotion attribute only but it is
// simpler to put it here where the other timing calculatations are.
- if (!parseKeyTimes(value, m_keyPoints, false))
- reportAttributeParsingError(SVGParseStatus::ParsingFailed, name, value);
+ if (!parseKeyTimes(params.newValue, m_keyPoints, false)) {
+ reportAttributeParsingError(SVGParseStatus::ParsingFailed, name,
+ params.newValue);
+ }
}
return;
}
if (name == SVGNames::keySplinesAttr) {
- if (!parseKeySplines(value, m_keySplines))
- reportAttributeParsingError(SVGParseStatus::ParsingFailed, name, value);
+ if (!parseKeySplines(params.newValue, m_keySplines)) {
+ reportAttributeParsingError(SVGParseStatus::ParsingFailed, name,
+ params.newValue);
+ }
return;
}
if (name == SVGNames::calcModeAttr) {
- setCalcMode(value);
+ setCalcMode(params.newValue);
return;
}
@@ -197,7 +204,7 @@ void SVGAnimationElement::parseAttribute(const QualifiedName& name,
return;
}
- SVGSMILElement::parseAttribute(name, oldValue, value);
+ SVGSMILElement::parseAttribute(params);
}
void SVGAnimationElement::svgAttributeChanged(const QualifiedName& attrName) {
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGAnimationElement.h ('k') | third_party/WebKit/Source/core/svg/SVGElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698