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

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

Issue 2517863002: Revert of Don't early out recursion into PaintLayerChildren when computing composited bounds. (Closed)
Patch Set: Created 4 years, 1 month 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 4e35b9156fea56bcc115b7a3f4096a06f21902af..9c040f849bc95d89034a661a870c726364b7fa78 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayer.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
@@ -2538,23 +2538,24 @@
if (layoutObject()->isLayoutFlowThread())
return LayoutRect();
- 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.
LayoutRect result = clipper().localClipRect(ancestorLayer);
// TODO(chrishtr): avoid converting to IntRect and back.
- if (result == LayoutRect(LayoutRect::infiniteIntRect()))
+ if (result == LayoutRect(LayoutRect::infiniteIntRect())) {
result = physicalBoundingBox(LayoutPoint());
- expandRectForStackingChildren(this, result, options);
-
- // Only enlarge by the filter outsets if we know the filter is going to be
- // rendered in software. Accelerated filters will handle their own outsets.
- if (paintsWithFilters())
- result = mapLayoutRectForFilter(result);
+ const_cast<PaintLayer*>(this)->stackingNode()->updateLayerListsIfNeeded();
+
+ expandRectForStackingChildren(this, result, options);
+
+ // Only enlarge by the filter outsets if we know the filter is going to be
+ // rendered in software. Accelerated filters will handle their own outsets.
+ if (paintsWithFilters())
+ result = mapLayoutRectForFilter(result);
+ }
if (transform() && (options == IncludeTransformsAndCompositedChildLayers ||
((paintsWithTransform(GlobalPaintNormalPhase) &&

Powered by Google App Engine
This is Rietveld 408576698