Patrick Walton
01e5c513a9
script: Squash duplicate animation tick events in the queue.
...
This prevents them from piling up endlessly if the JS
`requestAnimationFrame()` callback takes a long time to complete.
2015-07-29 17:32:21 -07:00
Patrick Walton
164e10202c
devtools: Convert the developer tools to run over IPC.
2015-07-27 09:10:01 -07:00
Patrick Walton
82b53d83ff
script: Make the ImageCacheTask
use IPC.
...
This necessitated getting rid of the boxed trait object that was being
be passed between the script task and the image cache task.
2015-07-26 23:07:44 -07:00
Patrick Walton
f10c076180
profile: Make the time and memory profilers run over IPC.
...
Uses the `Router` abstraction inside `ipc-channel` to avoid spawning new
threads.
2015-07-24 17:02:17 -07:00
bors-servo
aafc3dfa96
Auto merge of #6682 - boghison:scripttask, r=jdm
...
Fix a few issues
- Use SmallVec<[T; N]>
- Make find_iframe a free function
- Make ProgressEvent use enums for bubbles and cancelable
- Change README, as `rust-snapshot-hash` is just a text file
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6682 )
<!-- Reviewable:end -->
2015-07-22 12:25:57 -06:00
Bogdan Cuza
e10a524c81
Fix #6676
2015-07-22 16:45:42 +03:00
Manish Goregaokar
fda3eb6327
Make struct part of unrooted_must_root handle type parameters
2015-07-22 00:01:26 +05:30
Ms2ger
6d7bc2cffe
Rename browser_context identifiers to browsing_context.
2015-07-20 15:56:32 +02:00
James Graham
f44470ef52
Ensure we get the post-redirect url
2015-07-19 20:40:55 +01:00
Nicholas Nethercote
7429b90e02
Wire up the JS engine's memory reporting.
...
SpiderMonkey provides an extremely fine-grained breakdown of memory
usage, but for Servo we aggregate the measurements into a small number
of coarse buckets, which seems appropriate for the current level of
detail provided by Servo's memory profiler. Sample output:
```
| 10.99 MiB -- pages
| 7.75 MiB -- url(http://html5demos.com/worker )
| 4.63 MiB -- js
| 2.00 MiB -- gc-heap
| 0.94 MiB -- decommitted
| 0.92 MiB -- used
| 0.09 MiB -- unused
| 0.05 MiB -- admin
| 1.44 MiB -- malloc-heap
| 1.19 MiB -- non-heap
| [...]
| 3.24 MiB -- url(http://html5demos.com/js/worker-cruncher.js )
| 3.24 MiB -- js
| 1.17 MiB -- malloc-heap
| 1.06 MiB -- non-heap
| 1.00 MiB -- gc-heap
| 0.69 MiB -- used
| 0.19 MiB -- decommitted
| 0.09 MiB -- unused
| 0.03 MiB -- admin
```
Most of the changes are plumbing to get the script and worker tasks
communicating with the memory profiler task.
2015-07-15 21:58:20 -07:00
Patrick Walton
e5b1ec4078
script: Split Pipeline::create
into chrome process and content
...
process parts.
This will make it easier to adapt to IPC.
The trickiest part here was to make script tasks spawn new layout tasks
directly instead of having the pipeline do it for them. The latter
approach will not work in multiprocess mode, because layout and script
must run in the same address space and the pipeline cannot inject tasks
into another process.
2015-07-14 15:09:16 -07:00
Patrick Walton
e841065351
compositing: Move messages that go over the ScriptListener
to go over
...
an IPC channel instead.
Because this used a boxed trait object to invoke messages across a
process boundary, and boxed trait objects are not supported across IPC,
we spawn a helper thread inside the compositor to perform the marshaling
for us.
2015-07-14 12:12:19 -07:00
Will Huxtable
58a31b07b4
Remove url field from Page
2015-07-11 17:06:12 +01:00
David Winslow
4cf46bff2d
Refactor #[jstraceable] to #[derive(JSTraceable)]
...
fixes #6524
2015-07-01 18:27:06 -04:00
Michael Wu
b7301ca06c
Fix some warnings caused by the SM upgrade
2015-06-19 22:07:08 -04:00
Michael Wu
675267b782
Upgrade to SM 39
2015-06-19 18:42:48 -04:00
ecoal95
8cbfb3482c
Use euclid from crates.io
2015-06-19 00:04:24 +02:00
Corey Farwell
5c408d2be9
rust-geom API changes
...
https://github.com/servo/rust-geom/pull/81
2015-06-13 12:28:21 -07:00
James Graham
49f1b13ad9
Add support for switching frames with the webdriver API.
...
This moves webdriver_traits into msg to avoid a circular dependency.
2015-06-01 23:18:55 +01:00
Matt Brubeck
b78b33b7f5
Change not(ndebug) to debug_assertions
...
The name of this directive changed in rust-lang/rust#22980 .
2015-06-01 13:48:38 -07:00
Mike Blumenkrantz
0d46a3b89a
add navigation state data to LoadComplete messages, finish cef load state cbs
2015-05-27 14:45:48 -04:00
Patrick Walton
9e34e82aec
script: Reflow 200 milliseconds after the <body>
is parsed, like Gecko
...
does.
2015-05-26 10:38:47 -07:00
bors-servo
8759d42559
Auto merge of #6168 - tamird:get-cached-messages, r=jdm
...
Rebase of #4175 , closes #4175 . r? @jdm
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6168 )
<!-- Reviewable:end -->
2015-05-26 10:34:03 -05:00
Tamir Duberstein
b5f74eb54c
Implemented GetCachedMessages
2015-05-26 10:04:31 -04:00
bors-servo
7d0409b842
Auto merge of #6140 - nox:cleanup-rootedvec, r=Manishearth
...
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6140 )
<!-- Reviewable:end -->
2015-05-26 08:36:29 -05:00
Anthony Ramine
178f696df3
Optimise use of RootedVec in ScriptTask::handle_event()
2015-05-26 15:35:19 +02:00
Corey Farwell
8e3f4bba85
Reduce max line length from 150 to 120 characters
...
Part of https://github.com/servo/servo/issues/6041
2015-05-24 00:01:49 -04:00
bors-servo
dd319c1a99
Auto merge of #5727 - jdm:parserinterrupt2, r=mbrubeck
...
...r parsing. Hook up document loading to async networking events.
Relies on https://github.com/servo/html5ever/pull/107 , so we'll likely need to backport it rather than wait for the next rustc upgrade.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5727 )
<!-- Reviewable:end -->
2015-05-21 12:37:06 -05:00
Patrick Walton
7e7675c1dc
net: Don't load the placeholder image for background images, only for
...
image fragments.
This also changes the way the placeholder is handled in the image cache
task to decode it up front instead of each time an image fails to load,
both because it was more convenient to implement that way and because
it saves CPU cycles to do so.
This matches the behavior of Gecko and WebKit. It improves the look of
our cached copy of Wikipedia.
2015-05-20 12:00:33 -07:00
Josh Matthews
8082df7d0d
Make external script sources load asynchronously, yet still block further parsing. Hook up document loading to async networking events.
2015-05-20 14:22:09 -04:00
Glenn Watson
41c243e853
Add closed pipelines record as a debugging aid
2015-05-20 09:22:08 +10:00
Glenn Watson
23b18a8417
Handle case where a page fetch completes after pipeline exits.
2015-05-20 07:55:22 +10:00
Glenn Watson
decfb0da6e
Address review comments
2015-05-20 07:10:55 +10:00
Glenn Watson
35a570ab66
Fix several hangs / panics during pipeline cleanup of in progress loads.
...
This fixes a hang found while testing the jQuery test suite.
2015-05-19 16:14:25 +10:00
James Graham
8d10fa1f2d
Add basic support for executeAsyncScript.
...
This relies on a global webdriverCallback function, which is visible to content.
Obviously that's not a long term solution for a number of reasons, but it allows
us to experiment for now
2015-05-14 10:59:17 +01:00
James Graham
28ac0abf6a
Make WebDriver Get() command wait on pages loading before returning.
...
This makes using WebDriver significantly less racy. Also
refactors the message structure a little
2015-05-14 10:59:10 +01:00
Glenn Watson
2b3737d34e
Various fixes for cleaning up iframes, compositor layers, pipelines and threads.
...
This allows most of the jquery test suite to run without exhausting thread resources.
2015-05-14 11:42:54 +10:00
Glenn Watson
eec3fad93d
Fixes a number of race conditions and reliability issues with reftests and compositor.
...
The basic idea is it's safe to output an image for reftest by testing:
- That the compositor doesn't have any animations active.
- That the compositor is not waiting on any outstanding paint messages to arrive.
- That the script tasks are "idle" and therefore won't cause reflow.
- This currently means page loaded, onload fired, reftest-wait not active, first reflow triggered.
- It could easily be expanded to handle pending timers etc.
- That the "epoch" that the layout tasks have last laid out after script went idle, is reflected by the compositor in all visible layers for that pipeline.
2015-05-14 09:35:53 +10:00
bors-servo
2baa69595e
Auto merge of #5804 - jdm:docloader, r=Ms2ger
...
This implements a simple load-tracking system and tracks stylesheet loads as an example of how it fits together. This is a simplified and rebased version of #3714 ; I do not believe that the main thrust of hsivonen's comments (related to tracking navigation in browsing contexts) affect this part of the work.
r? @Ms2ger
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5804 )
<!-- Reviewable:end -->
2015-05-11 14:35:33 -05:00
Josh Matthews
a1ae53a230
Delay stylesheet load in test to increase confidence.
2015-05-11 15:35:10 -04:00
Josh Matthews
f3cdba6b8b
Make link elements fire a load event.
2015-05-11 13:41:52 -04:00
Josh Matthews
32a89c9455
Make stylesheets block page load.
2015-05-11 13:41:52 -04:00
Josh Matthews
7f0706ed42
Implement a DocumentLoader type that tracks pending loads and notifies the script task when the queue is empty. Dispatch the document load event based on the DocumentLoader's notification.
2015-05-11 13:41:51 -04:00
James Graham
6e639de664
Add support for getActiveElement webdriver command
2015-05-11 17:31:23 +01:00
bors-servo
8df824998f
Auto merge of #5969 - jgraham:webdriver_select_css, r=jdm
...
Also adds example support for getting the name and text properties of the elements.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5969 )
<!-- Reviewable:end -->
2015-05-11 09:57:02 -05:00
Ms2ger
cfe240d117
Remove reference counting from the Runtime implementation.
2015-05-10 18:09:09 +02:00
Ms2ger
4ed94629a2
Use Runtime in Window.
2015-05-10 17:16:15 +02:00
Ms2ger
076d15992a
Update js.
2015-05-10 15:58:07 +02:00
James Graham
9e44206760
Add WebDriver support for getting elements by selector.
...
Also adds example support for getting the name and text properties of the elements.
2015-05-08 22:25:37 +01:00
Patrick Walton
be8a5a2939
layout: Don't rerun selector matching unless we need to when resizing
...
the window.
2015-05-07 15:48:14 -07:00