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..e48a7499329b4c2b5ce32019b6d7d2ba30194663 100644 |
| --- a/Source/core/rendering/RenderBlock.cpp |
| +++ b/Source/core/rendering/RenderBlock.cpp |
| @@ -365,8 +365,9 @@ 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); |
|
ojan
2014/05/24 05:14:29
Can this be:
if (shouldCheckForInvalidationAfterL
dsinclair
2014/05/26 14:57:25
Done. I didn't bother before since the RenderBox v
|
| @@ -381,6 +382,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()) { |
| + 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. |
| + 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. |