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

Issue 2573773002: Sync requestFullscreen() and exitFullscreen() algorithms with the spec (Closed)

Created:
4 years ago by foolip
Modified:
3 years, 10 months ago
CC:
darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-animation_chromium.org, blink-reviews-css, blink-reviews-dom_chromium.org, blink-reviews-html_chromium.org, blink-reviews-layout_chromium.org, blink-reviews-style_chromium.org, blink-reviews-w3ctests_chromium.org, chromium-reviews, dcheng, dglazkov+blink, eae+blinkwatch, eric.carlson_apple.com, Eric Willigers, feature-media-reviews_chromium.org, feature-vr-reviews_chromium.org, fs, gasubic, haraken, jchaffraix+rendering, kinuko+watch, leviw+renderwatch, mlamouri+watch-blink_chromium.org, pdr+renderingwatchlist_chromium.org, rjwright, rwlbuis, shans, sof, nessy, Srirama, szager+layoutwatch_chromium.org, tfarina, vcarbune.chromium, zoltan1
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Sync requestFullscreen() and exitFullscreen() algorithms with the spec The central change is the timing for when the fullscreen element stack is modified and when the events fire. This makes it possible to make webkitCurrentFullScreenElement an alias of fullscreenElement, as the old notion of a single fullscreen element is gone. Previously, fullscreen requests did: 1. In Fullscreen::requestFullscreen(), synchronously modify m_fullscreenElementStack, visible in document.fullscreenElement, but not document.webkitCurrentFullScreenElement. Also enqueue events to fire, without starting the timer to fire them. 2. As soon as the resize happens, in Fullscreen::didEnterFullscreen(), set m_currentFullScreenElement, affecting :-webkit-full-screen document.webkitCurrentFullScreenElement. Start the event timer. 3. When the timer fires, events are dispatched. If the tree has changed since the events were enqueued, additional events may be fired. And similarly for exit. For errors, requestFullscreen() would itself start the timer to fire the events. Now, fullscreen requests will: 1. In Fullscreen::requestFullscreen(), append to a list of pending requests. 2. When the resize happens, enqueue an animation frame task for each pending request. 3. In the animation frame task, apply all changes, decide which events to fire and then fire them. TEST=run-webkit-tests fullscreen/ imported/wpt/fullscreen/ webkit_unit_tests --gtest_filter=*Fullscreen* interactive_ui_tests --gtest_filter=SitePerProcessInteractiveBrowserTest.Fullscreen* BUG=402376, 402421 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Committed: https://crrev.com/e1d42d636990425056ede44086ef49a1f8c6a0a5 Cr-Commit-Position: refs/heads/master@{#439607}

Patch Set 1 #

Total comments: 48

Patch Set 2 : rebase: push_back, fix orientation tests, most tests now in imported/wpt #

Patch Set 3 : address feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+729 lines, -887 lines) Patch
M third_party/WebKit/LayoutTests/TestExpectations View 1 1 chunk +0 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/fullscreen/api/document-exit-fullscreen-twice.html View 1 1 chunk +0 lines, -34 lines 0 comments Download
M third_party/WebKit/LayoutTests/fullscreen/api/document-exit-fullscreen-vs-request.html View 2 chunks +16 lines, -11 lines 0 comments Download
D third_party/WebKit/LayoutTests/fullscreen/api/document-fullscreen-element.html View 1 chunk +0 lines, -36 lines 0 comments Download
M third_party/WebKit/LayoutTests/fullscreen/api/element-request-fullscreen-and-move.html View 1 1 chunk +0 lines, -27 lines 0 comments Download
M third_party/WebKit/LayoutTests/fullscreen/api/element-request-fullscreen-and-move-to-iframe.html View 1 1 chunk +0 lines, -29 lines 0 comments Download
A third_party/WebKit/LayoutTests/fullscreen/api/element-request-fullscreen-and-move-to-iframe-prefixed.html View 1 chunk +28 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/fullscreen/api/element-request-fullscreen-and-remove.html View 1 1 chunk +0 lines, -24 lines 0 comments Download
M third_party/WebKit/LayoutTests/fullscreen/api/element-request-fullscreen-and-remove-iframe.html View 1 1 chunk +0 lines, -28 lines 0 comments Download
A third_party/WebKit/LayoutTests/fullscreen/api/element-request-fullscreen-and-remove-prefixed.html View 1 chunk +23 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/fullscreen/api/element-request-fullscreen-twice.html View 1 1 chunk +0 lines, -29 lines 0 comments Download
M third_party/WebKit/LayoutTests/fullscreen/api/element-request-fullscreen-two-iframes.html View 1 chunk +7 lines, -7 lines 0 comments Download
M third_party/WebKit/LayoutTests/fullscreen/api/element-request-fullscreen-vs-exit.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fullscreen/enter-exit-full-screen-hover.html View 1 chunk +23 lines, -15 lines 0 comments Download
M third_party/WebKit/LayoutTests/fullscreen/enter-exit-full-screen-hover-expected.txt View 1 chunk +2 lines, -0 lines 0 comments Download
D third_party/WebKit/LayoutTests/fullscreen/full-screen-remove-ancestor-during-transition.html View 1 chunk +0 lines, -40 lines 0 comments Download
D third_party/WebKit/LayoutTests/fullscreen/full-screen-remove-ancestor-during-transition-expected.txt View 1 chunk +0 lines, -5 lines 0 comments Download
M third_party/WebKit/LayoutTests/fullscreen/full-screen-stacking-context.html View 1 chunk +3 lines, -1 line 0 comments Download
D third_party/WebKit/LayoutTests/imported/wpt/fullscreen/api/document-exit-fullscreen-twice-manual-expected.txt View 1 1 chunk +0 lines, -4 lines 0 comments Download
D third_party/WebKit/LayoutTests/imported/wpt/fullscreen/api/document-fullscreen-element-manual-expected.txt View 1 1 chunk +0 lines, -4 lines 0 comments Download
D third_party/WebKit/LayoutTests/imported/wpt/fullscreen/api/element-request-fullscreen-and-move-manual-expected.txt View 1 1 chunk +0 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/imported/wpt/fullscreen/api/element-request-fullscreen-and-move-to-iframe-manual.html View 1 1 chunk +1 line, -0 lines 0 comments Download
D third_party/WebKit/LayoutTests/imported/wpt/fullscreen/api/element-request-fullscreen-and-move-to-iframe-manual-expected.txt View 1 1 chunk +0 lines, -4 lines 0 comments Download
D third_party/WebKit/LayoutTests/imported/wpt/fullscreen/api/element-request-fullscreen-and-remove-iframe-manual-expected.txt View 1 1 chunk +0 lines, -4 lines 0 comments Download
D third_party/WebKit/LayoutTests/imported/wpt/fullscreen/api/element-request-fullscreen-and-remove-manual-expected.txt View 1 1 chunk +0 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/imported/wpt/fullscreen/api/element-request-fullscreen-timing-manual-expected.txt View 1 chunk +1 line, -1 line 0 comments Download
D third_party/WebKit/LayoutTests/imported/wpt/fullscreen/api/element-request-fullscreen-twice-manual-expected.txt View 1 1 chunk +0 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/css/CSSDefaultStyleSheets.cpp View 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/SelectorChecker.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/dom/DocumentFullscreen.h View 1 chunk +0 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/dom/DocumentFullscreen.cpp View 1 chunk +0 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/dom/DocumentFullscreen.idl View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Element.cpp View 1 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Fullscreen.h View 1 2 6 chunks +33 lines, -51 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Fullscreen.cpp View 1 2 8 chunks +486 lines, -411 lines 0 comments Download
M third_party/WebKit/Source/core/dom/LayoutTreeBuilder.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/HTMLMediaElement.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/shadow/MediaControlsOrientationLockDelegateTest.cpp View 1 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutInline.cpp View 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp View 1 1 chunk +0 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/page/ChromeClient.h View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/modules/vr/VRDisplay.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/web/ChromeClientImpl.h View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/web/FullscreenController.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/web/FullscreenController.cpp View 4 chunks +24 lines, -22 lines 0 comments Download
M third_party/WebKit/Source/web/WebPluginContainerImpl.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/web/WebRemoteFrameImpl.cpp View 1 chunk +10 lines, -13 lines 0 comments Download
M third_party/WebKit/Source/web/WebViewImpl.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/web/tests/WebFrameTest.cpp View 1 16 chunks +41 lines, -38 lines 0 comments Download
M third_party/WebKit/Source/web/tests/WebViewTest.cpp View 1 7 chunks +10 lines, -1 line 0 comments Download

Messages

Total messages: 34 (15 generated)
foolip
Here it is, the long awaited timing fix for Fullscreen, which is what got in ...
4 years ago (2016-12-13 11:42:00 UTC) #5
mlamouri (slow - plz ping)
I will make this a priority for my review session tomorrow. Let me know if ...
4 years ago (2016-12-13 13:57:29 UTC) #8
eae
This is great. LGTM w/nits & suggestions https://codereview.chromium.org/2573773002/diff/1/third_party/WebKit/Source/core/dom/Fullscreen.cpp File third_party/WebKit/Source/core/dom/Fullscreen.cpp (right): https://codereview.chromium.org/2573773002/diff/1/third_party/WebKit/Source/core/dom/Fullscreen.cpp#newcode250 third_party/WebKit/Source/core/dom/Fullscreen.cpp:250: if (Fullscreen::fullscreenElementStackSizeFrom(*document) ...
4 years ago (2016-12-14 00:19:24 UTC) #9
mlamouri (slow - plz ping)
lgtm. As usual with CLs big like that, it's likely my review is very superficial ...
4 years ago (2016-12-14 16:24:12 UTC) #10
foolip
On 2016/12/14 16:24:12, mlamouri wrote: > lgtm. As usual with CLs big like that, it's ...
4 years ago (2016-12-14 17:01:59 UTC) #11
alexmos
Very nice. Looks good overall, a few comments below, and I'll need to think more ...
4 years ago (2016-12-15 07:58:53 UTC) #12
foolip
Thank you all for your comments. I think I've addressed it all. Further comments welcome, ...
4 years ago (2016-12-19 17:36:57 UTC) #13
foolip
On 2016/12/19 17:36:57, foolip wrote: > Thank you all for your comments. I think I've ...
4 years ago (2016-12-19 17:40:28 UTC) #14
alexmos
LGTM, thanks! https://codereview.chromium.org/2573773002/diff/1/third_party/WebKit/Source/core/dom/Fullscreen.cpp File third_party/WebKit/Source/core/dom/Fullscreen.cpp (right): https://codereview.chromium.org/2573773002/diff/1/third_party/WebKit/Source/core/dom/Fullscreen.cpp#newcode677 third_party/WebKit/Source/core/dom/Fullscreen.cpp:677: // element in their fullscreen element stacks, ...
4 years ago (2016-12-19 22:53:27 UTC) #19
foolip
Thanks alexmos@, I'll go ahead and land now. Given the size of the change I'm ...
4 years ago (2016-12-19 23:07:54 UTC) #20
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/2573773002/40001
4 years ago (2016-12-19 23:09:11 UTC) #23
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years ago (2016-12-19 23:17:07 UTC) #26
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/e1d42d636990425056ede44086ef49a1f8c6a0a5 Cr-Commit-Position: refs/heads/master@{#439607}
4 years ago (2016-12-19 23:20:38 UTC) #28
stgao
By any chance, will this CL make TabCaptureApiTest.FullscreenEvents flaky? https://findit-for-me.appspot.com/waterfall/check-flake?master_name=chromium.win&builder_name=Win%207%20Tests%20x64%20(1)&build_number=19376&step_name=browser_tests&test_name=TabCaptureApiTest.FullscreenEvents https://findit-for-me.appspot.com/waterfall/check-flake?master_name=chromium.win&builder_name=Win10%20Tests%20x64&build_number=6924&step_name=browser_tests%20on%20Windows-10-10586&test_name=TabCaptureApiTest.FullscreenEvents https://findit-for-me.appspot.com/waterfall/check-flake?master_name=chromium.chromiumos&builder_name=Linux%20ChromiumOS%20Tests%20(1)&build_number=31120&step_name=browser_tests&test_name=TabCaptureApiTest.FullscreenEvents
3 years, 12 months ago (2016-12-20 20:41:32 UTC) #29
foolip
On 2016/12/20 20:41:32, stgao (slow on Monday) wrote: > By any chance, will this CL ...
3 years, 12 months ago (2016-12-21 08:21:37 UTC) #30
jeffcarp
On 2016/12/21 at 08:21:37, foolip wrote: > On 2016/12/20 20:41:32, stgao (slow on Monday) wrote: ...
3 years, 12 months ago (2016-12-21 22:07:34 UTC) #31
stgao
On 2016/12/21 08:21:37, foolip_slow_very_sorry wrote: > On 2016/12/20 20:41:32, stgao (slow on Monday) wrote: > ...
3 years, 11 months ago (2017-01-14 08:13:02 UTC) #32
foolip
A revert of this CL (patchset #3 id:40001) has been created in https://codereview.chromium.org/2654083006/ by foolip@chromium.org. ...
3 years, 10 months ago (2017-01-26 18:44:11 UTC) #33
foolip
3 years, 10 months ago (2017-01-27 06:30:03 UTC) #34
Message was sent while issue was closed.
On 2017/01/14 08:13:02, stgao (OOO until Feb 23) wrote:
> On 2016/12/21 08:21:37, foolip_slow_very_sorry wrote:
> > On 2016/12/20 20:41:32, stgao (slow on Monday) wrote:
> > > By any chance, will this CL make TabCaptureApiTest.FullscreenEvents flaky?
> > > 
> > >
> >
>
https://findit-for-me.appspot.com/waterfall/check-flake?master_name=chromium....
> > > 
> > >
> >
>
https://findit-for-me.appspot.com/waterfall/check-flake?master_name=chromium....
> > > 
> > >
> >
>
https://findit-for-me.appspot.com/waterfall/check-flake?master_name=chromium....
> > 
> > That test didn't show up while working on this CL, but it does change the
> timing
> > of the fullscreenchange event, so it's quite plausible. If this CL isn't
> > reverted, I'll take a look at the test when I'm back in January.
> 
> This CL seems to be the exact culprit as shown below. Mind investigating and
> fixing the test flakiness?
> 
>
https://findit-for-me.appspot.com/waterfall/check-flake?master_name=chromium....

I am now reverting this CL, but have filed
https://bugs.chromium.org/p/chromium/issues/detail?id=685940 to investigate this
before relanding.

Powered by Google App Engine
This is Rietveld 408576698