Index: Source/core/svg/SVGSVGElement.cpp |
diff --git a/Source/core/svg/SVGSVGElement.cpp b/Source/core/svg/SVGSVGElement.cpp |
index 878c47ad9c2d01254c655bcade4129a9a51e10a0..13b528a4fa2ae27fc6d5aa377a0449050dc3fa55 100644 |
--- a/Source/core/svg/SVGSVGElement.cpp |
+++ b/Source/core/svg/SVGSVGElement.cpp |
@@ -265,15 +265,10 @@ void SVGSVGElement::collectStyleForPresentationAttribute(const QualifiedName& na |
} else if (property == m_y) { |
addSVGLengthPropertyToPresentationAttributeStyle(style, CSSPropertyY, *m_y->currentValue()); |
} else if (isOutermostSVGSVGElement() && (property == m_width || property == m_height)) { |
fs
2015/02/16 17:34:32
I guess this (isOutermostSVGSVGElement predicate)
Erik Dahlström (inactive)
2015/02/17 08:06:26
Yes, but I think it's best to do that in another C
|
- RefPtrWillBeRawPtr<SVGLength> length = SVGLength::create(LengthModeOther); |
- TrackExceptionState exceptionState; |
- length->setValueAsString(value, exceptionState); |
- if (!exceptionState.hadException()) { |
- if (property == m_width) |
- addPropertyToPresentationAttributeStyle(style, CSSPropertyWidth, value); |
- else if (property == m_height) |
- addPropertyToPresentationAttributeStyle(style, CSSPropertyHeight, value); |
- } |
+ if (property == m_width) |
+ addSVGLengthPropertyToPresentationAttributeStyle(style, CSSPropertyWidth, *m_width->currentValue()); |
+ else if (property == m_height) |
+ addSVGLengthPropertyToPresentationAttributeStyle(style, CSSPropertyHeight, *m_height->currentValue()); |
} else { |
SVGGraphicsElement::collectStyleForPresentationAttribute(name, value, style); |
} |