Bug 27623 - Video elements fires another "load" event when attached to DOM
Summary: Video elements fires another "load" event when attached to DOM
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Macintosh Intel OS X 10.5
: P2 Normal
Assignee: Eric Carlson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-23 13:27 PDT by Charles Ying
Modified: 2009-07-30 09:06 PDT (History)
2 users (show)

See Also:


Attachments
test reduction (651 bytes, text/html)
2009-07-23 13:27 PDT, Charles Ying
no flags Details
proposed patch (3.91 KB, patch)
2009-07-30 08:30 PDT, Eric Carlson
simon.fraser: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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