New issue
Advanced search Search tips

Issue 684920 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Aug 29
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug

Blocked on:
issue 240576



Sign in to add a comment

why does fullscreen mode scroll to 0?

Project Member Reported by skobes@chromium.org, Jan 25 2017

Issue description

FullscreenController::didEnterFullscreen scrolls the main frame to (0, 0), and restores the previous scroll offset after exiting.

This fires scroll events, which may trigger changes to layout (for example, showing / hiding sticky headers).

Does FullscreenController really need to scroll the page, or can we simply overlay the fullscreen element without scrolling?  I am not really familiar with the fullscreen code in general so I am not sure if there is a good reason for this or if it is mandated by spec.

Discovered in  issue 682655 , where this behavior interacts with scroll anchoring.
 

Comment 1 by foolip@chromium.org, Jan 25 2017

I think that with  issue 240576  fixed, it's possible that the scrolling will no longer be needed. After all, one can open a <dialog> element at any scroll offset and it will cover the whole screen.

However, the resize itself will change the layout, but I'm not sure how that interacts with scrolling, is there any code that tries to stay in the same position while resizing?

Comment 2 by foolip@chromium.org, Jan 25 2017

Blockedon: 240576
Although I am not confident that  issue 240576  will unblock this, I'm marking it as blocked, because I'm pretty sure that trying to fix this with the current code is not time well spent.

Comment 3 by skobes@chromium.org, Jan 25 2017

Scroll anchoring tries to anchor during resize, but ideally we would suspend layout of content outside the fullscreen element, while we're in fullscreen mode.

Comment 4 by foolip@chromium.org, Jan 25 2017

The fullscreen element itself need not be opaque, so the bits below it can be visible. That doesn't make much sense of course, and if there's a performance argument to be made one might consider changing the spec to allow some optimization or another.

Comment 5 by e...@chromium.org, Jan 26 2017

Cc: -foolip@chromium.org
Owner: foolip@chromium.org
Status: Assigned (was: Unconfirmed)
Project Member

Comment 6 by bugdroid1@chromium.org, Aug 29

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0de9638b5d008eb11b206187bf90a70bbf23857a

commit 0de9638b5d008eb11b206187bf90a70bbf23857a
Author: Dave Tapuska <dtapuska@chromium.org>
Date: Wed Aug 29 15:08:54 2018

Avoid scrolling when entering fullscreen

When entering fullscreen we shouldn't need to set scroll to 0,0. This
fixes fullscreening an element that has scroll offset.

BUG= 693075 , 684920 

Change-Id: I2acf27eb2641731d580865d38e1a1495f6aee7de
Reviewed-on: https://chromium-review.googlesource.com/1191664
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Philip Jägenstedt <foolip@chromium.org>
Cr-Commit-Position: refs/heads/master@{#587120}
[add] https://crrev.com/0de9638b5d008eb11b206187bf90a70bbf23857a/third_party/WebKit/LayoutTests/external/wpt/fullscreen/rendering/fullscreen-root-block-scroll-manual.html
[modify] https://crrev.com/0de9638b5d008eb11b206187bf90a70bbf23857a/third_party/blink/renderer/core/frame/fullscreen_controller.cc

Status: Fixed (was: Assigned)
Cc: foolip@chromium.org
Owner: dtapu...@chromium.org

Sign in to add a comment