Bug 27623

Summary: Video elements fires another "load" event when attached to DOM
Product: WebKit Reporter: Charles Ying <charles_ying>
Component: New BugsAssignee: Eric Carlson <eric.carlson>
Status: RESOLVED FIXED    
Severity: Normal CC: rik, simon.fraser
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac (Intel)   
OS: OS X 10.5   
Attachments:
Description Flags
test reduction
none
proposed patch simon.fraser: review+

Description Charles Ying 2009-07-23 13:27:55 PDT
Created attachment 33363 [details]
test reduction

When a video element not attached to the DOM is loaded first (prior to attachment), then attached, a second "load" event is fired on the video element.

This manifests itself as a repeated load event in the sample code which adds the video to the DOM only after the video has finished loading.

This is illustrated by commenting out the "jQuery("#container").append(video);" line from the attached reduction.
Comment 1 Eric Carlson 2009-07-29 15:39:00 PDT
Looks like you forgot to attach the test case.
Comment 2 Charles Ying 2009-07-29 15:47:35 PDT
I think I attached it, it appears in the attachments as "test reduction"
Comment 3 Eric Carlson 2009-07-30 08:30:05 PDT
Created attachment 33784 [details]
proposed patch
Comment 4 Eric Carlson 2009-07-30 09:06:45 PDT
http://trac.webkit.org/changeset/46581