Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 6711229d438fbd977d5b1b9b572096382597e08f
https://github.com/WebKit/WebKit/commit/6711229d438fbd977d5b1b9b572096382597e08f
Author: Jer Noble <[email protected]>
Date: 2025-10-22 (Wed, 22 Oct 2025)
Changed paths:
M Source/WebCore/en.lproj/Localizable.strings
M Source/WebCore/page/CaptionUserPreferencesMediaAF.cpp
M Source/WebCore/page/CaptionUserPreferencesMediaAF.h
M Source/WebCore/platform/cf/MediaAccessibilitySoftLink.cpp
M Source/WebCore/platform/cf/MediaAccessibilitySoftLink.h
M Source/WebKit/Shared/API/Cocoa/WebKitPrivate.h
A Source/WebKit/UIProcess/Cocoa/_WKCaptionStyleMenuController.h
A Source/WebKit/UIProcess/mac/_WKCaptionStyleMenuControllerMac.mm
M Source/WebKit/WebKit.xcodeproj/project.pbxproj
M Tools/TestWebKitAPI/SoftLinkShim.h
M Tools/TestWebKitAPI/Tests/WebCore/cocoa/CaptionPreferencesTests.mm
Log Message:
-----------
[Mac] Add a pop-up menu for selecting caption style profiles
rdar://163067314
https://bugs.webkit.org/show_bug.cgi?id=301134
Reviewed by Eric Carlson.
Add a default implementation of a pop-up menu that allows the user to choose
between their current caption style profiles. The menu will source profile
names through MediaAccessibility soft-linked methods, allowing the entire
backing for this menu to be stubbed and tested by TestWebKit API.
Test: Tools/TestWebKitAPI/Tests/WebCore/cocoa/CaptionPreferencesTests.mm
* Source/WebCore/page/CaptionUserPreferencesMediaAF.cpp:
(WebCore::CaptionUserPreferencesMediaAF::platformProfileIDs):
(WebCore::CaptionUserPreferencesMediaAF::platformActiveProfileID):
(WebCore::CaptionUserPreferencesMediaAF::canSetActiveProfileID):
(WebCore::CaptionUserPreferencesMediaAF::setActiveProfileID):
(WebCore::CaptionUserPreferencesMediaAF::nameForProfileID):
* Source/WebCore/page/CaptionUserPreferencesMediaAF.h:
* Source/WebCore/platform/cf/MediaAccessibilitySoftLink.cpp:
* Source/WebCore/platform/cf/MediaAccessibilitySoftLink.h:
* Source/WebKit/Shared/API/Cocoa/WebKitPrivate.h:
* Source/WebKit/UIProcess/mac/_WKCaptionStyleMenuController.h: Copied from
Tools/TestWebKitAPI/SoftLinkShim.h.
* Source/WebKit/UIProcess/mac/_WKCaptionStyleMenuController.mm: Added.
(-[WKCaptionStyleMenuController init]):
(-[WKCaptionStyleMenuController rebuildMenu]):
(-[WKCaptionStyleMenuController captionStyleMenu]):
(-[WKCaptionStyleMenuController profileMenuItemSelected:]):
(-[WKCaptionStyleMenuController profileMenuItemHighlighted:]):
(-[WKCaptionStyleMenuController systemCaptionStyleSettingsItemSelected:]):
(-[WKCaptionStyleMenuController menuWillOpen:]):
(-[WKCaptionStyleMenuController menu:willHighlightItem:]):
(-[WKCaptionStyleMenuController menuDidClose:]):
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:
* Tools/TestWebKitAPI/SoftLinkShim.h:
(TestWebKitAPI::SoftLinkShim::SoftLinkShim):
* Tools/TestWebKitAPI/Tests/WebCore/cocoa/CaptionPreferencesTests.mm:
(TestWebKitAPI::MediaAccessibilityShim::shimmedMACaptionAppearanceSetActiveProfileID):
(TestWebKitAPI::MediaAccessibilityShim::shimmedMACaptionAppearanceCopyProfileName):
(TestWebKitAPI::MediaAccessibilityShim::resetToDefaultValues):
(TestWebKitAPI::TEST(CaptionPreferenceTests, CaptionStyleMenu)):
(TestWebKitAPI::TEST(CaptionPreferenceTests, CaptionStyleMenuHighlight)):
(TestWebKitAPI::TEST(CaptionPreferenceTests, CaptionStyleMenuSelect)):
Canonical link: https://commits.webkit.org/301952@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications