Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(529)

Issue 2550703002: Move pending state from FullscreenController to Fullscreen (Closed)

Created:
4 years ago by foolip
Modified:
4 years ago
CC:
blink-reviews, blink-reviews-dom_chromium.org, chromium-reviews, dglazkov+blink, eae+blinkwatch, kinuko+watch, rwlbuis, sof
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Move 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
Unified diffs Side-by-side diffs Delta from patch set Stats (+319 lines, -200 lines) Patch
A third_party/WebKit/LayoutTests/fullscreen/api/element-request-fullscreen-and-remove-iframe.html View 1 2 3 4 5 1 chunk +28 lines, -0 lines 2 comments Download
A third_party/WebKit/LayoutTests/fullscreen/api/element-request-fullscreen-two-elements.html View 1 2 3 4 5 1 chunk +30 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fullscreen/api/element-request-fullscreen-two-iframes.html View 1 2 3 4 5 1 chunk +36 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Fullscreen.h View 3 chunks +5 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Fullscreen.cpp View 1 12 chunks +50 lines, -42 lines 0 comments Download
M third_party/WebKit/Source/core/page/ChromeClient.h View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/web/ChromeClientImpl.h View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/web/ChromeClientImpl.cpp View 1 2 3 4 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/web/FullscreenController.h View 1 2 3 4 5 4 chunks +26 lines, -23 lines 1 comment Download
M third_party/WebKit/Source/web/FullscreenController.cpp View 1 2 3 4 chunks +130 lines, -117 lines 0 comments Download
M third_party/WebKit/Source/web/WebViewImpl.h View 1 2 3 4 5 2 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/web/WebViewImpl.cpp View 1 2 3 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/web/tests/WebFrameTest.cpp View 1 2 3 4 1 chunk +1 line, -3 lines 0 comments Download

Messages

Total messages: 33 (23 generated)
foolip
PTAL. This is an alternative to https://codereview.chromium.org/2495423004/ that will take us down a different path ...
4 years ago (2016-12-02 17:01:01 UTC) #5
eae
Love the added comments, makes the code a lot easier to understand! LGTM
4 years ago (2016-12-05 13:51:37 UTC) #16
mlamouri (slow - plz ping)
sgtm - what would be the spec change? https://codereview.chromium.org/2550703002/diff/80001/third_party/WebKit/Source/web/FullscreenController.h File third_party/WebKit/Source/web/FullscreenController.h (right): https://codereview.chromium.org/2550703002/diff/80001/third_party/WebKit/Source/web/FullscreenController.h#newcode78 third_party/WebKit/Source/web/FullscreenController.h:78: Initial, ...
4 years ago (2016-12-05 13:54:54 UTC) #17
foolip
mlamouri@, I've imported some WIP tests from https://github.com/w3c/web-platform-tests/pull/4250, two of which illustrate the kinds of ...
4 years ago (2016-12-06 11:31:40 UTC) #18
mlamouri (slow - plz ping)
lgtm Thanks for adding the tests. I don't think you are solving the problem for ...
4 years ago (2016-12-06 12:15:47 UTC) #23
foolip
https://codereview.chromium.org/2550703002/diff/100001/third_party/WebKit/LayoutTests/fullscreen/api/element-request-fullscreen-and-remove-iframe.html File third_party/WebKit/LayoutTests/fullscreen/api/element-request-fullscreen-and-remove-iframe.html (right): https://codereview.chromium.org/2550703002/diff/100001/third_party/WebKit/LayoutTests/fullscreen/api/element-request-fullscreen-and-remove-iframe.html#newcode6 third_party/WebKit/LayoutTests/fullscreen/api/element-request-fullscreen-and-remove-iframe.html:6: <div id="log"></div> On 2016/12/06 12:15:47, mlamouri wrote: > What's ...
4 years ago (2016-12-06 14:03:59 UTC) #24
foolip
On 2016/12/06 12:15:47, mlamouri wrote: > lgtm > > Thanks for adding the tests. I ...
4 years ago (2016-12-06 14:08:55 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2550703002/100001
4 years ago (2016-12-06 14:09:25 UTC) #28
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years ago (2016-12-06 14:14:20 UTC) #31
commit-bot: I haz the power
4 years ago (2016-12-06 14:18:12 UTC) #33
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/a2441f293224a5c5c0352f40c5e8fcbbf1a5a051
Cr-Commit-Position: refs/heads/master@{#436585}

Powered by Google App Engine
This is Rietveld 408576698