Chromium Code Reviews| Index: Source/core/rendering/RenderBlock.cpp |
| diff --git a/Source/core/rendering/RenderBlock.cpp b/Source/core/rendering/RenderBlock.cpp |
| index a95ad9ee2a5fb8d4cc81f71a43687feab0881aa4..0c75e0e706ed8df10ae3394f7594136d0c39f345 100644 |
| --- a/Source/core/rendering/RenderBlock.cpp |
| +++ b/Source/core/rendering/RenderBlock.cpp |
| @@ -365,10 +365,12 @@ void RenderBlock::styleDidChange(StyleDifference diff, const RenderStyle* oldSty |
| void RenderBlock::repaintTreeAfterLayout(const RenderLayerModelObject& repaintContainer) |
| { |
| - if (!shouldCheckForInvalidationAfterLayout()) |
| - return; |
| + // Note, we don't want to early out here using shouldCheckForInvalidationAfterLayout as |
| + // we have to make sure we go through any positioned objects as they won't be seen in |
| + // the normal tree walk. |
| - RenderBox::repaintTreeAfterLayout(repaintContainer); |
| + if (shouldCheckForInvalidationAfterLayout()) |
| + RenderBox::repaintTreeAfterLayout(repaintContainer); |
| // Take care of positioned objects. This is required as LayoutState keeps a single clip rect. |
| if (TrackedRendererListHashSet* positionedObjects = this->positionedObjects()) { |
| @@ -381,6 +383,17 @@ void RenderBlock::repaintTreeAfterLayout(const RenderLayerModelObject& repaintCo |
| // so we can't pass our own repaint container along. |
| const RenderLayerModelObject& repaintContainerForChild = *box->containerForRepaint(); |
| + // When a floating object is moved the children do not get layout but they get a new position. |
| + // We have to make sure we invalidate the children if a floating parent container moves. |
| + if (isFloating() || isRelPositioned()) { |
|
Julien - ping for review
2014/05/27 12:34:53
Note that this is independent of the child so we c
dsinclair
2014/05/27 15:37:13
Done.
|
| + if (box->previousPositionFromRepaintContainer() != box->positionFromRepaintContainer(&repaintContainerForChild)) { |
| + // Note, this has to be non-recursive. If we walk up the tree we'll end up setting |
| + // the flag on our parent who has already cleared their flags for this invalidation |
| + // walk. We also don't have to force them to walk as we're all ready there. |
|
Julien - ping for review
2014/05/27 12:34:53
all ready, not already?
dsinclair
2014/05/27 15:37:13
Done.
|
| + box->setMayNeedInvalidationNonRecursive(true); |
| + } |
| + } |
| + |
| // If the positioned renderer is absolutely positioned and it is inside |
| // a relatively positioend inline element, we need to account for |
| // the inline elements position in LayoutState. |