Closed Bug 408182 Opened 17 years ago Closed 17 years ago

Random width of printed borders of table with border-collapse

Categories

(Core :: Layout, defect, P3)

PowerPC
macOS
defect

Tracking

()

RESOLVED FIXED

People

(Reporter: anlan, Assigned: roc)

Details

(Keywords: regression)

Attachments

(3 files)

Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en-US; rv:1.9b3pre) Gecko/2007121204 Minefield/3.0b3pre

Printing a table with border-collapse gives unexpected results. Will attach testcase and image.

Print in Fx2 lost one cellborder but all others are there and have the same width. 

Print in 3.0b3pre loses several borders and the others are of several different widths. Much worse in current Fx3 than Fx2 that is.
Attached file Medium testcase
Pretty random table which exhibits several problems.
dupe of bug 407031 ?
yeah probably, but this bug makes it clearer there's a regression.
Component: Printing → Layout
Flags: blocking1.9?
Keywords: regression
QA Contact: printing → layout
Flags: blocking1.9? → blocking1.9+
Priority: -- → P3
Assignee: nobody → roc
I get more or less the same preview with a nightly from 2007-04-01. 2007-01-01 refuses preview and prints on paper with more borders but some variation in thickness, while a 2007-02-16 build crashes on print. 
Here's what happens here --- actually in the testcase https://bugzilla.mozilla.org/attachment.cgi?id=291725, drawing the top horizontal line:
-- nsCSSRendering's DrawSolidBorderSegment tries to fill a rectangle (0,120,6120,60). That's 1 CSS pixel high.
-- nsThebesRenderingContext is at 80 appunits per CSS pixel. I guess this is because PDF is 72dpi. The gfxRect r is therefore (0,1.5,76.5,0.75).
-- gfxContext::Rectangle snaps to device pixels and gets (42,44,77,0). Poof, nothing is going to be drawn.

Either UserToDevicePixelSnapped should be a no-op for certain kinds of surfaces, or we should give those surfaces 1 appunit per dev pixel (5760dpi) and scale everything down by a factor of 80, and do something about font rasterization :-(
Attached patch fixSplinter Review
I must say I'm not a big fan of this GetFlags API, or the operator hack it's been used for, but it does the job here.
Attachment #295333 - Flags: review?(pavlov)
Comment on attachment 295333 [details] [diff] [review]
fix

I agree, but then again, this is exactly the type of thing that it works well for, hacky as it may be...
Attachment #295333 - Flags: review?(pavlov) → review+
checked in
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Flags: in-testsuite?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: