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

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

Issue 2485663002: Store CSSPropertyID in SVGAnimatedPropertyBase (Closed)
Patch Set: Add missing case Created 4 years, 1 month 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/SVGSVGElement.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp b/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp
index 1ed4a6bec297884d3bc20887d824d40eab5cc204..f49fb0848ea6df3310cf5f383ae6a093049e0d27 100644
--- a/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp
@@ -67,18 +67,21 @@ inline SVGSVGElement::SVGSVGElement(Document& doc)
SVGFitToViewBox(this),
m_x(SVGAnimatedLength::create(this,
SVGNames::xAttr,
- SVGLength::create(SVGLengthMode::Width))),
+ SVGLength::create(SVGLengthMode::Width),
+ CSSPropertyX)),
m_y(SVGAnimatedLength::create(this,
SVGNames::yAttr,
- SVGLength::create(SVGLengthMode::Height))),
- m_width(
- SVGAnimatedLength::create(this,
- SVGNames::widthAttr,
- SVGLength::create(SVGLengthMode::Width))),
+ SVGLength::create(SVGLengthMode::Height),
+ CSSPropertyY)),
+ m_width(SVGAnimatedLength::create(this,
+ SVGNames::widthAttr,
+ SVGLength::create(SVGLengthMode::Width),
+ CSSPropertyWidth)),
m_height(
SVGAnimatedLength::create(this,
SVGNames::heightAttr,
- SVGLength::create(SVGLengthMode::Height))),
+ SVGLength::create(SVGLengthMode::Height),
+ CSSPropertyHeight)),
m_useCurrentView(false),
m_timeContainer(SMILTimeContainer::create(*this)),
m_translation(SVGPoint::create()),
@@ -217,19 +220,16 @@ void SVGSVGElement::parseAttribute(const QualifiedName& name,
}
bool SVGSVGElement::isPresentationAttribute(const QualifiedName& name) const {
- if (isOutermostSVGSVGElement() &&
- (name == SVGNames::widthAttr || name == SVGNames::heightAttr))
- return true;
- else if (name == SVGNames::xAttr || name == SVGNames::yAttr)
- return true;
-
+ if ((name == SVGNames::widthAttr || name == SVGNames::heightAttr) &&
+ !isOutermostSVGSVGElement())
+ return false;
return SVGGraphicsElement::isPresentationAttribute(name);
}
bool SVGSVGElement::isPresentationAttributeWithSVGDOM(
const QualifiedName& attrName) const {
- if (attrName == SVGNames::xAttr || attrName == SVGNames::yAttr)
- return true;
+ if (attrName == SVGNames::widthAttr || attrName == SVGNames::heightAttr)
+ return false;
return SVGGraphicsElement::isPresentationAttributeWithSVGDOM(attrName);
}
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGRectElement.cpp ('k') | third_party/WebKit/Source/core/svg/SVGUseElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698