Bug 255197 - REGRESSION(257456@main): Scrollbar shows up on sites that initiate fullscreen from an iframe
Summary: REGRESSION(257456@main): Scrollbar shows up on sites that initiate fullscreen...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tim Nguyen (:ntim)
URL:
Keywords: InRadar, NeedsReduction
: 258069 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-04-08 17:48 PDT by Ahmad Saleem
Modified: 2023-08-16 12:06 PDT (History)
8 users (show)

See Also:


Attachments
Squashed Video (on specific width of window) (2.14 MB, image/png)
2023-07-26 14:46 PDT, Ahmad Saleem
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ahmad Saleem 2023-04-08 17:48:11 PDT
Hi Team,

While going through random website, I came across another bug, which is reproducible on WebKit ToT as well (using > run-safari --release):

1) https://kissanime.com.ru/Anime/Dr-STONE-NEW-WORLD/Episode-001?id=183709&s=yuserver

2) Pick any server

3) Ensure in System Settings, you have 'always' on scrollbar

4) Play video and fullscreen, you can see scrollbar while it is fullscreen

_____

it does not happen on Chrome Canary 114 and Firefox Nightly 113.

Another possible bug is squashed video inside container but it is not happening in Firefox Nightly 113 but happening in Chrome Canary 114 and Safari 16.4.

_____

Just wanted to raise both bug.

Thanks!
Comment 1 Radar WebKit Bug Importer 2023-04-15 17:49:14 PDT
<rdar://problem/108096981>
Comment 2 Ahmad Saleem 2023-06-01 17:23:29 PDT
Still reproducible on WebKit ToT.
Comment 3 Ahmad Saleem 2023-06-30 03:25:44 PDT
It is still reproducible and also many people noticed it on Reddit as well. If we follow ‘reddit.com/r/Safari', I noticed few people complaining about it as well.
Comment 4 Tim Nguyen (:ntim) 2023-07-26 08:01:37 PDT
The fix for this is pretty straightforward, we need to make :-webkit-fullscreen-document apply on ancestor documents as well.

Otherwise this rule that hides scrollbars won't apply: https://searchfox.org/wubkat/rev/2d36f436ba4efb45b5e3f3826637e671c9b13eaa/Source/WebCore/css/fullscreen.css#46-48
Comment 5 Ahmad Saleem 2023-07-26 14:06:56 PDT
(In reply to Tim Nguyen (:ntim) from comment #4)
> The fix for this is pretty straightforward, we need to make
> :-webkit-fullscreen-document apply on ancestor documents as well.
> 
> Otherwise this rule that hides scrollbars won't apply:
> https://searchfox.org/wubkat/rev/2d36f436ba4efb45b5e3f3826637e671c9b13eaa/
> Source/WebCore/css/fullscreen.css#46-48

Looking at Chromium Source, they had similar issue:

https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/css/fullscreen.css;l=38?q=fullscreen.css

/* This prevents video from overflowing the viewport in
   virtual/android/fullscreen/video-scrolled-iframe.html (crbug.com/441890) and
   removes scrollbars caused by html { overflow: scroll } (crbug.com/543946).
   TODO(foolip): This is done differently in Gecko, find a fix not involving the
   ancestor selector in https://github.com/whatwg/fullscreen/issues/19. */
:root:-webkit-full-screen-ancestor {
  overflow: hidden !important;
}

Our

:root:-webkit-full-screen-document:not(:fullscreen) {
    overflow: hidden !important;
}

___

So we have to remove ':not(:fullscreen)' part?
Comment 6 Tim Nguyen (:ntim) 2023-07-26 14:09:28 PDT
Pull request: https://github.com/WebKit/WebKit/pull/16112
Comment 7 Tim Nguyen (:ntim) 2023-07-26 14:09:49 PDT
I posted a fix that covers the scrollbars. I couldn't reproduce the squashed video.
Comment 8 Ahmad Saleem 2023-07-26 14:46:35 PDT
Created attachment 467126 [details]
Squashed Video (on specific width of window)

@Tim - if we squash the width of Safari window, it happens and it also happens on Chrome Canary 117 as well. Only Firefox Nightly 117 works perfectly fine on this page irrespective of window width.
Comment 9 Ahmad Saleem 2023-07-26 14:47:49 PDT
*** Bug 258069 has been marked as a duplicate of this bug. ***
Comment 10 EWS 2023-07-26 16:59:53 PDT
Committed 266340@main (0d8538115ee0): <https://commits.webkit.org/266340@main>

Reviewed commits have been landed. Closing PR #16112 and removing active labels.