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

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

Issue 2478463003: Revert of Implement overlay scrollbar fade out for non-composited scrollers. (Closed)
Patch Set: Created 4 years, 1 month 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 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 {
« no previous file with comments | « third_party/WebKit/Source/platform/scroll/Scrollbar.h ('k') | third_party/WebKit/Source/platform/scroll/ScrollbarTheme.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698