Index: Source/core/rendering/RenderLayerScrollableArea.cpp |
diff --git a/Source/core/rendering/RenderLayerScrollableArea.cpp b/Source/core/rendering/RenderLayerScrollableArea.cpp |
index d5ba03a633bf3881c315a8f3d19516e7f4c4015f..31d6e634fc3ad48dede7fc4ce142f375d5b143c3 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); |