Title: [197290] releases/WebKitGTK/webkit-2.4
- Revision
- 197290
- Author
- [email protected]
- Date
- 2016-02-28 06:34:41 -0800 (Sun, 28 Feb 2016)
Log Message
Merge r179706 - Crash due to failing to dirty a removed text node's line box
https://bugs.webkit.org/show_bug.cgi?id=136544
Reviewed by David Hyatt.
Source/WebCore:
Test: fast/text/remove-text-node-linebox-not-dirty-crash.html
* rendering/RenderLineBoxList.cpp:
(WebCore::RenderLineBoxList::dirtyLinesFromChangedChild): Make the check for dirtying the next
line box a bit more inclusive to avoid a case of a line box for a destroyed render object not
being dirtied. In particular, when the text node's parent has no line boxes but contains BRs.
LayoutTests:
* fast/text/remove-text-node-linebox-not-dirty-crash-expected.txt: Added.
* fast/text/remove-text-node-linebox-not-dirty-crash.html: Added.
Modified Paths
Added Paths
Diff
Modified: releases/WebKitGTK/webkit-2.4/LayoutTests/ChangeLog (197289 => 197290)
--- releases/WebKitGTK/webkit-2.4/LayoutTests/ChangeLog 2016-02-28 14:23:43 UTC (rev 197289)
+++ releases/WebKitGTK/webkit-2.4/LayoutTests/ChangeLog 2016-02-28 14:34:41 UTC (rev 197290)
@@ -1,3 +1,13 @@
+2015-02-05 Maciej Stachowiak <[email protected]>
+
+ Crash due to failing to dirty a removed text node's line box
+ https://bugs.webkit.org/show_bug.cgi?id=136544
+
+ Reviewed by David Hyatt.
+
+ * fast/text/remove-text-node-linebox-not-dirty-crash-expected.txt: Added.
+ * fast/text/remove-text-node-linebox-not-dirty-crash.html: Added.
+
2015-02-15 Said Abou-Hallawa <[email protected]>
Crash when accessing an item in SVGLengthList and then replacing it with a previous item in the list.
Added: releases/WebKitGTK/webkit-2.4/LayoutTests/fast/text/remove-text-node-linebox-not-dirty-crash-expected.txt (0 => 197290)
--- releases/WebKitGTK/webkit-2.4/LayoutTests/fast/text/remove-text-node-linebox-not-dirty-crash-expected.txt (rev 0)
+++ releases/WebKitGTK/webkit-2.4/LayoutTests/fast/text/remove-text-node-linebox-not-dirty-crash-expected.txt 2016-02-28 14:34:41 UTC (rev 197290)
@@ -0,0 +1,3 @@
+This test passes if it does not crash. bar
+
+
Added: releases/WebKitGTK/webkit-2.4/LayoutTests/fast/text/remove-text-node-linebox-not-dirty-crash.html (0 => 197290)
--- releases/WebKitGTK/webkit-2.4/LayoutTests/fast/text/remove-text-node-linebox-not-dirty-crash.html (rev 0)
+++ releases/WebKitGTK/webkit-2.4/LayoutTests/fast/text/remove-text-node-linebox-not-dirty-crash.html 2016-02-28 14:34:41 UTC (rev 197290)
@@ -0,0 +1,23 @@
+<script>
+if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+}
+
+window._onload_ = function()
+{
+ document.body.offsetTop;
+ b.lastChild.parentNode.removeChild(b.lastChild);
+ document.body.offsetTop;
+ a.firstChild.parentNode.removeChild(a.firstChild);
+ document.body.offsetTop;
+ if (window.testRunner)
+ testRunner.notifyDone();
+}
+</script>
+<div id="a">foo</div>
+<div></div>
+ This test passes if it does not crash. <output>
+<unknown>bar</output>
+<span id="b">
+<span><div style="display:inline-block"></div><br><br></span>
Modified: releases/WebKitGTK/webkit-2.4/Source/WebCore/ChangeLog (197289 => 197290)
--- releases/WebKitGTK/webkit-2.4/Source/WebCore/ChangeLog 2016-02-28 14:23:43 UTC (rev 197289)
+++ releases/WebKitGTK/webkit-2.4/Source/WebCore/ChangeLog 2016-02-28 14:34:41 UTC (rev 197290)
@@ -1,3 +1,17 @@
+2015-02-05 Maciej Stachowiak <[email protected]>
+
+ Crash due to failing to dirty a removed text node's line box
+ https://bugs.webkit.org/show_bug.cgi?id=136544
+
+ Reviewed by David Hyatt.
+
+ Test: fast/text/remove-text-node-linebox-not-dirty-crash.html
+
+ * rendering/RenderLineBoxList.cpp:
+ (WebCore::RenderLineBoxList::dirtyLinesFromChangedChild): Make the check for dirtying the next
+ line box a bit more inclusive to avoid a case of a line box for a destroyed render object not
+ being dirtied. In particular, when the text node's parent has no line boxes but contains BRs.
+
2015-02-15 Said Abou-Hallawa <[email protected]>
Crash when accessing an item in SVGLengthList and then replacing it with a previous item in the list.
Modified: releases/WebKitGTK/webkit-2.4/Source/WebCore/rendering/RenderLineBoxList.cpp (197289 => 197290)
--- releases/WebKitGTK/webkit-2.4/Source/WebCore/rendering/RenderLineBoxList.cpp 2016-02-28 14:23:43 UTC (rev 197289)
+++ releases/WebKitGTK/webkit-2.4/Source/WebCore/rendering/RenderLineBoxList.cpp 2016-02-28 14:34:41 UTC (rev 197290)
@@ -396,7 +396,7 @@
// space, the search for |child|'s linebox will go past the leading space to the previous linebox and select that
// one as |box|. If we hit that situation here, dirty the |box| actually containing the child too.
bool insertedAfterLeadingSpace = box->lineBreakObj() == child->previousSibling();
- if (adjacentBox && (adjacentBox->lineBreakObj() == child || child->isBR() || (curr && curr->isBR())
+ if (adjacentBox && (adjacentBox->lineBreakObj()->isDescendantOf(child) || child->isBR() || (curr && curr->isBR())
|| insertedAfterLeadingSpace || isIsolated(container->style().unicodeBidi())))
adjacentBox->markDirty();
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes