RESOLVED FIXED Bug 82760
WebViewImpl doesn't notify the page that the user has canceled fullscreen.
https://bugs.webkit.org/show_bug.cgi?id=82760
Summary WebViewImpl doesn't notify the page that the user has canceled fullscreen.
Bill Budge
Reported 2012-03-30 11:32:26 PDT
Recent changes in WebCore::Document caused a regression in Chromium. The page isn't getting notified when the user presses ESC or clicks the exit fullscreen bubble. http://trac.webkit.org/changeset/112596
Attachments
Proposed Patch (1.95 KB, patch)
2012-03-30 12:35 PDT, Bill Budge
no flags
Proposed patch (2.62 KB, patch)
2012-03-30 15:59 PDT, Bill Budge
pnormand: commit-queue-
Proposed Patch (2.75 KB, patch)
2012-03-31 12:36 PDT, Bill Budge
no flags
Bill Budge
Comment 1 2012-03-30 12:35:03 PDT
Created attachment 134862 [details] Proposed Patch
Darin Fisher (:fishd, Google)
Comment 2 2012-03-30 14:38:42 PDT
Comment on attachment 134862 [details] Proposed Patch View in context: https://bugs.webkit.org/attachment.cgi?id=134862&action=review > Source/WebKit/chromium/src/WebViewImpl.cpp:1337 > + doc->webkitCancelFullScreen(); I was expecting to see webkitCancelFullScreen called from willExitFullScreen. The implication of calling webkitCancelFullScreen here is that we will have already called Document::webkitWillExitFullScreenForElement. It seems like that might confuse Document (if not now, then later).
Bill Budge
Comment 3 2012-03-30 15:59:37 PDT
Created attachment 134908 [details] Proposed patch
Philippe Normand
Comment 4 2012-03-30 18:40:34 PDT
Comment on attachment 134908 [details] Proposed patch Attachment 134908 [details] did not pass gtk-ews (gtk): Output: http://queues.webkit.org/results/12247610
Bill Budge
Comment 5 2012-03-31 12:36:54 PDT
Created attachment 134973 [details] Proposed Patch
Bill Budge
Comment 6 2012-03-31 12:38:14 PDT
Resubmitting. There was some problem with the last patch on GTK.
Darin Fisher (:fishd, Google)
Comment 7 2012-04-02 12:29:03 PDT
Comment on attachment 134973 [details] Proposed Patch View in context: https://bugs.webkit.org/attachment.cgi?id=134973&action=review > Source/WebKit/chromium/src/WebViewImpl.cpp:1327 > + doc->webkitCancelFullScreen(); if exiting fullscreen is initiated by JS calling document.webkitCancelFullScreen(), then we will eventually reach this code again. it looks like the second call to webkitCancelFullScreen() will call webkitExitFullscreen(). in this case, do we have to worry about a second webkitfullscreenchange event being generated? it looks like Document::addDocumentToFullScreenChangeEventQueue() could be called more than once.
Bill Budge
Comment 8 2012-04-02 13:49:53 PDT
When we call webkitCancelFullScreen the second time, it exits at the first if-statement: if (!topDocument()->webkitFullscreenElement()) return; It seems a little fragile, but webkitExitFullscreen() isn't called a second time. If we want to avoid the second call, I can't see a way to distinguish whether the cancel is coming from the page or the embedder at this level. Ideas?
Darin Fisher (:fishd, Google)
Comment 9 2012-04-02 23:25:29 PDT
Comment on attachment 134973 [details] Proposed Patch OK, thanks for verifying that!
WebKit Review Bot
Comment 10 2012-04-03 00:21:29 PDT
Comment on attachment 134973 [details] Proposed Patch Clearing flags on attachment: 134973 Committed r112991: <http://trac.webkit.org/changeset/112991>
WebKit Review Bot
Comment 11 2012-04-03 00:21:34 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.