Closed Bug 399671 Opened 17 years ago Closed 13 years ago

Print preview scrollbars are too small with a lot of themes

Categories

(Core :: Graphics, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 401213

People

(Reporter: bzbarsky, Unassigned)

References

Details

(Keywords: regression)

This is NOT a duplicate of bug 378272.  See bug 378272 comment 17.

I finally traced down why scrollbar sizes in print preview are wrong over here (11px instead of 15px wide in my theme).  The issue is that the scrollbar sizing uses the device context off the prescontext, which uses a DPI of 72 (see nsThebesDeviceContext::SetDPI in the case when mPrintingSurface and GetType() is SurfaceTypePS).  So we end up using 80 app units per dev pixel.... but the stylesheet parsing code that parsed the style rule uses 60 app units per dev pixel, so everything ends up off by a factor of 3/4.  15 * 3/4 = 11.

I'm not really sure how to address this, to be honest.  We need the DPI to be 72 in print preview so that the page looks right, correct?

I have no idea why native-themed scrollbars don't have this problem.  Presumably they specify their sizes in device pixels, not CSS pixels, so don't suffer from the broken CSS-to-device conversion here.
Flags: blocking1.9?
Summary: Print preview scrollbars are too small → Print preview scrollbars are too small with a lot of themes
> We need the DPI to be 72 in print preview so that the page looks right, correct?

Yes.

Ultimately the right thing to do is to make the print preview content an IFRAME sized to the length of the previewed document and have the scrollbar belong to the chrome document. But I wouldn't want to try to do that for 1.9. In fact, I don't think this bug should block 1.9, unless someone thinks of a simple way to fix it.
> Ultimately the right thing to do is to make the print preview content an IFRAME

That's the best solution I've come up with too...  And I agree that this is not 1.9 material, and that if we don't think of a simple fix we shouldn't block.  I do think this should be wanted; if we can avoid breaking various themes it would be nice.
Flags: blocking1.9? → blocking1.9-
Whiteboard: [wanted-1.9]
Flags: wanted1.9+
Whiteboard: [wanted-1.9]
Isn't this related to bug 401213 which is about zoomed pages and non-native themes?
Depends on: 401213
In fact, that bug subsumes this bug.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.