Commit graph

269 commits

Author SHA1 Message Date
Ms2ger
25542e3f7e Replace most ~"string"s with "string".to_owned(). 2014-05-04 09:39:07 +02:00
Ms2ger
243814022e Replace all ~"" with "".to_owned(). 2014-05-03 22:17:45 +02:00
Josh Matthews
91278da9dd Address review comments. 2014-05-03 14:18:31 -04:00
Josh Matthews
46a33b4b38 Fix up the virtual method unsoundness. 2014-05-03 14:18:31 -04:00
Josh Matthews
0f2d0b1dc3 Address review comments. 2014-05-03 14:18:31 -04:00
Josh Matthews
7b3e6d1f21 Remove all root collections. 2014-05-03 14:18:31 -04:00
Josh Matthews
522d3f167b s/Unrooted/Temporary/g 2014-05-03 14:18:31 -04:00
Josh Matthews
109410900c Move all methods on T to JSRef<T> or JS<T> as appropriate. 2014-05-03 14:18:30 -04:00
Josh Matthews
7daa97c7e5 Remove abstract_self. 2014-05-03 14:18:30 -04:00
Josh Matthews
76783b029e Move WebIDL methods to traits implemented by JSRef types. 2014-05-03 14:18:30 -04:00
Josh Matthews
dfdda0098a Remove JS::get/get_mut to enforce sound rooting practices. 2014-05-03 14:18:30 -04:00
Josh Matthews
d7b96db33c Implement safe rooting strategy via Unrooted, Root, JSRef, and JS. 2014-05-03 14:18:30 -04:00
Josh Matthews
ffdc3f5b32 Turn on GC all the time. Fix rooting errors during parsing and storing timers. Fix borrow errors during tracing. 2014-05-03 14:18:30 -04:00
Tetsuharu OHZEKI
78856c87a4 Remove the 'pub use self::BindingDeclarations::*;' export. 2014-05-01 18:49:16 +09:00
Ms2ger
55ed05f2c7 Use Vec for the remaining ~[T]s in script. 2014-04-28 23:06:26 +02:00
Ms2ger
25357434e1 Make Element::attrs 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
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
bors-servo
b35d830999 auto merge of #2192 : evilpie/servo/children, r=Ms2ger
Fixes #2186
2014-04-22 16:52:17 -04:00
Tom Schuster
4c057deaf9 Implement ParentNode.children for Document and Element
Also implement it for DocumentFragment
2014-04-22 22:19:52 +02:00
Tetsuharu OHZEKI
cdbe179acb Make Attr handles all setting value. 2014-04-22 16:15:15 +09: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
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
Ms2ger
a3d13c35a2 Remove the IElement trait. 2014-04-10 10:27:32 +02:00
Josh Matthews
6388dec996 Add overridable tree binding/unbinding behaviour. 2014-04-10 10:27:32 +02:00
Josh Matthews
f5d1907195 Integrate Element's after_set/remove behaviour into the virtual method hierarchy. 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
Ms2ger
ea2560ef20 Rename before_remove_attr and after_set_attr to allow reusing those names in the next commit. 2014-04-09 23:55:45 +02:00
Ms2ger
ed18e4c948 Merge Attr::new_ns and Attr::new. 2014-04-08 20:17:15 +02:00
Ms2ger
d665ad5a17 Reimplement SetAttributeNS. 2014-04-08 20:17:15 +02:00
Ms2ger
bf73a47ce0 Reimplement SetAttribute. 2014-04-08 20:17:15 +02:00
Ms2ger
883d67882a Move SetAttributeNS onto JS<Element>. 2014-04-08 20:16:55 +02:00
Ms2ger
b19165e9e1 Move SetAttribute onto JS<Element>. 2014-04-08 20:16:55 +02:00
Ms2ger
3347c3ef80 Split out a do_set_attribute method. 2014-04-08 20:16:55 +02:00
bors-servo
6b1799caa3 auto merge of #2063 : lpy/servo/issue2059, r=Ms2ger
see #2059
2014-04-08 11:37:09 -04:00
bors-servo
51ff762bc5 auto merge of #1917 : lpy/servo/issue1822, r=jdm
see #1822
2014-04-08 10:49:14 -04:00
lpy
77941dc996 Move Node.namespaceURI to Element.(fixes #2059) 2014-04-08 22:13:28 +08:00
lpy
50aea70f98 Make sure getElementById always returns the first element with the given ID in tree order.(fixes #1822) 2014-04-08 12:21:58 +08:00
bors-servo
a65ff6089a auto merge of #2048 : Ms2ger/servo/set_uint_attribute, r=jdm 2014-04-07 12:34:18 -04:00
Daniel Glazman
4b0da08573 Implement Document.createElementNS. 2014-04-07 10:20:10 +02:00
Ms2ger
bb732ef4e6 Introduce a set_uint_attribute method. 2014-04-06 14:19:30 +02:00
Manish Goregaokar
05e793f4fb make attr getters/setters case insensitive (#1962) 2014-04-05 14:11:33 +05:30
bors-servo
2a5f82a764 auto merge of #2032 : brunoabinader/servo/html-whitespace, r=Ms2ger
Specs:
http://dom.spec.whatwg.org/#concept-ordered-set-parser
http://encoding.spec.whatwg.org/#ascii-whitespace

This PR implements the HTMLSpaceCharSplits iterator, used to split a string in a subset of strings separated by valid HTML space characters. Its first usage is upon splitting ```class``` attribute values.

Closes #1840.
2014-04-05 04:04:34 -04:00
Ms2ger
31eee791dd Upgrade rust. 2014-04-04 20:10:32 +02:00
Bruno de Oliveira Abinader
943743195f Split class names using split_html_space_chars helper function 2014-04-04 09:08:36 -04:00
lpy
ac5a634082 Get rid of match statements in Layout queries.(fixes #2019) 2014-04-02 00:55:33 +08:00