servo/components/script
bors-servo eab848df3e
Auto merge of #22433 - ferjm:player.eos.size, r=ceyusa
Improve implementation of media resource fetch algorithm

I have been observing inconsistent behaviors with my local tests depending of the media asset being played. I figured that we had these issues:

- We were setting the player EOS as soon as we got the first [process_response_eof](1046ae58a1/components/script/dom/htmlmediaelement.rs (L1596)). This is fine only if there is a single request. But that's not the case for multiple range requests or for seeks. Setting the player EOS makes the player appsrc reject any new buffers, and that breaks playback. Figuring out when is the right time to set the player EOS won't be a straight forward task, so my suggested fix for now is to simply not set it for now. It is a cleanup step that it would be nice to have but it is not mandatory.

- We were setting the input size more than once for multiple range requests and with the incorrect value. The fix uses the `content-length` or the `content-range` headers for single and range requests respectively.

- We were moving to the HaveEnoughData state if a fetch request succeded but no data was fetched from the network.

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22433)
<!-- Reviewable:end -->
2018-12-12 18:38:25 -05:00
..
docs Replace http with https in docs 2018-11-06 11:39:09 +01:00
dom Auto merge of #22433 - ferjm:player.eos.size, r=ceyusa 2018-12-12 18:38:25 -05:00
task_source Update MPL license to https (part 3) 2018-11-19 14:47:12 +01:00
body.rs Update MPL license to https (part 3) 2018-11-19 14:47:12 +01:00
build.rs Update MPL license to https (part 3) 2018-11-19 14:47:12 +01:00
Cargo.toml Make the parser decode input from document's encoding 2018-12-12 13:50:27 +01:00
clipboard_provider.rs Update MPL license to https (part 3) 2018-11-19 14:47:12 +01:00
CMakeLists.txt build(cmake): detect python binary for specified version 2018-03-13 09:25:06 -07:00
devtools.rs Update MPL license to https (part 3) 2018-11-19 14:47:12 +01:00
document_loader.rs Update MPL license to https (part 3) 2018-11-19 14:47:12 +01:00
fetch.rs refactored performance timing to align with updated spec 2018-11-20 16:21:32 +00:00
layout_image.rs refactored performance timing to align with updated spec 2018-11-20 16:21:32 +00:00
lib.rs Auto merge of #22225 - servo:webgl, r=emilio 2018-11-21 10:21:41 -05:00
mem.rs Update MPL license to https (part 3) 2018-11-19 14:47:12 +01:00
microtask.rs Update MPL license to https (part 3) 2018-11-19 14:47:12 +01:00
network_listener.rs refactored performance timing to align with updated spec 2018-11-20 16:21:32 +00:00
script_runtime.rs Update MPL license to https (part 3) 2018-11-19 14:47:12 +01:00
script_thread.rs Remove unused recycle argument from Document::unload 2018-11-30 18:08:08 +02:00
serviceworker_manager.rs Update MPL license to https (part 3) 2018-11-19 14:47:12 +01:00
serviceworkerjob.rs Update MPL license to https (part 3) 2018-11-19 14:47:12 +01:00
stylesheet_loader.rs refactored performance timing to align with updated spec 2018-11-20 16:21:32 +00:00
task.rs Update MPL license to https (part 3) 2018-11-19 14:47:12 +01:00
task_manager.rs Update MPL license to https (part 3) 2018-11-19 14:47:12 +01:00
task_queue.rs Update MPL license to https (part 3) 2018-11-19 14:47:12 +01:00
test.rs Update MPL license to https (part 3) 2018-11-19 14:47:12 +01:00
textinput.rs Auto merge of #22224 - pyfisch:composition-webdriver, r=nox 2018-11-20 03:32:25 -05:00
timers.rs Update MPL license to https (part 3) 2018-11-19 14:47:12 +01:00
unpremultiplytable.rs Update MPL license to https (part 3) 2018-11-19 14:47:12 +01:00
webdriver_handlers.rs Update MPL license to https (part 3) 2018-11-19 14:47:12 +01:00