Closed Bug 361844 Opened 18 years ago Closed 18 years ago

Printing cleanup

Categories

(Core :: Printing: Output, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: sharparrow1, Assigned: sharparrow1)

References

Details

Attachments

(2 files)

Patch coming up shortly.

Changes:

1. Less interdependence between nsPrintEngine and nsDocumentViewer.  nsPrintEngine now manages its own presentation/destroys its own presentation.  This has the side-effect of making exiting print preview faster than it used to be in the common case of a page with no frames or plugins.  Also, the EndObservingDocument call is now always near the Destroy call for presshells.

2. Allow subdocuments without display presshells to get printed.  There actually wasn't any fundamental reason they weren't working before; it's just that the nsPrintObject code to get the document failed when there wasn't a presshell.

3. Minor bugfix to allow the print preview navigation buttons to work while printing.  Caused by an odd check in PrintPreviewNavigate().

4. Extremely minor bug with printing selection when the HTML body tag isn't at the origin of the document (not normally visible because the body is almost always at the origin). The bug was actually caused by extra code which incorrectly attempted to compensate for the location of the body relative to its parent.

5. Getting rid of extra/duplicate member variables.

6. Getting rid of useless method parameters.

7. Other misc cleanup.
Attached patch PatchSplinter Review
Attachment #246577 - Flags: review?(roc)
Comment on attachment 246577 [details] [diff] [review]
Patch

Sure would be nice if GetDisplayTitleAndURL and GetDocumentTitleAndURL etc used string classes instead of malloc'd character pointers!

This is a bit of a rubber-stamp because really you're the only person who knows this code. At some stage --- maybe when you're "done" with fixing this up --- it would be really really great if you could write some documentation for the print engine.
Attachment #246577 - Flags: superreview+
Attachment #246577 - Flags: review?(roc)
Attachment #246577 - Flags: review+
I think I'm going to try and figure out why exactly this fixes bug 361941 before I check this in; I'm worried there might be some deeper event problems.
Attached patch Updated to trunkSplinter Review
I'm going to check this in now.

I decided that for the moment the event stuff is not a big deal; the only thing it breaks is using the arrow keys to scroll the document in print preview, as far as I can tell, so I'm not going to worry about it for the moment.  I'll make sure to keep the printing stuff moving so that it gets fixed in the near future.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Depends on: 363770
Depends on: 365003
Depends on: 365578
Depends on: 363265
Depends on: 372248
Blocks: 361941
Depends on: 398269
(In reply to comment #3)
> I think I'm going to try and figure out why exactly this fixes bug 361941
> before I check this in; I'm worried there might be some deeper event problems.
> 

See https://bugzilla.mozilla.org/show_bug.cgi?id=361941#c3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: