Commit graph

187 commits

Author SHA1 Message Date
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
Tetsuharu OHZEKI
0fccf5e386 Split TCast::to into TCast::to_unchecked and TCast::to. 2014-03-20 23:41:59 +09: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
bors-servo
cc77b28761 auto merge of #1925 : saneyuki/servo/1874, r=jdm
Fix #1874
2014-03-19 14:47:13 -04:00
Lars Bergstrom
a6100563a6 Rust upgrade for new master rebase 2014-03-18 22:00:48 -05: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
Tetsuharu OHZEKI
d200a2e444 Use 'NodeConstants' instead of magic numbers. 2014-03-16 14:03:28 +09:00
Tetsuharu OHZEKI
6ecb9ba4b6 Don't call bind_to_tree when appending a node to another node that isn't in the tree (fixes #1874). 2014-03-15 23:21:33 +09:00
bors-servo
2d2fae5fc5 auto merge of #1894 : khodzha/servo/node_normalize, r=Ms2ger
To resolve issue #1823 (without DOM Range updates)
2014-03-15 06:14:14 -04:00
Shamir Khodzha
574fba310f implemented Node.normalize() 2014-03-14 17:46:35 +04: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
Bruno de Oliveira Abinader
1703c427bc Implement Node.cloneNode
Spec:
http://dom.spec.whatwg.org/#dom-node-clonenode

Closes #1240.
2014-03-13 12:34:31 -04:00
bors-servo
047cc05f5a auto merge of #1889 : pcwalton/servo/fix-borrow-flags-race, r=jdm
r? @jdm
2014-03-12 20:52:46 -04:00
Manish Goregaokar
a2e15df4ab Add compareDocumentPosition (fixes #1794) to Node 2014-03-12 17:40:06 +05:30
Patrick Walton
d303f50784 script: Fix a borrow flags race in layout on .owner_doc(). 2014-03-11 17:46:43 -07:00
bors-servo
cdec81ea4f auto merge of #1834 : lpy/servo/issue1825, r=jdm
see #1825
2014-03-07 09:37:32 -05:00
lpy
0130392420 implement the setter for Node.nodeValue.(fixes #1825) 2014-03-07 13:11:02 +08:00
Ms2ger
b1f2a104cc Remove Node.hasAttributes() method that was removed from the specification. 2014-03-06 10:26:04 +01:00
Ms2ger
efde051666 Add pointers to specific issues in node.rs. 2014-03-05 18:54:20 +01:00
Ms2ger
daf9cf8b9d Move Node::SetTextContent to a better place. 2014-03-05 18:53:20 +01:00
Ms2ger
22a6485708 Move Node::Children to a better place. 2014-03-05 18:52:49 +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
lpy
77938bf6f6 Implement document_from_node and window_from_node helpers.(fixes #1761) 2014-03-01 21:57:37 +08:00
Saurabh Anand
5c5cb3e9a7 Move Error, Fallible, ErrorResult out of utils.rs (fixes #1749) 2014-02-28 13:32:00 +05:30
Patrick Walton
3c288a5b80 layout: Stop racing on the JSManaged borrow flags 2014-02-27 11:23:06 -08:00
Ms2ger
33792db657 Move ID management on binding to and unbinding from tree into Element. 2014-02-26 14:50:57 +01:00
Ms2ger
870ccd95d2 Remove DocumentTypeId. 2014-02-24 22:35:28 +01:00
Josh Matthews
625325434b Implement JSManaged for DOM objects. 2014-02-24 15:16:42 -05:00
Youngmin Yoo
13f9a66632 Impl Basic support for object element 2014-02-20 17:31:16 +09: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
6681476713 Use push_str instead of operator + for efficiency. 2014-02-16 10:25:12 +01:00
Adam Sinnett
ffcd3833de Change Text, Comment and ProcessingInstructions parent name from element to characterdata
All other node's parent type names reflect the actual type of the parent. This change extends that convention to the indicated nodes.

closes #1594
2014-02-15 13:52:33 -08:00
Ms2ger
59184bf6e1 Move DOMString into servo_util. 2014-02-14 12:48:51 +01:00
Bruno de Oliveira Abinader
b46de88a2b Added missing refs to DOM spec
This is a sub-task for #1655.
2014-02-10 11:40:43 -04:00
Bruno de Oliveira Abinader
4d4495b015 Implement Node.isEqualNode
Spec:
http://dom.spec.whatwg.org/#dom-node-isequalnode

Closes #1645.
2014-02-10 11:01:12 -04:00
HyunJune Kim
c8d503898a This is implement Hover Event. If over element, currently full reflow. after PR, will make partial reflow. 2014-02-10 11:16:07 +09:00
Bruno de Oliveira Abinader
99b3b144d4 Implement Node.contains
Spec:
http://dom.spec.whatwg.org/#dom-node-contains

Closes #1647.
2014-02-09 10:39:07 -04:00
Bruno de Oliveira Abinader
aa4b5bb948 Implement ProcessingInstruction DOM interface
Spec:
http://dom.spec.whatwg.org/#interface-processinginstruction

Closes #1619.
2014-02-06 14:41:55 -04:00
Adrien Bustany
2254a9e923 script: Pass the correct parent node to pre_insert in insertBefore
Closes #1572.
2014-02-05 16:27:22 +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
Tetsuharu OHZEKI
c95bb6403c Make Node::{remove, insert} take a descriptive enum for suppress_observers instead of a boolean. 2014-01-29 20:13:12 +09:00
Patrick Walton
9c3af574e5 layout: Perform cascading in parallel.
Speeds up the cascade by 3x.
2014-01-27 14:41:52 -08:00
Ms2ger
1117e24334 Remove AbstractNode::followed_by_doctype and AbstractNode::inclusively_followed_by_doctype in favour of iterators over following siblings. 2014-01-16 16:19:16 +01:00
Bruno de Oliveira Abinader
3b82b11054 Implement Node::replaceChild()
Implements Node:replaceChild() according to spec below:
http://dom.spec.whatwg.org/#concept-node-replace

Closes #1430.
2014-01-16 10:25:17 -04:00
bors-servo
89bb1194c1 auto merge of #1501 : Ms2ger/servo/add_child, r=jdm 2014-01-15 15:09:20 -08:00
Ms2ger
0157ff3ca3 Reorder changes in add_child to be correct. 2014-01-15 23:53:27 +01:00
bors-servo
c876335d22 auto merge of #1490 : pcwalton/servo/distrust-layout-new, r=jdm
Pointers to DOM nodes from layout could go stale if incremental reflow
does not correctly destroy dead nodes. Therefore, we ask the JavaScript
garbage collector to verify that each DOM node is indeed a valid pointer
before calling event handlers on it, and fail otherwise.

Depends on the `get-addressable-gc-thing` branches of `mozjs` and `rust-mozjs`.

r? @jdm
2014-01-14 22:06:56 -08:00