Bug 30407 - HTML 5 media elements should set network state to NETWORK_EMPTY if they do not have a source
: HTML 5 media elements should set network state to NETWORK_EMPTY if they do no...
Status: RESOLVED FIXED
: WebKit
Media Elements
: 528+ (Nightly build)
: All Mac OS X 10.5
: P2 Normal
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2009-10-15 14:36 PST by
Modified: 2009-10-16 15:03 PST (History)


Attachments
Round 1 (4.09 KB, patch)
2009-10-15 14:39 PST, Andrew Scherkus
no flags Review Patch | Details | Formatted Diff | Diff
Round 2 (6.86 KB, patch)
2009-10-15 17:59 PST, Andrew Scherkus
no flags Review Patch | Details | Formatted Diff | Diff
Round 3 (6.83 KB, patch)
2009-10-15 18:09 PST, Andrew Scherkus
eric.carlson: review+
Review Patch | Details | Formatted Diff | Diff
Round 4 (6.83 KB, patch)
2009-10-16 14:37 PST, Andrew Scherkus
no flags Review Patch | Details | Formatted Diff | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2009-10-15 14:36:00 PST
Latest spec reads:
"Otherwise the media element has neither a src attribute nor a source element child: set the networkState to NETWORK_EMPTY, and abort these steps; the synchronous section ends."
http://www.whatwg.org/specs/web-apps/current-work/#concept-media-load-algorithm

I also updated the comments to match the steps outlined in the spec.
------- Comment #1 From 2009-10-15 14:39:18 PST -------
Created an attachment (id=41246) [details]
Round 1
------- Comment #2 From 2009-10-15 15:36:55 PST -------
(From update of attachment 41246 [details])
Digging around some more I found more bugs... I'll keep working on this patch.
------- Comment #3 From 2009-10-15 17:59:33 PST -------
Created an attachment (id=41255) [details]
Round 2

Few things (as mentioned in the patch):
  - Having no source is defined as a null src attribute and no <source> children, and should result in the element going to NETWORK_EMPTY
  - Empty string "" is considered a valid src attribute and should be loaded (before it slipped through the cracks and the element would get jammed in NETWORK_LOADING)
------- Comment #4 From 2009-10-15 18:09:01 PST -------
Created an attachment (id=41256) [details]
Round 3

Removed useless findMediaElement() line from video-src-empty.html
------- Comment #5 From 2009-10-16 13:30:58 PST -------
CCing the media master.
------- Comment #6 From 2009-10-16 13:55:04 PST -------
(From update of attachment 41256 [details])

> +        <p>Empty src attribute defined.  Valid URL and video should error.</p>

I think you meant to say "Invalid URL"

r=me with this change.

Thanks for catching this!
------- Comment #7 From 2009-10-16 14:37:02 PST -------
Created an attachment (id=41330) [details]
Round 4

Valid -> Invalid
------- Comment #8 From 2009-10-16 15:03:50 PST -------
(From update of attachment 41330 [details])
Clearing flags on attachment: 41330

Committed r49702: <http://trac.webkit.org/changeset/49702>
------- Comment #9 From 2009-10-16 15:03:54 PST -------
All reviewed patches have been landed.  Closing bug.