Index: Source/core/rendering/RenderLayerScrollableArea.cpp |
diff --git a/Source/core/rendering/RenderLayerScrollableArea.cpp b/Source/core/rendering/RenderLayerScrollableArea.cpp |
index 73cdbd4d69612976284b185dced925a8b52349b0..c757aea9ae7de6ec92d751c9afd12dc7ce92c684 100644 |
--- a/Source/core/rendering/RenderLayerScrollableArea.cpp |
+++ b/Source/core/rendering/RenderLayerScrollableArea.cpp |
@@ -738,6 +738,26 @@ void RenderLayerScrollableArea::updateAfterStyleChange(const RenderStyle* oldSty |
updateResizerStyle(); |
} |
+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(); |