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

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

Issue 309793003: Mainframe scrollbars should get events even if document prevent-defaults the mouse events. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 7 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 | « LayoutTests/scrollbars/scrollbar-miss-mouseevents-if-document-preventdefaulted-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/EventHandler.cpp
diff --git a/Source/core/page/EventHandler.cpp b/Source/core/page/EventHandler.cpp
index 55a07108fe384eddf4e7d7407552417884a1d2ed..ab6f49b6c125f4034241fd3a31b1db9589056706 100644
--- a/Source/core/page/EventHandler.cpp
+++ b/Source/core/page/EventHandler.cpp
@@ -1288,6 +1288,10 @@ bool EventHandler::handleMousePressEvent(const PlatformMouseEvent& mouseEvent)
if (swallowEvent) {
// scrollbars should get events anyway, even disabled controls might be scrollable
Scrollbar* scrollbar = mev.scrollbar();
+ if (!scrollbar) {
+ FrameView* view = m_frame->view();
+ scrollbar = view ? view->scrollbarAtPoint(mouseEvent.position()) : 0;
+ }
updateLastScrollbarUnderMouse(scrollbar, true);
« no previous file with comments | « LayoutTests/scrollbars/scrollbar-miss-mouseevents-if-document-preventdefaulted-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698