Commit graph

200 commits

Author SHA1 Message Date
bors-servo
0a2bde1b6e auto merge of #4852 : jdm/servo/buffermessages, r=jdm
Rebased and squashed version of #4191.
2015-02-05 12:36:45 -07:00
Sagar Muchhal
5345edf51e Add flag to send live updates to devtools. 2015-02-05 19:26:59 +00:00
Ms2ger
d8c2c88bbd Replace Root::deref by a custom get_unsound_ref_forever method.
This will hopefully make it clearer that this is not the correct function
to call.
2015-02-05 18:45:20 +01:00
Glenn Watson
0873e5c8ca Implement window.parent for iframes. 2015-02-05 07:04:04 +10:00
Josh Matthews
a814ba4449 Use an option for the parser input. 2015-02-04 17:56:31 +00:00
Josh Matthews
fb217ab24b Make XMLHttpRequest user-set headers be preserved across redirects. 2015-02-04 13:37:01 +00:00
Josh Matthews
542e8d52d5 Reorganize document creation so it occurs after we have a final URL. 2015-02-04 13:37:01 +00:00
Gilles Leblanc
a1804effaf Initialize trusted-ness of DOM events properly
Fixes #3740
2015-02-03 21:40:07 -05:00
Alexandru Cojocaru
685fee02a0 add unwrap to send/recv calls 2015-02-03 16:05:13 +01:00
Diego Marcos
7b9c902a0a Adds borrow_for_script_deallocation and unsafe_mut_js_info method to avoid 'DOMRefCell already mutably borrowed' messages. This is just a temporary fix until the Rust standard library allows borrowing already-borrowed RefCell values during unwinding.
It also removes LiveDOMReferences destructor that it's a no-op but it contains an assert that was being violated causing an endless cycle of destructor calls ending up in a stack overflow.
2015-01-30 12:07:53 -08:00
Ms2ger
505159a464 Import the util crate as util rather than servo_util.
This used to conflict with the util crate from the standard library, which
has long since been removed.

The import in layout has not been changed because of a conflict with the
util mod there.
2015-01-29 12:16:41 +01:00
Manish Goregaokar
b68b7e87c8 self import 2015-01-28 13:46:00 +05:30
Josh Matthews
95fc29fa0d Update rustc to 00b112c45a604fa6f4b59af2a40c9deeadfdb7c6/rustc-1.0.0-dev. 2015-01-28 10:16:49 +10:00
Josh Matthews
d2f0aac5ce Make UntrustedNodeAddress a newtype.
This will allow us to make it Send after the Rust upgrade.
2015-01-24 11:40:21 +01:00
Ms2ger
7d1b567744 Encapsulate to-be-cleaned-up refcounted pointers.
This will allow us to make them Send in the future.
2015-01-21 20:04:51 +01:00
Ms2ger
01ed338746 Move to to_owned rather than into_string.
into_string has been removed from Rust.
2015-01-20 14:49:07 +01:00
Ms2ger
b2f40b9873 Make Runnable::handler take self by value.
With my thanks to kimundi and eddyb for their help in making this approach
work.
2015-01-10 17:47:18 +01:00
Ms2ger
57aaa60fa5 Create a StructuredCloneData struct to encapsulate the result of a structured clone. 2015-01-10 16:33:25 +01:00
Tetsuharu OHZEKI
0237561511 Make DOMContentLoaded and load asynchronous with using Runnable. 2015-01-10 04:05:46 +09:00
Ms2ger
edc1d89251 Deny unsafe blocks in script.
As a first start, this allows them indiscriminately where used.
2015-01-09 10:13:25 +01:00
Matthew Rasmus
dc72119998 Fix non_upper_case_globals warnings 2015-01-08 08:51:11 -08:00
bors-servo
df6a7959df auto merge of #4069 : guillaumebort/servo/fix/3936, r=jdm 2015-01-08 08:48:54 -07:00
Ms2ger
16c7060bc8 Update rustc to revision 2cfb5acb5a2751c759627377e602bac4f88f2d19. 2015-01-08 09:58:46 -05:00
Guillaume Bort
5fe3a3e54f Fix #3936 – {Window,WorkerGlobalScope}.set{Timeout,Interval}(DOMString) 2015-01-07 11:39:15 +01:00
Ms2ger
c4e44b568a Remove the unused native argument from spawn_named_with_send_on_failure. 2015-01-05 08:58:00 +01:00
bors-servo
ba8cf6b0e6 auto merge of #4542 : servo/servo/pre-rustup_20141221, r=saneyuki
In particular, this contains changes to qualify enums where rust will require it, and to stop using some features that will be removed.
2015-01-04 12:39:47 -07:00
bors-servo
2e17cae5d0 auto merge of #4495 : MeghaGupta/servo/typeid, r=Ms2ger 2015-01-04 12:12:48 -07:00
Ms2ger
6e027cda2d Rename the ConstellationControlMsg variants. 2015-01-04 19:01:13 +01:00
Ms2ger
394508953e Qualify compositor_msg::ReadyState. 2015-01-04 16:24:03 +01:00
Ms2ger
193c39294b Qualify script_traits enums. 2015-01-04 16:19:54 +01:00
Ms2ger
323daffbf0 Qualify resource_task enums. 2015-01-04 15:47:46 +01:00
Ms2ger
de0caf8761 Rename constellation_msg::Msg variants. 2015-01-04 11:59:21 +01:00
Bharath M R
50d53c9fa3 Issue 4497: Converts WorkerPostMessage into a Runnable.
Implements WorkerMessage handler implementing Runnable trait.
2015-01-04 12:26:27 +05:30
bors-servo
e8fac3681b auto merge of #4535 : servo/servo/pre-rustup_20141221, r=jdm
This prepares for the rust upgrade currently being conducted.
2015-01-03 14:39:46 -07:00
Martin Robinson
c0b397322f Stall PaintTask exit until it can release all buffers
It is possible for a PaintTask to start exiting soon after sending new
buffers to the compositor. In that case, the compositor should return
the now unnecessary buffers to the PaintTask so that it can properly
free them.

To accomplish this, the compositor now keeps a hash map of paint task
channels per pipeline id. When a PaintTask exists, the constellation
informs the compositor that it can forget about it. Additionally, the
PaintTask should not wait for any buffers when the engine is doing a
complete shutdown. In that case, the compositor is already halted and
has simply let all buffers leak. We pipe through the shutdown type when
destroying the pipeline to make this decision.

Fixes #2641.
2015-01-02 15:20:32 -08:00
Ms2ger
b51e83819d Fix obsolete format traits.
They are to be removed from the language in the next rust upgrade.
2015-01-02 19:04:18 +01:00
Megha Gupta
f85b9e37cc Add HTMLElementTypeId enum (fixes #3625) 2015-01-02 23:10:31 +05:30
bors-servo
141b5d038f auto merge of #4526 : servo/servo/deref-1, r=Manishearth
This is a start towards fixing #3868. Not all callers have been fixed yet, so the `Deref` implementation remains for now.
2015-01-02 09:22:51 -07:00
Ms2ger
43eecf6e7a Stop using ptr.is_not_null() in script.
This method is deprecated in rust master; removing its users in advance will
make a future rust upgrade smoother.
2015-01-01 22:19:34 +01:00
Ms2ger
1dad710063 Replace Root::deref() calls by Root::r() calls where possible.
This changes those calls that were already sound.
2015-01-01 20:36:43 +01:00
Ms2ger
b6117a57aa Replace the remaining to_string calls by into_string calls. 2014-12-31 10:34:44 +01:00
bors-servo
2c259f477c auto merge of #4057 : jdm/servo/refcountdom, r=Ms2ger
This replaces the specialized TrustedXHRAddress and TrustedWorkerAddress code that was used for the same purpose. A non-zero refcount pins the given DOM object's reflector and prevents it from being GCed even when there are no other outstanding references visible to SpiderMonkey. This will enable us to implement asynchronous operations that refer to particular DOM objects (such as "queue a task to fire a simple event named load at the iframe element" from the spec) safely and conveniently, and paves the way for things like asynchronous network responses.

Some concerns about the resulting size of XHR progress messages have been expressed, but I believe optimizations to reduce that can be implemented in subsequent PRs.

r? @Ms2ger - note in particular the changes to the worker lifetime code. I couldn't figure out how to achieve an identical lifetime to the previous addref/release pairing, and I also was having trouble figuring out why the existing setup was safe. The new implementation now holds the main script task Worker object alive via the TrustedWorkerAddress field in the dedicated worker global scope, which is a significant difference.
2014-12-29 11:57:45 -07:00
Josh Matthews
9a7cd31134 Force all messages to worker tasks to send a TrustedWorkerAddress along with the ScriptMsg. This ensures that the main-thread Worker object is rooted for as long as there are events in flight or being processed. 2014-12-29 13:53:49 -05:00
Josh Matthews
2f059c15e7 Allow refcounting arbitrary DOM objects in concert with the GC to enable safe, asynchronous/cross-task references to pinned objects. 2014-12-29 13:53:48 -05:00
Ms2ger
a1d21d4c5e Simplify some code in handle_click_event. 2014-12-29 09:51:01 +01:00
Manish Goregaokar
e9d1740e19 script: to_string() -> into_string() 2014-12-27 14:48:36 +01:00
bors-servo
194ce20969 auto merge of #4474 : thiagopnts/servo/generic-msgs, r=jdm
This refs #3735. As discussed in the issue, I did it cloning when I couldn't dereference an attribute. The trait method should be on `&self` for object-safety reasons.
2014-12-24 03:45:44 -07:00
thiagopnts
271aa277e9 Replace XHR events for generic ones in ScriptTask
fixup! Replace XHR events for generic ones in ScriptTask

fixup! Replace XHR events for generic ones in ScriptTask
2014-12-23 23:53:38 -02:00
Matt McCoy
75be44e744 This fixes #4259. Dispatching the mousemove event for the top most node when the mouse moves while on top of it 2014-12-23 17:49:03 -05:00
bors-servo
b9edc2243a auto merge of #4444 : Ms2ger/servo/load-simplify, r=jdm 2014-12-19 08:09:48 -07:00