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

Unified Diff: Source/core/dom/Document.cpp

Issue 146193003: Remove SVGDocument binding (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase against ToT Created 6 years, 11 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/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index 56f72966d6f0716198e97a6b11097247277b5615..7946ac1925c2d1bac469e0a0bbaee3366284bb69 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -3707,6 +3707,16 @@ PassRefPtr<Event> Document::createEvent(const String& eventType, ExceptionState&
return 0;
}
+PassRefPtr<Event> Document::createEvent(ExceptionState& exceptionState)
+{
+ if (!isSVGDocument()) {
Inactive 2014/01/27 15:48:55 The UseCounter should likely be at the beginning o
+ exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, 0));
+ return 0;
+ }
+ // Legacy SVGDocument behavior.
+ return createEvent("undefined", exceptionState);
+}
+
void Document::addMutationEventListenerTypeIfEnabled(ListenerType listenerType)
{
if (ContextFeatures::mutationEventsEnabled(this))

Powered by Google App Engine
This is Rietveld 408576698