Beginning on October 25th, 2016, Persona will no longer be an option for authentication on BMO. For more details see Persona Deprecated.
Last Comment Bug 467444 - Missing spanning rows in print preview at page break.
: Missing spanning rows in print preview at page break.
Product: Core
Classification: Components
Component: Printing: Output (show other bugs)
: Trunk
: All All
: -- normal with 1 vote (vote)
: mozilla11
Assigned To: Bernd
: Jet Villegas (:jet)
Depends on:
  Show dependency treegraph
Reported: 2008-12-01 16:16 PST by Julien Laurent
Modified: 2011-12-01 12:19 PST (History)
2 users (show)
bernd_mozilla: in‑testsuite+
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

zipped original testcase (16.48 KB, application/zip)
2008-12-03 10:14 PST, Daniel Holbert [:dholbert] (PTO Oct 21-25)
no flags Details
printed PDF demonstrating problem. (77.23 KB, application/pdf)
2008-12-03 10:20 PST, Daniel Holbert [:dholbert] (PTO Oct 21-25)
no flags Details
reduced testcase (786 bytes, text/html)
2011-11-27 12:57 PST, Bernd
no flags Details
patch (3.26 KB, patch)
2011-11-28 12:57 PST, Bernd
dholbert: review+
Details | Diff | Splinter Review

Description Julien Laurent 2008-12-01 16:16:18 PST
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv: Gecko/2008102920 Firefox/3.0.4
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv: Gecko/2008102920 Firefox/3.0.4

In a table with a page break occuring in a rowspan=5, spanning rows are missing
as the first spanned row. The Thead is correct though.
It's a very annoying problem for me as I don't see any easy workaround (highly dynamic content).

Reproducible: Always

Steps to Reproduce:
1.Open the link in Firefox
2.Launch print preview in landscape mode (no margins)
Actual Results:  
Rows are missing at the beginning of the second page.

Expected Results:  
10 cells with rowspan=5 and one more row (named AUTO) like the other entries.

Prints ok in IE (surprisingly o_O).
Comment 1 Julien Laurent 2008-12-03 01:21:17 PST
In fact better Expected Results would be a page break before the first rowspan of the block causing the page break.
Comment 2 Daniel Holbert [:dholbert] (PTO Oct 21-25) 2008-12-03 10:13:58 PST
Confirmed that rows are missing. I'll attach a printed PDF demonstrating the issue.

A minimized testcase would be awesome here.
Comment 3 Daniel Holbert [:dholbert] (PTO Oct 21-25) 2008-12-03 10:14:32 PST
Created attachment 351210 [details]
zipped original testcase

Here's the URL, saved & zipped, in case it goes down at some point in the future.
Comment 4 Daniel Holbert [:dholbert] (PTO Oct 21-25) 2008-12-03 10:20:59 PST
Created attachment 351213 [details]
printed PDF demonstrating problem.

In the 3rd column, the original page has rows labeled "Q1" through "Q6", but the printed output is missing the row for "Q4". (it jumps from Q3 on page 1 to Q5 on page 2)

Where this row should be, there's just blank space, except in the rightmost column.
Comment 5 Daniel Holbert [:dholbert] (PTO Oct 21-25) 2008-12-03 10:22:08 PST
I'm testing using
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1b3pre) Gecko/20081203 Shiretoko/3.1b3pre
 --> Platform=All
Comment 6 Bernd 2011-11-27 12:57:08 PST
Created attachment 577159 [details]
reduced testcase
Comment 7 Bernd 2011-11-27 23:57:11 PST
just from code inspection:

the code in SplitSpanningCells looks only for completeness but not for truncated.

So we happily split a truncated cell, but the image is not splittable
Comment 8 Bernd 2011-11-28 12:57:24 PST
Created attachment 577335 [details] [diff] [review]
Comment 10 Bernd 2011-11-28 21:52:41 PST
Comment on attachment 577335 [details] [diff] [review]

The patch lacks a little bit content but with CVS blame its more obvious,1254,1256,1261#1252

This code is from Chris :-)
Comment 11 Bernd 2011-11-28 21:54:26 PST
Comment 7 is bogus, it only highlights that this code was written in a hurry and is  difficult to read. But I have no idea how to do it better.
Comment 12 Daniel Holbert [:dholbert] (PTO Oct 21-25) 2011-11-29 00:51:51 PST
Comment on attachment 577335 [details] [diff] [review]

Patch looks reasonable, given highlighted mxr link from comment 10 (thanks for that).

A few nits on the test:

>+++ b/layout/reftests/bugs/467444-1-ref.html
>+div.spacer {
>+             height: 5px; 
>+             width: 10px;}
>+img, td.spacer {height: 140px; 
>+                width: 30px;}

Nix the straggling space character at the end of the line, after both "height" declarations.  (both in testcase & reference case)

This chunk also could stand some other spacing beautification, but I won't hold you to that.

>\ No newline at end of file

Add newline at end of file to fix this ^^.
(affects both testcase & reference case)

r=me with the above
Comment 14 Matt Brubeck (:mbrubeck) 2011-12-01 11:22:48 PST

Note You need to log in before you can comment on or make changes to this bug.