Index: Source/core/rendering/RenderLayerScrollableArea.cpp |
diff --git a/Source/core/rendering/RenderLayerScrollableArea.cpp b/Source/core/rendering/RenderLayerScrollableArea.cpp |
index f853c269513d06935c90b40684118bb58a9ec078..f5c00bcf59f22c434ac97b3d73a62786f3fc819b 100644 |
--- a/Source/core/rendering/RenderLayerScrollableArea.cpp |
+++ b/Source/core/rendering/RenderLayerScrollableArea.cpp |
@@ -749,6 +749,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(); |