| Index: Source/core/rendering/RenderLayer.cpp
|
| diff --git a/Source/core/rendering/RenderLayer.cpp b/Source/core/rendering/RenderLayer.cpp
|
| index 9c306c9dd320254c78ad2ed96a6a0be03fe7c60c..da440277905c6bf9a882a0004d5de271e31ac01d 100644
|
| --- a/Source/core/rendering/RenderLayer.cpp
|
| +++ b/Source/core/rendering/RenderLayer.cpp
|
| @@ -1140,7 +1140,7 @@ LayoutRect RenderLayer::transparencyClipBox(const RenderLayer* layer, const Rend
|
| return result;
|
| }
|
|
|
| - LayoutRect clipRect = layer->physicalBoundingBox(rootLayer);
|
| + LayoutRect clipRect = layer->fragmentsBoundingBox(rootLayer);
|
| expandClipRectForDescendantsAndReflection(clipRect, layer, rootLayer, transparencyBehavior, subPixelAccumulation, paintBehavior);
|
| layer->renderer()->style()->filterOutsets().expandRect(clipRect);
|
| clipRect.move(subPixelAccumulation);
|
| @@ -1412,7 +1412,7 @@ void RenderLayer::convertToLayerCoords(const RenderLayer* ancestorLayer, LayoutR
|
| {
|
| LayoutPoint delta;
|
| convertToLayerCoords(ancestorLayer, delta);
|
| - rect.move(-delta.x(), -delta.y());
|
| + rect.moveBy(delta);
|
| }
|
|
|
| void RenderLayer::didUpdateNeedsCompositedScrolling()
|
| @@ -2225,21 +2225,42 @@ LayoutRect RenderLayer::logicalBoundingBox() const
|
| return result;
|
| }
|
|
|
| -LayoutRect RenderLayer::physicalBoundingBox(const RenderLayer* ancestorLayer, const LayoutPoint* offsetFromRoot) const
|
| +LayoutRect RenderLayer::flippedLogicalBoundingBox() const
|
| {
|
| LayoutRect result = logicalBoundingBox();
|
| if (m_renderer->isBox())
|
| renderBox()->flipForWritingMode(result);
|
| else
|
| m_renderer->containingBlock()->flipForWritingMode(result);
|
| + return result;
|
| +}
|
|
|
| - LayoutPoint delta;
|
| +LayoutRect RenderLayer::physicalBoundingBox(const RenderLayer* ancestorLayer, const LayoutPoint* offsetFromRoot) const
|
| +{
|
| + LayoutRect result = flippedLogicalBoundingBox();
|
| if (offsetFromRoot)
|
| - delta = *offsetFromRoot;
|
| + result.moveBy(*offsetFromRoot);
|
| else
|
| - convertToLayerCoords(ancestorLayer, delta);
|
| + convertToLayerCoords(ancestorLayer, result);
|
| + return result;
|
| +}
|
|
|
| - result.moveBy(delta);
|
| +LayoutRect RenderLayer::fragmentsBoundingBox(const RenderLayer* ancestorLayer) const
|
| +{
|
| + if (!enclosingPaginationLayer())
|
| + return physicalBoundingBox(ancestorLayer);
|
| +
|
| + LayoutRect result = flippedLogicalBoundingBox();
|
| +
|
| + // Split our box up into the actual fragment boxes that render in the columns/pages and unite those together to
|
| + // get our true bounding box.
|
| + LayoutPoint offsetWithinPaginationLayer;
|
| + convertToLayerCoords(enclosingPaginationLayer(), offsetWithinPaginationLayer);
|
| + result.moveBy(offsetWithinPaginationLayer);
|
| +
|
| + RenderFlowThread* enclosingFlowThread = toRenderFlowThread(enclosingPaginationLayer()->renderer());
|
| + result = enclosingFlowThread->fragmentsBoundingBox(result);
|
| + enclosingPaginationLayer()->convertToLayerCoords(ancestorLayer, result);
|
| return result;
|
| }
|
|
|
|
|