Commit graph

130 commits

Author SHA1 Message Date
Lars Bergstrom
bbac8aa5c3 Rust upgrades 2014-03-18 09:30:35 -05: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
Ms2ger
53731b62ae Remove Reflectable::wrap_object_shared. 2013-11-06 16:40:16 +01:00
Ms2ger
c693cb185c Stop calling wrap_object_shared in WrapNewBindingObject and WrapNativeParent. Fixes #1083. 2013-11-06 16:01:57 +01:00
Josh Matthews
88f5c2b133 Add basic event dispatch with bubbling, capturing, and propagation interruption. 2013-11-05 12:58:28 -05:00
Josh Matthews
bb97fd13f3 Add Event and EventTarget hierarchy via gross AbstractFoo mechanism. 2013-11-05 12:58:28 -05:00
Josh Matthews
7ecf5abbbd Generate code for handling callbacks. Implement add/removeEventListener and hacky dispatchEvent proof-of-concept. 2013-11-05 12:58:28 -05:00
Ms2ger
ad658ba4ec Remove node::create. 2013-11-03 10:57:41 +01:00
Keegan McAllister
30a9fb2f45 Factor out a helper for eagerly creating JS wrappers 2013-10-22 12:52:04 -07:00
Jack Moffitt
94202661c0 Update to latest Rust. 2013-10-21 17:38:34 -06:00
Ms2ger
321e0373fa Merge BindingObject and Reflectable. 2013-10-18 17:02:16 +02:00