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

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

Issue 2467693002: Implement overlay scrollbar fade out for non-composited scrollers. (Closed)
Patch Set: sigh....git cl format 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 1dfc0e709791d41ed28d946509ad6561d00176b5..3c7a5ca233b60d503615bf953f2fe86955b68b4a 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -328,9 +328,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|.
@@ -1511,6 +1511,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
@@ -3652,6 +3653,8 @@ void FrameView::updateScrollOffset(const ScrollOffset& offset,
if (scrollDelta.isZero())
return;
+ showOverlayScrollbars();
+
if (RuntimeEnabledFeatures::rootLayerScrollingEnabled()) {
// Don't scroll the FrameView!
ASSERT_NOT_REACHED();
@@ -3786,8 +3789,7 @@ void FrameView::updateScrollbarGeometry() {
if (oldRect != horizontalScrollbar()->frameRect())
setScrollbarNeedsPaintInvalidation(HorizontalScrollbar);
- horizontalScrollbar()->setEnabled(contentsWidth() > clientWidth &&
- !scrollbarsHidden());
+ horizontalScrollbar()->setEnabled(contentsWidth() > clientWidth);
horizontalScrollbar()->setProportion(clientWidth, contentsWidth());
horizontalScrollbar()->offsetDidChange();
}
@@ -3805,8 +3807,7 @@ void FrameView::updateScrollbarGeometry() {
if (oldRect != verticalScrollbar()->frameRect())
setScrollbarNeedsPaintInvalidation(VerticalScrollbar);
- verticalScrollbar()->setEnabled(contentsHeight() > clientHeight &&
- !scrollbarsHidden());
+ verticalScrollbar()->setEnabled(contentsHeight() > clientHeight);
verticalScrollbar()->setProportion(clientHeight, contentsHeight());
verticalScrollbar()->offsetDidChange();
}
@@ -3874,10 +3875,6 @@ void FrameView::updateScrollbarsIfNeeded() {
updateScrollbars();
}
-void FrameView::didChangeScrollbarsHidden() {
- updateScrollbars();
-}
-
void FrameView::updateScrollbars() {
m_needsScrollbarsUpdate = false;
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.h ('k') | third_party/WebKit/Source/core/frame/RootFrameViewport.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698