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

Unified Diff: sky/engine/core/rendering/RenderBlock.cpp

Issue 688443003: Remove a bit more position:fixed plumbing. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 2 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 | « sky/engine/core/rendering/RenderBlock.h ('k') | sky/engine/core/rendering/RenderLayer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/rendering/RenderBlock.cpp
diff --git a/sky/engine/core/rendering/RenderBlock.cpp b/sky/engine/core/rendering/RenderBlock.cpp
index 822dc90f0aaba5df569dea05b8c5b13f39a91d07..b0928385c3f1bf316cc2d2c7ad04da85a4827c99 100644
--- a/sky/engine/core/rendering/RenderBlock.cpp
+++ b/sky/engine/core/rendering/RenderBlock.cpp
@@ -1171,14 +1171,8 @@ bool RenderBlock::simplifiedLayout()
if (needsSimplifiedNormalFlowLayout())
simplifiedNormalFlowLayout();
- // Lay out our positioned objects if our positioned child bit is set.
- // Also, if an absolute position element inside a relative positioned container moves, and the absolute element has a fixed position
- // child, neither the fixed element nor its container learn of the movement since posChildNeedsLayout() is only marked as far as the
- // relative positioned container. So if we can have fixed pos objects in our positioned objects list check if any of them
- // are statically positioned and thus need to move with their absolute ancestors.
- bool canContainFixedPosObjects = canContainFixedPositionObjects();
- if (posChildNeedsLayout() || needsPositionedMovementLayout() || canContainFixedPosObjects)
- layoutPositionedObjects(false, needsPositionedMovementLayout() ? ForcedLayoutAfterContainingBlockMoved : (!posChildNeedsLayout() && canContainFixedPosObjects ? LayoutOnlyFixedPositionedObjects : DefaultLayout));
+ if (posChildNeedsLayout() || needsPositionedMovementLayout())
+ layoutPositionedObjects(false, needsPositionedMovementLayout() ? ForcedLayoutAfterContainingBlockMoved : DefaultLayout);
// Recompute our overflow information.
// FIXME: We could do better here by computing a temporary overflow object from layoutPositionedObjects and only
@@ -1199,11 +1193,6 @@ bool RenderBlock::simplifiedLayout()
return true;
}
-void RenderBlock::markFixedPositionObjectForLayoutIfNeeded(RenderObject* child, SubtreeLayoutScope& layoutScope)
-{
- // FIXME(sky): Remove
-}
-
LayoutUnit RenderBlock::marginIntrinsicLogicalWidthForChild(RenderBox* child) const
{
// A margin has three types: fixed, percentage, and auto (variable).
@@ -1234,14 +1223,6 @@ void RenderBlock::layoutPositionedObjects(bool relayoutChildren, PositionedLayou
r->setLayoutDidGetCalled(true);
SubtreeLayoutScope layoutScope(*r);
- // A fixed position element with an absolute positioned ancestor has no way of knowing if the latter has changed position. So
- // if this is a fixed position element, mark it for layout if it has an abspos ancestor and needs to move with that ancestor, i.e.
- // it has static position.
- markFixedPositionObjectForLayoutIfNeeded(r, layoutScope);
- if (info == LayoutOnlyFixedPositionedObjects) {
- r->layoutIfNeeded();
- continue;
- }
// When a non-positioned block element moves, it may have positioned children that are implicitly positioned relative to the
// non-positioned block. Rather than trying to detect all of these movement cases, we just always lay out positioned
« no previous file with comments | « sky/engine/core/rendering/RenderBlock.h ('k') | sky/engine/core/rendering/RenderLayer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698