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 516eed533a8be643ee4b9a1c0b32f7df95180df5..71273852b4c469c5fb9cd44d7b4113cf02a48fda 100644 |
--- a/third_party/WebKit/Source/platform/scroll/Scrollbar.cpp |
+++ b/third_party/WebKit/Source/platform/scroll/Scrollbar.cpp |
@@ -462,16 +462,12 @@ |
} |
void Scrollbar::mouseUp(const PlatformMouseEvent& mouseEvent) { |
- bool isCaptured = m_pressedPart == ThumbPart; |
setPressedPart(NoPart); |
m_pressedPos = 0; |
m_draggingDocument = false; |
stopTimerIfNeeded(); |
if (m_scrollableArea) { |
- 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. |
@@ -506,20 +502,17 @@ |
moveThumb(desiredPos); |
return; |
} |
- if (m_pressedPart == ThumbPart) { |
+ if (m_pressedPart == ThumbPart) |
m_dragOrigin = m_currentPos; |
- if (m_scrollableArea) |
- m_scrollableArea->mouseCapturedScrollbar(); |
- } |
m_pressedPos = pressedPos; |
autoscrollPressedPart(theme().initialAutoscrollTimerDelay()); |
} |
-void Scrollbar::setScrollbarsHidden(bool hidden) { |
- if (m_scrollableArea) |
- m_scrollableArea->setScrollbarsHidden(hidden); |
+void Scrollbar::visibilityChanged() { |
+ if (m_scrollableArea) |
+ m_scrollableArea->scrollbarVisibilityChanged(); |
} |
void Scrollbar::setEnabled(bool e) { |
@@ -545,7 +538,8 @@ |
// Non-overlay scrollbars should always participate in hit testing. |
if (!isOverlayScrollbar()) |
return true; |
- return !m_scrollableArea->scrollbarsHidden(); |
+ return m_scrollableArea->scrollAnimator() |
+ .shouldScrollbarParticipateInHitTesting(*this); |
} |
bool Scrollbar::isWindowActive() const { |