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

Unified Diff: Source/core/svg/SVGSVGElement.cpp

Issue 262093007: Tighten error checking from SVGLength parsing (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Update expected file Created 6 years, 7 months 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 | « Source/core/svg/SVGForeignObjectElement.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGSVGElement.cpp
diff --git a/Source/core/svg/SVGSVGElement.cpp b/Source/core/svg/SVGSVGElement.cpp
index 3088ca5863f8671928e3b1d28392ea64ad615d64..208bd8c41a13bec33e4e122a3aaefec06d882e91 100644
--- a/Source/core/svg/SVGSVGElement.cpp
+++ b/Source/core/svg/SVGSVGElement.cpp
@@ -270,8 +270,9 @@ void SVGSVGElement::collectStyleForPresentationAttribute(const QualifiedName& na
{
if (isOutermostSVGSVGElement() && (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, value);
else if (name == SVGNames::heightAttr)
« no previous file with comments | « Source/core/svg/SVGForeignObjectElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698