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

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

Issue 302083005: Don't leave stale pointers into m_grid (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 7 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 b1f23c92913d273a20075b404deb973a7fdd860e..2615bd449fdf42189199df15141bfafc15359408 100644
--- a/Source/core/rendering/RenderBlock.cpp
+++ b/Source/core/rendering/RenderBlock.cpp
@@ -49,6 +49,7 @@
#include "core/rendering/RenderDeprecatedFlexibleBox.h"
#include "core/rendering/RenderFlexibleBox.h"
#include "core/rendering/RenderFlowThread.h"
+#include "core/rendering/RenderGrid.h"
#include "core/rendering/RenderInline.h"
#include "core/rendering/RenderLayer.h"
#include "core/rendering/RenderMarquee.h"
@@ -1052,6 +1053,10 @@ void RenderBlock::removeLeftoverAnonymousBlock(RenderBlock* child)
// Remove all the information in the flow thread associated with the leftover anonymous block.
child->removeFromRenderFlowThread();
+ // RenderGrid keeps track of its children, we must notify it about changes in the tree.
+ if (child->parent()->isRenderGrid())
+ toRenderGrid(child->parent())->dirtyGrid();
+
child->setParent(0);
child->setPreviousSibling(0);
child->setNextSibling(0);

Powered by Google App Engine
This is Rietveld 408576698