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

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

Issue 241113004: Incorrect invalidation on Google Forum (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 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/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;
« no previous file with comments | « LayoutTests/fast/repaint/positioned-list-offset-change-repaint-expected.txt ('k') | Source/core/rendering/RenderObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698