| Index: third_party/WebKit/Source/core/frame/EventHandlerRegistry.cpp
|
| diff --git a/third_party/WebKit/Source/core/frame/EventHandlerRegistry.cpp b/third_party/WebKit/Source/core/frame/EventHandlerRegistry.cpp
|
| index f30bf1cc3d93cc278d730bbbcc82956933a72687..8695bc1ae3da699bebe44e66fd440b7f4ed63613 100644
|
| --- a/third_party/WebKit/Source/core/frame/EventHandlerRegistry.cpp
|
| +++ b/third_party/WebKit/Source/core/frame/EventHandlerRegistry.cpp
|
| @@ -119,8 +119,12 @@ void EventHandlerRegistry::updateEventHandlerInternal(
|
| bool targetSetChanged = updateEventHandlerTargets(op, handlerClass, target);
|
| bool hasHandlers = m_targets[handlerClass].size();
|
|
|
| - if (hadHandlers != hasHandlers)
|
| - notifyHasHandlersChanged(handlerClass, hasHandlers);
|
| + if (hadHandlers != hasHandlers) {
|
| + LocalFrame* frame = nullptr;
|
| + if (Node* node = target->toNode())
|
| + frame = node->document().frame();
|
| + notifyHasHandlersChanged(frame, handlerClass, hasHandlers);
|
| + }
|
|
|
| if (targetSetChanged)
|
| notifyDidAddOrRemoveEventHandlerTarget(handlerClass);
|
| @@ -210,6 +214,7 @@ void EventHandlerRegistry::didRemoveAllEventHandlers(EventTarget& target) {
|
| }
|
|
|
| void EventHandlerRegistry::notifyHasHandlersChanged(
|
| + LocalFrame* frame,
|
| EventHandlerClass handlerClass,
|
| bool hasActiveHandlers) {
|
| switch (handlerClass) {
|
| @@ -219,14 +224,14 @@ void EventHandlerRegistry::notifyHasHandlersChanged(
|
| case WheelEventBlocking:
|
| case WheelEventPassive:
|
| m_frameHost->chromeClient().setEventListenerProperties(
|
| - WebEventListenerClass::MouseWheel,
|
| + frame, WebEventListenerClass::MouseWheel,
|
| webEventListenerProperties(hasEventHandlers(WheelEventBlocking),
|
| hasEventHandlers(WheelEventPassive)));
|
| break;
|
| case TouchStartOrMoveEventBlocking:
|
| case TouchStartOrMoveEventPassive:
|
| m_frameHost->chromeClient().setEventListenerProperties(
|
| - WebEventListenerClass::TouchStartOrMove,
|
| + frame, WebEventListenerClass::TouchStartOrMove,
|
| webEventListenerProperties(
|
| hasEventHandlers(TouchStartOrMoveEventBlocking),
|
| hasEventHandlers(TouchStartOrMoveEventPassive)));
|
| @@ -234,7 +239,7 @@ void EventHandlerRegistry::notifyHasHandlersChanged(
|
| case TouchEndOrCancelEventBlocking:
|
| case TouchEndOrCancelEventPassive:
|
| m_frameHost->chromeClient().setEventListenerProperties(
|
| - WebEventListenerClass::TouchEndOrCancel,
|
| + frame, WebEventListenerClass::TouchEndOrCancel,
|
| webEventListenerProperties(
|
| hasEventHandlers(TouchEndOrCancelEventBlocking),
|
| hasEventHandlers(TouchEndOrCancelEventPassive)));
|
|
|