Commit graph

162 commits

Author SHA1 Message Date
Matt Brubeck
efc3683cc7 Fix commonmark Markdown warnings in docs, part 1
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.
2017-10-17 11:24:57 -07:00
Simon Sapin
aa15dc269f Remove use of unstable box syntax.
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.
2017-10-16 17:16:20 +02:00
Anthony Ramine
f87c2a8d76 Rename Root<T> to DomRoot<T>
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.
2017-09-26 09:49:10 +02:00
Anthony Ramine
577370746e Rename DOMRefCell<T> to DomRefCell<T>
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.
2017-09-26 09:49:08 +02:00
Anthony Ramine
7be32fb237 Rename JS<T> to Dom<T> 2017-09-26 09:48:55 +02:00
Anthony Ramine
0e3c54c191 Rename dom::bindings::js to dom::bindings::root 2017-09-26 02:19:05 +02:00
Corey Farwell
23e5bfaf27 Audit usages of unicode case-changing methods. 2017-07-26 23:44:01 +00:00
Simon Sapin
6ac106ca76 Remove some usage of rust-encoding 2017-05-27 13:34:23 +02:00
coalman
fc34b9a14d Fix indentation errors in servo rust code that tidy now finds. 2017-04-18 14:56:13 -04:00
Keith Yeung
b5722e50bb Provide MIME type data for File in formdata::get_file 2017-04-09 17:34:16 -07:00
bors-servo
7be9f0e7c4 Auto merge of #15519 - gterzian:implement_structuredclone_callbacks, r=jdm
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 -->
2017-03-21 21:17:25 -07:00
Gregory Terzian
5c4f0be048 support structured cloning for Blob 2017-03-22 09:52:35 +08:00
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