mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-16 22:04:36 +00:00
Bug 847130 - Do DestroyOverflowLines() if the last line was removed instead of always RemoveOverflowLines() and SetOverflowLines() when there's lines remaining. r=dbaron
This commit is contained in:
parent
7f62afe13c
commit
cbee5b4736
15
layout/generic/crashtests/847130.xhtml
Normal file
15
layout/generic/crashtests/847130.xhtml
Normal file
@ -0,0 +1,15 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<script>
|
||||
|
||||
function boom()
|
||||
{
|
||||
document.getElementById("x").appendChild(document.createElementNS("http://www.w3.org/1999/xhtml", "span"));
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body onload="boom();">
|
||||
<div style="-moz-column-count: 15;"><div style="-moz-column-count: 15;" id="x"><td style="display: block; height: 2.5em;"></td></div></div>
|
||||
</body>
|
||||
</html>
|
@ -446,3 +446,4 @@ asserts(1) test-pref(layout.css.flexbox.enabled,true) load 826532-1.html # bug 3
|
||||
test-pref(layout.css.flexbox.enabled,true) load 827168-1.html
|
||||
load 842132-1.html
|
||||
test-pref(layout.css.flexbox.enabled,true) load 844529-1.html
|
||||
load 847130.xhtml
|
||||
|
@ -5507,13 +5507,10 @@ nsBlockFrame::DoRemoveFrame(nsIFrame* aDeletedFrame, uint32_t aFlags)
|
||||
visOverflow.width, visOverflow.height);
|
||||
#endif
|
||||
} else {
|
||||
// XXX update searchingOverflowList directly, remove only when empty
|
||||
FrameLines* overflowLines = RemoveOverflowLines();
|
||||
line = overflowLines->mLines.erase(line);
|
||||
if (!overflowLines->mLines.empty()) {
|
||||
SetOverflowLines(overflowLines);
|
||||
} else {
|
||||
delete overflowLines;
|
||||
if (overflowLines->mLines.empty()) {
|
||||
DestroyOverflowLines();
|
||||
overflowLines = nullptr;
|
||||
// We just invalidated our iterators. Since we were in
|
||||
// the overflow lines list, which is now empty, set them
|
||||
// so we're at the end of the regular line list.
|
||||
@ -5653,14 +5650,11 @@ nsBlockFrame::StealFrame(nsPresContext* aPresContext,
|
||||
// Remove the line box
|
||||
nsLineBox* lineBox = line;
|
||||
if (searchingOverflowList) {
|
||||
// Erase line, but avoid making the overflow line list empty
|
||||
// XXX update overflowLines directly, remove only when empty
|
||||
RemoveOverflowLines();
|
||||
// Erase the line, destroy the property if it was the last one.
|
||||
line = overflowLines->mLines.erase(line);
|
||||
if (!overflowLines->mLines.empty()) {
|
||||
SetOverflowLines(overflowLines);
|
||||
} else {
|
||||
delete overflowLines;
|
||||
if (overflowLines->mLines.empty()) {
|
||||
DestroyOverflowLines();
|
||||
overflowLines = nullptr;
|
||||
// We just invalidated our iterators. Since we were in
|
||||
// the overflow lines list, which is now empty, set them
|
||||
// so we're at the end of the regular line list.
|
||||
|
Loading…
x
Reference in New Issue
Block a user