Commit graph

206 commits

Author SHA1 Message Date
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
rohan.prinja
6e774ea6eb merge from master 2015-11-03 19:01:23 +09:00
Ms2ger
7ccc5ad7da Support unions that contain USVStrings. 2015-10-30 16:24:04 +01:00
rohan.prinja
51df8e310b rearrange imports to be in alphabetical order 2015-10-30 20:28:59 +09:00
rohan.prinja
45224028db more refactoring 2015-10-30 20:26:29 +09:00
Ravi Shankar
889eec364b sorted the extern crate, mod & use declarations 2015-09-24 02:12:45 +05:30
Brandon Fairchild
de3547e401 Fix reported test-tidy errors for unmerged import blocks
This merges import blocks that were reported by tidy as unmerged.
2015-09-19 12:50:14 -04:00
Josh Matthews
40806977b5 Add infrastructure for supporting dashed CSS property names on CSSStyleDeclaration. 2015-08-28 13:15:16 -04:00
Anthony Ramine
709d347872 Make the traits for the IDL interfaces take &self 2015-08-27 22:27:43 +02:00
João Oliveira
fd87c8cb3e make dom_struct derive HeapSizeOf,
closes #7357
2015-08-27 01:17:48 +01:00
Johann Tuffe
ec07178b6f sort all uses 2015-08-20 20:47:12 +08:00
Bogdan Cuza
45145108da Measure heap memory usage for more types. Fixes #6951 2015-08-13 21:44:41 +03:00
Bogdan Cuza
233a769c67 Add spec links 2015-07-28 13:28:41 +02:00
Michael Wu
675267b782 Upgrade to SM 39 2015-06-19 18:42:48 -04:00
Francesc Bautista
4ada1e9421 added TestBindingProxy.webidl and testbindingproxy.rs files
added testbindingproxy to dom/mod.rs and fixed unused variable warning of testingbindingproxy.rs

removed useless GlobalField, removed brackets use statements with only 1 element and changed the description of TestBindingProxy.webidl

renamed reflector to reflector_ and removed unused import in testbinding.rs
2015-06-09 23:14:05 +02:00
Anthony Ramine
cc5eee48a6 Generate forwarded setters 2015-05-07 16:04:25 +02:00
Anthony Ramine
7e7b421db9 Fix generation of static JS methods
They now take a global argument.
2015-04-25 12:23:39 +02:00
Ms2ger
5570bc3798 Implement support for object in IDL. 2015-04-07 17:05:27 +02:00
Tetsuharu OHZEKI
f7fd34c0aa Introduce Finite<T: Float> for restricted values defined in WebIDL. 2015-03-25 10:45:30 +09:00
Tetsuharu OHZEKI
2bf2c0020b Add bindings support for unrestricted float/double values. 2015-03-25 10:45:30 +09:00
Ms2ger
bbbdb98897 Implement USVString. 2015-03-13 21:27:58 +01:00
Chris Manchester
c81f1cc541 Add support for BinaryName attribute to servo's codegen (fixes #4435) r=jdm 2015-02-27 18:28:01 -08:00
Ms2ger
505159a464 Import the util crate as util rather than servo_util.
This used to conflict with the util crate from the standard library, which
has long since been removed.

The import in layout has not been changed because of a conflict with the
util mod there.
2015-01-29 12:16:41 +01:00
Ms2ger
01ed338746 Move to to_owned rather than into_string.
into_string has been removed from Rust.
2015-01-20 14:49:07 +01:00
Matt McCoy
85df7f0d6f Fixes #4164 Make Constructor and new functions take GlobalRef by value 2015-01-07 18:52:41 -05:00
Ms2ger
6077ed0ce8 Rename GlobalRoot::root_ref() to GlobalRoot::r() for consistency. 2015-01-01 20:38:04 +01:00
Shing Lyu
6df9b7fd3a Bug #1820, add the optional "type" parameter to Blob 2015-01-01 16:23:21 +08:00
bors-servo
56d1b16d1b auto merge of #4173 : Manishearth/servo/a-more-dom-struct, r=kmcallister
Now `#[dom_struct]` also generates Reflectable impls, and there's another lint to ensure that a DOM struct only contains one bare DOM field (as the first field) or a Reflector.

A lot of this was generated by sed -- each autogenerated change has its own commit for easy review; these will be squashed later.
2014-12-27 22:12:45 -07:00
Manish Goregaokar
e9d1740e19 script: to_string() -> into_string() 2014-12-27 14:48:36 +01:00
Manish Goregaokar
552db382d6 Remove manual impls of Reflectors (autogen)
Obtained via:

 `find . -maxdepth 1 -type f -print0 | xargs -0 sed -z -i "s/\\nimpl Reflectable for[^{]*{[^}]*}[^}]*}\\n//"`
 `find . -maxdepth 1 -type f -print0 |xargs -0  grep -lZ dom_struct | xargs -0 grep -LZ  "reflector()\\|Reflector::new" |xargs -0 sed -z -i "s/use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object};/use dom::bindings::utils::reflect_dom_object;/"`

followed by semi-automated removal of leftover imports
2014-12-27 02:52:33 +05:30
Ms2ger
466faac2a5 Update rustc to revision 3dcd2157403163789aaf21a9ab3c4d30a7c6494d. 2014-12-17 15:19:45 -05:00
Edit Balint
3036c8d21d Fixed codegen error regarding Uint8ClampedArray 2014-12-16 11:03:01 +01:00
Shing Lyu
f2885b8fc7 Issue #1820 - Improve the Blob implementation 2014-12-09 22:52:19 +08:00
Michael Booth
2cbf5a3671 Updated reflect_dom_object to be passed by value 2014-11-30 19:47:52 +00:00
Mukilan Thiyagarajan
05bd182538 Fix binding generation for Callback Functions and Callback Interfaces 2014-11-15 18:29:48 +05:30
Manish Goregaokar
3f2cbb275b Use #[dom_struct] everywhere 2014-10-16 10:20:18 +05:30