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

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

Issue 183263003: RenderLayer::clipParent() should avoid calling clippedByAncestor unless needed (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderLayer.cpp
diff --git a/Source/core/rendering/RenderLayer.cpp b/Source/core/rendering/RenderLayer.cpp
index ee883c0489bf85b87ebfc4f506aedd753d73831f..d77386be7932b9203c4d61b8e03fb0f91dab4a16 100644
--- a/Source/core/rendering/RenderLayer.cpp
+++ b/Source/core/rendering/RenderLayer.cpp
@@ -1680,15 +1680,11 @@ RenderLayer* RenderLayer::scrollParent() const
RenderLayer* RenderLayer::clipParent() const
{
- const bool needsAncestorClip = compositor()->clippedByAncestor(this);
-
- RenderLayer* clipParent = 0;
- if ((compositingReasons() & CompositingReasonOutOfFlowClipping) && !needsAncestorClip) {
+ if (compositingReasons() & CompositingReasonOutOfFlowClipping && !compositor()->clippedByAncestor(this)) {
if (RenderObject* containingBlock = renderer()->containingBlock())
- clipParent = containingBlock->enclosingLayer()->enclosingCompositingLayer();
+ return containingBlock->enclosingLayer()->enclosingCompositingLayer();
}
-
- return clipParent;
+ return 0;
}
void RenderLayer::didUpdateNeedsCompositedScrolling()
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698