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

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

Issue 2380703002: Adjust use counters for editing and legacy events. (Closed)
Patch Set: Rebase Created 4 years, 3 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/frame/UseCounter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/events/EventTarget.cpp
diff --git a/third_party/WebKit/Source/core/events/EventTarget.cpp b/third_party/WebKit/Source/core/events/EventTarget.cpp
index 4d2932f45e1b2b5055b6547585807e6ddc169578..15f9906fd2b7d1602b1c144418fe98b9225d311d 100644
--- a/third_party/WebKit/Source/core/events/EventTarget.cpp
+++ b/third_party/WebKit/Source/core/events/EventTarget.cpp
@@ -547,16 +547,13 @@ DispatchEventResult EventTarget::fireEventListeners(Event* event)
}
// Only invoke the callback if event listeners were fired for this phase.
- if (firedEventListeners)
+ if (firedEventListeners) {
event->doneDispatchingEventAtCurrentTarget();
- // TODO(dtapuska): Should we really do counting here for these events
- // if we really didn't fire a listener? For example having a bubbling
- // listener on an event that doesn't bubble likely records a UMA
- // metric where it probably shouldn't because it was never fired.
- // See https://crbug.com/612829
- Editor::countEvent(getExecutionContext(), event);
- countLegacyEvents(legacyTypeName, listenersVector, legacyListenersVector);
+ // Only count uma metrics if we really fired an event listener.
+ Editor::countEvent(getExecutionContext(), event);
+ countLegacyEvents(legacyTypeName, listenersVector, legacyListenersVector);
+ }
return dispatchEventResult(*event);
}
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/UseCounter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698