Commit graph

333 commits

Author SHA1 Message Date
Ms2ger
bf3ecaa901 Create a run_with_memory_reporting method to reduce the boilerplate associated with registering memory reporters. 2015-08-06 15:24:27 +02:00
Ms2ger
d2077dd245 Update Animation Timing links and terminology to the HTML specification. 2015-08-05 09:21:08 +02:00
Josh Matthews
8620fe5995 Start reporting memory usage for Window and all nodes in all DOM trees for frame treese in script tasks. 2015-08-03 23:05:00 -04:00
Ravi Shankar
79b65402d7 Persuading devtools to communicate with the workers; r=jdm 2015-08-01 21:25:49 +05:30
Patrick Walton
61e3a9545e script: Fix test failures. 2015-07-31 15:03:39 -07:00
Patrick Walton
2aa5174246 script: Make the resource task communication use IPC channels. 2015-07-31 11:28:09 -07:00
Patrick Walton
44d13f7fd4 net: Use a thread for each AsyncResponseTarget to avoid having to send
trait objects across process boundaries.
2015-07-31 11:27:49 -07:00
Patrick Walton
9c9d7dc93b net: Make most of the resource task messages serializable. 2015-07-31 11:27:49 -07:00
bors-servo
4837dd9a1c Auto merge of #6850 - servo:rustup_2015-07-30, r=SimonSapin
Upgrade to rustc 1.3.0-dev (87055a68c 2015-07-30)

This builds and passes unit tests.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6850)
<!-- Reviewable:end -->
2015-07-30 14:46:13 -06:00
Bruno de Oliveira Abinader
b3927d5a2d Implement Msg::Status with serialized url upon mouseover
Credits for Mike Blumenkrantz (@zmike), I just rebased against trunk and
fixed the url serialization.

Fixes #6178.
2015-07-30 16:37:54 +03:00
bors-servo
12c46ddd61 Auto merge of #6841 - pcwalton:squash-animation-ticks, r=metajack
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.

r? @jdm

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6841)
<!-- Reviewable:end -->
2015-07-30 00:04:17 -06:00
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
Nicholas Nethercote
187068e2ae Add a kind field to memory reports.
This is used for two memory reporting improvements.

- It's used to distinguish "explicit" memory reports from others. This
  mirrors the same categorization that is used in Firefox, and gives a single
  tree that's the best place to look. It replaces the "pages" tree which
  was always intended to be a temporary stand-in for "explicit".

- It's used to computed "heap-unclassified" values for both the jemalloc
  and system heaps, both of which are placed into the "explicit" tree.

Example output:
```
|  114.99 MiB -- explicit
|      52.34 MiB -- jemalloc-heap-unclassified
|      46.14 MiB -- system-heap-unclassified
|      14.95 MiB -- url(file:///home/njn/moz/servo2/../servo-static-suite/wikipe
dia/Guardians%20of%20the%20Galaxy%20(film)%20-%20Wikipedia,%20the%20free%20encyc
lopedia.html)
|          7.32 MiB -- js
|             3.07 MiB -- malloc-heap
|             3.00 MiB -- gc-heap
|                2.49 MiB -- used
|                0.34 MiB -- decommitted
|                0.09 MiB -- unused
|                0.09 MiB -- admin
|             1.25 MiB -- non-heap
|          1.36 MiB -- layout-worker-3-local-context
|          1.34 MiB -- layout-worker-0-local-context
|          1.24 MiB -- layout-worker-1-local-context
|          1.24 MiB -- layout-worker-4-local-context
|          1.16 MiB -- layout-worker-2-local-context
|          0.89 MiB -- layout-worker-5-local-context
|          0.38 MiB -- layout-task
|             0.31 MiB -- display-list
|             0.07 MiB -- local-context
|       1.56 MiB -- compositor-task
|          0.78 MiB -- surface-map
|          0.78 MiB -- layer-tree
```
The heap-unclassified values dominate the "explicit" tree because reporter
coverage is still quite poor.
2015-07-29 16:11:19 -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
Simon Sapin
a3c0366bd6 Fix deprecation warnings 2015-07-24 22:16:35 +02: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