<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>228828</bug_id>
          
          <creation_ts>2021-08-05 08:25:33 -0700</creation_ts>
          <short_desc>WebM is not enabled in WebKitTestRunner when GPU Process is used</short_desc>
          <delta_ts>2022-08-11 03:35:23 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Media</component>
          <version>WebKit Local Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>228830</blocked>
    
    <blocked>243818</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Kimmo Kinnunen">kkinnunen</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>jer.noble</cc>
    
    <cc>peng.liu6</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1782211</commentid>
    <comment_count>0</comment_count>
    <who name="Kimmo Kinnunen">kkinnunen</who>
    <bug_when>2021-08-05 08:25:33 -0700</bug_when>
    <thetext>WebM is not enabled in WebKitTestRunner when GPU Process is used 


void GPUProcessProxy::updatePreferences()
{

....

WebPageGroup::forEach([&amp;] (auto&amp; 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) &amp;&amp; ENABLE(VP9)
        if (group.preferences().webMParserEnabled())
            hasEnabledWebMParser = true;
#endif
    });

...


It&apos;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)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1782215</commentid>
    <comment_count>1</comment_count>
    <who name="Kimmo Kinnunen">kkinnunen</who>
    <bug_when>2021-08-05 08:27:29 -0700</bug_when>
    <thetext>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&apos;t be any security downside, at least.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1783828</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2021-08-12 08:26:18 -0700</bug_when>
    <thetext>&lt;rdar://problem/81850175&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>