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

Unified Diff: third_party/WebKit/Source/modules/indexeddb/IDBEventDispatcher.cpp

Issue 2641953006: Remove setting cancelBubble to false. (Closed)
Patch Set: Remove deprecation message Created 3 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
« no previous file with comments | « third_party/WebKit/Source/core/frame/UseCounter.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/indexeddb/IDBEventDispatcher.cpp
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBEventDispatcher.cpp b/third_party/WebKit/Source/modules/indexeddb/IDBEventDispatcher.cpp
index a17f89bdfa292260b070d43c62f730721a217875..1c8d91b7bd054de69db0edfa70b1934791b5bc37 100644
--- a/third_party/WebKit/Source/modules/indexeddb/IDBEventDispatcher.cpp
+++ b/third_party/WebKit/Source/modules/indexeddb/IDBEventDispatcher.cpp
@@ -28,7 +28,6 @@
#include "modules/indexeddb/IDBEventDispatcher.h"
-#include "core/frame/UseCounter.h"
#include "modules/EventModules.h"
#include "modules/EventTargetModules.h"
@@ -51,31 +50,15 @@ DispatchEventResult IDBEventDispatcher::dispatch(
event->setEventPhase(Event::kAtTarget);
event->setCurrentTarget(eventTargets[0].get());
eventTargets[0]->fireEventListeners(event);
- if (event->propagationStopped() || !event->bubbles())
+ if (event->propagationStopped() || !event->bubbles() || event->cancelBubble())
goto doneDispatching;
- if (event->bubbles() && event->cancelBubble()) {
- for (size_t i = 1; i < size; ++i) { // Don't do the first element.
- if (eventTargets[i]->hasEventListeners(event->type()))
- UseCounter::count(eventTargets[i]->getExecutionContext(),
- UseCounter::EventCancelBubbleAffected);
- }
- goto doneDispatching;
- }
event->setEventPhase(Event::kBubblingPhase);
for (size_t i = 1; i < size; ++i) { // Don't do the first element.
event->setCurrentTarget(eventTargets[i].get());
eventTargets[i]->fireEventListeners(event);
- if (event->propagationStopped())
- goto doneDispatching;
- if (event->cancelBubble()) {
- for (size_t j = i + 1; j < size; ++j) {
- if (eventTargets[j]->hasEventListeners(event->type()))
- UseCounter::count(eventTargets[j]->getExecutionContext(),
- UseCounter::EventCancelBubbleAffected);
- }
+ if (event->propagationStopped() || event->cancelBubble())
goto doneDispatching;
- }
}
doneDispatching:
« no previous file with comments | « third_party/WebKit/Source/core/frame/UseCounter.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698