<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Add some logic to decide when a video can control the videoControlsManager"
   href="https://bugs.webkit.org/show_bug.cgi?id=156089#c3">Comment # 3</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Add some logic to decide when a video can control the videoControlsManager"
   href="https://bugs.webkit.org/show_bug.cgi?id=156089">bug 156089</a>
              from <span class="vcard"><a class="email" href="mailto:eric.carlson&#64;apple.com" title="Eric Carlson &lt;eric.carlson&#64;apple.com&gt;"> <span class="fn">Eric Carlson</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=275421&amp;action=diff" name="attach_275421" title="Patch">attachment 275421</a> <a href="attachment.cgi?id=275421&amp;action=edit" title="Patch">[details]</a></span>
Patch

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

This looks good to me modulo the minor nits noted, but I am not a WK2 reviewer so someone else will have to give the official nod.

<span class="quote">&gt; Source/WebCore/html/HTMLMediaElement.cpp:4847
&gt; +        if (endedPlayback() &amp;&amp; document().page() &amp;&amp; is&lt;HTMLVideoElement&gt;(*this))</span >

As we discussed, this will cause issues when a video's src is changed in the 'ended' event to make a playlist. Probably worth filing a bug to investigate this.

<span class="quote">&gt; Source/WebCore/html/MediaElementSession.cpp:219
&gt; +    // FIXME: Audio elements should be able to have a controls manager as well. Audio elements
&gt; +    // should probably only have a controls manager if they started playing via a user gesture.</span >

It would be good to have a bug number here.

<span class="quote">&gt; Source/WebCore/html/MediaElementSession.cpp:233
&gt; +    if (renderer-&gt;clientWidth() &gt;= elementMainContentMinimumWidth &amp;&amp; renderer-&gt;clientHeight() &gt;= elementMainContentMinimumHeight) {
&gt; +        if (element.hasAudio() &amp;&amp; element.hasVideo())
&gt; +            return true;
&gt; +    }</span >

Do you care if the &lt;video&gt; is visible in the page or not?</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>