aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/blob.rs
Commit message (Collapse)AuthorAgeFilesLines
* Upgrade to rustc 1.23.0-nightly (02004ef78 2017-11-08)Simon Sapin2017-11-091-1/+0
|
* Replace all uses of the `heapsize` crate with `malloc_size_of`.Nicholas Nethercote2017-10-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Servo currently uses `heapsize`, but Stylo/Gecko use `malloc_size_of`. `malloc_size_of` is better -- it handles various cases that `heapsize` does not -- so this patch changes Servo to use `malloc_size_of`. This patch makes the following changes to the `malloc_size_of` crate. - Adds `MallocSizeOf` trait implementations for numerous types, some built-in (e.g. `VecDeque`), some external and Servo-only (e.g. `string_cache`). - Makes `enclosing_size_of_op` optional, because vanilla jemalloc doesn't support that operation. - For `HashSet`/`HashMap`, falls back to a computed estimate when `enclosing_size_of_op` isn't available. - Adds an extern "C" `malloc_size_of` function that does the actual heap measurement; this is based on the same functions from the `heapsize` crate. This patch makes the following changes elsewhere. - Converts all the uses of `heapsize` to instead use `malloc_size_of`. - Disables the "heapsize"/"heap_size" feature for the external crates that provide it. - Removes the `HeapSizeOf` implementation from `hashglobe`. - Adds `ignore` annotations to a few `Rc`/`Arc`, because `malloc_size_of` doesn't derive those types, unlike `heapsize`.
* Fix commonmark Markdown warnings in docs, part 1Matt Brubeck2017-10-171-2/+2
| | | | | | | | Fixes warnings from rust-lang/rust#44229 when `--enable-commonmark` is passed to rustdoc. This is mostly a global find-and-replace for bare URIs on lines by themselves in doc comments.
* Remove use of unstable box syntax.Simon Sapin2017-10-161-1/+1
| | | | | | | | | | | | | | | | | | | | http://www.robohornet.org gives a score of 101.36 on master, and 102.68 with this PR. The latter is slightly better, but probably within noise level. So it looks like this PR does not affect DOM performance. This is expected since `Box::new` is defined as: ```rust impl<T> Box<T> { #[inline(always)] pub fn new(x: T) -> Box<T> { box x } } ``` With inlining, it should compile to the same as box syntax.
* Rename Root<T> to DomRoot<T>Anthony Ramine2017-09-261-5/+5
| | | | | | | In a later PR, DomRoot<T> will become a type alias of Root<Dom<T>>, where Root<T> will be able to handle all the things that need to be rooted that have a stable traceable address that doesn't move for the whole lifetime of the root. Stay tuned.
* Rename DOMRefCell<T> to DomRefCell<T>Anthony Ramine2017-09-261-7/+7
| | | | | | | | I don't want to do such a gratuitous rename, but with all the other types now having "Dom" as part of their name, and especially with "DomOnceCell", I feel like the other cell type that we already have should also follow the convention. That argument loses weight though when we realise there is still DOMString and other things.
* Rename JS<T> to Dom<T>Anthony Ramine2017-09-261-4/+4
|
* Rename dom::bindings::js to dom::bindings::rootAnthony Ramine2017-09-261-1/+1
|
* Audit usages of unicode case-changing methods.Corey Farwell2017-07-261-1/+2
|
* Remove some usage of rust-encodingSimon Sapin2017-05-271-6/+3
|
* Fix indentation errors in servo rust code that tidy now finds.coalman2017-04-181-6/+6
|
* Provide MIME type data for File in formdata::get_fileKeith Yeung2017-04-091-1/+1
|
* Auto merge of #15519 - gterzian:implement_structuredclone_callbacks, r=jdmbors-servo2017-03-211-0/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | implement structured clone callbacks - support Blob cloning <!-- Please describe your changes on the following line: --> 1. Implement stubs for structured clone callbacks. 2. Support Blob cloning. Partial implementation of https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [ ] These changes fix #15021 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- 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/15519) <!-- Reviewable:end -->
| * support structured cloning for BlobGregory Terzian2017-03-221-0/+5
| |
* | Remove support for Blob::{close, isClosed}Charles Vandevoorde2017-02-281-25/+1
|/
* Make #[dom_struct] a proc_macro attributeAnthony Ramine2017-02-241-0/+1
|
* Rename `Reflectable` to `DomObject`.Corey Farwell2016-12-081-1/+1
| | | | Fixes https://github.com/servo/servo/issues/8473.
* Rename Reflectable::global_scope to globalAnthony Ramine2016-10-061-6/+6
|
* Pass a &GlobalScope to WebIDL static methods and constructorsAnthony Ramine2016-10-061-3/+2
|
* Make dom::blob::read_file take a &GlobalScopeAnthony Ramine2016-10-061-5/+4
|
* Introduce GlobalScope::resource_threadsAnthony Ramine2016-10-061-3/+3
|
* Introduce GlobalScope::get_urlAnthony Ramine2016-10-061-10/+6
|
* Introduce Reflectable::global_scopeAnthony Ramine2016-10-061-1/+1
|
* Make reflect_dom_object take a &GlobalScopeAnthony Ramine2016-10-061-4/+6
|
* Refactored a couple of files from codeStyle to code_style.Arthur Marble2016-09-171-2/+2
|
* Refactor isClosed_ to is_closed and relativeContentType to ↵Arthur Marble2016-09-171-7/+7
| | | | relative_content_type.
* Replace typeString with type_string.Arthur Marble2016-09-171-5/+5
|
* Reorder `use` statementsUK9922016-09-091-2/+2
|
* Burn SelectedFileId in fireZhen Zhang2016-08-221-15/+12
|
* Auto merge of #12897 - izgzhen:improve-file-api-comments, r=Manishearthbors-servo2016-08-171-7/+9
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improve File API related comments r? @Manishearth --- - [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/12897) <!-- Reviewable:end -->
| * Improve File API related commentsZhen Zhang2016-08-171-7/+9
| |
* | Improve Blob.Size() speed by avoid reading contentZhen Zhang2016-08-161-5/+6
|/
* Add cancellability to file manager load and related refactoringZhen Zhang2016-08-021-11/+14
|
* Auto merge of #12579 - izgzhen:fix-fileapi-ref, r=Manishearthbors-servo2016-08-021-61/+79
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix FileAPI's refcount implementation Revise several intricate parts of FileAPI's internal refcounting-related implementation. Goal: Get it done right once and for all. r? @Manishearth <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes do not require tests because it is internal logic change <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- 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/12579) <!-- Reviewable:end -->
| * Fix FileAPI's refcount implementationZhen Zhang2016-07-251-61/+79
| |
* | Chunked ReadFile from file managerZhen Zhang2016-07-251-4/+16
|/
* Patches of File APIZhen Zhang2016-07-211-3/+4
|
* Auto merge of #12400 - izgzhen:fix-type-string, r=Manishearthbors-servo2016-07-181-25/+19
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix Blob type-string Use a final construction guard over type-string format; and other minor related cleanups r? @Manishearth <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- 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/12400) <!-- Reviewable:end -->
| * Fix Blob type-stringZhen Zhang2016-07-131-25/+19
| |
* | Put Blob URL onlineZhen Zhang2016-07-151-22/+22
|/
* Refactor FileAPI implementationZhen Zhang2016-07-131-26/+44
|
* Add FileID validity setting/checking logic to Blob URL implementationZhen Zhang2016-07-111-12/+50
|
* Remove DataSlice, fix #12249Zhen Zhang2016-07-051-91/+26
|
* Integration and improvements of File API backendsZhen Zhang2016-07-041-48/+158
| | | | | | 1. More complete origin check in FileManagerThreadMsg 2. Add reference counting logic to file manage store and script API 3. Integrate the support of slicing
* Update Blob::{new, new_inherited} to take StringsAchal Shah2016-06-171-6/+5
|
* Add unit testing to file manager; Replace uuid by stringified version in ↵Zhen Zhang2016-06-101-5/+4
| | | | FileManagerThreadMsg
* Add file backend support for Blob and relatedZhen Zhang2016-06-011-25/+109
| | | | | | | | Changes include: - Add BlobImpl to Blob, and related caching mechanism - Expose ResourceThreads to document_loader, workerglobalscope, worker, and global - Fix encode_multipart_form_data - Other small fixes to accommodate the above changes
* Remove empty lines following braces.Josh Matthews2016-05-271-3/+0
|
* Move DOMString back to scriptAnthony Ramine2016-05-241-1/+1
| | | | This entirely removes the 'non-geckolib' feature of the util crate.
* Removed unused importsPer Lundberg2016-05-151-1/+0
| | | | This fixes #11185.