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

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

Issue 1972053002: Add UseCounters for Event.cancelBubble behavior. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « third_party/WebKit/Source/core/events/Event.h ('k') | third_party/WebKit/Source/core/events/Event.idl » ('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.cpp
diff --git a/third_party/WebKit/Source/core/events/Event.cpp b/third_party/WebKit/Source/core/events/Event.cpp
index ec0d6f143d51b5a5de5894404f039c80434430c8..8fd928df5ad6e8f2ca913e81170c2f11b6a55d16 100644
--- a/third_party/WebKit/Source/core/events/Event.cpp
+++ b/third_party/WebKit/Source/core/events/Event.cpp
@@ -358,6 +358,15 @@ double Event::timeStamp(ScriptState* scriptState) const
return timeStamp;
}
+void Event::setCancelBubble(ExecutionContext* context, bool cancel)
+{
+ if (!m_cancelBubble && cancel)
+ UseCounter::count(context, UseCounter::EventCancelBubbleWasChangedToTrue);
+ else if (m_cancelBubble && !cancel)
+ UseCounter::count(context, UseCounter::EventCancelBubbleWasChangedToFalse);
+ m_cancelBubble = cancel;
+}
+
DEFINE_TRACE(Event)
{
visitor->trace(m_currentTarget);
« no previous file with comments | « third_party/WebKit/Source/core/events/Event.h ('k') | third_party/WebKit/Source/core/events/Event.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698