Bug 734777 - Call NoteFrameRemoved also when it's the last frame on the line to avoid an assertion. r=roc

This commit is contained in:
Mats Palmgren 2013-01-06 03:04:59 +01:00
parent 84aac3df99
commit 5e9420f6c3
3 changed files with 10 additions and 5 deletions

View File

@ -0,0 +1,2 @@
<!DOCTYPE html>
<body><div style="-moz-column-width: 1ch; font-family: monospace; width: 5ch;">X X &#x062A;</div></body>

View File

@ -312,7 +312,7 @@ load 514800-1.html
load 515811-1.html
load 517968.html
load 519031.xhtml
asserts(3-7) load 520340.html # bug 734777
load 520340.html
load 522170-1.html
load 533379-1.html
load 533379-2.html
@ -388,6 +388,7 @@ load 700031.xhtml
load 718516.html
load first-letter-638937.html
load first-letter-638937-2.html
load 734777.html
test-pref(layout.css.flexbox.enabled,true) load 737313-1.html
test-pref(layout.css.flexbox.enabled,true) load 737313-2.html
test-pref(layout.css.flexbox.enabled,true) load 737313-3.html

View File

@ -2575,10 +2575,10 @@ nsBlockFrame::PullFrameFrom(nsBlockReflowState& aState,
// when aFromContainer is 'this', then aLine->LastChild()'s next sibling
// is already set correctly.
aLine->NoteFrameAdded(frame);
if (fromLine->GetChildCount() > 1) {
// Mark line dirty now that we pulled a child
fromLine->NoteFrameRemoved(frame);
if (fromLine->GetChildCount() > 0) {
// Mark line dirty now that we pulled a child
fromLine->MarkDirty();
fromLine->mFirstChild = newFirstChild;
} else {
@ -4464,6 +4464,7 @@ nsBlockFrame::GetOverflowLines() const
FrameLines* prop =
static_cast<FrameLines*>(Properties().Get(OverflowLinesProperty()));
NS_ASSERTION(prop && !prop->mLines.empty() &&
prop->mLines.front()->GetChildCount() == 0 ? prop->mFrames.IsEmpty() :
prop->mLines.front()->mFirstChild == prop->mFrames.FirstChild(),
"value should always be stored and non-empty when state set");
return prop;
@ -4478,6 +4479,7 @@ nsBlockFrame::RemoveOverflowLines()
FrameLines* prop =
static_cast<FrameLines*>(Properties().Remove(OverflowLinesProperty()));
NS_ASSERTION(prop && !prop->mLines.empty() &&
prop->mLines.front()->GetChildCount() == 0 ? prop->mFrames.IsEmpty() :
prop->mLines.front()->mFirstChild == prop->mFrames.FirstChild(),
"value should always be stored and non-empty when state set");
RemoveStateBits(NS_BLOCK_HAS_OVERFLOW_LINES);