[Webkit-unassigned] [Bug 45188] Setting innerHTML to a video element does not respect autoplay

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Sep 14 21:50:15 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=45188


Eric Carlson <eric.carlson at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #66987|review?, commit-queue?      |review-
               Flag|                            |




--- Comment #4 from Eric Carlson <eric.carlson at apple.com>  2010-09-14 21:50:15 PST ---
(From update of attachment 66987)
> +        * media/video-dom-autoplay2-expected.txt: Added.
> +        * media/video-dom-autoplay2.html: Added.

These check to make sure WebKit behaves the same in two slightly different situations, and have exactly
the same event handler test so I would prefer if they were combined into a single test.

> +<div id="container"></div>
> +<script src=media-file.js></script>
> +<script src=video-test.js></script>
> +
> +<script>
> +function isPlaying() {
> +    consoleWrite("EVENT(play)");
> +    findMediaElement();
> +    testExpected("video.paused", false);
> +    endTest();
> +}
> +    var src = findMediaFile("video", "content/test");
> +    var container = document.getElementById("container");

The function should be indented to match the rest of the <scrip> content.

In general I *greatly* pefer fully formed test files, eg. please add an HTML5 doctype, <html>, <body>, etc.


>  void HTMLMediaElement::removedFromDocument()
>  {
> -    if (m_networkState > NETWORK_EMPTY)
> +    if (m_networkState != NETWORK_EMPTY && m_networkState != NETWORK_NO_SOURCE)
>          pause(processingUserGesture());
>      if (m_isFullscreen)
>          exitFullscreen();

This is incorrect according to the spec, which in 4.8.9.8 says:

  When a media element is removed from a Document, if the media element's 
  networkState attribute has a value other than NETWORK_EMPTYthen the user 
  agent must act as if the pause() method had been invoked.

What actually happens to prevent autoplay from happening? Is the problem that m_player is NULL so we call scheduleLoad?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list