Commit graph

66 commits

Author SHA1 Message Date
Ms2ger
6077ed0ce8 Rename GlobalRoot::root_ref() to GlobalRoot::r() for consistency. 2015-01-01 20:38:04 +01:00
Ms2ger
1dad710063 Replace Root::deref() calls by Root::r() calls where possible.
This changes those calls that were already sound.
2015-01-01 20:36:43 +01:00
Ms2ger
c9f26dfd59 Rename Root::root_ref() to Root::r().
As it will be used much more widely after the upcoming changes, this limits
the effort reading and writing the method calls.
2015-01-01 20:36:43 +01:00
Ms2ger
1290c18794 Remove the 'b lifetime from Root.
It does not add any safety, as the reference is constructed from a raw pointer
without limiting the lifetime in any way.
2015-01-01 20:36:43 +01:00
Ms2ger
95ec20bd97 Remove the 'a lifetime from Root.
It does not add any safety, as the reference is constructed from a raw pointer
without limiting the lifetime in any way.
2015-01-01 20:36:43 +01:00
yodalee
bb087c238b use str to_jsval() now
xmlhttprequest.rs, CodegenRust.py
replace into_string().to_jsval() to to_jsval()

conversions.rs
DOMString to_jsval() use as_slice().tojsval() now
2015-01-01 02:17:33 +08:00
Bruno de Oliveira Abinader
bb577968e5 Codegen style fix 2014-12-30 12:40:49 -04:00
Bruno de Oliveira Abinader
7cca51b3b4 Codegen empty lines fix 2014-12-30 12:40:48 -04:00
Bruno de Oliveira Abinader
0721c624d9 Codegen indent fixes 2014-12-30 12:40:48 -04:00
Bruno de Oliveira Abinader
c950e3d61e Codegen whitespace fixes 2014-12-30 11:28:59 -04:00
Bruno de Oliveira Abinader
ab618dd9c7 Add support for named deleter
Closes #4469.
2014-12-29 12:58:48 -04:00
Manish Goregaokar
e9d1740e19 script: to_string() -> into_string() 2014-12-27 14:48:36 +01:00
bors-servo
0e6304dcf7 auto merge of #4467 : servo/servo/dataset, r=Ms2ger 2014-12-25 02:27:43 -07:00
Matt McCoy
bdb75c2146 This fixes #4166. throw_dom_exception will take the GlobalRef by value, and all generated code will pass it by value. 2014-12-24 17:16:48 -05:00
Ms2ger
919f2217f0 Implement dummy getOwnPropertyNames and enumerate traps. 2014-12-24 17:17:40 +01:00
Bruno de Oliveira Abinader
e0bab08754 Correct the generated code for NamedSetter calls. 2014-12-23 14:23:22 +01:00
Bruno de Oliveira Abinader
ade0b7be8e Use the custom defineProperty trap when it exists. 2014-12-23 14:22:30 +01:00
Bruno de Oliveira Abinader
c82eb3b1a4 Call the NamedGetter method from the get trap in proxy bindings. 2014-12-23 13:02:52 +01:00
Ms2ger
dc63735ca7 Revert PR #4038 for causing WPT failures. 2014-12-23 09:53:12 +01:00
bors-servo
a773bd5c45 auto merge of #4454 : amwatson/servo/global_update, r=jdm
Changed fn_wrap argument in reflect_dom_object() and reflect_node() to pass GlobalRef by value rather than by reference.  Fixes #4165
2014-12-20 17:51:44 -07:00
bors-servo
6efa7eedbc auto merge of #4452 : Ms2ger/servo/_obj_toString, r=jdm 2014-12-20 17:24:44 -07:00
Amanda Watson
582ba9d796 GlobalRef passed by value in reflect_dom_object, reflect_node #4165 2014-12-20 16:20:53 -08:00
Ms2ger
ef3901fceb Simplify _obj_toString by using JS_NewStringCopyN. 2014-12-20 16:40:20 +01:00
bors-servo
1f74e54bb2 auto merge of #4038 : brunoabinader/servo/dataset, r=Ms2ger
Spec: https://html.spec.whatwg.org/multipage/dom.html#dom-dataset

Closes #2974.
2014-12-20 08:06:44 -07:00
Ms2ger
96180ec3ad Move unwrap_jsmanaged and related machinery to conversions.rs. 2014-12-20 14:51:14 +01:00
Ms2ger
73c236ce3b Use unwrap() when finalizing.
This allows us to duplicate a little less code.
2014-12-20 14:07:23 +01:00
Ms2ger
b8c2573f4d Remove the proto_{id,depth} arguments from unwrap_jsmanaged.
Instead, we infer them from the type we're unwrapping into. This will prevent
any mismatches between the type we return and the type we check for.
2014-12-20 13:48:21 +01:00
Bruno de Oliveira Abinader
1533c07453 CodegenRust fixes for NamedGetter 2014-12-19 14:07:43 -04:00
Ms2ger
e2b75670bd Rename the PrototypeList enums to fix case build warnings. 2014-12-18 10:33:57 +01:00
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
Joseph Crail
c254d195ad Fix spelling mistakes in comments. 2014-12-11 23:56:29 -05:00
Tetsuharu OHZEKI
3681628936 Make callers of ${Derived}::${base}() use casts instead. 2014-11-28 06:00:23 +09:00
Mukilan Thiyagarajan
05bd182538 Fix binding generation for Callback Functions and Callback Interfaces 2014-11-15 18:29:48 +05:30
Keegan McAllister
642a3592c7 Fix interfaces test 2014-11-13 12:53:54 -05:00
Josh Matthews
bb7074698a Add KeyboardEvent stub. 2014-11-13 11:24:14 -05:00
Jack Moffitt
d1b433a3b3 Rust upgrade to rustc hash b03a2755193cd756583bcf5831cf4545d75ecb8a 2014-11-13 11:17:43 +10:00
Ms2ger
aa83388f38 Remove VoidVal.
There are no undefined constants in IDL.
2014-11-08 18:00:04 +01:00
Bruno de Oliveira Abinader
a9d68474c9 Remove warning from 'deleter' WebIDL codegen 2014-11-06 11:31:58 -08:00
Bruno de Oliveira Abinader
b50cfa56a9 Couple more fixes to handle 'setter' properties in WebIDL 2014-11-06 11:31:58 -08:00
Bruno de Oliveira Abinader
315f626393 Various fixes to CodegenRust.py 2014-11-03 17:26:23 -08:00
Mukilan Thiyagarajan
e023662571 Implement [LenientThis] support and enable it in Document.webidl
Closes issue #3760
2014-10-25 12:05:36 +05:30
Ms2ger
b60a601f56 Move jsstring_to_str and jsid_to_str to conversions.rs.
This appears to be a more sensible location for them.

Relevant to #433.
2014-10-16 10:42:09 +02:00
Kasey Carrothers
6d91e92c90 Add a to_js method to the casting trait code in CodegenRust.py
Replace the manual checks and calls to transmute_copy in /layout/wrapper.rs with calls to to_js

Fixes #3616
2014-10-14 19:06:53 -07:00
Patrick Walton
ee2ccc4f87 script: Use atom comparison in more places, especially for attributes.
75% improvement in style recalc for Guardians of the Galaxy.
2014-10-14 10:32:40 -07:00
bors-servo
f350879574 auto merge of #3666 : ttaubert/servo/issue/3644-privatize-dom, r=Manishearth
This PR removes public fields from all (hope I didn't miss any) DOM structs. Should |Page| be privatized as well? This PR additionally introduces a #[privatize] lint to ensure nobody accidentally re-introduces a public field.

All changesets compile separately if applied in the same order. Hope that helps reviewing but I can of course squash them before merging.
2014-10-13 22:00:37 -06:00
Tim Taubert
9a52bb8310 Privatize InheritTypes 2014-10-13 11:13:12 +02:00
Ms2ger
76ba40d5cb Remove support for {return,native,concrete}Type overrides in Bindings.conf.
We have no reason to support non-default type names, and this commit corrects
the computations for callbacks (which needed the override until now).
2014-10-10 13:13:43 +02:00
Tim Taubert
35f8270c64 Remove unnecessary deref()s (fixes #3586) 2014-10-09 15:01:54 +02:00
Ms2ger
c4d36b5721 Remove unused cx_for_dom_object function. 2014-09-25 22:35:38 +02:00