Commit graph

239 commits

Author SHA1 Message Date
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
aaf0a61194 Store per-ScriptTask RootCollection in TLS and use that in favour of per-frame 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
8e10daba97 Allow controlling GC zeal via JS_GC_ZEAL environment variable. 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
Ms2ger
86df4c1fc1 Stop passing owned strings to fail!().
The ~"string" expression is being removed in upstream rust.
2014-05-03 12:16:52 +02:00
Ms2ger
55ed05f2c7 Use Vec for the remaining ~[T]s in script. 2014-04-28 23:06:26 +02:00
Ms2ger
20f649da71 Make get_nodes_under_mouse return Vec. 2014-04-28 23:06:26 +02:00
Ms2ger
2a3b693054 Make PageTree::inner and PageTreeIterator::stack a Vec. 2014-04-28 23:06:26 +02:00
Ms2ger
ebe4b416f3 Make ScriptTask::mouse_over_targets use Vec. 2014-04-28 23:06:25 +02:00
Ms2ger
3ecfb9197f Remove unused support for passing extra arguments for timers. 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
bors-servo
6d89e67194 auto merge of #2210 : saneyuki/servo/query, r=jdm
- see #356
- To decrease the conversion code, `JS<Node>` -> `Node`, I added API methods to `NodeHelpers`.
- I added APIs to `Page` not `Document` because I had thought that their APIs returns the hitted nodes address in the "page".
2014-04-24 09:52:11 -04:00
Tetsuharu OHZEKI
6c987c31b5 Add Page::get_nodes_under_mouse(). 2014-04-24 14:37:04 +09:00
Tetsuharu OHZEKI
fff94a35b3 Add Page::hit_test(). 2014-04-24 14:37:04 +09:00
Tetsuharu OHZEKI
dce92dc44a Add NodeHelpers::get_bounding_content_box(). 2014-04-24 14:36:43 +09:00
bors-servo
cc33a721ab auto merge of #2200 : jdm/servo/loadfail, r=mbrubeck
...k-related reasons.

Under the hood, this requires treating the I Tried pipeline as a new load instead of a replacement, since the failure-handling code interacts poorly with the rest of the replacement code when we get a series of staggered failures over time from the various pipeline components.
2014-04-24 01:10:12 -04:00
Josh Matthews
be2b983ec1 Make the I Tried star appear when a top-level page load fails for network-related reasons.
Under the hood, this requires treating the I Tried pipeline as a new load instead of a replacement, since the failure-handling code interacts poorly with the rest of the replacement code when we get a series of staggered failures over time from the various pipeline components.
2014-04-24 01:07:52 -04:00
bors-servo
7326df044c auto merge of #2203 : mbrubeck/servo/back-crash, r=jdm
This fixes two `RefCell<T> is already borrowed` failures when reloading an
existing pipeline, both caused by functions trying to modify `Pipeline::url`
or `ScriptTask::url` while a reference to a previous borrow is still in scope.

Note: After applying this patch, there are some painting issues after navigating back.
2014-04-23 14:10:21 -04: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
bdcd8dd0c2 auto merge of #2111 : jdm/servo/browsercontext, r=Ms2ger 2014-04-22 11:01:18 -04:00
Josh Matthews
94dffca1e1 Remove all traces of WindowProxy. Implement basic browser context concept and outerizing of inner windows. 2014-04-22 10:57:25 -04:00
Matt Brubeck
b38f7d26d1 Make sure RefCell borrows are temporary.
This fixes two `RefCell<T> is already borrowed` failures when reloading an
existing pipeline, both caused by functions trying to modify `Pipeline::url`
or `ScriptTask::url` while a reference to a previous borrow is still in scope.
2014-04-21 16:06:01 -07:00
bors-servo
c6bdc7b7f2 auto merge of #2202 : jdm/servo/scriptleak, r=Ms2ger
....
2014-04-21 17:13:22 -04:00
Josh Matthews
3078f58055 Ensure JS-owned memory is not leaked if a script task fails. Fixes #2201. 2014-04-21 16:10:28 -04:00
Ms2ger
4f9e119334 Remove JSPageInfo::js_compartment.
A js::rust::Compartment is little more than a glorified pointer to the
reflector of a window, so there's no good reason to use it. Instead, this
commit passes a JS<Window> directly when it's necessary.

This also means that we now have to use JS_DefineFunctions rather than
Compartment::define_functions; I believe the former is clearer to the reader
than the extra indirection involved in the latter calling through three
reopsitories.

This commit also simplifies ScriptTask::load to reuse the 'cx' local that is
in scope already, rather than refetching it through js_info.
2014-04-21 13:43:18 +02: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
lpy
b7dcf62ed0 Implement Window.set/clearInterval.(fixes #2116) 2014-04-18 01:30:39 +08:00
Josh Matthews
14b85e0e60 Make find_fragment_node a method of Page. 2014-04-09 15:20:17 +02:00
bors-servo
3d1a4324b7 auto merge of #2057 : Ms2ger/servo/evaluate_script, r=jdm 2014-04-07 11:19:26 -04:00
Ms2ger
9ada80e4c0 Handle an exception from cx.evaluate_script more gracefully. 2014-04-07 17:05:59 +02:00
Ms2ger
4e34fcd264 Remove trailing whitespace. 2014-04-07 11:41:58 +02:00
Ms2ger
31eee791dd Upgrade rust. 2014-04-04 20:10:32 +02:00
Patrick Walton
c49f23ffb2 layout: Address review feedback. 2014-04-03 14:51:18 -07:00
Patrick Walton
cd9d824c21 servo: Implement stacking contexts and allow multiple layers per
pipeline. This handles fixed positioning mostly correctly.
2014-04-03 14:50:56 -07:00
lpy
d4d6fcb5f0 Get rid of match statements in layout queries in script_task 2014-04-02 01:28:44 +08:00
Martin Robinson
1a8a3cc271 Store Window.active_timers in a HashMap
A HashMap allows easily looking up a timer and canceling it in
Window.ClearTimeout.

Fixes #1477.
2014-03-31 15:07:50 -07:00
Ms2ger
038a195ead Move attributes-related functions onto JS<Element>. 2014-03-20 19:42:42 +01:00
Tetsuharu OHZEKI
0fccf5e386 Split TCast::to into TCast::to_unchecked and TCast::to. 2014-03-20 23:41:59 +09: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