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
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