Hacking around broken test or tree code for now to fix orange in CLOSED TREE

This commit is contained in:
Boris Zbarsky 2010-08-06 14:38:21 -04:00
Родитель bb5c570a83
Коммит d2a229d925
1 изменённых файлов: 14 добавлений и 3 удалений

Просмотреть файл

@ -120,15 +120,26 @@ nsTreeBoxObject::GetTreeBody(bool aFlushLayout)
// have to do this before checking for our cached mTreeBody, since
// it might go away on style flush, and in any case if aFlushLayout
// is true we need to make sure to flush no matter what.
nsIFrame* frame = GetFrame(aFlushLayout);
if (!frame)
return nsnull;
// XXXbz except that flushing style when we were not asked to flush
// layout here breaks things. See bug 585123.
nsIFrame* frame;
if (aFlushLayout) {
frame = GetFrame(aFlushLayout);
if (!frame)
return nsnull;
}
if (mTreeBody) {
// Have one cached already.
return mTreeBody;
}
if (!aFlushLayout) {
frame = GetFrame(aFlushLayout);
if (!frame)
return nsnull;
}
// Iterate over our content model children looking for the body.
nsCOMPtr<nsIContent> content;
FindBodyElement(frame->GetContent(), getter_AddRefs(content));