Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: cd1ce52d51cfaa63b60224e91294f4c7d8262dfa
https://github.com/WebKit/WebKit/commit/cd1ce52d51cfaa63b60224e91294f4c7d8262dfa
Author: Jer Noble <[email protected]>
Date: 2025-10-16 (Thu, 16 Oct 2025)
Changed paths:
M Source/WebCore/page/CaptionUserPreferencesMediaAF.cpp
M Source/WebCore/page/CaptionUserPreferencesMediaAF.h
M Source/WebCore/page/PageGroup.h
M Source/WebCore/platform/cf/MediaAccessibilitySoftLink.cpp
A Tools/TestWebKitAPI/SoftLinkShim.h
A Tools/TestWebKitAPI/Tests/WebCore/cocoa/CaptionPreferencesTests.mm
Log Message:
-----------
[Cocoa] "Classic" Caption Style does not display in Monospace font
rdar://162547048
https://bugs.webkit.org/show_bug.cgi?id=300863
Reviewed by Eric Carlson.
In 280864@main, a check was added to determine if the prefix of the font
description is ".AppleSystemUIFontMonospaced", but the order of the parameters
was backwards, meaning the test would only succeed if the string was an exact
match rather than a prefix. Additionally that font name was mapped
to "system-ui-monospaced", which is incorrect.
Swap the test parameter order to correctly test for strings which start with
".AppleSystemUIFontMonospaced". And correctly map that value to "ui-monospace".
Add a new test that "shims" the MediaAccessibility framework by replacing
the function pointers we generate with our SoftLinking macros, so that these
soft-linked methods return values controlled by the test. This set of tests
will be added in the future.
* Source/WebCore/page/CaptionUserPreferencesMediaAF.cpp:
(WebCore::CaptionUserPreferencesMediaAF::captionsDefaultFontCSS const):
* Source/WebCore/page/CaptionUserPreferencesMediaAF.h:
* Source/WebCore/page/PageGroup.h:
* Source/WebCore/platform/cf/MediaAccessibilitySoftLink.cpp:
* Tools/TestWebKitAPI/SoftLinkShim.h: Added.
(TestWebKitAPI::SoftLinkShim::SoftLinkShim):
(TestWebKitAPI::SoftLinkShim::~SoftLinkShim):
* Tools/TestWebKitAPI/Tests/WebCore/cocoa/CaptionPreferencesTests.mm: Added.
(TestWebKitAPI::TEST(CaptionPreferenceTests, ShimTest)):
(TestWebKitAPI::TEST(CaptionPreferenceTests, FontFace)):
Canonical link: https://commits.webkit.org/301678@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes