Closed
Bug 383195
Opened 18 years ago
Closed 17 years ago
Repeatable footers don't work on trunk in Print/Print-Preview
Categories
(Core :: Layout: Tables, defect, P2)
Tracking
()
RESOLVED
FIXED
People
(Reporter: bzbarsky, Assigned: roc)
References
()
Details
(Keywords: regression, Whiteboard: [dbaron-1.9:RwCr])
Attachments
(2 files)
12.67 KB,
patch
|
bernd_mozilla
:
review+
dbaron
:
superreview+
|
Details | Diff | Splinter Review |
2.77 KB,
text/html
|
Details |
The testcase in the URL bar fails on trunk. It seems to work as of right before 1.8 branched. I have no idea when it broke; I tried to find a range, but printing seems to have been completely busted on trunk for most of 2006. Or at least the nightly builds I have from that time don't even paginate this testcase in print preview, and don't print it when I try to print to file.
Someone who's not on Linux might want to look into this, in the hope that things are better elsewhere.
Flags: blocking1.9?
Martijn, I suspect this is mine, do you have time to find a regression range?
Comment 2•18 years ago
|
||
I actually have this breaking between 20061207 and 20061208, which would point to the reflow branch or maybe bug 362708
bonsai query:
http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=all&branch=HEAD&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=2006-12-07&maxdate=2006-12-08+04&cvsroot=%2Fcvsroot
(This is also on linux, by the way)
Comment 3•18 years ago
|
||
Thanks for finding the regression range, dophinling.
This doesn't seem to be a problem on branch.
However, on print preview, when I change to Landscape format, I don't get a footer on the second page. I can see that problem even on branch. I guess I should file a new bug on that?
>This doesn't seem to be a problem on branch.
This rules out bug 362708 as it landed on the branches.
note to myself: verify where the functionality that got removed here http://bonsai.mozilla.org/cvsview2.cgi?diff_mode=context&whitespace_mode=show&root=/cvsroot&subdir=mozilla/layout/tables&command=DIFF&root=/cvsroot&file=nsTableFrame.cpp&rev1=3.665&rev2=3.666#87
is now
Blocks: reflow-refactor
Flags: blocking1.9? → blocking1.9+
Updated•17 years ago
|
Summary: Repeatable footers don't work on trunk → Repeatable footers don't work on trunk in Print/Print-Preview
Comment 6•17 years ago
|
||
During Print-Preview, I'm just seeing one footer (on the last page) on trunk builds for *both* Windows and Linux.
(This is instead of one footer per page, which would be correct.)
Marking as OS: All.
OS: Linux → All
Comment 7•17 years ago
|
||
(In reply to comment #3)
> when I change to Landscape format, I don't get a
> footer on the second page. I can see that problem even on branch. I guess I
> should file a new bug on that?
Filed bug 389748 for this separate branch issue.
I had a discussion with bz on IRC (#developers)
The agreement was that the removed code needs to be reimplemented but the reflow state should not be used to keep track of the necessary pointers and sizes. Local variables should be used instead.
Whiteboard: [dbaron-1.9:RwCr]
Assignee | ||
Comment 10•17 years ago
|
||
I'll take this since we should do it soon, there will probably be regressions or other followup work.
Assignee: nobody → roc
Assignee | ||
Comment 11•17 years ago
|
||
nsTableFrame::Reflow contains
if (isPaginated && !GetPrevInFlow() && (NS_UNCONSTRAINEDSIZE == aReflowState.availSize.height)) {
nscoord height = presContext->GetPageSize().height;
// don't repeat the thead or tfoot unless it is < 25% of the page height
if (thead && height != NS_UNCONSTRAINEDSIZE) {
thead->SetRepeatable(IsRepeatable(*thead, height));
}
if (tfoot && height != NS_UNCONSTRAINEDSIZE) {
tfoot->SetRepeatable(IsRepeatable(*tfoot, height));
}
}
I can't figure out how this ever got executed. When did we do an unconstrained-height reflow with pagination enabled? I thought perhaps nsTableFrame::Reflow did an extra unconstrainted-height reflow to make this happen, but I can't find any such thing in the pre-reflow-branch-landing code.
Assignee | ||
Updated•17 years ago
|
Updated•17 years ago
|
Reporter | ||
Updated•17 years ago
|
Reporter | ||
Comment 12•17 years ago
|
||
aReflowState is not an nsHTMLReflowState there. It's a nsTableReflowState.
See http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/layout/tables/nsTableFrame.cpp&rev=3.616.6.12&mark=1937-1940,1944-1946#1924 for the place this reflow is coming from.
Assignee | ||
Comment 13•17 years ago
|
||
My first go at getting this working.
The approach is a bit different from what we used to do. I'm reflowing headers and footers at the start of ReflowChildren to determine whether we should repeat them, and if a footer should be repeated, how much height it needs.
Seems to work OK in my limited testing.
I'm assuming that reflowing them "out of order" is OK, if suboptimal, because we reorder rowgroups etc anyway. The risky part here I think is that we reflow with unconstrained height and then reflow again with constrained height. I wonder if there's something I need to do to make sure the second reflow happens correctly.
Attachment #287499 -
Flags: review?(bernd_mozilla)
Assignee | ||
Updated•17 years ago
|
Whiteboard: [dbaron-1.9:RwCr] → [dbaron-1.9:RwCr][needs review]
Assignee | ||
Comment 14•17 years ago
|
||
The special-height reflow stuff does an unconstrained height reflow followed by a constrained height reflow, for the entire table, which suggests what I'm doing should be OK.
Assignee | ||
Updated•17 years ago
|
Priority: -- → P1
Comment 15•17 years ago
|
||
Moving this to P2, but there's no reason why we won't take this during beta 2. We will accept this if the patch is ready.
Priority: P1 → P2
Comment 16•17 years ago
|
||
Comment on attachment 287499 [details] [diff] [review]
patch v1
> // XXXroc shouldn't we add a repeated footer here?
I think yes, it would otherwise not create a footer for a table where every row is encapsulated in a row group or at least the row that does not fit, is such a encapsulated row.
Attachment #287499 -
Flags: review?(bernd_mozilla) → review+
Assignee | ||
Comment 17•17 years ago
|
||
Comment on attachment 287499 [details] [diff] [review]
patch v1
I'll file a followup bug about repeating a footer in that case, rather than fix it here now.
Attachment #287499 -
Flags: superreview?(dbaron)
Comment 18•17 years ago
|
||
Updated•17 years ago
|
Whiteboard: [dbaron-1.9:RwCr][needs review] → [dbaron-1.9:RwCr][needs sr dbaron]
Comment on attachment 287499 [details] [diff] [review]
patch v1
sr=dbaron, although I suspect isPaginated isn't really the right test and we'll eventually want to do this for multi-column as well.
Attachment #287499 -
Flags: superreview?(dbaron) → superreview+
Assignee | ||
Comment 20•17 years ago
|
||
Getting this to work in dynamic contexts is a really big nasty project. I don't know when if ever we'll get around to doing that with our current continuation architecture.
Assignee | ||
Comment 21•17 years ago
|
||
checked in
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Whiteboard: [dbaron-1.9:RwCr][needs sr dbaron] → [dbaron-1.9:RwCr]
Updated•17 years ago
|
Flags: in-testsuite?
You need to log in
before you can comment on or make changes to this bug.
Description
•