зеркало из https://github.com/mozilla/gecko-dev.git
Bug 432068. Fix stupid assumption in listbox code. r+sr=roc
This commit is contained in:
Родитель
3c3a952c53
Коммит
2359dacea5
|
@ -1208,20 +1208,24 @@ nsListBoxBodyFrame::GetNextItemBox(nsIBox* aBox, PRInt32 aOffset,
|
|||
// There is a content node that wants a frame.
|
||||
nsIContent *nextContent = parentContent->GetChildAt(i + aOffset + 1);
|
||||
|
||||
// Either append the new frame, or insert it after the current frame
|
||||
PRBool isAppend = result != mLinkupFrame && mRowsToPrepend <= 0;
|
||||
nsIFrame* prevFrame = isAppend ? nsnull : aBox;
|
||||
|
||||
nsPresContext* presContext = PresContext();
|
||||
nsCSSFrameConstructor* fc = presContext->PresShell()->FrameConstructor();
|
||||
fc->CreateListBoxContent(presContext, this, prevFrame, nextContent,
|
||||
&result, isAppend, PR_FALSE, nsnull);
|
||||
result = presContext->GetPresShell()->GetPrimaryFrameFor(nextContent);
|
||||
|
||||
if (result) {
|
||||
if (aCreated)
|
||||
*aCreated = PR_TRUE;
|
||||
} else
|
||||
return GetNextItemBox(aBox, ++aOffset, aCreated);
|
||||
if (!result) {
|
||||
// Either append the new frame, or insert it after the current frame
|
||||
PRBool isAppend = result != mLinkupFrame && mRowsToPrepend <= 0;
|
||||
nsIFrame* prevFrame = isAppend ? nsnull : aBox;
|
||||
|
||||
nsCSSFrameConstructor* fc = presContext->PresShell()->FrameConstructor();
|
||||
fc->CreateListBoxContent(presContext, this, prevFrame, nextContent,
|
||||
&result, isAppend, PR_FALSE, nsnull);
|
||||
|
||||
if (result) {
|
||||
if (aCreated)
|
||||
*aCreated = PR_TRUE;
|
||||
} else
|
||||
return GetNextItemBox(aBox, ++aOffset, aCreated);
|
||||
}
|
||||
|
||||
mLinkupFrame = nsnull;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче