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

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

Issue 2549563002: Only communicate CSSPrimitiveValue references from SVGLength (Closed)
Patch Set: Created 4 years 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 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) {
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGForeignObjectElement.cpp ('k') | third_party/WebKit/Source/core/svg/SVGLength.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698