Commit graph

91 commits

Author SHA1 Message Date
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
Josh Matthews
e9c0606454 Remove maybe_ prefix from Promise methods. 2016-09-22 16:21:23 -04:00
Josh Matthews
498ccd41e8 Support an equivalent of Trusted<T> for Rc<Promise> objects named TrustedPromise. 2016-09-22 16:16:59 -04:00
Josh Matthews
27d44c8d10 Add a simple API to reject promises with DOM error values. 2016-09-22 16:16:58 -04:00
Josh Matthews
ae81ab3972 Create meaningful tests for native promise handlers. 2016-09-22 16:16:56 -04:00
Josh Matthews
f89355b85d Add integration tests for interacting with promises from native code. 2016-09-22 16:16:53 -04:00
Josh Matthews
a1091772ec Implement binding support for returning and accepting Promises in WebIDL. 2016-09-22 16:16:48 -04:00
Ms2ger
2d83e5a788 Implement the MozMap type.
Fixes #13144.
2016-09-21 14:03:34 +02:00
Keith Yeung
3976d974fc Properly generate typedef identities in unions 2016-09-07 21:48:46 -07:00
Anthony Ramine
6e1523f4ae Compile WebIDL return type "object" to NonZero<*mut JSObject> 2016-08-30 19:07:13 +02:00
Anthony Ramine
897a81e95b Improve some TestBinding methods
We make them return sensical things in a sensical way.
2016-08-30 19:06:41 +02:00
Malisa Smith
7fd65affab bindings generator: support default ByteString values in dictionary 2016-08-10 10:50:36 -07:00
Emilio Cobos Álvarez
0e3d4ab407
layout: Expand animation test mode to support not force-ticking layout. 2016-08-05 14:42:45 -07:00
Malisa Smith
56bdc002fc Union types now allow ByteString 2016-07-21 19:19:12 -07:00
bors-servo
4ae0897175 Auto merge of #12541 - jdm:seqseq, r=nox
Support sequences of sequences in generated bindings.

This fixes a blocker for #11897. `unroll` recursively gets the inner type of any sequence type encountered, so it's inappropriate for codegen that only wants the immediate inner type. However, if a type identifies as a sequence and is nullable, we need to reach through the nullable wrapper first. Gecko does very similar things.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #12528 (github issue number if applicable).
- [X] There are tests for these changes

<!-- 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/12541)
<!-- Reviewable:end -->
2016-07-21 14:24:52 -05:00
Josh Matthews
9ef848b65e Support sequences of sequences in generated bindings.
unroll recursively gets the inner type of any sequence type encountered, so it's inappropriate for codegen that only wants the immediate inner type. However, if a type identifies as a sequence and is nullable, we need to reach through the nullable wrapper first. Gecko does very similar things.
2016-07-21 10:26:57 -04:00
Emilio Cobos Álvarez
0b67b218d0
style: Add a new Timer structure to the shared style context, and basic infrastructure for controlling animations. 2016-07-20 09:05:53 -07:00
Zhen Zhang
ab14777312 Remove DataSlice, fix #12249 2016-07-05 17:51:53 +08:00
Corey Farwell
22928f50ac Refactor util::prefs operations to be methods on static struct. 2016-07-02 16:43:39 -04:00
Josh Matthews
fbf6c7fc2b Add a manual test for panicking while JS stack frames exist. 2016-06-22 09:35:19 -04:00
Josh Matthews
99e436eb05 Add a test that forces a crash. This makes it easy to manually check the output of a segfault with a complicated backtrace; the actual automation doesn't help us except to verify that the crash continues to happen as excepted. 2016-06-20 18:32:48 -04:00
Achal Shah
af325a9a3a Update Blob::{new, new_inherited} to take Strings 2016-06-17 07:43:11 -07: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
bors-servo
2f9796fa69 Auto merge of #11329 - c-rhodes:11320, r=jdm
Report use statements that use {} with only one entry

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 --faster` does not report any errors
- [X ] These changes fix #11320  (github issue number if applicable).

Either:
- [X] 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11329)
<!-- Reviewable:end -->
2016-05-27 07:11:17 -05:00
Cullen Rhodes
40acd24e8f Report use statements that use {} with only one entry 2016-05-27 10:18:44 +01:00
Anthony Ramine
e179cb02ff Implement [Func] 2016-05-27 00:55:02 +02: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
Emilio Cobos Álvarez
093f5c01e4
codegen: add tests for non-nullable non-required values 2016-05-13 09:42:59 +02:00
Emilio Cobos Álvarez
f893a2eaac
bindings: Add test for keywords in dictionaries 2016-05-12 20:39:31 +02:00
Zhen Zhang
f43009333f Rewrite Blob constructor interface 2016-05-10 20:19:10 +08:00
Josh Matthews
cb5bad63dc Implement hiding of interface members via Pref annotations. 2016-05-02 14:32:56 -04:00
Arnaud Marant
95c077af46 Issue #10348 Implement StringMozPreference, string preferences, WPT tests
I'm not exactly sure of the wanted semantics with boolean values.
2016-04-03 21:28:17 +02:00
Awal Garg
b1ff30f752 Allow setting preferences to false in WPT tests. closes #10161 2016-03-26 23:53:56 +05:30
Peter
3e78b54d46 Fixed compile error in generated code, when webidl constructors have same number of args
Edited test webidl to show issue, and fix
2016-03-03 20:21:48 +00:00
zakorgyula
6d6f23a69d Fixing issue with uniontypes not created with primitive types
refer to #9531
2016-02-18 11:08:47 +01:00
Alexander Lopatin
2be49404be Fix #9508: Beautify our union enums constructors 2016-02-07 02:55:21 +03:00
Emilio Cobos Álvarez
8859c617a8 webidl: Add test for interface and sequence in the same union 2016-01-15 14:20:23 +01:00
Emilio Cobos Álvarez
a76efa5eca webidl: Add test for interface sequences
Sequence interfaces return values worked before, but had no test.

Sequence interface arguments didn't work until the previous commit.
2016-01-15 14:20:22 +01:00
Emilio Cobos Álvarez
4ad1a8ddcc webidl: Implement sequences in unions
Unblocks #9053
2016-01-15 13:42:08 +01:00
Emilio Cobos Álvarez
1509d87545 codegen: Test WebIDL sequence arguments 2016-01-12 18:25:47 +01:00
Chad Kimes
ce6075825d Add global default method for Reflectable trait 2016-01-11 20:23:47 -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
bors-servo
e63b1e83d4 Auto merge of #8147 - nox:weakref, r=Ms2ger
Implement weak-referenceable JS-managed objects

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8147)
<!-- Reviewable:end -->
2015-11-13 06:22:40 +05:30
Anthony Ramine
d4ce25d07c Properly handle variadic arguments preceded by default values
I broke that in #8197.
2015-11-12 21:10:45 +01:00
Anthony Ramine
72c67efe96 Introduce trait WeakReferenceable
This allows to take weak references of JS-managed DOM objects.
2015-11-12 12:51:50 +01:00
Anthony Ramine
acb13dc899 Support variadic interface arguments (fixes #8159)
We use a RootedVec value in codegen, of which we use the `r()` method to
pass `&[&T]` to the interface methods.
2015-11-11 14:52:21 +01:00
Anthony Ramine
e66a361e08 Do not import union constructors in dom::testbinding 2015-11-11 14:19:36 +01:00
Anthony Ramine
6d72293681 Remove TestBinding::global
Use global_root_from_reflector() instead.
2015-11-11 14:19:35 +01:00
Ms2ger
e6aa976462 Use DOMString::new() somewhat consistently. 2015-11-04 12:09:10 +01:00