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

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

Issue 2272993004: Clarify devtools console log when a passive event listener is preventDefaulted. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add not reached Created 4 years, 4 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 | « no previous file | third_party/WebKit/Source/core/events/Event.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 0be18533489aa8d75c3b09fe6e496bf46fe56779..48bd7e7a9b8b5515ed4c0a102a92b97dbc3be7f2 100644
--- a/third_party/WebKit/Source/core/events/Event.h
+++ b/third_party/WebKit/Source/core/events/Event.h
@@ -79,6 +79,12 @@ public:
Scoped,
};
+ enum class PassiveMode {
+ NotPassive,
+ Passive,
+ PassiveForcedDocumentLevel,
+ };
+
static Event* create()
{
return new Event;
@@ -211,7 +217,7 @@ public:
bool isTrusted() const { return m_isTrusted; }
void setTrusted(bool value) { m_isTrusted = value; }
- void setHandlingPassive(bool value);
+ void setHandlingPassive(PassiveMode);
bool preventDefaultCalledDuringPassive() const { return m_preventDefaultCalledDuringPassive; }
@@ -230,6 +236,8 @@ protected:
void setCanBubble(bool bubble) { m_canBubble = bubble; }
+ PassiveMode handlingPassive() const { return m_handlingPassive; }
+
private:
enum EventPathMode {
@@ -252,7 +260,6 @@ private:
unsigned m_cancelBubble:1;
unsigned m_wasInitialized:1;
unsigned m_isTrusted : 1;
- unsigned m_handlingPassive : 1;
// Whether preventDefault was called when |m_handlingPassive| is
// true. This field is reset on each call to setHandlingPassive.
@@ -260,6 +267,7 @@ private:
// Whether preventDefault was called on uncancelable event.
unsigned m_preventDefaultCalledOnUncancelableEvent : 1;
+ PassiveMode m_handlingPassive;
unsigned short m_eventPhase;
Member<EventTarget> m_currentTarget;
Member<EventTarget> m_target;
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/events/Event.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698