Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 7503ebe002c0a59ad64c4844e0458d363cbf6df9
      
https://github.com/WebKit/WebKit/commit/7503ebe002c0a59ad64c4844e0458d363cbf6df9
  Author: Josh Hernandez <[email protected]>
  Date:   2026-06-04 (Thu, 04 Jun 2026)

  Changed paths:
    M LayoutTests/TestExpectations
    M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
    M Source/WebCore/Modules/mediasession/MediaSession.cpp
    M Source/WebCore/Modules/mediasession/MediaSessionAction.h
    M Source/WebCore/Modules/mediasession/MediaSessionAction.idl

  Log Message:
  -----------
  Ensure exception is not thrown when MediaSession.setActionHandler is called
https://bugs.webkit.org/show_bug.cgi?id=315774
rdar://178167294

Reviewed by Eric Carlson and Youenn Fablet.

Currently we fail the parts of WPT mediasession/seactionhandler.html that
test mediasession actions: "hangup", "previousslide", "nextslide", 
"enterpictureinpicture",
due to these actions not being included in MediaSessionAction.idl.
This patch adds these actions to the MediaSessionAction.idl and MediaSession.h.

A runtime flag MediaSessionExtendedActionsEnabled is added to gate these 
actions,
throwing a TypeError in setActionHandler and callActionHandler when the flag is 
off.
The flag is marked as testable so it is enabled in WPT runs.

We now pass 
LayoutTests/imported/w3c/web-platform-tests/mediasession/setactionhandler.html
and mark it as [ Pass ] in TestExpectations.

* LayoutTests/TestExpectations:
* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
* Source/WebCore/Modules/mediasession/MediaSession.cpp:
(WebCore::platformCommandForMediaSessionAction):
(WebCore::MediaSession::setActionHandler):
(WebCore::MediaSession::callActionHandler):
* Source/WebCore/Modules/mediasession/MediaSessionAction.h:
* Source/WebCore/Modules/mediasession/MediaSessionAction.idl:

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



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

Reply via email to