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

Unified Diff: third_party/WebKit/Source/platform/scroll/Scrollbar.cpp

Issue 2587563002: Mouse up updates scrollbar hovered part if needed. (Closed)
Patch Set: Created 4 years 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: third_party/WebKit/Source/platform/scroll/Scrollbar.cpp
diff --git a/third_party/WebKit/Source/platform/scroll/Scrollbar.cpp b/third_party/WebKit/Source/platform/scroll/Scrollbar.cpp
index a50f1a0593a3824166d8b6404b2e7eeab40ce59e..d0b52964c01ba46db4d0db75eaf7ec6b6791ce11 100644
--- a/third_party/WebKit/Source/platform/scroll/Scrollbar.cpp
+++ b/third_party/WebKit/Source/platform/scroll/Scrollbar.cpp
@@ -472,12 +472,11 @@ void Scrollbar::mouseUp(const PlatformMouseEvent& mouseEvent) {
if (isCaptured)
m_scrollableArea->mouseReleasedScrollbar();
- // m_hoveredPart won't be updated until the next mouseMoved or mouseDown, so
- // we have to hit test to really know if the mouse has exited the scrollbar
- // on a mouseUp.
ScrollbarPart part = theme().hitTest(*this, mouseEvent.position());
- if (part == NoPart)
+ if (part == NoPart) {
+ setHoveredPart(NoPart);
m_scrollableArea->mouseExitedScrollbar(*this);
+ }
}
}

Powered by Google App Engine
This is Rietveld 408576698