Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(629)

Unified Diff: third_party/WebKit/Source/core/paint/PaintLayer.cpp

Issue 2591883002: Apply both phsical bounding box and clip to composited bounds. (Closed)
Patch Set: none Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);

Powered by Google App Engine
This is Rietveld 408576698