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

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
« no previous file with comments | « Source/core/dom/Document.h ('k') | Source/core/dom/Document.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index 6530b8af691d4ea1f8439b92e73c9ef37a548c78..aae58dd8cb95fb376936800d57d8fddd5915a598 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -3737,6 +3737,18 @@ PassRefPtr<Event> Document::createEvent(const String& eventType, ExceptionState&
return 0;
}
+PassRefPtr<Event> Document::createEvent(ExceptionState& exceptionState)
+{
+ if (!isSVGDocument()) {
+ exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, 0));
+ return 0;
+ }
+
+ UseCounter::count(this, UseCounter::DocumentCreateEventOptionalArgument);
+ // Legacy SVGDocument behavior.
+ return createEvent("undefined", exceptionState);
+}
+
void Document::addMutationEventListenerTypeIfEnabled(ListenerType listenerType)
{
if (ContextFeatures::mutationEventsEnabled(this))
« no previous file with comments | « Source/core/dom/Document.h ('k') | Source/core/dom/Document.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698