DescriptionMove pending state from FullscreenController to Fullscreen
The precise details of how competing enter+exit requests should work is
currently an ongoing discussion:
https://github.com/whatwg/fullscreen/issues/63
https://github.com/whatwg/fullscreen/pull/64
https://github.com/w3c/web-platform-tests/pull/4250
Previous 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.
Behavior is preserved as far as possible, with deliberate exception that
the "enters+exits quickly" behavior is no more, due to the added early
return in FullscreenController::exitFullscreen.
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.
With no Member<>s left in FullscreenController, it can be owned as a
std::unique_ptr by WebViewImpl.
TEST=https://codereview.chromium.org/2541833002
BUG=402376
Committed: https://crrev.com/a2441f293224a5c5c0352f40c5e8fcbbf1a5a051
Cr-Commit-Position: refs/heads/master@{#436585}
Patch Set 1 #Patch Set 2 : self review #Patch Set 3 : more self review #Patch Set 4 : rebase #Patch Set 5 : fix my test #
Total comments: 3
Patch Set 6 : tests and documentation #
Total comments: 3
Messages
Total messages: 33 (23 generated)
|