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) { |