On caption menu item doesn't enable text tracks
07ed9244b847e843991ca9e31e9a9a413023cf91
On caption menu item doesn't enable text tracks rdar://166158394 https://bugs.webkit.org/show_bug.cgi?id=304048 Reviewed by NOBODY (OOPS!). Make "On" behave similarly to "Auto", which is to enable the highest scoring text track available. Additionally, mark languages in the subtitle menu as checked when they will be enabled by the "On" menu item. Drive-by fix: Pass track and element parameters into CaptionUserPreferences by reference rather than by pointer value. Test: media/modern-media-controls/tracks-support/on-off-text-track.html * LayoutTests/media/modern-media-controls/resources/media-controls-utils.js: * LayoutTests/media/modern-media-controls/tracks-support/on-off-text-track-expected.txt: Added. * LayoutTests/media/modern-media-controls/tracks-support/on-off-text-track.html: Added. * Source/WebCore/Modules/mediacontrols/MediaControlsHost.cpp: (WebCore::MediaControlsHost::captionMenuOnItem): (WebCore::MediaControlsHost::showMediaControlsContextMenu): * Source/WebCore/Modules/mediacontrols/MediaControlsHost.h: * Source/WebCore/Modules/mediacontrols/MediaControlsHost.idl: * Source/WebCore/html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::configureTextTrackGroup): (WebCore::HTMLMediaElement::setSelectedTextTrack): * Source/WebCore/page/CaptionUserPreferences.cpp: (WebCore::CaptionUserPreferences::textTrackSelectionScore const): (WebCore::CaptionUserPreferences::textTrackLanguageSelectionScore const): * Source/WebCore/page/CaptionUserPreferences.h: * Source/WebCore/testing/Internals.cpp: (WebCore::Internals::controlsHostForMediaElement): * Source/WebCore/testing/Internals.h: * Source/WebCore/testing/Internals.idl:
https://github.com/WebKit/WebKit/commit/07ed9244b847e843991ca9e31e9a9a413023cf91
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/ecb0e2a0cca71f272f221d87ba84f80553693120)
| Misc | iOS, visionOS, tvOS & watchOS | macOS | Linux | Windows | Apple Internal |
|---|---|---|---|---|---|
| โ ๐งช style | โ ๐ ios | โ ๐ mac | โ ๐ wpe | โ ๐ win | โณ ๐ ios-apple |
| โ ๐งช bindings | โ ๐ ios-sim | โ ๐ mac-AS-debug | โ ๐งช wpe-wk2 | โณ ๐งช win-tests | โณ ๐ mac-apple |
| โ ๐งช webkitperl | โ ๐งช ios-wk2 | โ ๐งช api-mac | โ ๐งช api-wpe | โณ ๐ vision-apple | |
| โ ๐งช ios-wk2-wpt | โ ๐งช api-mac-debug | โ ๐ wpe-cairo-libwebrtc | |||
| โ ๐งช api-ios | โ ๐งช mac-wk1 | โ ๐ gtk | |||
| โ ๐ vision | โ ๐งช mac-wk2 | โ ๐งช gtk-wk2 | |||
| โ ๐ vision-sim | โ ๐งช mac-AS-debug-wk2 | โ ๐งช api-gtk | |||
| โ ๐งช vision-wk2 | โ ๐งช mac-wk2-stress | โ ๐ playstation | |||
| โ ๐ tv | โ ๐งช mac-intel-wk2 | ||||
| โ ๐ tv-sim | โ ๐ mac-safer-cpp | ||||
| โ ๐ watch | |||||
| โ ๐ watch-sim |
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/aca24fc9b2d1fae9e22a13d3586ce501d82584ea)
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/07ed9244b847e843991ca9e31e9a9a413023cf91)
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/b6c05d8fee2c6907abf4a9b9e78a0097d812d3c8)
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/78350363331f582e0c331324417b79b7db28e85a)
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/aba2b654b3326e31b3b4878d22d1e7342142e7d4)
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/c3bccafcbf041a5459f6666c19a9c3a86b7faa9e)
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/68956881aaedbbc6a32c20b2c42b9c26cc9dded9)
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/ec9c0a6e65562748895b6831a5ce4ff0799c5058)
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/cdd0b916cfe4706e4f52470895942c8bc1cf3020)
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/0cf6be5d55a8fd47ff92f154176329d4d0f7aab3)
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/64a112919f71689a4f646682b86df6d71008c0e6)
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/ac47a6498f8c6ad956c07c246ff370e303ad9819)
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/c06fd15170bea07dd1f4ca1d3fab1d1a55398fe3)
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/5a51757a833d12101b200075e5bb4243f0c90043)
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/b798d93d8775e76c36cae5410e725a9f2c3e3f8b)
EWS run on current version of this PR (hash https://github.com/WebKit/WebKit/commit/bc50903b64348abe774a7d260ac128dcf3405a5b)
Committed 304462@main (443099fc5edf): https://commits.webkit.org/304462@main
Reviewed commits have been landed. Closing PR #55295 and removing active labels.
๐ mac-apple