servo/components
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
..
canvas Remove empty lines following braces. 2016-05-27 13:32:05 -04:00
canvas_traits Simplify TOML syntax 2016-04-26 23:51:36 +02:00
compositing script: Keep the DOM-side viewport up to date when scrolling happens in 2016-05-31 14:12:51 -07:00
constellation Remove LayoutControlChan. 2016-05-28 11:43:19 +02:00
devtools Implement a dummy canCurrentlyRecord method in performance actor 2016-05-30 20:00:36 +02:00
devtools_traits Update internal crates to bitflags 0.7 2016-05-17 23:34:04 +02:00
gfx script: Keep the DOM-side viewport up to date when scrolling happens in 2016-05-31 14:12:51 -07:00
gfx_traits script: Keep the DOM-side viewport up to date when scrolling happens in 2016-05-31 14:12:51 -07:00
layout Auto merge of #11417 - stshine:flex-longhand-properties, r=mbrubeck 2016-05-31 21:44:06 -05:00
layout_traits Remove the ConvertPipelineIdToWebRender trait. 2016-05-28 14:10:32 +02:00
msg Remove the ConvertPipelineIdToWebRender trait. 2016-05-28 14:10:32 +02:00
net Auto merge of #11503 - szeged:adapter_macro, r=jdm 2016-05-30 14:39:34 -05:00
net_traits Remove empty lines following braces. 2016-05-27 13:32:05 -04:00
plugins Update Rust to 1.10.0-nightly (267cde259 2016-05-25) 2016-05-26 14:44:07 +02:00
profile script: Keep the DOM-side viewport up to date when scrolling happens in 2016-05-31 14:12:51 -07:00
profile_traits script: Keep the DOM-side viewport up to date when scrolling happens in 2016-05-31 14:12:51 -07:00
range Use num-traits in range. 2016-04-20 14:59:05 +02:00
script Auto merge of #11221 - izgzhen:blob-file-backend, r=Manishearth 2016-06-01 05:09:21 -05:00
script_traits script: Keep the DOM-side viewport up to date when scrolling happens in 2016-05-31 14:12:51 -07:00
servo Auto merge of #11221 - izgzhen:blob-file-backend, r=Manishearth 2016-06-01 05:09:21 -05:00
style Auto merge of #11417 - stshine:flex-longhand-properties, r=mbrubeck 2016-05-31 21:44:06 -05:00
style_traits Removed unused imports 2016-05-15 22:24:26 +03:00
util Remove the gonk port 2016-05-27 19:33:43 -05:00
webdriver_server Remove empty lines following braces. 2016-05-27 13:32:05 -04:00