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

Unified Diff: Source/core/input/EventHandler.cpp

Issue 1210253003: Fix wheel event dispatch logic to fallback to document when hit-test fails (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 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: Source/core/input/EventHandler.cpp
diff --git a/Source/core/input/EventHandler.cpp b/Source/core/input/EventHandler.cpp
index 19698b6bf5a0b587896378adc6a5058273c8515d..f53f4f681e96c0d799d000ce5747a4f6133984ac 100644
--- a/Source/core/input/EventHandler.cpp
+++ b/Source/core/input/EventHandler.cpp
@@ -1762,11 +1762,14 @@ bool EventHandler::handleWheelEvent(const PlatformWheelEvent& event)
if (widget && passWheelEventToWidget(event, *widget))
RETURN_WHEEL_EVENT_HANDLED();
}
-
- if (node && !node->dispatchWheelEvent(event))
- RETURN_WHEEL_EVENT_HANDLED();
+ } else {
+ // Dispatch the event to document if hit-test is empty
+ node = m_frame->document();
Rick Byers 2015/06/26 12:34:49 How did you decide to fall back to 'document' vs.
majidvp 2015/06/29 16:58:40 Hit test falls back to document for clicks and tou
Rick Byers 2015/06/29 17:07:59 Great! That code in DeprecatedPaintLayer has seem
majidvp 2015/06/30 15:33:04 Created a bug (crbug.com/505825 owned by dtapuska@
}
+ if (node && !node->dispatchWheelEvent(event))
+ RETURN_WHEEL_EVENT_HANDLED();
+
// We do another check on the frame view because the event handler can run
// JS which results in the frame getting destroyed.
view = m_frame->view();

Powered by Google App Engine
This is Rietveld 408576698