зеркало из https://github.com/mozilla/pjs.git
Bug 542620. Fix incorrect usage of nsFrameList. r=bzbarsky
This commit is contained in:
Родитель
2aeaa841bd
Коммит
7394b15683
|
@ -1273,10 +1273,9 @@ IsFrameAllowedInTable(nsIAtom* aType)
|
|||
#endif
|
||||
|
||||
static PRBool
|
||||
AnyTablePartHasBorderOrBackground(const nsFrameList& aFrames)
|
||||
AnyTablePartHasBorderOrBackground(nsIFrame* aStart, nsIFrame* aEnd)
|
||||
{
|
||||
for (nsFrameList::Enumerator e(aFrames); !e.AtEnd(); e.Next()) {
|
||||
nsIFrame* f = e.get();
|
||||
for (nsIFrame* f = aStart; f != aEnd; f = f->GetNextSibling()) {
|
||||
NS_ASSERTION(IsFrameAllowedInTable(f->GetType()), "unexpected frame type");
|
||||
|
||||
if (f->GetStyleVisibility()->IsVisible() &&
|
||||
|
@ -1289,7 +1288,7 @@ AnyTablePartHasBorderOrBackground(const nsFrameList& aFrames)
|
|||
if (cellFrame)
|
||||
continue;
|
||||
|
||||
if (AnyTablePartHasBorderOrBackground(f->GetChildList(nsnull)))
|
||||
if (AnyTablePartHasBorderOrBackground(f->GetChildList(nsnull).FirstChild(), nsnull))
|
||||
return PR_TRUE;
|
||||
}
|
||||
|
||||
|
@ -1326,8 +1325,8 @@ nsTableFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
// Specific visibility decisions are delegated to the table background
|
||||
// painter, which handles borders and backgrounds for the table.
|
||||
if (aBuilder->IsForEventDelivery() ||
|
||||
AnyTablePartHasBorderOrBackground(nsFrameList(this, GetNextSibling())) ||
|
||||
AnyTablePartHasBorderOrBackground(mColGroups)) {
|
||||
AnyTablePartHasBorderOrBackground(this, GetNextSibling()) ||
|
||||
AnyTablePartHasBorderOrBackground(mColGroups.FirstChild(), nsnull)) {
|
||||
item = new (aBuilder) nsDisplayTableBorderBackground(this);
|
||||
nsresult rv = aLists.BorderBackground()->AppendNewToTop(item);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
|
Загрузка…
Ссылка в новой задаче