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

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

Issue 2708923011: Avoid duplicating the CSS property mapping for SVG pres. attrs. (Closed)
Patch Set: Created 3 years, 10 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/SVGImageElement.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGImageElement.cpp b/third_party/WebKit/Source/core/svg/SVGImageElement.cpp
index 4dc7f4e8730258d47123432fee5089b9c52928d0..99f083eae214dccc6296751d4afa06fb065655c7 100644
--- a/third_party/WebKit/Source/core/svg/SVGImageElement.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGImageElement.cpp
@@ -91,16 +91,16 @@ void SVGImageElement::collectStyleForPresentationAttribute(
MutableStylePropertySet* style) {
SVGAnimatedPropertyBase* property = propertyFromAttribute(name);
if (property == m_width) {
- addPropertyToPresentationAttributeStyle(style, CSSPropertyWidth,
+ addPropertyToPresentationAttributeStyle(style, property->cssPropertyId(),
m_width->cssValue());
} else if (property == m_height) {
- addPropertyToPresentationAttributeStyle(style, CSSPropertyHeight,
+ addPropertyToPresentationAttributeStyle(style, property->cssPropertyId(),
m_height->cssValue());
} else if (property == m_x) {
- addPropertyToPresentationAttributeStyle(style, CSSPropertyX,
+ addPropertyToPresentationAttributeStyle(style, property->cssPropertyId(),
m_x->cssValue());
} else if (property == m_y) {
- addPropertyToPresentationAttributeStyle(style, CSSPropertyY,
+ addPropertyToPresentationAttributeStyle(style, property->cssPropertyId(),
m_y->cssValue());
} else {
SVGGraphicsElement::collectStyleForPresentationAttribute(name, value,
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGForeignObjectElement.cpp ('k') | third_party/WebKit/Source/core/svg/SVGMaskElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698