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

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

Issue 1413523007: Simplify computation of the invalidation rect for a frame. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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/PaintLayerClipper.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerClipper.cpp b/third_party/WebKit/Source/core/paint/PaintLayerClipper.cpp
index 989dc1c849b3bad39383c1635c464d49a39ef3fb..7bb1bae8ee63a317d586216baf13caabb48db6be 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerClipper.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayerClipper.cpp
@@ -170,18 +170,6 @@ void PaintLayerClipper::clearClipRectsIncludingDescendants(ClipRectsCacheSlot ca
}
}
-LayoutRect PaintLayerClipper::childrenClipRect() const
-{
- // FIXME: border-radius not accounted for.
- // FIXME: Flow thread based columns not accounted for.
- PaintLayer* clippingRootLayer = clippingRootForPainting();
- LayoutRect layerBounds;
- ClipRect backgroundRect, foregroundRect;
- // Need to use uncached clip rects, because the value of 'dontClipToOverflow' may be different from the painting path (<rdar://problem/11844909>).
- ClipRectsContext context(clippingRootLayer, UncachedClipRects);
- calculateRects(context, LayoutRect(m_layoutObject.view()->unscaledDocumentRect()), layerBounds, backgroundRect, foregroundRect);
- return LayoutRect(clippingRootLayer->layoutObject()->localToAbsoluteQuad(FloatQuad(FloatRect(foregroundRect.rect()))).enclosingBoundingBox());
-}
LayoutRect PaintLayerClipper::localClipRect(const PaintLayer* clippingRootLayer) const
{
@@ -326,30 +314,6 @@ void PaintLayerClipper::getOrCalculateClipRects(const ClipRectsContext& context,
calculateClipRects(context, clipRects);
}
-PaintLayer* PaintLayerClipper::clippingRootForPainting() const
-{
- const PaintLayer* current = m_layoutObject.layer();
- // FIXME: getting rid of current->hasCompositedLayerMapping() here breaks the
- // compositing/backing/no-backing-for-clip.html layout test, because there is a
- // "composited but paints into ancestor" layer involved. However, it doesn't make sense that
- // that check would be appropriate here but not inside the while loop below.
- if (current->isPaintInvalidationContainer() || current->hasCompositedLayerMapping())
- return const_cast<PaintLayer*>(current);
-
- while (current) {
- if (current->isRootLayer())
- return const_cast<PaintLayer*>(current);
-
- current = current->compositingContainer();
- ASSERT(current);
- if (current->transform() || current->isPaintInvalidationContainer())
- return const_cast<PaintLayer*>(current);
- }
-
- ASSERT_NOT_REACHED();
- return 0;
-}
-
bool PaintLayerClipper::shouldRespectOverflowClip(const ClipRectsContext& context) const
{
PaintLayer* layer = m_layoutObject.layer();
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayerClipper.h ('k') | third_party/WebKit/Source/web/WebPluginContainerImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698