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

Unified Diff: Source/core/rendering/RenderLayerClipper.cpp

Issue 342203004: Get rid of compositing and squashing helper methods on RenderLayerModelObject. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed compile. Created 6 years, 6 months 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
« no previous file with comments | « Source/core/rendering/RenderLayer.cpp ('k') | Source/core/rendering/RenderLayerModelObject.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderLayerClipper.cpp
diff --git a/Source/core/rendering/RenderLayerClipper.cpp b/Source/core/rendering/RenderLayerClipper.cpp
index 73e410aaee05c1786d4143dfa66c4abba087b799..ba9d089451ca4d2365fc82211ee77a9a7a7646fe 100644
--- a/Source/core/rendering/RenderLayerClipper.cpp
+++ b/Source/core/rendering/RenderLayerClipper.cpp
@@ -360,17 +360,21 @@ void RenderLayerClipper::parentClipRects(const ClipRectsContext& context, ClipRe
RenderLayer* RenderLayerClipper::clippingRootForPainting() const
{
- if (m_renderer.hasCompositedLayerMapping() || m_renderer.groupedMapping())
- return const_cast<RenderLayer*>(m_renderer.layer());
-
const RenderLayer* current = m_renderer.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<RenderLayer*>(current);
+
while (current) {
if (current->isRootLayer())
return const_cast<RenderLayer*>(current);
current = current->compositingContainer();
ASSERT(current);
- if (current->transform() || (current->compositingState() == PaintsIntoOwnBacking) || current->groupedMapping())
+ if (current->transform() || current->isPaintInvalidationContainer())
return const_cast<RenderLayer*>(current);
}
« no previous file with comments | « Source/core/rendering/RenderLayer.cpp ('k') | Source/core/rendering/RenderLayerModelObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698