Commit graph

29 commits

Author SHA1 Message Date
Ms2ger
2d83e5a788 Implement the MozMap type.
Fixes #13144.
2016-09-21 14:03:34 +02:00
Anthony Ramine
0b689a8a31 Implement WebIDL namespaces 2016-09-08 11:01:34 +02:00
Anthony Ramine
51e46b11a3 Move WebIDL constants machinery to bindings::constant 2016-09-06 10:14:11 +02:00
Simon Sapin
c87180a2fb Move DOMRefCell to style. 2016-08-31 02:34:05 +02:00
Josh Matthews
812a761abf Implement pair iterators in WebIDL interfaces. 2016-08-24 11:26:01 -04:00
Anthony Ramine
fd7c4f8149 Remove utils::Prefable in favour of guard::Guard 2016-05-26 23:56:13 +02:00
Zhen Zhang
0385f60310 fix docs 2016-05-02 11:17:35 +08:00
Anthony Ramine
1559f5a39f Lazily define interface objects on globals (fixes #6419) 2016-02-25 15:56:47 +01:00
Ms2ger
ff0992401e Remove remaining reference to the long-disappeared JSRef type. 2016-01-18 09:52:23 +01:00
Anthony Ramine
833e0d2fac Refactor prototype initialisation
The function do_create_interface_objects is removed in favour of 4 functions:
create_callback_interface_object, create_interface_prototype_object,
create_noncallback_interface_object and create_named_constructors.

While this increases the amount of codegen'd code, this greatly improves the
readability of the code involved in this part of DOM, instead of having one function
doing 4 different things. We can always find a more adequate abstraction later.

NativeProperties and everything related to the interface objects have been removed
from the utils module.
2016-01-12 12:34:18 +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
bors-servo
92f9e58310 Auto merge of #8286 - eefriedman:no-move, r=nox
Remove unnecessary uses of #[no_move]

The patch makes RootCollection a bit safer by making the StackRootTLS hold
it in place.

RootedVec was doing an extremely delicate dance and just hoping nobody
messed it up; switch to a Box to be safe.

CodeGenRust seemed to be using no_move for no particularly good reason.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8286)
<!-- Reviewable:end -->
2015-11-08 12:51:00 +05:30
Eli Friedman
1a50fce67c Clean up some code related to #[no_move].
The patch makes RootCollection a bit safer by making the StackRootTLS hold
it in place.

The use of no_move in CodeGenRust was leftover from when roots couldn't
be moved.
2015-11-07 21:17:24 -08:00
rohan.prinja
45224028db more refactoring 2015-10-30 20:26:29 +09:00
Ms2ger
1f03ce1b1f Enable some warnings for generated code.
None of those warnings currently occur.
2015-10-16 12:07:57 +02:00
Ravi Shankar
889eec364b sorted the extern crate, mod & use declarations 2015-09-24 02:12:45 +05:30
Hugo Thiessard
6565e7b02f Issue #7390 correct the order of mod declaration 2015-09-18 22:02:04 +02:00
Anthony Ramine
cf6975f2a3 Do not allow unreachable_code in codegen anymore 2015-08-30 17:25:05 +02:00
Anthony Ramine
3c1c315838 Do not allow dead_code in codegen anymore 2015-08-30 17:19:42 +02:00
Anthony Ramine
2c8638ea9e Do not allow unused_parens in codegen anymore 2015-08-30 17:16:15 +02:00
Anthony Ramine
1064e7decc Do not allow unused_mut in codegen anymore 2015-08-30 16:53:35 +02:00
Anthony Ramine
aaa7a86381 Do not allow unused_unsafe in codegen anymore 2015-08-30 16:53:20 +02:00
Jack Moffitt
07d95627ca Generate code into OUT_DIR.
This is necessary to ensure Cargo knows when to rebuild. Normally
.gitignore would be enough to exclude these from Cargo's freshness
calculation, but https://github.com/rust-lang/cargo/issues/1729 prevents
this currently. This is the new, correct way to do these thigns, just
like the style crate does.
2015-06-17 16:18:22 -06:00
Manish Goregaokar
dcb0a0eab6 Fix some no_move errors 2015-04-28 04:20:45 +05:30
Ms2ger
03c526dd20 Add more documentation about the DOM bindings.
Most of this documentation is based on
<https://developer.mozilla.org/en-US/docs/Mozilla/WebIDL_bindings>.
2015-04-03 11:33:53 +02:00
Tetsuharu OHZEKI
f7fd34c0aa Introduce Finite<T: Float> for restricted values defined in WebIDL. 2015-03-25 10:45:30 +09:00
Manish Goregaokar
3479d3fa7f Replace unsafe_blocks by unsafe_code. 2015-03-21 10:27:32 +01:00
Ms2ger
e596afe22d Document the DOM.
This is by no means complete, but it is a good place to start.
2015-02-05 14:41:12 +01:00
Ms2ger
88ecb4c6f2 Create mod.rs files for the dom and dom::bindings modules.
This gives us a better place to put DOM documentation, which I'd like to start
adding.
2015-02-01 09:10:59 +01:00