DescriptionConvert FullscreenController to use WebCallbacks
https://github.com/whatwg/fullscreen/issues/63
Current behavior of FullscreenController:
enterFullscreenForElement() calls WebFrameClient::enterFullscreen()
unless we're already in fullscreen, transitioning in or out of
fullscreen, or if the request was for a cross-process descendant.
(m_fullscreenFrame is non-null also when transitioning out.) This
explains the "request then exit+request" behavior of simply exiting, as
no IPC to enter fullscreen is sent in this situation. However, it's not
obviously intentional, as it's covered by the "We are already in
fullscreen" bits.
exitFullscreen() calls WebFrameClient::exitFullscreen() unless
didExitFullscreen() is on the stack (m_isCancelingFullscreen). This
explains the "request+exit" behavior of "enters+exits quickly", as both
the enter and exit IPCs are sent.
The new behavior for entering is similar, except that while exiting, the
error callback is invoked. TODO: test other browsers.
The new behavior for exiting is to do nothing unless in fullscreen. This
fixes the "enters+exits quickly" behavior.
There is an asymetry between requesting and exiting fullscreen; only
Fullscreen::requestFullscreen can be used get into fullscreen in the
Fullscreen API sense, with a "fullscreen element" and so on. However,
the browser can exit at any time. This is why there are no callbacks for
WebFrameClient::exitFullscreen(), FullscreenController needs to know
which frames/document to notify anyway.
The fullyExitFullscreen call surrounded by m_isCancelingFullscreen was a
workaround, and is moved into Fullscreen::didExitFullscreen. Because
FullscreenController::exitFullscreen now does nothing if not in
fullscreen, m_isCancelingFullscreen or similar is no longer needed.
BUG=402376
Patch Set 1 #Patch Set 2 : pass layout tests #Patch Set 3 : update tests #Patch Set 4 : fix tests? #Patch Set 5 : tolerate browser-initiated tab fullscreen mode #Patch Set 6 : fix overlay fullscreen #Patch Set 7 : rebase #
Total comments: 4
Patch Set 8 : public/WebFullscreenCallbacks->core/FullscreenCallbacks #
Total comments: 6
Patch Set 9 : handle (poorly) the element being moved after request #Patch Set 10 : just in case #Messages
Total messages: 44 (31 generated)
|