Closed Bug 617638 Opened 14 years ago Closed 14 years ago

Make printing reftests work for out-of-process content

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: cjones, Unassigned)

References

Details

The problem with the current setup is that
 - print tests enable a special "page mode" which creates a new presshell and window
 - we don't use WIDGET_LAYERS for the page-mode presshell, and instead use a temporary BasicLayerManager to paint to a device context for printing
 - these paints (should!) go to /dev/null as far as the chrome process is concerned, because the temporary layer manager doesn't use shadow layers
 - (any device context originating at a PuppetWidget is just a 1x1 dummy)
 - so, drawWindow() of a <browser remote> doesn't (shouldn't!) see the content painted for the page-mode presshell

The options for fixing this seem to be approximately
 (1) selectively skip printing reftests for remote content.  Simplest, but there are close to 200 tests, and requiring reftest writers to add a |skip-if(browserIsRemote)| to all new printing tests is an unfair burden (guaranteed to burn a try run each time one is added).
 (2) ignore the results of printing reftests for remote content.  A bit trickier than it seems, but not too hard.  Sucky, for baking a workaround into the reftest harness that will need to be excised later.  Attractive for allowing us to change platform code without worrying about failing tests for an unsupported feature (as long as the changes don't cause printing tests to crash).
 (3) make page-mode presshells work well enough out-of-process to pass printing reftests.  Not sure how much work this is.  Doesn't necessarily get us closer to bug 617632, but might be required nonetheless.
 (4) Bug 617632.  Not going to be near the top of anyone's TODO list for a while.

I lean towards (2), much as I hate it.  If (3) isn't too much work and would be largely separate from (4) anyway, that's a clearly better way to go.

I said (should!) and (shouldn't!) above because I've seen images from reftest-ipc fails that seem to show paginated content.  I have absolutely no idea how that could happen, and it's really almost a kind of bug if it is.
Turns out these were failing because of a bug in the test harness.  I still don't know how they're working, but don't look a gift horse in the mouth and so forth.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.