Commit graph

75 commits

Author SHA1 Message Date
Ms2ger
eaedeb07cb Update Rust. 2014-05-22 16:36:40 -06: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
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
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
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
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
dce92dc44a Add NodeHelpers::get_bounding_content_box(). 2014-04-24 14:36:43 +09:00
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
bors-servo
038730c4bb auto merge of #2054 : sankha93/servo/imageattr, r=jdm 2014-04-15 12:49:14 -04: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
Sankha Narayan Guria
58e5feca9f HTMLImageElement attribute getters and setters 2014-04-08 08:44:38 +05:30
Ms2ger
bb732ef4e6 Introduce a set_uint_attribute method. 2014-04-06 14:19:30 +02:00
Ms2ger
31eee791dd Upgrade rust. 2014-04-04 20:10:32 +02:00
lpy
d4d6fcb5f0 Get rid of match statements in layout queries in script_task 2014-04-02 01:28:44 +08:00
Ms2ger
038a195ead Move attributes-related functions onto JS<Element>. 2014-03-20 19:42:42 +01:00
Josh Matthews
64c0de9fe7 Warning police. 2014-03-18 09:31:22 -05:00
Lars Bergstrom
bbac8aa5c3 Rust upgrades 2014-03-18 09:30:35 -05: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
Ms2ger
a15cac53bc Don't use the Untraceable fields outside the module they're defined in.
This pattern will become illegal with the next Rust upgrade.
2014-03-12 14:30:19 +01:00
Patrick Walton
d303f50784 script: Fix a borrow flags race in layout on .owner_doc(). 2014-03-11 17:46:43 -07:00
lpy
77938bf6f6 Implement document_from_node and window_from_node helpers.(fixes #1761) 2014-03-01 21:57:37 +08:00
Josh Matthews
fa542e5de7 De-@mut the script crate. 2014-02-28 13:42:03 -05:00
Saurabh Anand
5c5cb3e9a7 Move Error, Fallible, ErrorResult out of utils.rs (fixes #1749) 2014-02-28 13:32:00 +05:30
lpy
8fc5ba5dc6 Add url getter to Page and fix users of Page url with it.(fixes #1762) 2014-02-28 14:13:08 +08:00
Ms2ger
432e9cb3a7 Call after_remove_attr before removing the attribute, and rename it before_remove_attr. 2014-02-26 14:50:57 +01:00
Ms2ger
938f6baf9e Handle removing the src attribute from an img element (fixes #1469). 2014-02-25 19:33:49 +01:00
Ms2ger
9faf2c89e4 Pass the attribute value to the update_image function. 2014-02-25 19:17:58 +01:00
Ms2ger
e834e532c5 Fetch the image cache inside the update_image function. 2014-02-25 19:12:34 +01:00
Ms2ger
2639e36c78 Remove the image loading workaround from the parser. 2014-02-25 19:04:47 +01:00
Josh Matthews
625325434b Implement JSManaged for DOM objects. 2014-02-24 15:16:42 -05:00
Ms2ger
59184bf6e1 Move DOMString into servo_util. 2014-02-14 12:48:51 +01:00
Ms2ger
0f5c9a35b9 Use DOMString more consistently. 2014-02-13 19:32:59 +01:00
Simon Sapin
33f8ef618b Rename make_url/current_url to parse_url/base_url, to align with spec terminology. 2014-02-01 17:51:15 +01:00
Simon Sapin
624e2714d4 Move script::dom::namespace into util, in order to use it from style later. 2014-01-25 12:14:06 -08:00
Jack Moffitt
c443bcbfff Change get_attr() to get_attr_val_for_layout().
The old code was used by both layout and script, but was erroneously
borrowing for the layout case (which causes parallelism
problems). script now uses only `value_ref()` or `get_attribute()`, and
layout now has its own unsafe version that dances around the borrows of
`@mut Attr`.
2014-01-22 17:02:21 -07:00
Tetsuharu OHZEKI
7a9ecffaa0 Implement Element.removeAttribute()/removeAttributeNS(). 2014-01-13 23:12:08 +09:00
Jack Moffitt
a7ef1cd35e Upgrade to latest Rust. 2014-01-12 19:45:45 -07:00
Ms2ger
95913d1fed Pass a Namespace to Element::get_attr. 2013-12-23 13:03:52 +01:00
Patrick Walton
be69a503fe script: Eliminate the phantom type in favor of just whitelisting methods
that layout can safely call.

This is simpler. Currently, the set of methods is not safe, but I plan
to lock it down more soon.
2013-12-17 18:07:12 -08:00
Patrick Walton
199ca33b72 script: Make trees less generic 2013-12-17 13:46:14 -08:00
Simon Sapin
b290823f4d Fix #1264: support namespaced attribute selectors. 2013-12-10 17:53:12 +00:00
Tetsuharu OHZEKI
f5ef4365f4 Stop passing DOMStrings via borrowed pointer. (#1201) 2013-11-14 20:35:36 +09:00