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
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
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
bors-servo
ea39b878ac
auto merge of #4356 : servo/servo/msgs, r=jdm
2014-12-12 17:30:47 -07:00
Gilbert Röhrbein
31e40038cd
script_trask, handle_msgs: factored out handle_msg_from_devtools
2014-12-12 23:54:54 +01:00
Gilbert Röhrbein
1fc46471ff
script_trask, handle_msgs: factored out handle_msg_from_script
2014-12-12 23:54:52 +01:00
Gilbert Röhrbein
8da73afa06
script_trask, handle_msgs: factored out handle_msg_from_constellation
2014-12-12 23:51:14 +01:00
Gilbert Röhrbein
9b9f662732
script_task, handle_msgs: sort for pattern constructor
2014-12-12 23:37:42 +01:00
Greg Weng
a477893ab3
Return real page titles and URLs for devtools tab choices.
...
Fixes #4167 .
2014-12-12 22:38:55 +01:00
Nathan E. Egge
b0552cb98e
Sending key events through script task before processing them in the compositor.
...
Fixes #4163
2014-12-12 12:31:44 -05:00
Patrick Walton
8b2aadc30b
ports/cef: Implement accelerated compositing for the CEF port.
2014-12-10 08:35:47 -08:00
Ms2ger
64b0a6b0b4
Reuse the final_url in ScriptTask::load.
...
In both the javascript and non-javascript url cases, final_url is set to the
same url as is stored by the Page.
2014-12-09 15:14:59 +01:00
Ms2ger
795327d5c4
Pass a borrowed Url to parse_html.
...
It does not need to take ownership, and I want to reuse final_url in the
caller.
2014-12-09 15:12:01 +01:00
Ms2ger
8838f2460e
Rename base_url to final_url in ScriptTask::load.
...
This seems like a clearer name, as it's used for more than just as a base url.
2014-12-09 15:05:50 +01:00
Ms2ger
0fc65d4088
Remove the url from the InputUrl variant.
...
This url is the pre-redirect url, which is not particularly meaningful, and it
is used only in a panic message.
2014-12-09 01:07:16 +01:00
Ms2ger
e76c3386ce
Move the load response into the HTMLInput enum.
...
It is None iff the parser input is an InputString variant, so it makes more
sense to pass it in the same enum.
2014-12-09 00:53:33 +01:00
Ms2ger
fbedf030d4
Combine two conditionals in ScriptTask::load.
...
Now that the code lives in the same function, I see no reason for them to
remain separate.
2014-12-09 00:53:33 +01:00
Ms2ger
3e031bdaf8
Make parse_html's base_url argument non-optional.
...
It turns out the case where it woul be None can't happen.
2014-12-08 12:44:49 +01:00
Ms2ger
c7c7dc03ee
Move the networking code in parse_html into ScriptTask::load.
...
This doesn't really have anything to do with parsing HTML, and fits in better
with the code in ScriptTask::load. In particular, all changes to Page's url
now go through ScriptTask methods.
2014-12-08 12:44:49 +01:00
Ms2ger
5d0934d8ec
Pass the load data to parse_html directly, rather than in an Option.
2014-12-08 12:44:49 +01:00
Ms2ger
69e13f3267
Cleanup last_loaded_url/last_url handling in ScriptTask::load.
2014-12-08 12:44:49 +01:00
Ms2ger
6374d74d6e
Simplify the content_changed call in ScriptTask::load.
2014-12-08 12:44:49 +01:00