Closed
Bug 374141
Opened 18 years ago
Closed 17 years ago
Borders of various form controls are not rendered on print preview
Categories
(Core :: Print Preview, defect, P2)
Tracking
()
VERIFIED
FIXED
People
(Reporter: martijn.martijn, Assigned: roc)
References
Details
(Keywords: regression, testcase)
Attachments
(4 files)
See testcase.
When looking at the testcase in print preview, I don't seen any border of the various form controls. I'm on windowsXP, using the classic theme.
This regressed between 2007-02-13 and 2007-02-14:
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=2007-02-13+04&maxdate=2007-02-14+08&cvsroot=%2Fcvsroot
I think a regression from bug 369834.
Comment 1•18 years ago
|
||
Yeah, actually a regression from bug 177805. It's just that now it affects print preview as well as printing. The issue is simply that theme renderig isn't getting scaled up for printing; therefore, the borders are too thin to be visible.
Reassigning to self, but I'm not planning on working on this for a while.
Assignee: printing → sharparrow1
Comment 2•18 years ago
|
||
Comment 3•18 years ago
|
||
Not only do the borders not show, but the text is huge and overlapping. I haven't used print preview in a while, so don't know when this happened. My only extensions are Adblock and Paste and Go.
Reporter | ||
Comment 4•18 years ago
|
||
(In reply to comment #3)
> Not only do the borders not show, but the text is huge and overlapping.
That's bug 372838.
Reporter | ||
Comment 5•17 years ago
|
||
Also, the print output doesn't show any borders on the testcase. This seems serious enough to be blocking 1.9 for me.
Flags: blocking1.9?
Assignee | ||
Updated•17 years ago
|
Assignee: sharparrow1 → nobody
Comment 6•17 years ago
|
||
Eli can you take a look at this since it was a regression from your check-in?
Assignee: nobody → sharparrow1
Flags: blocking1.9? → blocking1.9+
Priority: -- → P3
Assignee | ||
Comment 8•17 years ago
|
||
I tried this out. Some borders are missing at some scale factors (usually when we're shrinking) --- that's just because we snap to pixels when drawing. If you scale up enough the borders are there.
I'm in a VM, but if I set up a dummy Postscript printer and use it to generate Postscript, the borders seem to be there too.
Martijn, am I missing something? Try scaling print preview up to 200% or 400%? Can you give me a screenshot of your print preview? Or has this been fixed recently?
Reporter | ||
Comment 9•17 years ago
|
||
I tried print previewing to 200%, in that case, the majority of the borders are there.
Printing seems to be busted again for me in current trunk build, nothing shows up on the page.
Reporter | ||
Comment 10•17 years ago
|
||
This is what I see on print preview with 200% zoom.
Assignee | ||
Comment 11•17 years ago
|
||
In my test, print DPI is 600 and screen DPI is 96, so print preview scales everything by 0.16. When we zoom by 200%, everything is scaled by 0.32. When we paint a native-themed widget, we paint it just as a large widget scaled down by 0.32 --- so a 1px device-pixel theme border becomes 1/300 of an inch, which is why borders seem thin and often disappear on the screen.
One way to fix this would be to make "device pixels" for printing bigger. That's not a great solution, but maybe it's the best available. Actually I'm not sure how we get device pixels that small for printing in the first place, we're supposed to be using 72dpi...
Assignee | ||
Comment 12•17 years ago
|
||
Oh, Windows printing just uses the dpi of the printer.
I'll see if I can change the Windows printing DPI to 72.
Assignee | ||
Comment 13•17 years ago
|
||
That requires code changes in multiple places to adjust the surface size, maybe risky.
As an alternative, I'm thinking of hacking nsNativeThemeWin to scale theme borders by some amount.
Assignee | ||
Comment 14•17 years ago
|
||
This seems to work and it's a small patch, although it feels a little scary.
Attachment #301615 -
Flags: review?(pavlov)
Assignee | ||
Updated•17 years ago
|
Whiteboard: [needs review]
Assignee | ||
Comment 15•17 years ago
|
||
There's a bit of a problem; the device pixel size not only affects theme rendering, but also font metrics and character placement because GDI and Uniscribe return all glyph positions and text measurements in device pixels. So 72dpi isn't good for Windows because character positions get aligned to 72dpi and that makes glyph positioning look chunky.
I'd change the print dpi to 144 before checking in ... that will be more forgiving for text but still let native theme pixels be reasonably large.
A longer-term fix probably requires us to modify nsNativeThemeWin so that when the device pixel size is different from the screen's device pixel size, we scale all theme drawing and measurement to suit. That would be quite a lot of risky work. We might decide to do that on all platforms, in fact.
Updated•17 years ago
|
Priority: P3 → P2
Assignee | ||
Comment 16•17 years ago
|
||
OK Stuart, you marked this P2, does that mean you're going to review the patch? :-)
Comment 17•17 years ago
|
||
Comment on attachment 301615 [details] [diff] [review]
fix
this patch scares me, but lets go for it.
Attachment #301615 -
Flags: review?(pavlov) → review+
Assignee | ||
Comment 18•17 years ago
|
||
checked in
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•17 years ago
|
Whiteboard: [needs review]
Comment 19•17 years ago
|
||
This looks like it caused bug 418428. I don't have a printer, so I can't confirm the bug, but someone should probably take a look at it since it has a range and a testcase.
Reporter | ||
Updated•17 years ago
|
Status: RESOLVED → VERIFIED
Comment 20•17 years ago
|
||
i cannot verify this bug, because i still see problems with the border rendering on print preview, i filed Bug 432739 for this.
You need to log in
before you can comment on or make changes to this bug.
Description
•