[webkit-changes] [WebKit/WebKit] 89d981: [Cocoa] REGRESSION (283033 at main) Viewer mode doesn...

Eric Carlson noreply at github.com
Wed Oct 30 22:08:37 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 89d9814e2f11b99164232dfd654cbd2df507fdc9
      https://github.com/WebKit/WebKit/commit/89d9814e2f11b99164232dfd654cbd2df507fdc9
  Author: Eric Carlson <eric.carlson at apple.com>
  Date:   2024-10-30 (Wed, 30 Oct 2024)

  Changed paths:
    M Source/WebCore/html/HTMLMediaElement.cpp
    M Source/WebCore/html/HTMLMediaElement.h
    M Source/WebCore/html/HTMLVideoElement.cpp
    M Source/WebCore/html/HTMLVideoElement.h
    M Source/WebCore/platform/cocoa/PlaybackSessionModelMediaElement.mm

  Log Message:
  -----------
  [Cocoa] REGRESSION (283033 at main) Viewer mode doesn't work for video in an iframe
https://bugs.webkit.org/show_bug.cgi?id=282351
rdar://138769971

Reviewed by Andy Estes.

283033 at main changed Viewer mode to use element fullscreen instead of video fullscreen.
Element fullscreen enforces permission policy and the old video fullscreen API does not,
so the change broke Viewer mode for video in an iframe without the "allowfullscreen"
property. Fix this by adding new, internal-only, methods to allow element fullscreen to
ignore fullscreen permission policy.

* Source/WebCore/html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::enterFullscreen): Pass ExemptIFrameAllowFullscreenRequirement to
FullscreenManager::requestFullscreenForElement when m_ignoreFullscreenPermissionsPolicy is true;
* Source/WebCore/html/HTMLMediaElement.h:
(WebCore::HTMLMediaElement::ignoreFullscreenPermissionPolicyOnNextCallToEnterFullscreen):

* Source/WebCore/html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::enterFullscreenIgnoringPermissionsPolicy): Call
ignoreFullscreenPermissionPolicyOnNextCallToEnterFullscreen() before calling webkitEnterFullscreen().
(WebCore::HTMLVideoElement::setPresentationModeIgnoringPermissionsPolicy): Call
ignoreFullscreenPermissionPolicyOnNextCallToEnterFullscreen() before calling setPresentationMode().
* Source/WebCore/html/HTMLVideoElement.h:

* Source/WebCore/platform/cocoa/PlaybackSessionModelMediaElement.mm:
(WebCore::PlaybackSessionModelMediaElement::enterInWindowFullscreen): Call setPresentationModeIgnoringPermissionsPolicy.
(WebCore::PlaybackSessionModelMediaElement::enterFullscreen): Call enterFullscreenIgnoringPermissionsPolicy.

Canonical link: https://commits.webkit.org/285943@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