Index: Source/core/rendering/RenderLayerScrollableArea.cpp |
diff --git a/Source/core/rendering/RenderLayerScrollableArea.cpp b/Source/core/rendering/RenderLayerScrollableArea.cpp |
index 69884479df62801e90c339d3544f19e4d144ce19..5a085bee6c4e903d6a0a7a4a3f99ffa8e8c29a1f 100644 |
--- a/Source/core/rendering/RenderLayerScrollableArea.cpp |
+++ b/Source/core/rendering/RenderLayerScrollableArea.cpp |
@@ -611,12 +611,17 @@ void RenderLayerScrollableArea::updateAfterLayout() |
DisableCompositingQueryAsserts disabler; |
// overflow:scroll should just enable/disable. |
- if (box().style()->overflowX() == OSCROLL) |
+ if (box().style()->overflowX() == OSCROLL && horizontalScrollbar()) |
MuVen
2014/10/13 15:45:01
This checks fixes webkit_unit_tests crashes on and
|
horizontalScrollbar()->setEnabled(hasHorizontalOverflow); |
- if (box().style()->overflowY() == OSCROLL) |
+ if (box().style()->overflowY() == OSCROLL && verticalScrollbar()) |
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); |