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

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

Issue 2641953006: Remove setting cancelBubble to false. (Closed)
Patch Set: update 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
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 3c9428ad35de9d91b75fd4c960f8ae9597d4369d..0f93a0316fb59cbc1f85c4897710f77e63225e9e 100644
--- a/third_party/WebKit/Source/core/events/Event.cpp
+++ b/third_party/WebKit/Source/core/events/Event.cpp
@@ -25,6 +25,7 @@
#include "core/dom/StaticNodeList.h"
#include "core/events/EventDispatchMediator.h"
#include "core/events/EventTarget.h"
+#include "core/frame/Deprecation.h"
#include "core/frame/HostsUsingFeatures.h"
#include "core/frame/UseCounter.h"
#include "core/svg/SVGElement.h"
@@ -87,7 +88,6 @@ Event::Event(const AtomicString& eventType,
m_immediatePropagationStopped(false),
m_defaultPrevented(false),
m_defaultHandled(false),
- m_cancelBubble(false),
m_wasInitialized(true),
m_isTrusted(false),
m_preventDefaultCalledOnUncancelableEvent(false),
@@ -337,11 +337,12 @@ double Event::timeStamp(ScriptState* scriptState) const {
}
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;
+ if (cancel) {
+ m_propagationStopped = true;
+ } else {
+ Deprecation::countDeprecation(
+ context, UseCounter::EventCancelBubbleWasChangedToFalse);
+ }
}
DEFINE_TRACE(Event) {

Powered by Google App Engine
This is Rietveld 408576698