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

Unified Diff: Source/core/layout/LayoutTable.cpp

Issue 880113002: Fix crash when establishing an inline continuation inside a block continuation. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove assertion in LayoutTable::addChildIgnoringContinuation() - crashed fast/table/crash-bad-chil… Created 5 years, 11 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
« no previous file with comments | « Source/core/layout/LayoutTable.h ('k') | Source/core/rendering/RenderBlock.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayoutTable.cpp
diff --git a/Source/core/layout/LayoutTable.cpp b/Source/core/layout/LayoutTable.cpp
index ae01460b50ad69914093e7b83218b2997be0bc7e..6cf3c1b05c3cec5a3569bcbb8d52401d6d446fd5 100644
--- a/Source/core/layout/LayoutTable.cpp
+++ b/Source/core/layout/LayoutTable.cpp
@@ -207,6 +207,16 @@ void LayoutTable::addChild(RenderObject* child, RenderObject* beforeChild)
section->addChild(child);
}
+void LayoutTable::addChildIgnoringContinuation(RenderObject* newChild, RenderObject* beforeChild)
+{
+ // We need to bypass the RenderBlock implementation and instead do a normal addChild() (or we
+ // won't get there at all), so that any missing anonymous table part renderers are
+ // inserted. Otherwise we might end up with an insane render tree with inlines or blocks as
+ // direct children of a table, which will break assumptions made all over the code, which may
+ // lead to crashers and security issues.
+ addChild(newChild, beforeChild);
+}
+
void LayoutTable::addCaption(const LayoutTableCaption* caption)
{
ASSERT(m_captions.find(caption) == kNotFound);
« no previous file with comments | « Source/core/layout/LayoutTable.h ('k') | Source/core/rendering/RenderBlock.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698