I've been working on bug 175879, concerning how paper sizes are presented
to the user. This involves reworking a table of paper sizes built into
mozilla (gfx/src/ps/nsPostScriptObj.h). The table currently contains top,
bottom, left & right margins for each paper size, and while studying
how those values are used I've run into a problem.

As far as I can tell, mozilla formerly had two places to set margins:

1) File->Print->Properties contains margins intended to reflect the
region of the page the printer is capable of printing on. The default
value is currently 0.04in on each edge. Layout uses this as the margin
for the header/footer information (URL, page number, etc.).

2) File->Page Setup->Margins & Header/Footer contains a set of margins
reflecting the user's page layout preference. I think the default here
is 0.5in. Layout uses this as the margin for content.

Bug 130075 was filed claiming that margin #1 was too small. For some
reason none of the comments mentioned the UI for changing this margin,
but a patch was proposed to make the default setting 0.25in. This patch
was rejected, and a third margin was eventually added to the PS module
instead:

3) The table of paper sizes in nsPostScriptObj.h contains a hardcoded set
of top/bottom/left/right margins for each size. In each case the margin
is 0.25in, and the paper width/height reported to layout is reduced by
0.5in to compensate. There is no UI or pref that I'm aware of to override
these values. These are basically a hardcoded "super-margin" which
applies *in addition* to the other two.

(For some reason, the code for this third margin was part of the fix for
bug 132563, and but bug 130075 was never closed.)

As far as the PS module is concerned, this third margin is just
redundant. The original two margins provide all the functionality
needed, and they have UIs for the user to make adjustments. The cleanest
approach would be to remove this hardcoded margin and adjust the margin #1
default to something more suitable, as originally proposed in bug
130075.
-- 
Kenneth Herron
"Netscape pollution must be eradicated."
    -- Jeff Raikes, Vice president, Microsoft
_______________________________________________
mozilla-layout mailing list
[EMAIL PROTECTED]
http://mail.mozilla.org/listinfo/mozilla-layout

Reply via email to