Commit graph

150 commits

Author SHA1 Message Date
Charles Vandevoorde
44e05e224c Remove support for Blob::{close, isClosed} 2017-02-28 17:20:16 +01:00
Anthony Ramine
31e9d81c0f Make #[dom_struct] a proc_macro attribute 2017-02-24 01:50:51 +01:00
Corey Farwell
449f6337d4 Rename Reflectable to DomObject.
Fixes https://github.com/servo/servo/issues/8473.
2016-12-08 08:50:35 -10:00
Anthony Ramine
d8e92bb271 Rename Reflectable::global_scope to global 2016-10-06 21:36:41 +02:00
Anthony Ramine
19108aa330 Pass a &GlobalScope to WebIDL static methods and constructors 2016-10-06 21:35:49 +02:00
Anthony Ramine
9a48ebb245 Make dom::blob::read_file take a &GlobalScope 2016-10-06 21:35:47 +02:00
Anthony Ramine
bad49e4696 Introduce GlobalScope::resource_threads 2016-10-06 21:35:46 +02:00
Anthony Ramine
f38159b7d3 Introduce GlobalScope::get_url 2016-10-06 21:35:44 +02:00
Anthony Ramine
ae6af5172b Introduce Reflectable::global_scope 2016-10-06 21:35:38 +02:00
Anthony Ramine
fcb59d3057 Make reflect_dom_object take a &GlobalScope 2016-10-06 20:59:09 +02:00
Arthur Marble
55ff161ed5 Refactored a couple of files from codeStyle to code_style. 2016-09-17 20:31:46 -05:00
Arthur Marble
dd4907c985 Refactor isClosed_ to is_closed and relativeContentType to relative_content_type. 2016-09-17 20:31:46 -05:00
Arthur Marble
e7ffbf819a Replace typeString with type_string. 2016-09-17 20:31:46 -05:00
UK992
93a103ba73 Reorder use statements 2016-09-09 04:55:19 +02:00
Zhen Zhang
2527dc07f2 Burn SelectedFileId in fire 2016-08-22 10:05:01 +02:00
bors-servo
f4f212fd18 Auto merge of #12897 - izgzhen:improve-file-api-comments, r=Manishearth
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 -->
2016-08-17 06:38:34 -05:00
Zhen Zhang
cd9fc4919d Improve File API related comments 2016-08-17 11:06:25 +02:00
Zhen Zhang
06e29c0497 Improve Blob.Size() speed by avoid reading content 2016-08-16 23:17:54 +02:00
Zhen Zhang
17ae38a318 Add cancellability to file manager load and related refactoring 2016-08-02 23:51:51 +02:00
bors-servo
93b130f3f7 Auto merge of #12579 - izgzhen:fix-fileapi-ref, r=Manishearth
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 -->
2016-08-02 03:03:47 -05:00
Zhen Zhang
9c8ebd3ce1 Chunked ReadFile from file manager 2016-07-25 19:39:16 +02:00
Zhen Zhang
49ed453a59 Fix FileAPI's refcount implementation 2016-07-25 17:48:03 +02:00
Zhen Zhang
f598b5f7fd Patches of File API 2016-07-21 20:52:00 +02:00
bors-servo
fa432a5a34 Auto merge of #12400 - izgzhen:fix-type-string, r=Manishearth
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 -->
2016-07-18 07:19:49 -07:00
Zhen Zhang
fdc3a8e3ac Put Blob URL online 2016-07-15 20:33:51 +08:00
Zhen Zhang
8985f37fa7 Fix Blob type-string 2016-07-13 22:21:21 +08:00
Zhen Zhang
aea99e081b Refactor FileAPI implementation 2016-07-13 12:12:32 +08:00
Zhen Zhang
0ff6f313e8 Add FileID validity setting/checking logic to Blob URL implementation 2016-07-11 10:51:55 +08:00
Zhen Zhang
ab14777312 Remove DataSlice, fix #12249 2016-07-05 17:51:53 +08:00
Zhen Zhang
14d68968ed Integration and improvements of File API backends
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
2016-07-04 23:02:03 +08:00
Achal Shah
af325a9a3a Update Blob::{new, new_inherited} to take Strings 2016-06-17 07:43:11 -07:00
Zhen Zhang
f8fa9aaf42 Add unit testing to file manager; Replace uuid by stringified version in FileManagerThreadMsg 2016-06-10 02:20:52 +08:00
Zhen Zhang
43ad4ba585 Add file backend support for Blob and related
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
2016-06-01 09:47:07 +08:00
Josh Matthews
3cb8af20c2 Remove empty lines following braces. 2016-05-27 13:32:05 -04:00
Anthony Ramine
cdc7bca944 Move DOMString back to script
This entirely removes the 'non-geckolib' feature of the util crate.
2016-05-24 10:54:57 +02:00
Per Lundberg
2f7ed1d73e Removed unused imports
This fixes #11185.
2016-05-15 22:24:26 +03:00
Zhen Zhang
87fec3e026 Implement missing interfaces of File DOM object 2016-05-11 22:35:21 +08:00
Zhen Zhang
f43009333f Rewrite Blob constructor interface 2016-05-10 20:19:10 +08:00
Zhen Zhang
e0f3cdafe1 Fixes related to file input and File API 2016-05-02 12:52:28 +08:00
Yoav Alon
711c23ae39 updated Blob constructor to use optional, fixes https://github.com/servo/servo/issues/10779 2016-04-22 01:28:35 +03:00
Ms2ger
03d4bacc05 Use num-traits in script. 2016-04-20 15:23:43 +02:00
St.Spyder
34726d8b9e Implementation of Blob Constructor with test changes 2016-03-17 23:47:12 +05:30
Saurav Sachidanand
663e42bdbd Convert directly from DOMString to Vec<u8> 2016-03-11 23:38:16 +05:30
Chad Kimes
ce6075825d Add global default method for Reflectable trait 2016-01-11 20:23:47 -05:00
Chad Kimes
5e3bbdcafb Remove global field from Blob 2016-01-10 21:20:31 -05:00
David Raifaizen
76f689cd06 Changed blob to use DataSlice with Arc in order to limit wasteful copying of byte vector 2016-01-06 19:41:52 -05:00
Brandon Fairchild
b5e121a312 Update FileAPI spec links
The links in components/script/dom/blob.rs were pointing
to the old location.

Fixes #9157.
2016-01-05 15:48:30 -05:00
Tetsuharu OHZEKI
e8c12c1c6d Fix warnings: Use Vec.extend_from_slice instead of Vec.push_all 2015-12-10 16:49:29 -05:00
Ms2ger
0c61be7a57 Rustfmt some of script. 2015-11-18 11:14:05 +01:00
Alan Jeffrey
84bde75b42 Replaced DOMString constructor by conversion functions.
Replaced DOMString(...) by DOMString::from(...).
Replaced ....0 by String::from(...).
Removed any uses of .to_owner() in DOMString::from("...").
2015-11-12 17:52:59 -06:00