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

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

Issue 296003011: Fix event passing to overlay scrollbars when over a plugin (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 | « no previous file | Source/web/WebViewImpl.cpp » ('j') | Source/web/WebViewImpl.cpp » ('J')
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 46e48ac448b53e0de8c14b10db360fc897fd2c5e..7c91f6bd48f327730e2ffb8f7bc54a8d8c9926ff 100644
--- a/Source/core/page/EventHandler.cpp
+++ b/Source/core/page/EventHandler.cpp
@@ -1271,6 +1271,14 @@ bool EventHandler::handleMousePressEvent(const PlatformMouseEvent& mouseEvent)
m_frame->selection().setCaretBlinkingSuspended(true);
+ FrameView* view = m_frame->view();
+ Scrollbar* scrollbar = view ? view->scrollbarAtPoint(mouseEvent.position()) : 0;
Rick Byers 2014/05/22 13:53:36 Shouldn't this already be in mev.scrollbar()? See
+ if (scrollbar) {
+ updateLastScrollbarUnderMouse(scrollbar, true);
+ if (passMousePressEventToScrollbar(mev, scrollbar))
+ return true;
+ }
+
bool swallowEvent = !dispatchMouseEvent(EventTypeNames::mousedown, mev.targetNode(), m_clickCount, mouseEvent, true);
swallowEvent = swallowEvent || !handleMouseFocus(mouseEvent);
m_capturesDragging = !swallowEvent || mev.scrollbar();
@@ -1287,7 +1295,7 @@ bool EventHandler::handleMousePressEvent(const PlatformMouseEvent& mouseEvent)
if (swallowEvent) {
// scrollbars should get events anyway, even disabled controls might be scrollable
- Scrollbar* scrollbar = mev.scrollbar();
+ scrollbar = mev.scrollbar();
updateLastScrollbarUnderMouse(scrollbar, true);
@@ -1299,10 +1307,7 @@ bool EventHandler::handleMousePressEvent(const PlatformMouseEvent& mouseEvent)
mev = m_frame->document()->prepareMouseEvent(request, documentPoint, mouseEvent);
}
- FrameView* view = m_frame->view();
- Scrollbar* scrollbar = view ? view->scrollbarAtPoint(mouseEvent.position()) : 0;
- if (!scrollbar)
- scrollbar = mev.scrollbar();
+ scrollbar = mev.scrollbar();
updateLastScrollbarUnderMouse(scrollbar, true);
« no previous file with comments | « no previous file | Source/web/WebViewImpl.cpp » ('j') | Source/web/WebViewImpl.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698