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

Unified Diff: third_party/WebKit/Source/core/svg/SVGRectElement.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/SVGRectElement.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGRectElement.cpp b/third_party/WebKit/Source/core/svg/SVGRectElement.cpp
index ce116b41eb67d089a5e4f605f7556f3abb6a0fde..c7e08f7d9ed50e4482a84bda0135207110ee97b1 100644
--- a/third_party/WebKit/Source/core/svg/SVGRectElement.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGRectElement.cpp
@@ -30,25 +30,29 @@ inline SVGRectElement::SVGRectElement(Document& document)
: SVGGeometryElement(SVGNames::rectTag, document),
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_rx(SVGAnimatedLength::create(this,
SVGNames::rxAttr,
- SVGLength::create(SVGLengthMode::Width))),
- m_ry(
- SVGAnimatedLength::create(this,
- SVGNames::ryAttr,
- SVGLength::create(SVGLengthMode::Height))) {
+ SVGLength::create(SVGLengthMode::Width),
+ CSSPropertyRx)),
+ m_ry(SVGAnimatedLength::create(this,
+ SVGNames::ryAttr,
+ SVGLength::create(SVGLengthMode::Height),
+ CSSPropertyRy)) {
addToPropertyMap(m_x);
addToPropertyMap(m_y);
addToPropertyMap(m_width);
@@ -112,24 +116,6 @@ Path SVGRectElement::asPath() const {
return path;
}
-bool SVGRectElement::isPresentationAttribute(
- const QualifiedName& attrName) const {
- if (attrName == SVGNames::xAttr || attrName == SVGNames::yAttr ||
- attrName == SVGNames::widthAttr || attrName == SVGNames::heightAttr ||
- attrName == SVGNames::rxAttr || attrName == SVGNames::ryAttr)
- return true;
- return SVGGeometryElement::isPresentationAttribute(attrName);
-}
-
-bool SVGRectElement::isPresentationAttributeWithSVGDOM(
- const QualifiedName& attrName) const {
- if (attrName == SVGNames::xAttr || attrName == SVGNames::yAttr ||
- attrName == SVGNames::widthAttr || attrName == SVGNames::heightAttr ||
- attrName == SVGNames::rxAttr || attrName == SVGNames::ryAttr)
- return true;
- return SVGGeometryElement::isPresentationAttributeWithSVGDOM(attrName);
-}
-
void SVGRectElement::collectStyleForPresentationAttribute(
const QualifiedName& name,
const AtomicString& value,
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGRectElement.h ('k') | third_party/WebKit/Source/core/svg/SVGSVGElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698