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

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

Issue 331653004: Delete RenderLayer::updateLayerPositionsAfterDocumentScroll (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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.h ('k') | Source/core/rendering/RenderLayerClipper.h » ('j') | 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 6e1ffea8d4011717cdb3065935949011c8022b08..387eeb6fc91fcea33edde843a5978416095567f2 100644
--- a/Source/core/rendering/RenderLayer.cpp
+++ b/Source/core/rendering/RenderLayer.cpp
@@ -251,6 +251,8 @@ void RenderLayer::updateLayerPositionsAfterLayout(const RenderLayer* rootLayer,
{
TRACE_EVENT0("blink_rendering", "RenderLayer::updateLayerPositionsAfterLayout");
+ m_clipper.clearClipRectsIncludingDescendants();
+
// FIXME: Remove incremental compositing updates after fixing the chicken/egg issues
// https://code.google.com/p/chromium/issues/detail?id=343756
DisableCompositingQueryAsserts disabler;
@@ -265,9 +267,6 @@ void RenderLayer::updateLayerPositionRecursive(UpdateLayerPositionsFlags flags)
if (flags & ForceMayNeedPaintInvalidation)
m_renderer->setMayNeedPaintInvalidation(true);
- // Clear our cached clip rect information.
- m_clipper.clearClipRects();
-
if (hasOverflowControls()) {
// FIXME: We should figure out the right time to position the overflow controls.
// This call appears to be necessary to pass some layout test that use EventSender,
@@ -345,54 +344,22 @@ bool RenderLayer::scrollsWithRespectTo(const RenderLayer* other) const
return compositingInputs().ancestorScrollingLayer != other->compositingInputs().ancestorScrollingLayer;
}
-void RenderLayer::updateLayerPositionsAfterDocumentScroll()
-{
- ASSERT(this == renderer()->view()->layer());
- updateLayerPositionsAfterScroll();
-}
-
void RenderLayer::updateLayerPositionsAfterOverflowScroll()
{
- // FIXME: why is it OK to not check the ancestors of this layer in order to
- // initialize the HasSeenViewportConstrainedAncestor and HasSeenAncestorWithOverflowClip flags?
- updateLayerPositionsAfterScroll(IsOverflowScroll);
+ m_clipper.clearClipRectsIncludingDescendants();
+ updateLayerPositionsAfterScrollRecursive();
}
-void RenderLayer::updateLayerPositionsAfterScroll(UpdateLayerPositionsAfterScrollFlags flags)
+void RenderLayer::updateLayerPositionsAfterScrollRecursive()
{
- // FIXME: This shouldn't be needed, but there are some corner cases where
- // these flags are still dirty. Update so that the check below is valid.
- updateDescendantDependentFlags();
-
- // If we have no visible content and no visible descendants, there is no point recomputing
- // our rectangles as they will be empty. If our visibility changes, we are expected to
- // recompute all our positions anyway.
- if (subtreeIsInvisible())
- return;
-
- if (updateLayerPosition())
- flags |= HasChangedAncestor;
-
- if ((flags & HasChangedAncestor) || (flags & HasSeenViewportConstrainedAncestor) || (flags & IsOverflowScroll))
- m_clipper.clearClipRects();
-
- if (renderer()->style()->hasViewportConstrainedPosition())
- flags |= HasSeenViewportConstrainedAncestor;
+ updateLayerPosition();
- if (renderer()->hasOverflowClip())
- flags |= HasSeenAncestorWithOverflowClip;
-
- if ((flags & IsOverflowScroll) && (flags & HasSeenAncestorWithOverflowClip) && !renderer()->isTableCell()) {
- // FIXME: We could track the repaint container as we walk down the tree.
+ // FIXME: We could track the repaint container as we walk down the tree.
+ if (!renderer()->isTableCell())
m_renderer->setPreviousPaintInvalidationRect(m_renderer->boundsRectForPaintInvalidation(m_renderer->containerForPaintInvalidation()));
- }
for (RenderLayer* child = firstChild(); child; child = child->nextSibling())
- child->updateLayerPositionsAfterScroll(flags);
-
- // We don't update our reflection as scrolling is a translation which does not change the size()
- // of an object, thus RenderReplica will still repaint itself properly as the layer position was
- // updated above.
+ child->updateLayerPositionsAfterScrollRecursive();
}
void RenderLayer::updateTransformationMatrix()
« no previous file with comments | « Source/core/rendering/RenderLayer.h ('k') | Source/core/rendering/RenderLayerClipper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698