[webkit-changes] [WebKit/WebKit] e68044: REGRESSION: Scrolling down and attempting to fulls...

Aditya Keerthi noreply at github.com
Wed Feb 21 11:06:59 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e680442311f32c01dbf7187d032fcde640e1a525
      https://github.com/WebKit/WebKit/commit/e680442311f32c01dbf7187d032fcde640e1a525
  Author: Aditya Keerthi <akeerthi at apple.com>
  Date:   2024-02-21 (Wed, 21 Feb 2024)

  Changed paths:
    M Source/WebCore/dom/Document.cpp
    M Source/WebCore/dom/FullscreenManager.cpp
    M Source/WebCore/dom/FullscreenManager.h
    M Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
    A Tools/TestWebKitAPI/Tests/ios/FullscreenLayoutParameters.mm
    R Tools/TestWebKitAPI/Tests/ios/FullscreenOverriddenLayoutParameters.mm

  Log Message:
  -----------
  REGRESSION: Scrolling down and attempting to fullscreen video on twitter.com displays the feed
https://bugs.webkit.org/show_bug.cgi?id=269795
rdar://122981183

Reviewed by Jer Noble.

In order for element fullscreen to behave correctly, sites rely on the following
invariants:

1. "fullscreenchange" is fired before "resize".
2. The values of viewport properties during "fullscreenchange" match the fullscreen size.

Twitter relies on (1), as they teardown the video player if "resize" occurs
during the transition into fullscreen.

270199 at main broke two things:

1. The ordering of "fullscreenchange" and "resize" events when entering fullscreen on iPadOS.
2. The values of viewport properties during the "fullscreenchange" event on visionOS.

(1) went undetected for a long time, because at first, the effect was not this
bug, but a crash, fixed in 273885 at main.

272752 at main fixed (2), but also introduced (1) on visionOS.

To the invariant mentioned above is true, fix by adding logic which ensures
"resize" is dispatched after "fullscreenchange".

* Source/WebCore/dom/Document.cpp:
(WebCore::Document::setNeedsDOMWindowResizeEvent):
(WebCore::Document::setNeedsVisualViewportResize):
* Source/WebCore/dom/FullscreenManager.cpp:
(WebCore::FullscreenManager::setAnimatingFullscreen):
(WebCore::FullscreenManager::addPendingScheduledResize):
* Source/WebCore/dom/FullscreenManager.h:
* Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* Tools/TestWebKitAPI/Tests/ios/FullscreenLayoutParameters.mm: Renamed from Tools/TestWebKitAPI/Tests/ios/FullscreenOverriddenLayoutParameters.mm.
(TestWebKitAPI::TEST):

Canonical link: https://commits.webkit.org/275115@main



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list