Huon Wilson
94e4ab3eaf
Remove some unnecessary transmutes.
...
These can either be done by implicit `&` -> `*` coercions, explicit `*`
-> `*` casts, or an explicit `&*x` `*` -> `&` re-borrow (which is still
unsafe, but significantly more controlled compared to a `transmute`).
2014-03-25 22:23:55 +11:00
lpy
f6d912a94f
Remove |unused| field from DOMClass.( fixes #1960 )
2014-03-22 15:17:44 +08:00
Ms2ger
6ee2e29e62
Make unwrap and unwrap_object less generic.
2014-03-20 23:26:22 +01:00
Ms2ger
a4fc6961a8
Remove support for non-castable arguments.
2014-03-20 23:17:46 +01:00
lpy
34b73837d3
Rename squirrel_away_unboxed to squirrel_away_unique.( fixes #1938 )
2014-03-20 17:14:31 +08:00
bors-servo
7f188500a1
auto merge of #1915 : Ms2ger/servo/wrap-return-js, r=jdm
...
This lets us avoid the sketchy tricks in JS::new and Window::new, where we
kept an unsafe pointer to the native object across the Wrap call that
consumed the owned pointer.
2014-03-19 19:01:48 -04:00
Josh Matthews
64c0de9fe7
Warning police.
2014-03-18 09:31:22 -05:00
Josh Matthews
f279abbf9f
Remove all traces of Box representation from bindings. Work around file read runtime problem.
2014-03-18 09:30:35 -05:00
Lars Bergstrom
bbac8aa5c3
Rust upgrades
2014-03-18 09:30:35 -05:00
Ms2ger
4ad3b6ccd1
Return a JS<T> from *Binding::Wrap rather than a JSObject.
...
This lets us avoid the sketchy tricks in JS::new and Window::new, where we
kept an unsafe pointer to the native object across the Wrap call that
consumed the owned pointer.
2014-03-14 13:06:51 +01:00
Ms2ger
256a5cbf9f
Replace GetReflector by an implementation of ToJSValConvertible.
2014-03-11 17:23:48 +01:00
Ms2ger
58382471d5
Replace jsval_to_str and jsval_to_domstring with a FromJSValConvertible implementation.
2014-03-10 16:31:13 +01:00
Ms2ger
17411db8ca
Replace str_to_jsval and domstring_to_jsval by a ToJSValConvertible implementation.
2014-03-10 16:31:13 +01:00
Ms2ger
9709dce07a
Use the JSVal member functions to replace JSVAL_IS_* and JSVAL_TO_*.
2014-03-09 18:52:05 +01:00
Ms2ger
84b0f45ed5
Use FooValue() functions.
2014-03-09 18:51:38 +01:00
Ms2ger
9fbfb1909c
Move JSVal into the jsval module.
2014-03-08 18:49:55 +01:00
bors-servo
da6a571f9e
auto merge of #1811 : Ms2ger/servo/Wrap_, r=jdm
2014-03-05 09:31:44 -05:00
Ms2ger
23d9a5af4b
Fail if JS_NewUCStringCopyN returns null in str_to_jsval.
2014-03-04 22:49:25 +01:00
Ms2ger
787108deaf
Pass &JS<Window> to the Wrap functions in codegen.
2014-03-04 15:08:44 +01:00
Ms2ger
23b7277b54
Pass &JS<Window> to reflect_dom_object.
2014-03-04 14:13:58 +01:00
Ms2ger
99574f14d9
Return a JS<Window> from global_object_for_{dom,js}_object.
2014-03-04 11:41:46 +01:00
Ms2ger
c8bd9615f4
When calling constructors, retrieve the global object from the callee rather than the JSContext.
2014-03-04 10:46:49 +01:00
Ms2ger
ec935eca0f
Remove unused argument to CreateInterfaceObject and now unused code.
2014-03-03 16:10:43 +01:00
Ms2ger
bec0dcd023
Remove unused argument to CreateInterfaceObjects2.
2014-03-03 16:00:49 +01:00
Josh Matthews
fa542e5de7
De-@mut the script crate.
2014-02-28 13:42:03 -05:00
Saurabh Anand
5c5cb3e9a7
Move Error, Fallible, ErrorResult out of utils.rs ( fixes #1749 )
2014-02-28 13:32:00 +05:30
lpy
f706123208
Move Traceable, trace_reflector from utils.rs to trace.rs.( fixes #1748 )
2014-02-26 19:33:21 +08:00
Josh Matthews
232ca59708
Address review comments. Fix union conversion result mistakes introduced in refactoring.
2014-02-24 17:20:37 -05:00
Josh Matthews
625325434b
Implement JSManaged for DOM objects.
2014-02-24 15:16:42 -05:00
bors-servo
edd7e32fdb
auto merge of #1602 : pcwalton/servo/more-inlines, r=jdm
...
9% improvement in style recalc on the rainbow page.
r? @jdm
2014-02-18 14:08:12 -05:00
Ms2ger
68f534c45a
Use DOMString in a few more places in utils.rs.
2014-02-16 09:50:29 +01:00
Ms2ger
6cc8a4dfba
Simplify string construction in InterfaceObjectToString.
2014-02-16 09:50:10 +01:00
Ms2ger
59184bf6e1
Move DOMString into servo_util.
2014-02-14 12:48:51 +01:00
Ms2ger
5765de12cd
Remove unused Reflector::get_rootable.
2014-02-07 13:04:31 +01:00
Patrick Walton
a0fbc04ba5
script: Inline some hot functions used in flow constructions.
...
9% improvement in style recalc on the rainbow page.
2014-01-30 18:05:12 -08:00
Jack Moffitt
a7ef1cd35e
Upgrade to latest Rust.
2014-01-12 19:45:45 -07:00
Ms2ger
29a7405b4e
Report exceptions to JS when the DOM implementation fails.
...
As a bonus, adds some debugging statements.
2013-12-05 16:14:02 +01:00
Tom Schuster
f9433e357c
trace window.location and window.navigator
2013-11-24 23:11:11 +01:00
Patrick Walton
155befe10d
Rewrite flow construction to be incrementalizable and parallelizable.
...
This replaces flow construction with a strict bottom-up tree traversal,
allowing for parallelism. Each step of the traversal creates a flow or
a `ConstructionItem`, similar to how Gecko works. {ib} splits are
handled by not creating `InlineFlow`s until the containing block is
reached.
This should be able to be incrementalized by storing the `Flow` from
layout to layout, and performing fixups during flow construction
and/or wiping containing blocks in a previous pass.
2013-11-18 11:24:11 -08:00
Tetsuharu OHZEKI
f5ef4365f4
Stop passing DOMStrings via borrowed pointer. ( #1201 )
2013-11-14 20:35:36 +09:00
Ms2ger
08afc6d19d
Don't pass nullable strings to native DOM methods that want non-nullable strings. Fixes #1207 .
2013-11-12 13:57:18 +01:00
Ms2ger
803cd4b7cf
Make DOMString represent a non-nullable string.
2013-11-12 13:32:53 +01:00
James Graham
15b9d4d199
Initial support for Attr and namespaces.
2013-11-12 17:39:04 +09:00
Ms2ger
793d87f07d
Rewrite jsval_to_str and introduce jsval_to_domstring.
2013-11-09 14:49:15 +01:00
Ms2ger
255864a843
Simplify InterfaceObjectToString.
2013-11-09 14:07:09 +01:00
Ms2ger
610d1649cd
Introduce jsid_to_str to simplify jsval_to_str callers that have an id.
2013-11-09 14:05:53 +01:00
Ms2ger
80a6103f7d
Remove Reflectable::GetParentObject.
2013-11-06 21:56:47 +01:00
Ms2ger
edd9c1d5eb
Remove WrapNativeParent and nearby cleanup.
2013-11-06 21:56:36 +01:00
Ms2ger
ccd9306681
Remove DerivedWrapper.
2013-11-06 18:16:31 +01:00
Ms2ger
4074412107
Pass a Reflector to WrapNewBindingObject instead of a Reflectable, and rename it GetReflector.
2013-11-06 17:52:59 +01:00