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

Unified Diff: third_party/WebKit/Source/core/svg/SVGPathElement.cpp

Issue 1544673003: Refactor propagation of parsing errors for SVG attributes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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/SVGPathElement.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGPathElement.cpp b/third_party/WebKit/Source/core/svg/SVGPathElement.cpp
index 36f5179ccdd8f17ac2ae0be51185d6ef2b7a7f71..b21d54b4fe04c914bab5a2e8d04a3417dcfb51dd 100644
--- a/third_party/WebKit/Source/core/svg/SVGPathElement.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGPathElement.cpp
@@ -36,13 +36,14 @@ public:
return adoptRefWillBeNoop(new SVGAnimatedPathLength(contextElement));
}
- void setBaseValueAsString(const String& value, SVGParsingError& parseError) override
+ SVGParsingError setBaseValueAsString(const String& value) override
{
- SVGAnimatedNumber::setBaseValueAsString(value, parseError);
+ SVGParsingError parseStatus = SVGAnimatedNumber::setBaseValueAsString(value);
ASSERT(contextElement());
- if (parseError == NoError && baseValue()->value() < 0)
+ if (parseStatus == NoError && baseValue()->value() < 0)
contextElement()->document().accessSVGExtensions().reportError("A negative value for path attribute <pathLength> is not allowed");
+ return parseStatus;
}
private:

Powered by Google App Engine
This is Rietveld 408576698