Commit graph

272 commits

Author SHA1 Message Date
Tetsuharu OHZEKI
975fee82da Remove needless mutabilities from script crate. 2014-06-22 21:22:58 +09:00
Ms2ger
c90a8529c5 Use internal mutability for Attr::value. 2014-06-22 20:39:21 +09:00
Manish Goregaokar
53d0e4ec04 Use Traceable for NodeFlags 2014-06-16 22:04:17 +05:30
Ms2ger
bb0efdd5a2 Make some locals immutable. 2014-06-13 21:41:28 +02:00
bors-servo
7ed5041891 auto merge of #2649 : ebalint/servo/2580_JS_T_unrooted_replace, r=jdm
removed .clone() calls
modified from_rooted method parameter: T to &T
2014-06-13 14:33:03 -04:00
Ms2ger
e09ed14362 Remove Reflectable::mut_reflector. 2014-06-13 19:19:58 +02:00
Edit Balint
bda29ade09 Replace uses of JS<T>.unrooted() with JS::from_rooted #2580 2014-06-13 19:06:28 +02:00
bors-servo
da668f53d9 auto merge of #2616 : Ms2ger/servo/attrvalue, r=jdm
Obsoletes #2073.
2014-06-13 11:41:13 -04:00
Ms2ger
0803e5d0ac Implement support for parsed attributes.
This commit is heavily based on earlier work by Bruno Abinader in #2073.
2014-06-13 14:07:49 +02:00
Tetsuharu OHZEKI
28f8d16c87 Fix the assertion failure with inserting node contains child which has id into the document
https://github.com/mozilla/servo/issues/2630
2014-06-13 20:36:27 +09:00
bors-servo
897e39dcf3 auto merge of #2640 : Ms2ger/servo/derefmut, r=jdm 2014-06-11 17:19:51 -04:00
Ms2ger
687722da2d Pass immutable self to Node::{SetNodeValue, SetTextContent}. 2014-06-11 22:53:53 +02:00
bors-servo
baa97fe6e5 auto merge of #2632 : brunoabinader/servo/document-queryselectorall, r=Ms2ger
Spec:
http://dom.spec.whatwg.org/#dom-parentnode-queryselectorall

Closes #851.
2014-06-11 16:05:04 -04:00
Ms2ger
23a6b6823b Use internal mutability for Document::{quirks_mode, encoding_name}. 2014-06-11 19:51:08 +02:00
Ms2ger
288e0bc877 Use internal mutability for CharacterData::data. 2014-06-11 19:51:07 +02:00
Ms2ger
d230077f9f Stop mutating Element::namespace. 2014-06-11 19:51:07 +02:00
Ms2ger
6df6a7d512 Use internal mutability for Node.flags. 2014-06-11 19:51:07 +02:00
Bruno de Oliveira Abinader
b0e8f7cebf Added Node's query_selector_all helper function 2014-06-10 12:11:20 -04:00
Patrick Walton
7350cfb004 script: Inline is_element_for_layout and friends.
8% improvement on style recalc on Wikipedia.
2014-06-09 19:15:56 -07:00
Ms2ger
efe69f3a82 Make Attr::value private. 2014-06-08 17:09:22 +02:00
bors-servo
f1194fc85b auto merge of #2607 : bjz/servo/leeeeeak, r=jdm
Introduced by yours-truly in 7212c3573e

Oopsie.
2014-06-06 17:49:21 -04:00
bors-servo
b52fbe0a5f auto merge of #2591 : brunoabinader/servo/document-queryselector-v3, r=jdm
This is a subtask for #2254 & #2576.

Spec:
http://dom.spec.whatwg.org/#dom-parentnode-queryselector
2014-06-06 17:22:25 -04:00
Bruno de Oliveira Abinader
c89112dabf Fixed traversal issues 2014-06-06 13:40:08 -07:00
Brendan Zabarauskas
bf21217504 Fix leak
Introduced by yours-truly in 7212c3573e

Oopsie.
2014-06-06 12:26:30 -07:00
Tetsuharu OHZEKI
2aa1554b0c Remove needless '&self mut' from VirtualMethods trait. 2014-06-07 00:58:43 +09:00
Bruno de Oliveira Abinader
249c484c24 Implement querySelector for Document 2014-06-05 16:54:26 -07:00
Bruno de Oliveira Abinader
f78d04b620 Implement TNode for JS<Node> 2014-06-05 16:54:26 -07:00
Brendan Zabarauskas
7212c3573e Use bitflags! for NodeFlags 2014-06-05 15:43:57 -07:00
Jack Moffitt
629c4c6afe Upgrade Rust. 2014-06-05 09:58:59 -06:00
bors-servo
246c9759be auto merge of #2555 : brson/servo/warnings, r=metajack
Depends on https://github.com/mozilla-servo/rust-fontconfig/pull/19, https://github.com/mozilla-servo/rust-harfbuzz/pull/21, https://github.com/mozilla-servo/rust-hubbub/pull/23, https://github.com/mozilla-servo/rust-layers/pull/68, https://github.com/mozilla-servo/sharegl/pull/29, https://github.com/mozilla-servo/rust-mozjs/pull/85.
2014-06-02 20:46:25 -04:00
Brian Anderson
c85e2c9594 Eliminate some warnings 2014-06-02 17:42:10 -07:00
Ms2ger
97efd122a3 Rename BindingDeclarations to Bindings. 2014-06-02 19:48:42 +02:00
Ms2ger
c675421279 Remove low-level pointer stitching methods from Node.
There is no good reason for the additional abstraction here.

This commit also adds assertions that were suggested in XXX comments.
2014-06-02 13:33:59 +02:00
Tetsuharu OHZEKI
3819ebb740 Remove needless '&mut self' from node.rs. 2014-06-02 04:28:04 +09:00
Tetsuharu OHZEKI
25a6deda4d Remove needless lifetime parameter from LayoutNodeHelpers. 2014-06-02 00:40:09 +09:00
Tetsuharu OHZEKI
106627e6eb "JS<T>::from_raw" should accept "*T" instead of "*mut T" 2014-05-31 01:10:19 +09:00
Tetsuharu OHZEKI
b4463c1fb2 Use Cell/RefCell for interior mutability of Node. 2014-05-30 03:54:24 +09:00
Tetsuharu OHZEKI
b0239b5a5a Use Cell/RefCell for interior mutability of Element. 2014-05-30 03:53:07 +09:00
Ms2ger
d5cb4377ef Use *mut T for the T* pointers in SpiderMonkey. 2014-05-26 18:19:44 +02:00
Ms2ger
eaedeb07cb Update Rust. 2014-05-22 16:36:40 -06:00
bors-servo
fbcfe78bf6 auto merge of #2388 : zwarich/servo/cssom, r=jdm
Implementing the CSSOM requires giving the script task access to the
computed style for a node. Moving it into a new SharedLayoutData struct
member of LayoutDataRef seems to be the best way to achieve this.

This is the first step towards #1721.
2014-05-12 16:46:10 -04:00
Cameron Zwarich
0e67202bc2 Move the computed style to a new SharedLayoutData struct.
Implementing the CSSOM requires giving the script task access to the
computed style for a node. Moving it into a new SharedLayoutData struct
member of LayoutDataRef seems to be the best way to achieve this.

This is the first step towards #1721.
2014-05-09 13:22:50 -07:00
Martin Robinson
300004f3e9 Use == instead of match for tests against a single enum value
The performance of using == should now equal that of match, so many
identity methods can be simplified to a single line.

Fixes #1596.
2014-05-08 17:11:00 -07:00
Glenn Watson
51ef2f06ba Rename from_unrooted to from_temporary. Fixes #2332. 2014-05-07 09:25:32 +10:00
Harry Maclean
6f310a5c20 Implement ChildNode.remove() 2014-05-05 14:04:25 -04:00
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