Commit graph

213 commits

Author SHA1 Message Date
Tetsuharu OHZEKI
78856c87a4 Remove the 'pub use self::BindingDeclarations::*;' export. 2014-05-01 18:49:16 +09:00
Ms2ger
cc7d04702d Use Vec in Node mutation methods. 2014-04-28 23:06:26 +02:00
Ms2ger
02bcf97fd0 Make get_content_boxes return Vec. 2014-04-28 23:06:26 +02:00
Ms2ger
a1ec0cec11 Make TreeIterator::nodes a Vec. 2014-04-28 23:06:25 +02:00
Lars Bergstrom
948daf2422 This batch of changes upgrades Servo to work with the Rust upgrade as of
April 10, 2014. The main changes are to privacy, to work around the
issues with incorrect bounds on the libstd `Arc<Mutex<T>>`, and the
various API changes strewn throughout the libraries.
2014-04-27 15:46:12 -05:00
Harry Maclean
9e1f63e147 Ensure Node.Normalize() acts on all descendants by recursively calling it on all non-text child nodes. 2014-04-24 17:41:30 +01:00
Tetsuharu OHZEKI
7d511f4baf Add NodeHelpers::get_content_boxes(). 2014-04-24 14:37:02 +09:00
Tetsuharu OHZEKI
dce92dc44a Add NodeHelpers::get_bounding_content_box(). 2014-04-24 14:36:43 +09:00
bors-servo
3fc2c11910 auto merge of #2209 : lpy/servo/issue2188, r=Ms2ger
see #2188
2014-04-23 03:19:23 -04:00
lpy
dfe5215b88 Implement Element.localName.(fixes #2188) 2014-04-23 11:00:03 +08:00
Tetsuharu OHZEKI
b2fa6fa221 Make Attr::SetValue to reflect attribute change. 2014-04-22 16:15:15 +09:00
Sankha Narayan Guria
36bf23de20 Implement Element.prefix (Fixes #1737) 2014-04-22 00:27:06 +05:30
Josh Matthews
742f73ded5 Add transparent Traceable and Untraceable types to aid proper rooting practices, and replace ad-hoc Untraceable structs with empty Encodable implementations. 2014-04-17 17:41:09 -04:00
Matt Brubeck
28a013cfc5 Move child_inserted into VirtualMethods.
Follow-up from #1984.
2014-04-14 13:39:11 -07:00
Matt Brubeck
8c794c6739 Move inline stylesheet parsing out of HTML parser.
Instead, use shared code to parse stylesheet content when it is inserted,
whether during parsing or dynamically by script.

Based on work by sanools in #1350.
2014-04-14 11:14:07 -07:00
Josh Matthews
6388dec996 Add overridable tree binding/unbinding behaviour. 2014-04-10 10:27:32 +02:00
Josh Matthews
ca6cfb5bca Add support for trait-based virtual methods on Nodes, and use it for before_remove_attr and after_set_attr. 2014-04-10 10:27:28 +02:00
bors-servo
d7f450dbd7 auto merge of #2045 : Manishearth/servo/pub-struct-2044, r=SimonSapin
See #2044
2014-04-09 10:40:26 -04:00
Ms2ger
ed18e4c948 Merge Attr::new_ns and Attr::new. 2014-04-08 20:17:15 +02:00
lpy
77941dc996 Move Node.namespaceURI to Element.(fixes #2059) 2014-04-08 22:13:28 +08:00
Daniel Glazman
4b0da08573 Implement Document.createElementNS. 2014-04-07 10:20:10 +02:00
Manish Goregaokar
c397c5233d fix visibility warnings in script crate (#2044) 2014-04-06 02:53:55 +05:30
Ms2ger
31eee791dd Upgrade rust. 2014-04-04 20:10:32 +02:00
Bruno de Oliveira Abinader
b05e3666e4 Cleaned up recursive code in Node.clone 2014-03-26 09:49:08 -04:00
Bruno de Oliveira Abinader
990545c310 Implemented Node.adoptNode
Spec:
http://dom.spec.whatwg.org/#dom-document-adoptnode
2014-03-26 09:49:07 -04:00
Bruno de Oliveira Abinader
8a457a2caa Implemented Document.importNode
Spec:
http://dom.spec.whatwg.org/#dom-document-importnode
2014-03-26 09:49:07 -04:00
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