| Index: third_party/WebKit/Source/core/paint/PaintLayer.cpp
|
| diff --git a/third_party/WebKit/Source/core/paint/PaintLayer.cpp b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
|
| index 970f6567235e582a7edfe79317f5618b48f01000..2146ec37fff702c9672c646f6c04d27b07ea09eb 100644
|
| --- a/third_party/WebKit/Source/core/paint/PaintLayer.cpp
|
| +++ b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
|
| @@ -2551,13 +2551,10 @@ LayoutRect PaintLayer::boundingBoxForCompositingInternal(
|
| const_cast<PaintLayer*>(this)->stackingNode()->updateLayerListsIfNeeded();
|
|
|
| // If there is a clip applied by an ancestor to this PaintLayer but below or
|
| - // equal to |ancestorLayer|, use that clip as the bounds rather than the
|
| - // recursive bounding boxes, since the latter may be larger than the actual
|
| - // size. See https://bugs.webkit.org/show_bug.cgi?id=80372 for examples.
|
| + // equal to |ancestorLayer|, apply that clip.
|
| LayoutRect result = clipper().localClipRect(compositedLayer);
|
| - // TODO(chrishtr): avoid converting to IntRect and back.
|
| - if (result == LayoutRect(LayoutRect::infiniteIntRect()))
|
| - result = physicalBoundingBox(LayoutPoint());
|
| +
|
| + result.intersect(physicalBoundingBox(LayoutPoint()));
|
|
|
| expandRectForStackingChildren(compositedLayer, result, options);
|
|
|
|
|