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 0e1b5c853b0ae1f1a3a06c51b6edddc3c7885d68..4dc7f4e8730258d47123432fee5089b9c52928d0 100644 |
--- a/third_party/WebKit/Source/core/svg/SVGImageElement.cpp |
+++ b/third_party/WebKit/Source/core/svg/SVGImageElement.cpp |
@@ -90,23 +90,22 @@ void SVGImageElement::collectStyleForPresentationAttribute( |
const AtomicString& value, |
MutableStylePropertySet* style) { |
SVGAnimatedPropertyBase* property = propertyFromAttribute(name); |
- if (property == m_width) |
- addPropertyToPresentationAttributeStyle( |
- style, CSSPropertyWidth, |
- m_width->currentValue()->asCSSPrimitiveValue()); |
- else if (property == m_height) |
- addPropertyToPresentationAttributeStyle( |
- style, CSSPropertyHeight, |
- m_height->currentValue()->asCSSPrimitiveValue()); |
- else if (property == m_x) |
- addPropertyToPresentationAttributeStyle( |
- style, CSSPropertyX, m_x->currentValue()->asCSSPrimitiveValue()); |
- else if (property == m_y) |
- addPropertyToPresentationAttributeStyle( |
- style, CSSPropertyY, m_y->currentValue()->asCSSPrimitiveValue()); |
- else |
+ if (property == m_width) { |
+ addPropertyToPresentationAttributeStyle(style, CSSPropertyWidth, |
+ m_width->cssValue()); |
+ } else if (property == m_height) { |
+ addPropertyToPresentationAttributeStyle(style, CSSPropertyHeight, |
+ m_height->cssValue()); |
+ } else if (property == m_x) { |
+ addPropertyToPresentationAttributeStyle(style, CSSPropertyX, |
+ m_x->cssValue()); |
+ } else if (property == m_y) { |
+ addPropertyToPresentationAttributeStyle(style, CSSPropertyY, |
+ m_y->cssValue()); |
+ } else { |
SVGGraphicsElement::collectStyleForPresentationAttribute(name, value, |
style); |
+ } |
} |
void SVGImageElement::svgAttributeChanged(const QualifiedName& attrName) { |