Title: [92028] branches/chromium/835
- Revision
- 92028
- Author
- [email protected]
- Date
- 2011-07-29 16:03:38 -0700 (Fri, 29 Jul 2011)
Log Message
Merge 91781
BUG=82552
Review URL: http://codereview.chromium.org/7537012
Modified Paths
Added Paths
Diff
Copied: branches/chromium/835/LayoutTests/editing/execCommand/crash-line-break-after-outdent-expected.txt (from rev 91781, trunk/LayoutTests/editing/execCommand/crash-line-break-after-outdent-expected.txt) (0 => 92028)
--- branches/chromium/835/LayoutTests/editing/execCommand/crash-line-break-after-outdent-expected.txt (rev 0)
+++ branches/chromium/835/LayoutTests/editing/execCommand/crash-line-break-after-outdent-expected.txt 2011-07-29 23:03:38 UTC (rev 92028)
@@ -0,0 +1,3 @@
+Test for bug REGRESSION (83075): Crash in line break after outdent
+
+This test PASSED!
Copied: branches/chromium/835/LayoutTests/editing/execCommand/crash-line-break-after-outdent.html (from rev 91781, trunk/LayoutTests/editing/execCommand/crash-line-break-after-outdent.html) (0 => 92028)
--- branches/chromium/835/LayoutTests/editing/execCommand/crash-line-break-after-outdent.html (rev 0)
+++ branches/chromium/835/LayoutTests/editing/execCommand/crash-line-break-after-outdent.html 2011-07-29 23:03:38 UTC (rev 92028)
@@ -0,0 +1,29 @@
+<head>
+<script>
+if (window.layoutTestController)
+ layoutTestController.dumpAsText();
+
+function f() {
+ document.designMode="on";
+ document.execCommand("SelectAll");
+ document.execCommand("InsertImage",false);
+ document.execCommand("InsertImage",false);
+ document.execCommand("Indent");
+ document.execCommand("insertunorderedlist",false);
+ document.execCommand("InsertUnorderedList",false);
+ document.execCommand("Bold");
+ document.execCommand("InsertLineBreak");
+ document.execCommand("insertunorderedlist");
+ document.execCommand("insertimage",false);
+ document.execCommand("insertparagraph",false);
+ document.execCommand("insertunorderedlist");
+ document.execCommand("InsertUnorderedList");
+ document.execCommand("Outdent");
+ document.write("<p>Test for bug <a href="" (83075): Crash in line break after outdent</p>");
+ document.write("<p>This test PASSED!</p>");
+}
+ </script>
+</head>
+<body _onload_='f();'>
+ <pre id="x">x</pre>
+</body>
\ No newline at end of file
Modified: branches/chromium/835/Source/WebCore/rendering/RenderLineBoxList.cpp (92027 => 92028)
--- branches/chromium/835/Source/WebCore/rendering/RenderLineBoxList.cpp 2011-07-29 23:00:58 UTC (rev 92027)
+++ branches/chromium/835/Source/WebCore/rendering/RenderLineBoxList.cpp 2011-07-29 23:03:38 UTC (rev 92028)
@@ -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) {
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes