<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:achristensen&#64;apple.com" title="Alex Christensen &lt;achristensen&#64;apple.com&gt;"> <span class="fn">Alex Christensen</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - TAKE 2: Pass down website autoplay policies to media elements"
   href="https://bugs.webkit.org/show_bug.cgi?id=167355">bug 167355</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Attachment #299566 Flags</td>
           <td>review?
           </td>
           <td>review-
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - TAKE 2: Pass down website autoplay policies to media elements"
   href="https://bugs.webkit.org/show_bug.cgi?id=167355#c2">Comment # 2</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - TAKE 2: Pass down website autoplay policies to media elements"
   href="https://bugs.webkit.org/show_bug.cgi?id=167355">bug 167355</a>
              from <span class="vcard"><a class="email" href="mailto:achristensen&#64;apple.com" title="Alex Christensen &lt;achristensen&#64;apple.com&gt;"> <span class="fn">Alex Christensen</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=299566&amp;action=diff" name="attach_299566" title="Patch">attachment 299566</a> <a href="attachment.cgi?id=299566&amp;action=edit" title="Patch">[details]</a></span>
Patch

View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=299566&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=299566&amp;action=review</a>

<span class="quote">&gt; Source/WebCore/loader/DocumentLoader.h:471
&gt; +    std::optional&lt;bool&gt; m_audioPlaybackRequiresUserGesture;
&gt; +    std::optional&lt;bool&gt; m_videoPlaybackRequiresUserGesture;</span >

I think this should be a 3-state enum, probably with a different name like m_audioPlaybackPolicy.
enum class AutoplayPolicy {
    RequireUserGesture,
    AutoPlay,
    AutoPlayWithoutSound,
    Default, &lt;-- This name might need to be more descriptive indicating that the policy hasn't been set by the WebsitePolicies so default to the Settings value.  Maybe just a comment explaining this.
    etc.
}
These two could probably even be made into one enum

<span class="quote">&gt; Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:820
&gt; +#if PLATFORM(MAC)</span >

Let's get rid of this now that it doesn't do anything for other platforms.

<span class="quote">&gt; Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:823
&gt; +        documentLoader-&gt;setAudioPlaybackRequiresUserGesture(std::optional&lt;bool&gt;());</span >

std::nullopt</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>