Bug 228828 - WebM is not enabled in WebKitTestRunner when GPU Process is used
Summary: WebM is not enabled in WebKitTestRunner when GPU Process is used
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks: 228830 webgltesting
  Show dependency treegraph
 
Reported: 2021-08-05 08:25 PDT by Kimmo Kinnunen
Modified: 2022-08-11 03:35 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kimmo Kinnunen 2021-08-05 08:25:33 PDT
WebM is not enabled in WebKitTestRunner when GPU Process is used 


void GPUProcessProxy::updatePreferences()
{

....

WebPageGroup::forEach([&] (auto& group) mutable {
        if (!group.preferences().useGPUProcessForMediaEnabled())
            return;

#if ENABLE(OPUS)
        if (group.preferences().opusDecoderEnabled())
            hasEnabledOpus = true;
#endif

#if ENABLE(VORBIS)
        if (group.preferences().vorbisDecoderEnabled())
            hasEnabledVorbis = true;
#endif

#if ENABLE(WEBM_FORMAT_READER)
        if (group.preferences().webMFormatReaderEnabled())
            hasEnabledWebMFormatReader = true;
#endif

#if ENABLE(MEDIA_SOURCE) && ENABLE(VP9)
        if (group.preferences().webMParserEnabled())
            hasEnabledWebMParser = true;
#endif
    });

...


It's not correct to iterate the WebPageGroup::forEach.
The WebKitTestRunner and MiniBrowser do not seem to use a preferences object that is part of a WebPageGroup.
They seem to be using a brand new preferences object.


Tested by:
run-webkit-tests  --debug --force media/media-can-play-webm.html 
(observe the double negative result expectations in internal)
Comment 1 Kimmo Kinnunen 2021-08-05 08:27:29 PDT
One option would be to just simplify and unilaterally always enable the codecs and the format reader in the GPU process. If I understand correctly there shouldn't be any security downside, at least.
Comment 2 Radar WebKit Bug Importer 2021-08-12 08:26:18 PDT
<rdar://problem/81850175>