Index: Source/core/layout/LayoutBox.cpp |
diff --git a/Source/core/layout/LayoutBox.cpp b/Source/core/layout/LayoutBox.cpp |
index 6c96e11737005747c74fae729231500dbf8e7f9b..557df15b0fdb5c4ab1172ef3068c57b7a1085342 100644 |
--- a/Source/core/layout/LayoutBox.cpp |
+++ b/Source/core/layout/LayoutBox.cpp |
@@ -600,6 +600,19 @@ LayoutUnit LayoutBox::constrainContentBoxLogicalHeightByMinMax(LayoutUnit logica |
return std::max(logicalHeight, computeContentLogicalHeight(styleToUse.logicalMinHeight(), intrinsicContentHeight)); |
} |
+void LayoutBox::setLocationAndUpdateOverflowControlsIfNeeded(const LayoutPoint& location) |
+{ |
+ if (LayerScrollableArea* scrollableArea = this->scrollableArea()) { |
+ IntSize oldPixelSnappedBorderRectSize = pixelSnappedBorderBoxRect().size(); |
+ setLocation(location); |
+ if (pixelSnappedBorderBoxRect().size() != oldPixelSnappedBorderRectSize) |
+ scrollableArea->updateAfterLayout(); |
+ return; |
+ } |
+ |
+ setLocation(location); |
+} |
+ |
IntRect LayoutBox::absoluteContentBox() const |
{ |
// This is wrong with transforms and flipped writing modes. |
@@ -1719,7 +1732,7 @@ void LayoutBox::positionLineBox(InlineBox* box) |
} else if (isReplaced()) { |
// FIXME: the call to roundedLayoutPoint() below is temporary and should be removed once |
// the transition to LayoutUnit-based types is complete (crbug.com/321237) |
- setLocation(box->topLeft().roundedLayoutPoint()); |
+ setLocationAndUpdateOverflowControlsIfNeeded(box->topLeft().roundedLayoutPoint()); |
setInlineBoxWrapper(box); |
} |
} |