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

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

Issue 894913002: Prevent default actions for JS-generated mouse events other than click (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: TIL, gclient sync may rebase changes back in time Created 5 years, 6 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 | « LayoutTests/plugins/user-gesture-expected.txt ('k') | Source/core/dom/Node.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Node.h
diff --git a/Source/core/dom/Node.h b/Source/core/dom/Node.h
index 7e6bc65f550156a0dba0a749d03d767fd02aa7d8..d4841e0f3499f29ca2a2cb89fef72ac62cd48612 100644
--- a/Source/core/dom/Node.h
+++ b/Source/core/dom/Node.h
@@ -62,6 +62,7 @@ class HTMLInputElement;
class HTMLQualifiedName;
class IntRect;
class KeyboardEvent;
+class MouseEvent;
class NSResolver;
class NameNodeList;
class NamedNodeMap;
@@ -638,6 +639,7 @@ public:
virtual void postDispatchEventHandler(Event*, void* /*dataFromPreDispatch*/) { }
using EventTarget::dispatchEvent;
+ // This dispatchEvent override is intended to only be used for events dispatched from script
virtual bool dispatchEvent(PassRefPtrWillBeRawPtr<Event>) override;
void dispatchScopedEvent(PassRefPtrWillBeRawPtr<Event>);
@@ -651,6 +653,7 @@ public:
bool dispatchKeyEvent(const PlatformKeyboardEvent&);
bool dispatchWheelEvent(const PlatformWheelEvent&);
bool dispatchMouseEvent(const PlatformMouseEvent&, const AtomicString& eventType, int clickCount = 0, Node* relatedTarget = nullptr);
+ bool dispatchMouseEvent(PassRefPtrWillBeRawPtr<MouseEvent>);
bool dispatchGestureEvent(const PlatformGestureEvent&);
bool dispatchTouchEvent(PassRefPtrWillBeRawPtr<TouchEvent>);
« no previous file with comments | « LayoutTests/plugins/user-gesture-expected.txt ('k') | Source/core/dom/Node.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698