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); |