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

Unified Diff: third_party/WebKit/Source/core/events/Event.h

Issue 1563623002: Support registering and dispatching passive event listeners. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adjust comments in layout tests Created 4 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: third_party/WebKit/Source/core/events/Event.h
diff --git a/third_party/WebKit/Source/core/events/Event.h b/third_party/WebKit/Source/core/events/Event.h
index 8d296d982792a332cf61dd7c513e15b08508cf87..49f4995aac7128336f63b8f3c8719e3057b541a8 100644
--- a/third_party/WebKit/Source/core/events/Event.h
+++ b/third_party/WebKit/Source/core/events/Event.h
@@ -169,11 +169,7 @@ public:
bool immediatePropagationStopped() const { return m_immediatePropagationStopped; }
bool defaultPrevented() const { return m_defaultPrevented; }
- virtual void preventDefault()
- {
- if (m_cancelable)
- m_defaultPrevented = true;
- }
+ virtual void preventDefault();
void setDefaultPrevented(bool defaultPrevented) { m_defaultPrevented = defaultPrevented; }
bool defaultHandled() const { return m_defaultHandled; }
@@ -201,6 +197,8 @@ public:
bool isTrusted() const { return m_isTrusted; }
void setTrusted(bool value) { m_isTrusted = value; }
+ void setHandlingPassive(bool value) { m_handlingPassive = value; }
+
DECLARE_VIRTUAL_TRACE();
protected:
@@ -225,6 +223,7 @@ private:
unsigned m_defaultHandled:1;
unsigned m_cancelBubble:1;
unsigned m_isTrusted : 1;
+ unsigned m_handlingPassive : 1;
unsigned short m_eventPhase;
RefPtrWillBeMember<EventTarget> m_currentTarget;

Powered by Google App Engine
This is Rietveld 408576698