Bug 35088 - Setting src on <source> shouldn't restart the resource selection algorithm
Summary: Setting src on <source> shouldn't restart the resource selection algorithm
Status: RESOLVED WORKSFORME
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-18 03:47 PST by Simon Pieters (:zcorpan)
Modified: 2012-02-01 12:16 PST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Pieters (:zcorpan) 2010-02-18 03:47:11 PST
URLs (if applicable) :
Other browsers tested:
Add OK or FAIL after other browsers where you have tested this issue:
     Chrome: FAIL
  Firefox 3.x: has different bugs
         IE 7: N/A
         IE 8: N/A
  Opera 10.50 beta: OK

What steps will reproduce the problem?
1. Consider:

<video><source></video>
<script>
onload = function(){
  document.body.firstChild.firstChild.src = 'test.mp4';
}
</script>

What is the expected result?

This should not load anything, because the resource selection algorithm 
should have been started during parsing and have discarded the <source> 
element (so that "pointer" is between the <source> and the end of the list). 

What happens instead?

Safari happily loads the video. The author should be required to 
explicitly call load() per spec.
Comment 1 Simon Pieters (:zcorpan) 2010-02-18 03:47:39 PST
http://code.google.com/p/chromium/issues/detail?id=36120
Comment 2 Simon Pieters (:zcorpan) 2010-02-18 23:18:58 PST
If I run the script when clicking a button instead of onload, Safari still fails but Chrome passes (though I might have an older webkit for Safari).
Comment 3 Arun Patole 2012-02-01 01:44:14 PST
I couldn't reproduce this issue with the latest webkit code. Also the related chromium issue mentioned in Comment #1 is already closed.