servo/components/script
bors-servo 3d7b17681d Auto merge of #11221 - izgzhen:blob-file-backend, r=Manishearth
Add file backend support for Blob and related

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy --faster` does not report any errors
- [x] These changes fix #10851, related to #11131
- [x] These changes do not require tests because the implementation is partial and can't work alone

1. Add new backend to `Blob` and a `BlobImpl` struct to abstract multiple backends
2. Rewrite most interfaces of `Blob` to accommodate the change
3. Change the `read` behaviour of `FileReader`, considering the case when blob is file-backed and not cached

The design is still immature, welcome comments!

- [x] I used `DOMRefCell` to cache the bytes in `BlobImpl`, is it sound?
- [x] The interfaces (like `BlobImpl::get_bytes`) handle requests in a default-to-empty way when the inner `DataSlice` is not cached. It might be possible to handle this condition better.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11221)
<!-- Reviewable:end -->
2016-06-01 05:09:21 -05:00
..
docs Move the DOM memory management blog post into the tree. 2015-10-29 17:25:00 +01:00
dom Auto merge of #11221 - izgzhen:blob-file-backend, r=Manishearth 2016-06-01 05:09:21 -05:00
parse Move DOMString back to script 2016-05-24 10:54:57 +02:00
task_source Removed unused imports 2016-05-15 22:24:26 +03:00
bluetooth_blacklist.rs Add WebBluetooth Blacklist support 2016-05-31 17:05:45 +02:00
build.rs
Cargo.toml Implement window.openURLInDefaultBrowser() (fixes #11292) 2016-05-27 16:16:02 +02:00
clipboard_provider.rs Remove ConstellationChan. 2016-05-19 17:13:44 +02:00
cors.rs Remove empty lines following braces. 2016-05-27 13:32:05 -04:00
devtools.rs Use JSautoCompartment in devtools handle_evaluate_js to avoid segfault 2016-05-27 15:12:27 +05:30
document_loader.rs Add file backend support for Blob and related 2016-06-01 09:47:07 +08:00
layout_interface.rs script: Keep the DOM-side viewport up to date when scrolling happens in 2016-05-31 14:12:51 -07:00
lib.rs Auto merge of #11221 - izgzhen:blob-file-backend, r=Manishearth 2016-06-01 05:09:21 -05:00
makefile.cargo Fix spurious rebuilds of the script crate 2015-10-08 21:37:56 -07:00
mem.rs Bump heapsize to 0.3 2016-02-13 11:13:19 +01:00
network_listener.rs refactors entities from script_thread into script_runtime 2016-04-06 12:46:49 +05:30
origin.rs Make script origins sendable and immutable. 2016-05-27 17:16:13 +02:00
reporter.rs Report CSS errors to script task for further processing. 2016-02-11 14:48:47 -05:00
script_runtime.rs script: Keep the DOM-side viewport up to date when scrolling happens in 2016-05-31 14:12:51 -07:00
script_thread.rs Auto merge of #11221 - izgzhen:blob-file-backend, r=Manishearth 2016-06-01 05:09:21 -05:00
textinput.rs Move DOMString back to script 2016-05-24 10:54:57 +02:00
timers.rs Remove empty lines following braces. 2016-05-27 13:32:05 -04:00
unpremultiplytable.rs add un-premultiply table for GetImageData 2015-10-20 04:51:29 -04:00
webdriver_handlers.rs Move DOMString back to script 2016-05-24 10:54:57 +02:00