Regression : Unwanted black bar is observed at the top of the PDF page in 'Presentation Mode'.
Reported by
avsha...@etouch.net,
Jul 27 2017
|
||||||
Issue descriptionChrome version : 62.0.3168.0 (Official Build) da2455bea333a5a4bfe61ba1fcfe9e325dc368e1-refs/heads/master@{#489803} 32/64 bit OS : Windows(7,8,10), Mac(10.12.3, 10.12.5, 10.11.6), Linux(14.04 LTS) Precondition : Kindly install 'PDF viewer' extension from - https://chrome.google.com/webstore/detail/pdf-viewer/oemmndcbldboiebfnladdacbdfmadadm?utm_source=chrome-ntp-icon Test URL : http://che.org.il/wp-content/uploads/2016/12/pdf-sample.pdf What steps will reproduce the problem? 1. Launch chrome and open above test URL in two different tabs. 2. In first tab, click on 'Print' icon to open print preview window. 3. Switch to second tab and click on 'Switch to presentation Mode' icon (page switch to full screen mode) and observe the top portion of page. Actual Result : Unwanted black bar is observed at the top of PDF page when switching into 'Presentation Mode'. Expected Result : Black bar should not be seen on PDF page, after switching into 'Presentation Mode'. This is a regression issue broken in ‘M-61’, below is the Manual Regression range and will soon update other info. Good build : 61.0.3136.0 Bad build : 61.0.3137.0
,
Aug 4 2017
I can reproduce this with the extension (maintained by rob@robwu.nl in CC). However, interestingly, it does not reproduce with https://mozilla.github.io/pdf.js/web/viewer.html open in two tabs. Another observation is that if one open http://che.org.il/wp-content/uploads/2016/12/pdf-sample.pdf (automatically gets prefixed with chrome-extension://oemmndcbldboiebfnladdacbdfmadadm/) and open the print dialog, then open http://che.org.il/wp-content/uploads/2016/12/pdf-sample.pdf in another tab, that will say "Waiting for extension PDF Viewer..." on a white page, until one goes back to the other page to close the print dialog. In other words, the print dialog is able to interfere with the other tab in more ways than one. When it doesn't work, the document.fullscreenElement (#viewerContainer) has a computed style top of 32px. There are two bits of CSS involved here, from chrome-extension://oemmndcbldboiebfnladdacbdfmadadm/content/web/viewer.css: #viewerContainer.pdfPresentationMode:-webkit-full-screen { top: 0px; border-top: 2px solid transparent; background-color: #000; width: 100%; height: 100%; overflow: hidden; cursor: none; -webkit-user-select: none; } #viewerContainer { overflow: auto; -webkit-overflow-scrolling: touch; position: absolute; top: 32px; right: 0; bottom: 0; left: 0; outline: none; } For some reason, the top block isn't being applied.
,
Aug 4 2017
It's because the pdfPresentationMode class isn't there. After entering fullscreen, document.getElementById('viewerContainer').className is "". If one doesn't have the print dialog open in the other tab, it's "pdfPresentationMode pdfPresentationModeControls".
,
Aug 4 2017
Looks like when the print dialog is open, no (webkit)fullscreenchange event is fired, so the code that adds the "pdfPresentationMode" class is never reached.
,
Aug 4 2017
OK, mystery solved. The event is scheduled (EnqueueEvent) in Fullscreen.cpp, but never fired. This is because it's an animation frame event, handled by ScriptedAnimationController, but ScriptedAnimationController is suspended, in this call chain: #7 0x7fb2ad222cde blink::ScriptedAnimationController::Suspend() #8 0x7fb2ad7aaea1 blink::Page::SetPaused() #9 0x7fb2ad7b690d blink::ScopedPageSuspender::ScopedPageSuspender() #10 0x7fb2ad797fdd blink::ChromeClient::Print() #11 0x7fb2ad361b3a blink::LocalDOMWindow::print() While it is suspended, rAF callback will also not be run, so there are many ways that things could break when the print dialog is open. I think the fundamental problem is that the the two extension tabs are in the same process, and apparently ScopedPageSuspender suspends all (ordinary) pages in the process.
,
Aug 4 2017
rdevlin.cronin@, jochen@, I believe you know a think or two about extensions and modal dialogs. Is this (printing suspends other pages in the same process) a symptom of a known bug that it can be duped into?
,
Aug 4 2017
+also thestig@, who probably knows this best. AFAIK, printing suspending activity is known (and pseudo-desired?). We've actually had bugs where the suspension wasn't properly respected by certain subsystems.
,
Aug 4 2017
This bug makes me think of issue 702085 , which links to bug 629431 in comment https://crbug.com/702085#c7 . ( bug 629431 is not visible to me, so I might be wrong. But if it is relevant, please cc me so that I can know more).
,
Aug 4 2017
This sounds like the type of problem I want to avoid in bug 139706.
,
Aug 21 2017
printing suspends the entire renderer, this is WAI, although I argue in issue 629432 that we should fix this
,
Aug 21 2017
-Internals>Plugins>PDF because this has nothing to do with Chromium's built-in PDF reader.
,
Nov 22 2017
Closing per #10. |
||||||
►
Sign in to add a comment |
||||||
Comment 1 by jmukthavaram@chromium.org
, Jul 27 2017Labels: hasbisect-per-revision
Owner: foolip@chromium.org
Status: Assigned (was: Unconfirmed)