Clean up determination of page numbers
Categories
(Core :: Printing: Output, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox81 | --- | fixed |
People
(Reporter: dholbert, Assigned: dholbert)
References
Details
Attachments
(4 files)
We use a somewhat clumsy mechanism for computing & handling page numbers and the page-count.
In support of bug 1631452 and bug 1659005, let's clean that up a bit.
Assignee | ||
Comment 1•4 years ago
|
||
We already do this static_cast'ing before this patch, for a single
nsPageFrame-specific method call. This patch just captures the result of that
static_cast in a reusable variable, so that I can easily add another
nsPageFrame-specific function call in the next patch of this patch series.
(We can be confident this casting is valid, because we only ever give
PrintedSheetFrame this one type of child frame.)
Assignee | ||
Comment 2•4 years ago
|
||
(Two more patches coming, in phabricator processing limbo right now)
These patches don't represent any functional changes, given the current state of our tree. They should not impact behavior at this point.
They are meant to simplify code & prevent bugs that would crop up once we have more than one nsPageFrame on a given PrintedSheetFrame, which I intend to support in bug 1631452 and bug 1659005. Once we have multiple nsPageFrames per PrintedSheetFrame, we cannot simply count the pages by counting the number of nsPageSequenceFrame child-frames anymore, since strictly speaking that gives us the number of sheets.
In particular, they prevent us from reporting e.g. "Page 7 of 3" on page footers (where "3" is mistakenly a sheet count rather than a page count).
Assignee | ||
Comment 3•4 years ago
|
||
Depends on D87695
Assignee | ||
Comment 4•4 years ago
|
||
Before this patch stack, nsPageSequenceFrame and every nsPageFrame each
individually tracked the number of pages.
As of the previous patch, we've coalesced the nsPageFrame variables into a
single variable that lives on nsSharedPageData. This patch here replaces
nsPageSequenceFrame's member-var with that nsSharedPageData variable, too.
Depends on D87696
Comment 5•4 years ago
|
||
I am going to land these patches once after I've confirmed it's ok on a try run.
Assignee | ||
Comment 6•4 years ago
|
||
Thank you!!
Comment 7•4 years ago
|
||
Okay, the result looks good. https://treeherder.mozilla.org/#/jobs?repo=try&revision=0bcb792a68bcdb53a7779140ace670801c69aa20
Assignee | ||
Comment 9•4 years ago
|
||
Comment 10•4 years ago
|
||
Comment 11•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/5fe1dd9f3bad
https://hg.mozilla.org/mozilla-central/rev/d64d22e30483
https://hg.mozilla.org/mozilla-central/rev/c3fe601df6e1
Comment 12•4 years ago
|
||
bugherder |
Description
•