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

Unified Diff: third_party/WebKit/Source/core/svg/SVGSVGElement.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/SVGSVGElement.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp b/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp
index a08056bfca98312c020b18fb64f8a2c29443c2ca..181fd7bb8e359a49ee6bcbed664d313000742ec2 100644
--- a/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp
@@ -238,21 +238,20 @@ void SVGSVGElement::collectStyleForPresentationAttribute(
MutableStylePropertySet* style) {
SVGAnimatedPropertyBase* property = propertyFromAttribute(name);
if (property == m_x) {
- addPropertyToPresentationAttributeStyle(
- style, CSSPropertyX, m_x->currentValue()->asCSSPrimitiveValue());
+ addPropertyToPresentationAttributeStyle(style, CSSPropertyX,
+ m_x->cssValue());
} else if (property == m_y) {
- addPropertyToPresentationAttributeStyle(
- style, CSSPropertyY, m_y->currentValue()->asCSSPrimitiveValue());
+ addPropertyToPresentationAttributeStyle(style, CSSPropertyY,
+ m_y->cssValue());
} else if (isOutermostSVGSVGElement() &&
(property == m_width || property == m_height)) {
- if (property == m_width)
- addPropertyToPresentationAttributeStyle(
- style, CSSPropertyWidth,
- m_width->currentValue()->asCSSPrimitiveValue());
- else if (property == m_height)
- addPropertyToPresentationAttributeStyle(
- style, CSSPropertyHeight,
- m_height->currentValue()->asCSSPrimitiveValue());
+ if (property == m_width) {
+ addPropertyToPresentationAttributeStyle(style, CSSPropertyWidth,
+ m_width->cssValue());
+ } else if (property == m_height) {
+ addPropertyToPresentationAttributeStyle(style, CSSPropertyHeight,
+ m_height->cssValue());
+ }
} else {
SVGGraphicsElement::collectStyleForPresentationAttribute(name, value,
style);
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGRectElement.cpp ('k') | third_party/WebKit/Source/core/svg/SVGUseElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698