Chromium Code Reviews| Index: Source/core/rendering/RenderGrid.cpp |
| diff --git a/Source/core/rendering/RenderGrid.cpp b/Source/core/rendering/RenderGrid.cpp |
| index a1de68202177f4dafa8c7e86d0569ead6c56f4df..76756b0a11f9ffd3ec5f9cafea605d99064a92e1 100644 |
| --- a/Source/core/rendering/RenderGrid.cpp |
| +++ b/Source/core/rendering/RenderGrid.cpp |
| @@ -207,6 +207,15 @@ void RenderGrid::addChild(RenderObject* newChild, RenderObject* beforeChild) |
| if (gridIsDirty()) |
| return; |
| + // If the new requested beforeChild is not one of our children is because it's wrapped by an anonymous container. In |
| + // those cases addChild will be called twice for the newChild, one with the initial beforeChild and another one with |
| + // its parent (the anonymous block container). See RenderBlock::addChildIgnoringAnonymousColumnBlocks() |
| + if (beforeChild && beforeChild->parent() != this) { |
| + ASSERT(beforeChild->parent()->isAnonymous()); |
| + dirtyGrid(); |
|
Julien - ping for review
2014/06/25 21:25:08
Do we really need to invalidate the grid in this c
svillar
2014/06/26 09:45:53
Good point, should be safe to just return indeed.
|
| + return; |
| + } |
| + |
| if (!newChild->isBox()) { |
| dirtyGrid(); |
| return; |