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

Unified Diff: third_party/WebKit/Source/core/svg/SVGForeignObjectElement.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/SVGForeignObjectElement.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGForeignObjectElement.cpp b/third_party/WebKit/Source/core/svg/SVGForeignObjectElement.cpp
index d5966e2bc0877461447107387b3b7ae62d6df45e..daf86ffa523129e5401b5d4e2478b36e9fc5b38b 100644
--- a/third_party/WebKit/Source/core/svg/SVGForeignObjectElement.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGForeignObjectElement.cpp
@@ -70,23 +70,22 @@ void SVGForeignObjectElement::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 SVGForeignObjectElement::svgAttributeChanged(
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGEllipseElement.cpp ('k') | third_party/WebKit/Source/core/svg/SVGImageElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698