| Index: Source/core/rendering/RenderLayer.cpp
|
| diff --git a/Source/core/rendering/RenderLayer.cpp b/Source/core/rendering/RenderLayer.cpp
|
| index 9c306c9dd320254c78ad2ed96a6a0be03fe7c60c..b6fc18825ec839bc6ebe8fbfc4b6735a3874ea0e 100644
|
| --- a/Source/core/rendering/RenderLayer.cpp
|
| +++ b/Source/core/rendering/RenderLayer.cpp
|
| @@ -1121,7 +1121,7 @@ LayoutRect RenderLayer::transparencyClipBox(const RenderLayer* layer, const Rend
|
|
|
| // We don't use fragment boxes when collecting a transformed layer's bounding box, since it always
|
| // paints unfragmented.
|
| - LayoutRect clipRect = layer->physicalBoundingBox(layer);
|
| + LayoutRect clipRect = layer->boundingBox(layer);
|
| expandClipRectForDescendantsAndReflection(clipRect, layer, layer, transparencyBehavior, subPixelAccumulation, paintBehavior);
|
| layer->renderer()->style()->filterOutsets().expandRect(clipRect);
|
| LayoutRect result = transform.mapRect(clipRect);
|
| @@ -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()
|
| @@ -1486,7 +1486,7 @@ void RenderLayer::collectFragments(LayerFragments& fragments, const RenderLayer*
|
| outlineRectInFlowThread, &offsetWithinPaginatedLayer);
|
|
|
| // Take our bounding box within the flow thread and clip it.
|
| - LayoutRect layerBoundingBoxInFlowThread = layerBoundingBox ? *layerBoundingBox : physicalBoundingBox(enclosingPaginationLayer(), &offsetWithinPaginatedLayer);
|
| + LayoutRect layerBoundingBoxInFlowThread = layerBoundingBox ? *layerBoundingBox : boundingBox(enclosingPaginationLayer(), &offsetWithinPaginatedLayer);
|
| layerBoundingBoxInFlowThread.intersect(backgroundRectInFlowThread.rect());
|
|
|
| // Shift the dirty rect into flow thread coordinates.
|
| @@ -2186,7 +2186,7 @@ bool RenderLayer::intersectsDamageRect(const LayoutRect& layerBounds, const Layo
|
|
|
| // Otherwise we need to compute the bounding box of this single layer and see if it intersects
|
| // the damage rect.
|
| - return physicalBoundingBox(rootLayer, offsetFromRoot).intersects(damageRect);
|
| + return boundingBox(rootLayer, offsetFromRoot).intersects(damageRect);
|
| }
|
|
|
| LayoutRect RenderLayer::logicalBoundingBox() const
|
| @@ -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::boundingBox(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 boundingBox(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;
|
| }
|
|
|
| @@ -2267,10 +2288,10 @@ static void expandRectForReflectionAndStackingChildren(const RenderLayer* ancest
|
| }
|
| }
|
|
|
| -LayoutRect RenderLayer::physicalBoundingBoxIncludingReflectionAndStackingChildren(const RenderLayer* ancestorLayer, const LayoutPoint& offsetFromRoot) const
|
| +LayoutRect RenderLayer::boundingBoxIncludingReflectionAndStackingChildren(const RenderLayer* ancestorLayer, const LayoutPoint& offsetFromRoot) const
|
| {
|
| LayoutPoint origin;
|
| - LayoutRect result = physicalBoundingBox(ancestorLayer, &origin);
|
| + LayoutRect result = boundingBox(ancestorLayer, &origin);
|
|
|
| const_cast<RenderLayer*>(this)->stackingNode()->updateLayerListsIfNeeded();
|
|
|
| @@ -2316,7 +2337,7 @@ LayoutRect RenderLayer::boundingBoxForCompositing(const RenderLayer* ancestorLay
|
| }
|
|
|
| LayoutPoint origin;
|
| - LayoutRect result = physicalBoundingBox(ancestorLayer, &origin);
|
| + LayoutRect result = boundingBox(ancestorLayer, &origin);
|
|
|
| const_cast<RenderLayer*>(this)->stackingNode()->updateLayerListsIfNeeded();
|
|
|
| @@ -2809,9 +2830,9 @@ void RenderLayer::computeSelfHitTestRects(LayerHitTestRects& rects) const
|
| if (const RenderLayer* parentLayer = parent()) {
|
| LayerHitTestRects::iterator iter = rects.find(parentLayer);
|
| if (iter == rects.end()) {
|
| - rects.add(parentLayer, Vector<LayoutRect>()).storedValue->value.append(physicalBoundingBox(parentLayer));
|
| + rects.add(parentLayer, Vector<LayoutRect>()).storedValue->value.append(boundingBox(parentLayer));
|
| } else {
|
| - iter->value.append(physicalBoundingBox(parentLayer));
|
| + iter->value.append(boundingBox(parentLayer));
|
| }
|
| }
|
| } else {
|
|
|