Summary: | Removing a media element from the document may trigger last second load() | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Tor Arne Vestbø <vestbo> | ||||||
Component: | WebKit Misc. | Assignee: | Tor Arne Vestbø <vestbo> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | adele, koivisto | ||||||
Priority: | P3 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | All | ||||||||
OS: | All | ||||||||
Attachments: |
|
Description
Tor Arne Vestbø
2008-11-06 10:14:02 PST
Created attachment 24946 [details]
Preliminary patch for the first load() condition
Comment on attachment 24946 [details]
Preliminary patch for the first load() condition
Looks good. How about a test case?
Comment on attachment 24946 [details]
Preliminary patch for the first load() condition
Clearing review flag since this patch is lacking a test case and changelog.
No problem Eric, the patch was just for discussion. Assigning to me, and test case in the pipeline. Created attachment 25740 [details]
Patch with test case
Same check for networkState() != EMPTY but with test case.
There's still a code path that can trigger this condition: if the element is removed from the document while m_player is 0, but I'm not sure when that will happen.
We could guard for that too in removedFromDocument(), but would then miss out on the timeupdateEvent and pauseEvent sent from pause() (if that's even a code path we could hit). Any thoughts about this Antti?
Thanks!
Comment on attachment 25740 [details]
Patch with test case
r=me
|