mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1177927: Use nsFrameList::GetLength() instead of manual iteration to count pages in nsPrintEngine. r=tn
This commit is contained in:
parent
5477c03e0c
commit
793c147e27
@ -360,16 +360,10 @@ nsPrintEngine::GetSeqFrameAndCountPagesInternal(nsPrintObject* aPO,
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
// first count the total number of pages
|
||||
aCount = 0;
|
||||
nsIFrame* pageFrame = aSeqFrame->GetFirstPrincipalChild();
|
||||
while (pageFrame != nullptr) {
|
||||
aCount++;
|
||||
pageFrame = pageFrame->GetNextSibling();
|
||||
}
|
||||
// count the total number of pages
|
||||
aCount = aSeqFrame->PrincipalChildList()->GetLength();
|
||||
|
||||
return NS_OK;
|
||||
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user