Index: Source/core/rendering/RenderLayerScrollableArea.cpp |
diff --git a/Source/core/rendering/RenderLayerScrollableArea.cpp b/Source/core/rendering/RenderLayerScrollableArea.cpp |
index d341b15c297482c8479e09e707bee5f24d4a2da6..d31a2aed74c5a4ff911402d8b5318888397ca617 100644 |
--- a/Source/core/rendering/RenderLayerScrollableArea.cpp |
+++ b/Source/core/rendering/RenderLayerScrollableArea.cpp |
@@ -771,6 +771,26 @@ void RenderLayerScrollableArea::updateAfterCompositingChange() |
layer()->updateScrollingStateAfterCompositingChange(); |
} |
+void RenderLayerScrollableArea::updateAfterOverflowRecalc() |
+{ |
+ computeScrollDimensions(); |
+ if (Scrollbar* horizontalScrollbar = this->horizontalScrollbar()) { |
+ int clientWidth = m_box.pixelSnappedClientWidth(); |
+ horizontalScrollbar->setProportion(clientWidth, overflowRect().width()); |
+ } |
+ if (Scrollbar* verticalScrollbar = this->verticalScrollbar()) { |
+ int clientHeight = m_box.pixelSnappedClientHeight(); |
+ verticalScrollbar->setProportion(clientHeight, overflowRect().height()); |
+ } |
+ |
+ bool hasHorizontalOverflow = this->hasHorizontalOverflow(); |
+ bool hasVerticalOverflow = this->hasVerticalOverflow(); |
+ bool autoHorizontalScrollBarChanged = m_box.hasAutoHorizontalScrollbar() && (hasHorizontalScrollbar() != hasHorizontalOverflow); |
+ bool autoVerticalScrollBarChanged = m_box.hasAutoVerticalScrollbar() && (hasVerticalScrollbar() != hasVerticalOverflow); |
+ if (autoHorizontalScrollBarChanged || autoVerticalScrollBarChanged) |
+ m_box.setNeedsLayout(); |
+} |
+ |
IntSize RenderLayerScrollableArea::clampScrollOffset(const IntSize& scrollOffset) const |
{ |
int maxX = scrollWidth() - m_box.pixelSnappedClientWidth(); |