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
Product: WebKit
Classification: Unclassified
Component: Media Elements
: 528+ (Nightly build)
: All Mac OS X 10.5
: P2 Normal
Assigned To: Nobody
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-10-15 14:36 PDT by Andrew Scherkus
Modified: 2009-10-16 15:03 PDT (History)
3 users (show)

See Also:


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

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Scherkus 2009-10-15 14:36:00 PDT
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 Andrew Scherkus 2009-10-15 14:39:18 PDT
Created attachment 41246 [details]
Round 1
Comment 2 Andrew Scherkus 2009-10-15 15:36:55 PDT
Comment on attachment 41246 [details]
Round 1

Digging around some more I found more bugs... I'll keep working on this patch.
Comment 3 Andrew Scherkus 2009-10-15 17:59:33 PDT
Created attachment 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 Andrew Scherkus 2009-10-15 18:09:01 PDT
Created attachment 41256 [details]
Round 3

Removed useless findMediaElement() line from video-src-empty.html
Comment 5 Eric Seidel 2009-10-16 13:30:58 PDT
CCing the media master.
Comment 6 Eric Carlson 2009-10-16 13:55:04 PDT
Comment on attachment 41256 [details]
Round 3


> +        <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 Andrew Scherkus 2009-10-16 14:37:02 PDT
Created attachment 41330 [details]
Round 4

Valid -> Invalid
Comment 8 WebKit Commit Bot 2009-10-16 15:03:50 PDT
Comment on attachment 41330 [details]
Round 4

Clearing flags on attachment: 41330

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