Closed
Bug 369834
Opened 18 years ago
Closed 18 years ago
Get rid of SetAltDevice and friends
Categories
(Core :: Print Preview, defect)
Core
Print Preview
Tracking
()
RESOLVED
FIXED
People
(Reporter: sharparrow1, Assigned: sharparrow1)
References
Details
Attachments
(1 file, 5 obsolete files)
30.79 KB,
patch
|
roc
:
review+
roc
:
superreview+
|
Details | Diff | Splinter Review |
Pretty straightforward bug; posting with WIP. There is one semi-blocking issue for this, though: the print preview pages are *way* too big. I'll figure that out soon and post a real patch for review.
As a side effect, this should fix print preview, which has basically been broken since Thebes landed.
Assignee | ||
Comment 1•18 years ago
|
||
Almost working; still some repainting problems with the scaled print preview, but essentially working.
Unfortunately, it appears that some sort of hinting problem is remaining, because some of the text in the print preview window overlaps.
Attachment #254520 -
Attachment is obsolete: true
Assignee | ||
Comment 2•18 years ago
|
||
I'm not really sure of the nsSimplePageSequence changes. Hopefully, though, that code should go away once we get rid of the current print preview mode.
If we end up needing the PPScale factor for more things, it might be worth naming it something more general. (One thing we might want it for is scaling up native form controls when printing.)
Attachment #254586 -
Attachment is obsolete: true
Attachment #254632 -
Flags: review?(roc)
I think instead of this scaling display list item, I'd prefer nsSimplePageSequenceFrame::BuildDisplayList to just build a "pagesequence display item" that's a leaf, and just calls nsLayoutUtils::PaintFrame to paint the children. That way if we need to enhance DisplayListBuilder in the future (e.g. new setup parameters) we won't have to update this code.
PPScale needs a better name, at least call it Get/SetPrintPreviewScale. And add a comment explaining what it does (scales the display, but not layout, of page contents by that amount). Probably should explain why we need both PageScale and PrintPreviewScale -- the former affects layout, the latter does not (right?).
Other than that, this is good.
Assignee | ||
Comment 4•18 years ago
|
||
Okay, updated to comments. Not quite sure this is what you wanted, but it works.
Attachment #254632 -
Attachment is obsolete: true
Attachment #254917 -
Flags: review?(roc)
Attachment #254632 -
Flags: review?(roc)
Assignee | ||
Comment 5•18 years ago
|
||
Oops, that version had a bunch of extra stuff in there accidentally.
Attachment #254917 -
Attachment is obsolete: true
Attachment #254918 -
Flags: review?(roc)
Attachment #254917 -
Flags: review?(roc)
Do we need to scale the nsSimplePageSequence's background, border and outline? Does it ever even have one? If not, we can avoid mReentrantPainting by calling nsLayoutUtils::PaintFrame for each child frame.
+ friend void PaintPageSequence(nsIFrame* aFrame, nsIRenderingContext* aCtx,
+ const nsRect& aDirtyRect, nsPoint aPt);
+ void PaintPageSequence(nsIRenderingContext& aRenderingContext,
+ const nsRect& aDirtyRect,
+ nsPoint aPt);
Just make PaintPageSequence public, it's easier than this :-).
Assignee | ||
Comment 7•18 years ago
|
||
I guess this works too. I'm kind of wondering about performance, but I guess it's not a serious issue.
Attachment #254918 -
Attachment is obsolete: true
Attachment #254930 -
Flags: review?(roc)
Attachment #254918 -
Flags: review?(roc)
Assignee | ||
Comment 8•18 years ago
|
||
(In reply to comment #6)
> Do we need to scale the nsSimplePageSequence's background, border and outline?
> Does it ever even have one?
It has a solid gray background, but no border or outline.
Attachment #254930 -
Flags: superreview+
Attachment #254930 -
Flags: review?(roc)
Attachment #254930 -
Flags: review+
Assignee | ||
Comment 9•18 years ago
|
||
Checked in.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•