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
Ms2ger
3da1a206d8
Remove DerivedWrapper::wrap_shared, as it's unused.
2013-10-18 15:56:35 +02:00
bors-servo
ebe1c1353c
auto merge of #1077 : kmcallister/servo/jsstr, r=jdm
...
This doesn't resolve the big questions of how Servo will represent strings; it's just about doing the conversion correctly for our existing types.
2013-10-17 16:34:30 -07:00
Keegan McAllister
5f14ee617b
Check for allocation failure in domstring_to_jsval
2013-10-17 12:59:05 -07:00
Ms2ger
f58c7874b2
Remove an unnecessary cast::transmute call.
2013-10-17 19:35:53 +02:00
Keegan McAllister
2c302a4627
Convert between JS and Rust strings in a way that handles Unicode
...
This doesn't handle invalid UTF-16 and may not be efficient. It's just a small
change to make things better until we decide what we're doing about strings in
the long run.
Fixes #1068 .
2013-10-16 16:18:12 -07:00
Ms2ger
98cdf5c118
Implement Document.createComment.
2013-10-11 12:40:35 +02:00
Bobby Holley
c4bbc4cd37
Introduce mutable/immutable variants of reflector() with named lifetimes, and kill unsafe casts.
2013-10-10 13:11:24 +02:00
bors-servo
59d2d345c8
auto merge of #1013 : huonw/servo/text-iter, r=pcwalton
...
And 3 other minor clean-ups: removing a redundant `if`, a redundant function call, and using `slice_from` where it is possible.
2013-10-09 16:19:24 -07:00
Bobby Holley
92e91c58da
Rename the |wrapper| field in Reflector.
2013-10-09 12:18:17 +02:00
Bobby Holley
549ac6a29b
Rename some local variables and shorten some lines.
...
This was done manually, and might benefit from a more careful review.
2013-10-09 12:15:56 +02:00
Bobby Holley
6bf740d967
Rename {get,set}_wrapper to {get,set}_jsobject. v1
2013-10-09 12:13:18 +02:00
Bobby Holley
62ddac8b6f
Rename get_wrappercache() to reflector(). v1
...
I also updated some variable names in the codegen.
2013-10-09 12:11:25 +02:00
Bobby Holley
2cbe2d7ce9
Rename WrapperCache to Reflector.
...
I think the abstraction from the raw JSObject is still probably worthwhile for
now.
2013-10-09 12:07:41 +02:00
Bobby Holley
0a0599ad9b
Rename CacheableWrapper to Reflectable.
2013-10-09 12:03:18 +02:00
Huon Wilson
451519b6ff
Use str.char_offset_iter instead of manually calling str.char_range_at.
2013-10-04 22:26:36 +10:00
Josh Matthews
bc81716c30
Make proxy finalizers retrieve the DOM object from the right slot.
2013-10-02 01:43:14 -04:00
Keegan McAllister
73c1a12f30
bindings: Return errors in Result rather than setting an out parameter
...
Fixes #909 .
2013-09-18 18:07:37 -07:00
Keegan McAllister
4b0680a136
Replace our rust_box with std::unstable::raw::Box
...
This will keep us in sync with compiler changes. In fact we had the 'prev' and
'next' fields in the wrong order (but we aren't using them).
2013-09-18 14:57:12 -07:00
Keegan McAllister
68ddc6b4ab
Make DOMString an alias for Option<~str>
...
Fixes #898 .
2013-09-18 14:46:42 -07:00
Jack Moffitt
0695e09568
Make CreateElement comply with the spec.
2013-09-14 09:07:20 -06:00
Josh Matthews
8ae725146c
Make Window store an @Page instead of a *Page and remove a bunch of unsafe code.
2013-09-12 14:45:47 -07:00
Josh Matthews
a31d950695
Remove unused old bindings helpers.
2013-09-12 14:41:03 -07:00
Ilyong Cho
0d4cfd0eb9
Add node.appendChild
2013-09-10 12:39:58 +09:00
Ilyong Cho
bcd7c0b8c6
Add node.removeChild
2013-09-10 11:35:31 +09:00
Josh Matthews
da599c6ccf
Make the global object be the Window object. Fixes #833 .
2013-09-09 10:25:39 -07:00
Brian Anderson
13a3865e4e
Update rust
2013-09-06 15:14:22 -07:00
Ms2ger
efff6be86c
Make CharacterData store a ~str rather than a DOMString, because its data can never be null.
2013-09-06 09:45:16 +02:00
Josh Matthews
329f92a41d
Add trace hooks for all generated derivatives of Node.
2013-09-04 13:13:03 -04:00
Keegan McAllister
317add5528
Warning police
2013-09-03 13:10:51 -07:00
Brian Anderson
4487b1c29a
Merge remote-tracking branch 'origin/master'
...
Conflicts:
src/components/script/dom/bindings/element.rs
src/components/script/dom/bindings/node.rs
src/components/script/dom/bindings/utils.rs
2013-08-30 13:44:44 -07:00
Josh Matthews
75f1cbd76f
Remove all handwritten bindings code.
2013-08-30 13:13:46 -04:00
Brian Anderson
1026556477
Update Rust
2013-08-29 15:36:36 -07:00
bors-servo
bda4c424a4
auto merge of #760 : jdm/servo/protolist, r=kmcallister
2013-08-22 21:57:37 -07:00
Josh Matthews
1c087ab507
Remove the hardcoded prototype count.
2013-08-22 16:19:10 -04:00
aydin.kim
da2ccb048e
fix dom bindings for android(and 32bit system) build
2013-08-22 15:26:11 +09:00
bors-servo
d0e47f427e
auto merge of #726 : metajack/servo/dlist, r=jdm
...
r? @jdm
2013-08-21 09:12:41 -07:00
Jack Moffitt
dd45751368
Fix macos interators, warnings, and updating submodules.
2013-08-16 14:30:34 -06:00
Keegan McAllister
a2d9810b69
Update Rust version again
...
This gets us the new runtime.
2013-08-15 13:56:29 -07:00
Keegan McAllister
307f1074d3
For loops and misc changes
2013-08-15 13:56:29 -07:00
Keegan McAllister
be061a9aa0
Library changes
2013-08-15 13:55:40 -07:00
Keegan McAllister
ffe60ea027
Trait changes, and eliminate 'copy'
2013-08-15 13:55:40 -07:00
Ilyong Cho
eadda9411b
Add get_ref() method to DOMString
2013-08-15 11:36:15 -06:00