Commit graph

215 commits

Author SHA1 Message Date
Ms2ger
b77869bd9a Add a subpage_id field to NewLayoutInfo. 2014-05-14 12:50:26 +02:00
Ms2ger
69172a1ae5 Rename the pipeline ID fields in NewLayoutInfo.
This will make the distinction clearer with the subpage ID field to be added.
2014-05-14 12:44:59 +02:00
bors-servo
049fa56fff auto merge of #2425 : saneyuki/servo/window_helper, r=jdm
Fix #2418
2014-05-14 00:55:17 -04:00
Tetsuharu OHZEKI
facffe0966 Move Window helper methods to a WindowHelpers trait 2014-05-14 13:14:29 +09:00
bors-servo
6871e4ccb6 auto merge of #2420 : Ms2ger/servo/merge-Page-PageTree, r=pcwalton 2014-05-13 23:52:21 -04:00
Ms2ger
c437bacfc8 fixup! Use a match rather than a for loop for last_loaded_url in ScriptTask::load. 2014-05-13 19:52:25 +02:00
Ms2ger
1bf270d369 Merge Page and PageTree. 2014-05-13 18:27:24 +02:00
Ms2ger
1d464abb5a Use a match rather than a for loop for last_loaded_url in ScriptTask::load. 2014-05-13 15:48:32 +02:00
Ms2ger
d095c42eaf Move the loading of documents in iframes into HTMLIFrameElement.
Right now, the load is kicked off inside the parser glue. This is unfortunate
for several reasons:

1) we'd like to replace the current parser (libhubbub) by our own parser,
   written in Rust, so code intertwined with the parser will have to be
   rewritten;
2) it is impossible to support dynamically (i.e. from script) created iframes
   in this way;
3) the code flow around loading subdocuments is complicated needlessly.

This commit adds the constellation channel (on which the message to actually
load the document is sent) as a field on the Page, to allow HTMLIFrameElement
to access it.

In rewriting the code, support for dynamically created iframes is added, and
a task failure is avoided when the value of the src attribute can not be
parsed.
2014-05-12 21:21:03 +02:00
bors-servo
9a71af38b9 auto merge of #2393 : Ms2ger/servo/initialize_js_info, r=jdm
There is no particular leason to initilaize js_info lazily.
2014-05-10 12:25:09 -04:00
Ms2ger
4b1b19fd11 Remove ScriptTask::initialize_js_info.
There is no particular leason to initilaize js_info lazily.
2014-05-10 09:37:24 +02:00
bors-servo
5334d8bb25 auto merge of #2384 : saneyuki/servo/2383, r=Ms2ger
Fix #2383

These changes introduce `FooEvent::new_uninitialized()` constructor. This constructor use to create `FooEvent` without calling `FooEvent::InitFooEvent`.

#2383 says integrating `FooEvent::new()` and `InitFooEvent`, but we need to preserve simple `FooEvent::new_uninitialized()` for `document.createEvent()`.

@jdm r?
2014-05-10 03:01:13 -04:00
Tetsuharu OHZEKI
ac288f6657 Add UIEvent::new_uninitialized(). 2014-05-10 13:55:19 +09:00
Guro Bokum
04c807dd53 Convert as many of Page's RefCell fields to Cell as possible (fixes #1990). 2014-05-09 23:52:06 +02:00
bors-servo
1477652295 auto merge of #2357 : Manishearth/servo/xhr-syncget, r=ms2ger
This gets a basic synchronous GET request working. I've also tried to implement a portion of the procedures mentioned in the spec.


Blocks #2282
2014-05-09 11:34:07 -04:00
Manish Goregaokar
b40d8b4d53 Basic synchronous GET with XHR 2014-05-09 20:39:54 +05:30
Ms2ger
30055d9820 Move debug functions to Window IDL.
This is a cleaner way to expose those functions, and makes it possible to
remove a significant amount code in rust-mozjs.

The assert() function is no longer exposed, as it was unused and not very
useful.
2014-05-09 14:44:07 +02:00
bors-servo
e9ac0d1e2c auto merge of #2339 : glennw/servo/js-event-assert, r=jdm 2014-05-07 03:04:21 -04:00
bors-servo
dc49e7d1a0 auto merge of #2340 : glennw/servo/js-click-assert, r=jdm 2014-05-07 00:46:21 -04:00
Glenn Watson
87e6921d46 Fix JS roots assertion when clicking on an element 2014-05-07 09:04:02 +10:00
Glenn Watson
db81cf9bc7 Modify node traversal loop to avoid JS roots assertion. Fixes #2321. 2014-05-07 08:46:11 +10:00
Josh Matthews
d0387a399b Force a GC when shutting down each layout task. Fixes #2342. 2014-05-06 11:56:28 -04:00
Ms2ger
1fa3610e2d Don't clobber the default wrapping callback. 2014-05-06 12:37:13 +02:00
Ms2ger
3a5fc11bb8 Enter a compartment when calling timeout handlers. 2014-05-05 23:08:04 +02:00
Ms2ger
0016b1839e Use a single JSContext per JSRuntime.
The long-term plan for SpiderMonkey is to eliminate JSContexts by merging
(most of) it into JSRuntime, so to future-proof our code, we should avoid
creating multiple JSContexts for the same JSRuntime.

However, this implies we'll have to use the same JSContext for objects in
different compartments, so we need to enter compartments. This is done by
using the with_compartment function.
2014-05-05 19:41:02 +02:00
Ms2ger
25542e3f7e Replace most ~"string"s with "string".to_owned(). 2014-05-04 09:39:07 +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
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