Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 932c6b3792a18c2d61a0094b8fbe5f56ef98856e
https://github.com/WebKit/WebKit/commit/932c6b3792a18c2d61a0094b8fbe5f56ef98856e
Author: Simon Pena <[email protected]>
Date: 2026-05-28 (Thu, 28 May 2026)
Changed paths:
A
LayoutTests/media/encrypted-media/mock-getSupportedCapabilitiesForAudioVideoType-expected.txt
A
LayoutTests/media/encrypted-media/mock-getSupportedCapabilitiesForAudioVideoType.html
M Source/WebCore/platform/encryptedmedia/CDMPrivate.cpp
M Source/WebCore/platform/network/ParsedContentType.h
M Source/WebCore/testing/MockCDMFactory.cpp
M Source/WebCore/testing/MockCDMFactory.h
M Source/WebCore/testing/MockCDMFactory.idl
Log Message:
-----------
[EME] getSupportedCapabilitiesForAudioVideoType can accidentally include
unsupported capabilities
https://bugs.webkit.org/show_bug.cgi?id=315667
Reviewed by Philippe Normand.
A local copy of accumulatedConfiguration is created where we append the
requestedCapability, then supportsConfigurationWithRestrictions is
queried. This means that requestedCapabilities cannot be accidentally
added when they aren't supported.
Tested on HBO Max, which was incorrectly serving HEVC content on a system
that didn't support it, and added a new test verifying this behaviour
after extending the MockCDMFactory to support this.
*
LayoutTests/media/encrypted-media/mock-getSupportedCapabilitiesForAudioVideoType-expected.txt:
Added.
*
LayoutTests/media/encrypted-media/mock-getSupportedCapabilitiesForAudioVideoType.html:
Added.
* Source/WebCore/platform/encryptedmedia/CDMPrivate.cpp:
(WebCore::CDMPrivate::getSupportedCapabilitiesForAudioVideoType):
* Source/WebCore/platform/network/ParsedContentType.h:
* Source/WebCore/testing/MockCDMFactory.cpp:
(WebCore::MockCDM::supportsConfigurationWithRestrictions const):
* Source/WebCore/testing/MockCDMFactory.h:
(WebCore::MockCDMFactory::setUnsupportedVideoCodecs):
* Source/WebCore/testing/MockCDMFactory.idl:
Canonical link: https://commits.webkit.org/314032@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications