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

Unified Diff: Source/WebCore/rendering/RenderLineBoxList.cpp

Issue 7550046: Merge 91781 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/782/
Patch Set: Created 9 years, 4 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 | « LayoutTests/editing/execCommand/crash-line-break-after-outdent-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/rendering/RenderLineBoxList.cpp
===================================================================
--- Source/WebCore/rendering/RenderLineBoxList.cpp (revision 92500)
+++ Source/WebCore/rendering/RenderLineBoxList.cpp (working copy)
@@ -354,8 +354,21 @@
if (box)
break;
}
- if (!box)
+ if (!box) {
+ if (inlineContainer && !inlineContainer->alwaysCreateLineBoxes()) {
+ // https://bugs.webkit.org/show_bug.cgi?id=60778
+ // We may have just removed a <br> with no line box that was our first child. In this case
+ // we won't find a previous sibling, but firstBox can be pointing to a following sibling.
+ // This isn't good enough, since we won't locate the root line box that encloses the removed
+ // <br>. We have to just over-invalidate a bit and go up to our parent.
+ if (!inlineContainer->parent()->selfNeedsLayout()) {
+ inlineContainer->parent()->dirtyLinesFromChangedChild(inlineContainer);
+ inlineContainer->setNeedsLayout(true); // Mark the container as needing layout to avoid dirtying the same lines again across multiple destroy() calls of the same subtree.
+ }
+ return;
+ }
box = firstBox->root();
+ }
// If we found a line box, then dirty it.
if (box) {
« no previous file with comments | « LayoutTests/editing/execCommand/crash-line-break-after-outdent-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698