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

Unified Diff: third_party/WebKit/Source/core/svg/SVGBoolean.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/SVGBoolean.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGBoolean.cpp b/third_party/WebKit/Source/core/svg/SVGBoolean.cpp
index a3237442baf48d2696a1d2d042a8a6c5f78b5a9f..5af4bd38a341d8eb63f0ffaca8d64bfd75010bcb 100644
--- a/third_party/WebKit/Source/core/svg/SVGBoolean.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGBoolean.cpp
@@ -30,9 +30,6 @@
#include "core/svg/SVGBoolean.h"
-#include "bindings/core/v8/ExceptionState.h"
-#include "bindings/core/v8/ExceptionStatePlaceholder.h"
-#include "core/dom/ExceptionCode.h"
#include "core/svg/SVGAnimationElement.h"
namespace blink {
@@ -42,15 +39,17 @@ String SVGBoolean::valueAsString() const
return m_value ? "true" : "false";
}
-void SVGBoolean::setValueAsString(const String& value, ExceptionState& exceptionState)
+SVGParsingError SVGBoolean::setValueAsString(const String& value)
{
if (value == "true") {
m_value = true;
- } else if (value == "false") {
+ return NoError;
+ }
+ if (value == "false") {
m_value = false;
- } else {
- exceptionState.throwDOMException(SyntaxError, "The value provided ('" + value + "') is invalid.");
+ return NoError;
}
+ return ParsingAttributeFailedError;
}
void SVGBoolean::add(PassRefPtrWillBeRawPtr<SVGPropertyBase>, SVGElement*)

Powered by Google App Engine
This is Rietveld 408576698