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

Unified Diff: Source/core/rendering/RenderInline.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: 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
Index: Source/core/rendering/RenderInline.cpp
diff --git a/Source/core/rendering/RenderInline.cpp b/Source/core/rendering/RenderInline.cpp
index a431a76f93976c69a50e131323494e28f3e980ad..71c7bc4341ad24a26c3d250c5265e101976a75de 100644
--- a/Source/core/rendering/RenderInline.cpp
+++ b/Source/core/rendering/RenderInline.cpp
@@ -503,6 +503,13 @@ void RenderInline::splitFlow(RenderObject* beforeChild, RenderBlock* newBlockBox
}
}
+ // Always just do a full layout in order to ensure that line boxes (especially wrappers for images)
+ // get deleted properly. Because objects moves from the pre block into the post block, we want to
+ // make new line boxes instead of leaving the old line boxes around.
+ pre->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation();
+ block->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation();
+ post->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation();
mstensho (USE GERRIT) 2015/01/28 10:43:16 If we only keep this change but drop the ones in R
dsinclair 2015/01/28 16:35:01 So, this is moved up just to guard against the cas
mstensho (USE GERRIT) 2015/01/28 16:51:19 Correct. But I don't know if would still be possib
dsinclair 2015/01/28 17:08:06 Yea, lets put this back in that case, and file a b
mstensho (USE GERRIT) 2015/01/28 17:19:54 Done. Sounds like something to do while working o
+
splitInlines(pre, post, newBlockBox, beforeChild, oldCont);
// We already know the newBlockBox isn't going to contain inline kids, so avoid wasting
@@ -510,13 +517,6 @@ void RenderInline::splitFlow(RenderObject* beforeChild, RenderBlock* newBlockBox
newBlockBox->setChildrenInline(false);
newBlockBox->addChild(newChild);
-
- // Always just do a full layout in order to ensure that line boxes (especially wrappers for images)
- // get deleted properly. Because objects moves from the pre block into the post block, we want to
- // make new line boxes instead of leaving the old line boxes around.
- pre->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation();
- block->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation();
- post->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation();
}
void RenderInline::addChildToContinuation(RenderObject* newChild, RenderObject* beforeChild)
« Source/core/rendering/RenderBlock.cpp ('K') | « Source/core/rendering/RenderBlock.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698