Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
LayoutTests:
Reviewed by Hyatt, thumbs up by Darin. - test for http://bugs.webkit.org/show_bug.cgi?id=12782 Reproducible crash in BidiContext::deref * fast/dynamic/anonymous-block-orphaned-lines-expected.checksum: Added. * fast/dynamic/anonymous-block-orphaned-lines-expected.png: Added. * fast/dynamic/anonymous-block-orphaned-lines-expected.txt: Added. * fast/dynamic/anonymous-block-orphaned-lines.html: Added. WebCore: Reviewed by Hyatt, thumbs up by Darin. - fix http://bugs.webkit.org/show_bug.cgi?id=12782 Reproducible crash in BidiContext::deref Test: fast/dynamic/anonymous-block-orphaned-lines.html * rendering/InlineBox.cpp: (WebCore::InlineBox::root): Added an assertion that we return a root inline box. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::removeChild): Added code to adopt the line boxes of anonymous blocks being destroyed instead of leaving them orphaned, which is what caused this crash. The boxes will be deleted on the next layout, but this ensures consistency in the mean time. Canonical link: https://commits.webkit.org/16984@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@20188 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
with
116 additions
and 1 deletion.
- +12 −0 LayoutTests/ChangeLog
- +1 −0 LayoutTests/fast/dynamic/anonymous-block-orphaned-lines-expected.checksum
- BIN LayoutTests/fast/dynamic/anonymous-block-orphaned-lines-expected.png
- +25 −0 LayoutTests/fast/dynamic/anonymous-block-orphaned-lines-expected.txt
- +28 −0 LayoutTests/fast/dynamic/anonymous-block-orphaned-lines.html
- +17 −0 WebCore/ChangeLog
- +1 −0 WebCore/rendering/InlineBox.cpp
- +32 −1 WebCore/rendering/RenderBlock.cpp
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1 @@ | ||
7438c617be4c166db3cc9aa3dc9d69d9 |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,25 @@ | ||
layer at (0,0) size 800x600 | ||
RenderView at (0,0) size 800x600 | ||
layer at (0,0) size 800x600 | ||
RenderBlock {HTML} at (0,0) size 800x600 | ||
RenderBody {BODY} at (8,8) size 784x584 | ||
RenderBlock {P} at (0,0) size 784x18 | ||
RenderText {#text} at (0,0) size 53x18 | ||
text run at (0,0) width 53: "Test for " | ||
RenderInline {I} at (0,0) size 566x18 | ||
RenderInline {A} at (0,0) size 301x18 [color=#0000EE] | ||
RenderText {#text} at (53,0) size 301x18 | ||
text run at (53,0) width 301: "http://bugs.webkit.org/show_bug.cgi?id=12782" | ||
RenderText {#text} at (354,0) size 265x18 | ||
text run at (354,0) width 4: " " | ||
text run at (358,0) width 261: "Reproducible crash in BidiContext::deref" | ||
RenderText {#text} at (619,0) size 4x18 | ||
text run at (619,0) width 4: "." | ||
RenderBlock {P} at (0,34) size 784x18 | ||
RenderText {#text} at (0,0) size 246x18 | ||
text run at (0,0) width 246: "No assertion failure means SUCCESS." | ||
RenderBlock {DIV} at (0,68) size 784x18 | ||
RenderInline {SPAN} at (0,0) size 21x18 | ||
RenderText {#text} at (0,0) size 21x18 | ||
text run at (0,0) width 21: "foo" | ||
RenderBlock {DIV} at (0,86) size 784x0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,28 @@ | ||
<html> | ||
<head> | ||
<title></title> | ||
</head> | ||
<body> | ||
<p> | ||
Test for <i><a href="http://bugs.webkit.org/show_bug.cgi?id=12782">http://bugs.webkit.org/show_bug.cgi?id=12782</a> | ||
Reproducible crash in BidiContext::deref</i>. | ||
</p> | ||
<p> | ||
No assertion failure means SUCCESS. | ||
</p> | ||
<div id="target1"><span>foo</span><div></div><span>bar</span></div> | ||
<div id="target2"><div></div><span>baz</span></div> | ||
<script> | ||
document.body.offsetTop; | ||
|
||
var target1 = document.getElementById("target1"); | ||
target1.removeChild(target1.childNodes[1]); | ||
target1.removeChild(target1.childNodes[1]); | ||
|
||
var target2 = document.getElementById("target2"); | ||
target2.removeChild(target2.firstChild); | ||
target2.removeChild(target2.firstChild); | ||
|
||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -173,6 +173,7 @@ RootInlineBox* InlineBox::root() | ||
{ | ||
if (m_parent) | ||
return m_parent->root(); | ||
ASSERT(isRootInlineBox()); | ||
return static_cast<RootInlineBox*>(this); | ||
} | ||
|
||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters