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

Issue 2122013003: Wait until after layout when restoring scroll on exiting fullscreen. (Closed)

Created:
4 years, 5 months ago by bokan
Modified:
4 years, 5 months ago
Reviewers:
trchen
CC:
chromium-reviews, blink-reviews, kinuko+watch
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Wait until after layout when restoring scroll on exiting fullscreen. Many pages can change while in fullscreen. For example, youtube applies display:none to elements not in the fullscreen ancestor chain using CSS selectors. This means that until we update style and layout, the page will not be scrollable to the same extent (or at all) as it was when we entered fullscreen. The solution is to take note when we exit fullscreen and try to restore the scale and scroll once the first layout after exiting fullscreen is completed. This ensures the page is completely back to it's pre-fullscreen state. BUG=625683 Committed: https://crrev.com/d3fb3a358ce9c85bfd7bcda882a23179ac064775 Cr-Commit-Position: refs/heads/master@{#405854}

Patch Set 1 #

Patch Set 2 : Rebase #

Patch Set 3 : Fixed race issue #

Patch Set 4 : Rebase #

Patch Set 5 : Rebase #

Patch Set 6 : Rebase #

Patch Set 7 : Fix tests after foolip@'s patch #

Unified diffs Side-by-side diffs Delta from patch set Stats (+171 lines, -12 lines) Patch
M third_party/WebKit/Source/web/FullscreenController.h View 1 2 3 2 chunks +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/FullscreenController.cpp View 1 2 3 4 chunks +27 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/web/WebViewImpl.cpp View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/tests/WebViewTest.cpp View 1 2 3 4 5 6 2 chunks +88 lines, -4 lines 0 comments Download
A third_party/WebKit/Source/web/tests/data/fullscreen_style.html View 1 chunk +51 lines, -0 lines 0 comments Download

Messages

Total messages: 27 (13 generated)
bokan
ptal
4 years, 5 months ago (2016-07-05 14:31:54 UTC) #3
bokan
friendly ping
4 years, 5 months ago (2016-07-07 16:22:14 UTC) #4
bokan
ping, trchen@, could you please take a look?
4 years, 5 months ago (2016-07-12 16:42:27 UTC) #5
trchen
Ah oh, my apologies. Sorry I didn't see your previous messages. I'd worry about race ...
4 years, 5 months ago (2016-07-12 21:11:53 UTC) #6
bokan
On 2016/07/12 21:11:53, trchen wrote: > Ah oh, my apologies. Sorry I didn't see your ...
4 years, 5 months ago (2016-07-13 15:17:21 UTC) #7
bokan
ping
4 years, 5 months ago (2016-07-14 22:17:53 UTC) #8
trchen
Thanks! This looks great! lgtm
4 years, 5 months ago (2016-07-14 22:24:59 UTC) #9
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/2122013003/100001
4 years, 5 months ago (2016-07-15 15:46:14 UTC) #16
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/263564)
4 years, 5 months ago (2016-07-15 17:03:41 UTC) #18
bokan
After https://chromium.googlesource.com/chromium/src/+/d666f503ae854fac360cc70da1f5971a6724546a, I had to add didExitFullscreenForElement() in the tests to get the layout to ...
4 years, 5 months ago (2016-07-15 19:03:18 UTC) #19
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/2122013003/120001
4 years, 5 months ago (2016-07-15 19:04:31 UTC) #22
commit-bot: I haz the power
Committed patchset #7 (id:120001)
4 years, 5 months ago (2016-07-15 20:54:18 UTC) #24
commit-bot: I haz the power
Patchset 7 (id:??) landed as https://crrev.com/d3fb3a358ce9c85bfd7bcda882a23179ac064775 Cr-Commit-Position: refs/heads/master@{#405854}
4 years, 5 months ago (2016-07-15 20:56:57 UTC) #26
foolip
4 years, 5 months ago (2016-07-21 04:27:35 UTC) #27
Message was sent while issue was closed.
On 2016/07/15 19:03:18, bokan wrote:
> After
>
https://chromium.googlesource.com/chromium/src/+/d666f503ae854fac360cc70da1f5...,
> I had to add didExitFullscreenForElement() in the tests to get the layout to
> take effect properly after exiting fullscreen. +cc foolip@ as
FYI/double-check.

I think the reason this is needed is related to the TODO in
FullscreenController::exitFullScreenForElement. If there were only a single way
to enter and exit fullscreen, then this test could use that way as well, but
what you have makes sense now.

Powered by Google App Engine
This is Rietveld 408576698