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

Unified Diff: Source/core/rendering/RenderLayerScrollableArea.cpp

Issue 588013002: Remove Overlay Scrollbar if not scrollable along the axis (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 months 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: Source/core/rendering/RenderLayerScrollableArea.cpp
diff --git a/Source/core/rendering/RenderLayerScrollableArea.cpp b/Source/core/rendering/RenderLayerScrollableArea.cpp
index 0065d9e34c2c6af023afcb5ca6169b2512e2f3ad..d25122de25fced1760b365ecacca1e6786ef7130 100644
--- a/Source/core/rendering/RenderLayerScrollableArea.cpp
+++ b/Source/core/rendering/RenderLayerScrollableArea.cpp
@@ -600,7 +600,12 @@ void RenderLayerScrollableArea::updateAfterLayout()
if (box().style()->overflowY() == OSCROLL)
verticalScrollbar()->setEnabled(hasVerticalOverflow);
}
-
+ if (hasOverlayScrollbars()) {
+ if (!scrollSize(HorizontalScrollbar))
+ setHasHorizontalScrollbar(false);
+ if (!scrollSize(VerticalScrollbar))
+ setHasVerticalScrollbar(false);
+ }
// overflow:auto may need to lay out again if scrollbars got added/removed.
bool autoHorizontalScrollBarChanged = box().hasAutoHorizontalScrollbar() && (hasHorizontalScrollbar() != hasHorizontalOverflow);
bool autoVerticalScrollBarChanged = box().hasAutoVerticalScrollbar() && (hasVerticalScrollbar() != hasVerticalOverflow);

Powered by Google App Engine
This is Rietveld 408576698