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
Ms2ger
10bda1a52b
Simplify some code in ScriptTask::load.
2014-12-19 11:40:27 +01:00
Ms2ger
bce3b172e7
Make the argument to dispatch_event_with_target non-optional.
...
The name of the method makes it clear it's supposed to be used with a target
override, so we might as well enforce that.
2014-12-19 11:34:11 +01:00
bors-servo
803e5ef790
auto merge of #4434 : saneyuki/servo/glob_script, r=jdm
...
#4406
2014-12-18 15:57:48 -07:00
bors-servo
8626be6ab0
auto merge of #4403 : pcwalton/servo/back-borrow, r=jdm
...
I have verified that back and forward work once again.
Sorry about this one. r? @jdm
2014-12-18 14:39:50 -07:00
Tetsuharu OHZEKI
a7bb436177
script: Remove glob imports added in #4405
2014-12-19 04:52:48 +09:00
Patrick Walton
7371e0b8e3
compositing: Implement cursor
per CSS3-UI § 8.1.1 in the CEF/Mac port.
...
I'm not sure how we want to handle Linux cursors, and GLFW has no
ability to set cursors (short of disabling it and managing it yourself).
2014-12-17 22:58:52 -08:00
Ms2ger
466faac2a5
Update rustc to revision 3dcd2157403163789aaf21a9ab3c4d30a7c6494d.
2014-12-17 15:19:45 -05:00
Patrick Walton
4f6c732b54
script: Fix double borrow error when going back. Closes #4402 .
...
I have verified that back and forward work once again.
2014-12-16 21:54:43 -08:00
bors-servo
746b262ff4
auto merge of #4374 : thiagopnts/servo/dispatch-event, r=Ms2ger
...
servo/pull/4369 with the right commit.
2014-12-16 06:36:47 -07:00
thiagopnts
79487252ca
Add auxiliary method to EventTargetHelpers for events without target
...
fixup! Add auxiliary method to EventTargetHelpers for events without target
2014-12-16 10:01:38 -02:00
Patrick Walton
34d76fef28
script: Fix double-borrow error
...
This was my fault. It comes up on almost any page after scrolling a bit.
2014-12-15 18:21:51 -08:00
Patrick Walton
a200b139b6
script: Add some workarounds for image cache task races
2014-12-15 14:16:20 -08:00
Patrick Walton
d101c1dd91
script: Improve dirty propagation and fix script-layout synchronization.
...
This fixes race conditions whereby layout and script could be running
simultaneously.
2014-12-15 14:16:04 -08:00