Commit graph

154 commits

Author SHA1 Message Date
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
Lars Bergstrom
bbac8aa5c3 Rust upgrades 2014-03-18 09:30:35 -05:00
Ms2ger
9709dce07a Use the JSVal member functions to replace JSVAL_IS_* and JSVAL_TO_*. 2014-03-09 18:52:05 +01:00
Ms2ger
84b0f45ed5 Use FooValue() functions. 2014-03-09 18:51:38 +01:00
Ms2ger
57be68ca8b Stop sticking a Page in the JSContext's private. 2014-03-05 21:04:57 +01:00
Ms2ger
6291aac170 Pass &JS<Window> to some constructors. 2014-03-04 14:10:33 +01:00
lpy
b13a7c73c5 Remove next_subpage_id argument from parse_html.(fixes #1801) 2014-03-04 08:40:48 +08:00
Keegan McAllister
6ad5597edd Fix a dynamic borrow failure with iframes 2014-03-03 15:02:33 -08:00
Josh Matthews
fa542e5de7 De-@mut the script crate. 2014-02-28 13:42:03 -05:00
Tetsuharu OHZEKI
b3536d1d97 Implement "resize" DOM Event.
* We cannot automate this feature.
* So this testcase is a manual test.
2014-03-01 01:02:09 +09:00
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
2639e36c78 Remove the image loading workaround from the parser. 2014-02-25 19:04:47 +01:00
Ms2ger
870ccd95d2 Remove DocumentTypeId. 2014-02-24 22:35:28 +01:00
Ms2ger
5ede84fa46 Remove document::DocumentType (fixes #1730). 2014-02-24 22:28:27 +01:00
Ms2ger
e2617a6396 Remove HTMLDocument. 2014-02-24 22:23:11 +01:00
Josh Matthews
625325434b Implement JSManaged for DOM objects. 2014-02-24 15:16:42 -05:00
Ms2ger
e45b7fa22d Use eq() and eq_slice() less, and map_default() more. 2014-02-16 10:24:24 +01:00
Keegan McAllister
36b8f63984 Restore failure handling
We probably leak some threads and resources, e.g. when the script task crashes
and doesn't get a chance to send layout data back to layout to be deallocated.

Not tested with iframes yet.
2014-02-12 18:07:32 -08:00
HyunJune Kim
c8d503898a This is implement Hover Event. If over element, currently full reflow. after PR, will make partial reflow. 2014-02-10 11:16:07 +09:00
HyunJune Kim
d2f8b593a9 compositor can get mouse point from window event 2014-02-10 11:14:29 +09:00
Tetsuharu OHZEKI
d3cbdd8865 Reduce copying on parse_url() call sites. 2014-02-09 05:03:06 +09: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
Lars Bergstrom
f41c39b3dd Add a LoadComplete message so that script informs the constellation,
which can then inform the compositor (and anyone else, later) about
the completion of loading a page. This is important for ref tests,
which should not emit a PNG until load has completed, even if we
perform a composite before then.
2014-01-30 13:48:22 -06:00
Bruno de Oliveira Abinader
43416ef91f Implement document.URL & document.documentURI
Specs:
http://dom.spec.whatwg.org/#dom-document-url
http://dom.spec.whatwg.org/#dom-document-documenturi

This is a sub-task for #1428.
2014-01-30 10:41:24 -04: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
Lars Bergstrom
342844ed7b When window.close() is called, we should just ask the compositor to exit
normally.

The old code made the mistake of attempting to shutdown the associated
pipelines itself, which caused race conditions with the constellation and
compositor, as they expect to be able to drain their message queues
before exiting.
2014-01-15 15:26:39 -06:00
Patrick Walton
7d447dbc06 script: Stop trusting pointers to DOM nodes that layout provides.
Pointers to DOM nodes from layout could go stale if incremental reflow
does not correctly destroy dead nodes. Therefore, we ask the JavaScript
garbage collector to verify that each DOM node is indeed a valid pointer
before calling event handlers on it, and fail otherwise.
2014-01-14 21:51:24 -08:00
zmike
193b6d2635 add names for all servo spawned tasks
* add servo_util::task::{spawn_named,spawn_with_named} functions

* add name param for spawn_listener and spawn_conversation functions

this should resolve #1169
2014-01-13 13:12:48 -05:00
Jack Moffitt
a7ef1cd35e Upgrade to latest Rust. 2014-01-12 19:45:45 -07:00
bors-servo
de36f37ac7 auto merge of #1409 : pcwalton/servo/fix-get-bounding-client-rect, r=jdm
This fixes the `getBoundingClientRect()` content test.

r? @jdm
2014-01-07 19:46:25 -08:00
Ms2ger
95913d1fed Pass a Namespace to Element::get_attr. 2013-12-23 13:03:52 +01:00
Patrick Walton
8f886e599e layout: Stop exposing raw Element types to layout as well.
This should make layout memory-safe as is, though we will need to do
more stuff for incremental reflow and parallelism.
2013-12-17 18:07:41 -08: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
Patrick Walton
10150b0ec5 script: Don't do anything before the window size comes in.
This fixes the `getBoundingClientRect()` content test.
2013-12-13 18:35:48 -08:00