mirror of
https://github.com/servo/servo
synced 2026-05-05 06:32:13 +02:00
Make sure we do not skip the HaveMetadata state. Fixes a bunch of tests
This commit is contained in:
@@ -1314,6 +1314,11 @@ impl FetchResponseListener for HTMLMediaElementContext {
|
||||
}
|
||||
|
||||
if status.is_ok() {
|
||||
if elem.ready_state.get() == ReadyState::HaveNothing {
|
||||
// Make sure that we don't skip the HaveMetadata and HaveCurrentData
|
||||
// states for short streams.
|
||||
elem.change_ready_state(ReadyState::HaveMetadata);
|
||||
}
|
||||
elem.change_ready_state(ReadyState::HaveEnoughData);
|
||||
|
||||
elem.upcast::<EventTarget>().fire_event(atom!("progress"));
|
||||
|
||||
Reference in New Issue
Block a user