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

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

Issue 1412713004: Hoist some pre-condition checks out of SVGAngle/SVGEnumeration (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 | « third_party/WebKit/Source/core/svg/SVGEnumeration.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/svg/SVGEnumeration.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGEnumeration.cpp b/third_party/WebKit/Source/core/svg/SVGEnumeration.cpp
index d1a0ff975cd07e9c45310d1f17c0b6425e15b427..32b3e4f8a79f77583ea80ee0cf2d0f55997d49cd 100644
--- a/third_party/WebKit/Source/core/svg/SVGEnumeration.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGEnumeration.cpp
@@ -68,18 +68,8 @@ String SVGEnumerationBase::valueAsString() const
return emptyString();
}
-void SVGEnumerationBase::setValue(unsigned short value, ExceptionState& exceptionState)
+void SVGEnumerationBase::setValue(unsigned short value)
{
- if (!value) {
- exceptionState.throwTypeError("The enumeration value provided is 0, which is not settable.");
- return;
- }
-
- if (value > maxExposedEnumValue()) {
- exceptionState.throwTypeError("The enumeration value provided (" + String::number(value) + ") is larger than the largest allowed value (" + String::number(maxExposedEnumValue()) + ").");
- return;
- }
-
m_value = value;
notifyChange();
}
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGEnumeration.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698