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

Unified Diff: third_party/WebKit/Source/core/frame/FrameView.cpp

Issue 2467693002: Implement overlay scrollbar fade out for non-composited scrollers. (Closed)
Patch Set: overlay-scrollbar-mouse-capture now works on Mac 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/core/frame/FrameView.cpp
diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp
index 5c8daac7b6ac0bc4e8d64bb70c4a93f61fe64d14..5dd7f8f4e9eec8183e2c0acd1012631aca4bd13d 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -300,9 +300,9 @@ void FrameView::dispose() {
// from non-GC'd objects and RootFrameViewport will still have a pointer to
// this class.
if (m_viewportScrollableArea)
- m_viewportScrollableArea->clearScrollAnimators();
+ m_viewportScrollableArea->clearScrollableArea();
- clearScrollAnimators();
+ clearScrollableArea();
// Destroy |m_autoSizeInfo| as early as possible, to avoid dereferencing
// partially destroyed |this| via |m_autoSizeInfo->m_frameView|.
@@ -1471,6 +1471,7 @@ void FrameView::removeViewportConstrainedObject(LayoutObject* object) {
void FrameView::viewportSizeChanged(bool widthChanged, bool heightChanged) {
DCHECK(widthChanged || heightChanged);
+ showOverlayScrollbars();
if (RuntimeEnabledFeatures::rootLayerScrollingEnabled()) {
// The background must be repainted when the FrameView is resized, even if
// the initial containing block does not change (so we can't rely on layout
@@ -2391,6 +2392,8 @@ bool FrameView::scrollbarsCanBeActive() const {
}
void FrameView::scrollbarVisibilityChanged() {
+ // Scrollbar enabled state is set from updateScrollbarGeometry.
+ updateScrollbarGeometry();
LayoutViewItem viewItem = layoutViewItem();
if (!viewItem.isNull())
viewItem.clearHitTestCache();
@@ -3604,6 +3607,8 @@ void FrameView::updateScrollOffset(const ScrollOffset& offset,
if (scrollDelta.isZero())
return;
+ showOverlayScrollbars();
+
if (RuntimeEnabledFeatures::rootLayerScrollingEnabled()) {
// Don't scroll the FrameView!
ASSERT_NOT_REACHED();
@@ -3825,10 +3830,6 @@ void FrameView::updateScrollbarsIfNeeded() {
updateScrollbars();
}
-void FrameView::didChangeScrollbarsHidden() {
- updateScrollbars();
-}
-
void FrameView::updateScrollbars() {
m_needsScrollbarsUpdate = false;

Powered by Google App Engine
This is Rietveld 408576698