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

Unified Diff: third_party/WebKit/Source/core/svg/SVGUseElement.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
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGSVGElement.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/svg/SVGUseElement.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGUseElement.cpp b/third_party/WebKit/Source/core/svg/SVGUseElement.cpp
index 72bd3e79710708ddd4568fa3278cd72b13b9ae52..69220493620545e6d1792acc6d2556069fb90959 100644
--- a/third_party/WebKit/Source/core/svg/SVGUseElement.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGUseElement.cpp
@@ -180,15 +180,16 @@ void SVGUseElement::collectStyleForPresentationAttribute(
const AtomicString& value,
MutableStylePropertySet* style) {
SVGAnimatedPropertyBase* property = propertyFromAttribute(name);
- 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_x) {
+ addPropertyToPresentationAttributeStyle(style, CSSPropertyX,
+ m_x->cssValue());
+ } else if (property == m_y) {
+ addPropertyToPresentationAttributeStyle(style, CSSPropertyY,
+ m_y->cssValue());
+ } else {
SVGGraphicsElement::collectStyleForPresentationAttribute(name, value,
style);
+ }
}
bool SVGUseElement::isStructurallyExternal() const {
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGSVGElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698