Index: Source/core/svg/SVGForeignObjectElement.cpp |
diff --git a/Source/core/svg/SVGForeignObjectElement.cpp b/Source/core/svg/SVGForeignObjectElement.cpp |
index a588a67984e325a1d144c468e5b4c0d1da6350c1..6e9623ba4a6d3f6ba5ddc324b7f3122715146cae 100644 |
--- a/Source/core/svg/SVGForeignObjectElement.cpp |
+++ b/Source/core/svg/SVGForeignObjectElement.cpp |
@@ -96,12 +96,13 @@ void SVGForeignObjectElement::collectStyleForPresentationAttribute(const Qualifi |
{ |
if (name == SVGNames::widthAttr || name == SVGNames::heightAttr) { |
RefPtr<SVGLength> length = SVGLength::create(LengthModeOther); |
- length->setValueAsString(value, IGNORE_EXCEPTION); |
- if (length->unitType() != LengthTypeUnknown) { |
+ TrackExceptionState exceptionState; |
+ length->setValueAsString(value, exceptionState); |
+ if (!exceptionState.hadException()) { |
if (name == SVGNames::widthAttr) |
- addPropertyToPresentationAttributeStyle(style, CSSPropertyWidth, length->valueAsString()); |
+ addPropertyToPresentationAttributeStyle(style, CSSPropertyWidth, value); |
else if (name == SVGNames::heightAttr) |
- addPropertyToPresentationAttributeStyle(style, CSSPropertyHeight, length->valueAsString()); |
+ addPropertyToPresentationAttributeStyle(style, CSSPropertyHeight, value); |
} |
} else { |
SVGGraphicsElement::collectStyleForPresentationAttribute(name, value, style); |