Index: Source/core/rendering/RenderBlock.cpp |
diff --git a/Source/core/rendering/RenderBlock.cpp b/Source/core/rendering/RenderBlock.cpp |
index c75eeed13d3c4a2602cfca85c7476431156d6428..60e03ab2a87ca234916b4dda829c7781fe19b7c5 100644 |
--- a/Source/core/rendering/RenderBlock.cpp |
+++ b/Source/core/rendering/RenderBlock.cpp |
@@ -1523,7 +1523,7 @@ void RenderBlock::simplifiedNormalFlowLayout() |
bool RenderBlock::simplifiedLayout() |
{ |
- if ((!posChildNeedsLayout() && !needsSimplifiedNormalFlowLayout()) || normalChildNeedsLayout() || selfNeedsLayout()) |
+ if ((!posChildNeedsLayout() && !(needsSimplifiedNormalFlowLayout() || needsPositionedMovementLayout())) || normalChildNeedsLayout() || selfNeedsLayout()) |
leviw_travelin_and_unemployed
2014/04/17 20:35:55
This conditional is really hard to work out. Could
Julien - ping for review
2014/04/18 18:20:31
Split the logic and added some comment to make mor
|
return false; |
@@ -1551,8 +1551,8 @@ bool RenderBlock::simplifiedLayout() |
// 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() || canContainFixedPosObjects) |
- layoutPositionedObjects(false, !posChildNeedsLayout() && canContainFixedPosObjects ? LayoutOnlyFixedPositionedObjects : DefaultLayout); |
+ if (posChildNeedsLayout() || needsPositionedMovementLayout() || canContainFixedPosObjects) |
+ layoutPositionedObjects(false, needsPositionedMovementLayout() ? ForcedLayoutAfterContainingBlockMoved : (!posChildNeedsLayout() && canContainFixedPosObjects ? LayoutOnlyFixedPositionedObjects : DefaultLayout)); |
// Recompute our overflow information. |
// FIXME: We could do better here by computing a temporary overflow object from layoutPositionedObjects and only |
@@ -1660,11 +1660,6 @@ void RenderBlock::layoutPositionedObjects(bool relayoutChildren, PositionedLayou |
if (!r->needsLayout()) |
r->markForPaginationRelayoutIfNeeded(layoutScope); |
- // We don't have to do a full layout. We just have to update our position. Try that first. If we have shrink-to-fit width |
- // and we hit the available width constraint, the layoutIfNeeded() will catch it and do a full layout. |
- if (r->needsPositionedMovementLayoutOnly() && r->tryLayoutDoingPositionedMovementOnly()) |
- r->clearNeedsLayout(); |
- |
// If we are paginated or in a line grid, go ahead and compute a vertical position for our object now. |
// If it's wrong we'll lay out again. |
LayoutUnit oldLogicalTop = 0; |