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

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

Issue 205523003: Remove beforeload events. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove more tests Created 6 years, 9 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/Node.h ('k') | Source/core/dom/ProcessingInstruction.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Node.cpp
diff --git a/Source/core/dom/Node.cpp b/Source/core/dom/Node.cpp
index 74fad30010f3bf731a8e0a52059a5e467faa83db..a2db256f3fb9142d1fc3a7d55382e44a6618f386 100644
--- a/Source/core/dom/Node.cpp
+++ b/Source/core/dom/Node.cpp
@@ -60,7 +60,6 @@
#include "core/dom/shadow/ShadowRoot.h"
#include "core/editing/htmlediting.h"
#include "core/editing/markup.h"
-#include "core/events/BeforeLoadEvent.h"
#include "core/events/Event.h"
#include "core/events/EventDispatchMediator.h"
#include "core/events/EventDispatcher.h"
@@ -2232,20 +2231,6 @@ void Node::dispatchSimulatedClick(Event* underlyingEvent, SimulatedClickMouseEve
EventDispatcher::dispatchSimulatedClick(this, underlyingEvent, eventOptions);
}
-bool Node::dispatchBeforeLoadEvent(const String& sourceURL)
-{
- if (!RuntimeEnabledFeatures::beforeLoadEnabled())
- return true;
-
- if (!document().hasListenerType(Document::BEFORELOAD_LISTENER))
- return true;
-
- RefPtr<Node> protector(this);
- RefPtr<BeforeLoadEvent> beforeLoadEvent = BeforeLoadEvent::create(sourceURL);
- dispatchEvent(beforeLoadEvent.get());
- return !beforeLoadEvent->defaultPrevented();
-}
-
bool Node::dispatchWheelEvent(const PlatformWheelEvent& event)
{
return EventDispatcher::dispatchEvent(this, WheelEventDispatchMediator::create(event, document().domWindow()));
« no previous file with comments | « Source/core/dom/Node.h ('k') | Source/core/dom/ProcessingInstruction.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698