Closed
Bug 1177927
Opened 10 years ago
Closed 10 years ago
Simplify frame-list counting in nsPrintEngine to use GetLength()
Categories
(Core :: Printing: Output, defect)
Core
Printing: Output
Tracking
()
RESOLVED
FIXED
mozilla41
People
(Reporter: dholbert, Assigned: dholbert)
Details
Attachments
(1 file)
1.30 KB,
patch
|
tnikkel
:
review+
|
Details | Diff | Splinter Review |
While fixing bug 1177925, I noticed that nsPrintEngine walks a nsFrameList purely to count the number of frames in it.
It should simply use nsFrameList::GetLength for this.
Assignee | ||
Updated•10 years ago
|
Summary: Simplify child-list counting in nsPrintEngine to use GetLength() → Simplify frame-list counting in nsPrintEngine to use GetLength()
Assignee | ||
Comment 1•10 years ago
|
||
Here's the patch. This just replaces a loop with a call to GetLength(). (I also removed "first" from the comment, because it's not actually "first"; it's rather the last thing that we do.)
Attachment #8626797 -
Flags: review?(tnikkel)
Updated•10 years ago
|
Attachment #8626797 -
Flags: review?(tnikkel) → review+
Assignee | ||
Updated•10 years ago
|
Flags: in-testsuite-
Assignee | ||
Comment 4•10 years ago
|
||
Comment on attachment 8626797 [details] [diff] [review]
fix v1
>+ // count the total number of pages
>+ aCount = aSeqFrame->PrincipalChildList()->GetLength();
Er, PrincipalChildList() returns a nsFrameList&, so that should be .GetLength(), not ->. (I could've sworn I built this locally earlier in the week, but I guess not.)
Just pushed a followup to fix that.
Comment 5•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/052df7a415f1
https://hg.mozilla.org/mozilla-central/rev/30e8c73f674e
Status: NEW → RESOLVED
Closed: 10 years ago
status-firefox41:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
You need to log in
before you can comment on or make changes to this bug.
Description
•