New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 734191 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug


Participants' hotlists:
presentation-api-1ua


Sign in to add a comment

[chrome.tabCapture] Calling window.print() from offscreen tab hangs tab

Project Member Reported by mfo...@chromium.org, Jun 16 2017

Issue description

Chrome Version:  61.0.3132.0 (Developer Build) unknown (64-bit)
OS: Linux (presumably all)

What steps will reproduce the problem?
Call chrome.tabCapture.captureOffscreenTab with a document that calls window.print()

E.g. Run the demo here, start a presentation and send the 'print' message

https://github.com/mfoltzgoogle/samples/tree/temp-test-navigation/presentation-api

What is the expected result?
It's a no-op.

What happens instead?
Offscreen tab is blocked by a modal dialog that the user can't respond to.

---

Notes:

- Presentations started with offscreen tabs should not respond to window.print() per spec; the sandboxed modals flag prevents this but it would be good to add secondary enforcement in the implementation.

- I don't see a way to prevent window.print() from spawning modal dialogs this way via WebContentsDelegate.  This is either a bug in ShouldSuppressDialogs, or requires plumbing a new API. :-/





What happens instead?

Please use labels and text to provide additional information.


For graphics-related bugs, please copy/paste the contents of the about:gpu
page at the end of this report.

 

Comment 1 by mfo...@chromium.org, Jun 16 2017

Labels: PresentationAPI1UA

Comment 2 by mfo...@chromium.org, Jun 16 2017

Labels: -PresentationAPI1UA

Comment 3 by m...@chromium.org, Jun 19 2017

Hmm...There are WebContentsDelegate overrides meant to protect against this, such as: https://cs.chromium.org/chromium/src/chrome/browser/extensions/api/tab_capture/offscreen_tab.cc?rcl=c81a6b895381f8d921cbee83bc814710856cdec2&l=158

However, maybe that method is only used for page-initiated "popup" dialogs? We should see whether there needs to be a delegate override API to prevent any attempts to open user agent dialogs.
Is window.print() triggering Print Preview, or a system print dialog here?
Cc: powerb@chromium.org

Sign in to add a comment