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

Unified Diff: Source/core/rendering/compositing/CompositingReasonFinder.cpp

Issue 270633003: Remove RenderLayerCompositor::m_viewportConstrainedLayers (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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
Index: Source/core/rendering/compositing/CompositingReasonFinder.cpp
diff --git a/Source/core/rendering/compositing/CompositingReasonFinder.cpp b/Source/core/rendering/compositing/CompositingReasonFinder.cpp
index f17e456aeff758b00c422431cb195c2b78d80afe..982a06269e236d976903eca2a0735aacb1185a67 100644
--- a/Source/core/rendering/compositing/CompositingReasonFinder.cpp
+++ b/Source/core/rendering/compositing/CompositingReasonFinder.cpp
@@ -228,30 +228,6 @@ bool CompositingReasonFinder::requiresCompositingForOverflowScrolling(const Rend
return layer->needsCompositedScrolling();
}
-static bool isViewportConstrainedStickyLayer(const RenderLayer* layer)
-{
- ASSERT(layer->renderer()->isStickyPositioned());
- return !layer->enclosingOverflowClipLayer(ExcludeSelf);
-}
-
-bool CompositingReasonFinder::isViewportConstrainedFixedOrStickyLayer(const RenderLayer* layer)
-{
- if (layer->renderer()->isStickyPositioned())
- return isViewportConstrainedStickyLayer(layer);
-
- if (layer->renderer()->style()->position() != FixedPosition)
- return false;
-
- for (const RenderLayerStackingNode* stackingContainer = layer->stackingNode(); stackingContainer;
- stackingContainer = stackingContainer->ancestorStackingContainerNode()) {
- if (stackingContainer->layer()->compositingState() != NotComposited
- && stackingContainer->layer()->renderer()->style()->position() == FixedPosition)
- return false;
- }
-
- return true;
-}
-
bool CompositingReasonFinder::requiresCompositingForPosition(RenderObject* renderer, const RenderLayer* layer, RenderLayer::ViewportConstrainedNotCompositedReason* viewportConstrainedNotCompositedReason, bool* needToRecomputeCompositingRequirements) const
{
return requiresCompositingForPositionSticky(renderer, layer) || requiresCompositingForPositionFixed(renderer, layer, viewportConstrainedNotCompositedReason, needToRecomputeCompositingRequirements);
@@ -265,7 +241,7 @@ bool CompositingReasonFinder::requiresCompositingForPositionSticky(RenderObject*
return false;
// FIXME: This probably isn't correct for accelerated overflow scrolling. crbug.com/361723
// Instead it should return false only if the layer is not inside a scrollable region.
- return isViewportConstrainedStickyLayer(layer);
+ return !layer->enclosingOverflowClipLayer(ExcludeSelf);
chrishtr 2014/05/07 20:12:00 I don't get why this is correct..
abarth-chromium 2014/05/07 20:18:54 I just inlined isViewportConstrainedStickyLayer be
chrishtr 2014/05/07 20:20:42 oops, misread the code. ok
}
bool CompositingReasonFinder::requiresCompositingForPositionFixed(RenderObject* renderer, const RenderLayer* layer, RenderLayer::ViewportConstrainedNotCompositedReason* viewportConstrainedNotCompositedReason, bool* needToRecomputeCompositingRequirements) const
« no previous file with comments | « Source/core/rendering/compositing/CompositingReasonFinder.h ('k') | Source/core/rendering/compositing/RenderLayerCompositor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698