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

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

Issue 303263008: [SVG2] Add support for the 'turn' unit in <angle>. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: hide the internals of SVGAngle Created 6 years, 6 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
Index: Source/core/svg/SVGAngleTearOff.cpp
diff --git a/Source/core/svg/SVGAngleTearOff.cpp b/Source/core/svg/SVGAngleTearOff.cpp
index 8a5f832ace8e6ee456c1aa82d5aebe6f3d21c665..053cf5094e946760c7b745faeecae3929500e7c6 100644
--- a/Source/core/svg/SVGAngleTearOff.cpp
+++ b/Source/core/svg/SVGAngleTearOff.cpp
@@ -109,6 +109,12 @@ void SVGAngleTearOff::setValueAsString(const String& value, ExceptionState& exce
}
target()->setValueAsString(value, exceptionState);
+
+ if (!exceptionState.hadException() && !isValidAngle()) {
+ exceptionState.throwDOMException(SyntaxError, "The value provided ('" + value + "') is invalid.");
fs 2014/06/10 11:13:30 Hmm, the "damage" has been done here already (stat
krit 2014/06/10 11:45:48 Does unknown unit type need to imply that we do no
Erik Dahlström (inactive) 2014/06/10 16:57:42 If we want to behave as if the "turn" unit wasn't
Erik Dahlström (inactive) 2014/06/10 16:57:42 Done.
+ return;
+ }
+
commitChange();
}

Powered by Google App Engine
This is Rietveld 408576698