Closed Bug 1697963 Opened 3 years ago Closed 3 years ago

Images that have not been decoded before in print preview don't reliably show up because of async decode.

Categories

(Core :: Fuzzing, defect)

defect

Tracking

()

RESOLVED FIXED
88 Branch
Tracking Status
firefox88 --- fixed

People

(Reporter: tsmith, Assigned: emilio)

References

Details

Attachments

(3 files)

I guess another description could be "window.print() does not always block".
I don't have a test case for this but I've seen it a few times now.

I'm running with prefs:
print.always_print_silent=true
print.print_to_file=true
print.print_to_filename='/dev/null'
print.show_print_progress=true

Required results:
window.print() is called and script execution is blocked while print is in progress (print progress bar is shown if pref enabled).

Actual results:
window.print() is called and script execution continue while the print is in progress. Test cases continue to run and close. This will break sync with the framework if a call to window.print() causes a failure before it is complete but after the test case has been closed.

I'm not sure what the best way forward here is since this seems like the correct functionality for an end user.

Should we make window.print() block on fuzzing builds or add a pref?
Should we add an additional fuzzing only function to FuzzingFunctions?
Any other ideas? I think I prefer the pref option.

I think both options would be reasonable. I can look into the pref.

Flags: needinfo?(emilio)

I think this is what's supposed to happen, otherwise this can cause
invalidation issues because UpdateDrawResult etc for fallback images
becomes a no-op...

Assignee: nobody → emilio
Status: NEW → ASSIGNED

If GetAnimated fails when we're getting a static request, because e.g.
the image is not yet fully loaded, we still create a frozen image, but
in that case we can do better and avoid the WR fallback.

Depends on D108197

Even with the above fixes, this is not enough to fix all the
invalidation issues, because frame update notifications arrive for the
proxies of the inner image, not for the frozen image.

The simpler thing to do here is sync-decoding for print preview like we
do for print documents.

I think imgRequestProxyStatic is the only thing that can suffer from
these issues (because other ImageOps users like image-orientation don't
create a fake proxy).

Depends on D108198

Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8cb718008dd5
Properly override WebRenderUserData::GetGeometry for fallback. r=aosmond
https://hg.mozilla.org/integration/autoland/rev/bc0e95a3d1b0
Handle non-animated frozen images better, avoiding WR fallback. r=aosmond
https://hg.mozilla.org/integration/autoland/rev/b2249f5ef462
Sync decode for print preview. r=aosmond

Err, these patches landed with the wrong bug number, sorry, should've landed with bug 1697790. Will retitle this bug and clone it into a new one :(

Flags: needinfo?(emilio)
Blocks: 1698175
No longer blocks: 1698175
Summary: Print status bar dialog sometimes persists across multiple fuzzing iterations → Images that have not been decoded before in print preview don't reliably show up because of async decode.
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 88 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: