Commit graph

12161 commits

Author SHA1 Message Date
Ms2ger
bb444df679 Remove unused ThreadSafeLayoutNode::traverse_postorder_mut. 2015-07-17 13:26:23 +02:00
Ms2ger
c018863201 Stop using Option in ThreadSafeLayoutNodeChildrenIterator::parent_node. 2015-07-17 11:41:57 +02:00
Ms2ger
4b08cea663 Scope the allowed unsafe code in traversal.rs. 2015-07-17 11:41:06 +02:00
Ms2ger
3e2c44114c Move the traversal traits into the traversal module. 2015-07-17 11:40:40 +02:00
David Zbarsky
207648f14d Implement Range#cloneContents 2015-07-17 02:48:39 -04:00
Martin Robinson
5d93f9d5fa Report layer tree memory usage
rust-layers can now deliver the memory usage of a layer tree, so include
that in the reports.
2015-07-16 16:24:59 -07:00
Martin Robinson
900337e3d1 Add memory profiling for the compositor task
Currently only the BufferMap is recorded, but a later change will also
measure the memory usage of the compositor tree.
2015-07-16 16:08:34 -07:00
bors-servo
acf47a02cf Auto merge of #6568 - dzbarsky:delete_range, r=jdm
Implement Range#insertNode

Gecko doesn't really follow the spec but it seems to throw a HierarchyRequest error when parent is null.
Any ideas who I should talk to about fixing the spec to account for the null checks?

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6568)
<!-- Reviewable:end -->
2015-07-16 10:56:17 -06:00
David Zbarsky
c2664e52dd Implement Range#insertNode 2015-07-16 17:43:46 -04:00
bors-servo
9534e8143f Auto merge of #6641 - michaelwu:direct-output, r=Ms2ger
Directly append children to output node in parse_html_fragment



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6641)
<!-- Reviewable:end -->
2015-07-16 07:21:06 -06:00
bors-servo
2ef1fd342e Auto merge of #6632 - Ms2ger:unused-mut, r=jdm
Initialize info directly in get_system_heap_allocated.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6632)
<!-- Reviewable:end -->
2015-07-16 06:42:37 -06:00
bors-servo
7e91577d0a Auto merge of #6647 - Ms2ger:ws-send-closing-closed, r=jdm
Don't try to send a message in WebSocket#close if the sender isn't present.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6647)
<!-- Reviewable:end -->
2015-07-16 02:27:13 -06:00
Ms2ger
b467f3e9d6 Don't try to send a message in WebSocket#close if the sender isn't present. 2015-07-16 14:29:04 +02:00
Ms2ger
072fdf695b Handle Send correctly if readyState is not Open. 2015-07-16 12:43:10 +02:00
Ms2ger
cd741e681d Remove WebSocket::sendCloseFrame.
It is a field that is used a function argument. Given that the control flow
is not quite the same, and we can't add an argument to Send, I opted for a
separate function.
2015-07-16 12:43:08 +02:00
bors-servo
2b0bdbe1c1 Auto merge of #6572 - nnethercote:js-reporting, r=jdm
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:
```
|      17.41 MiB -- url(file:///home/njn/moz/servo/../servo-static-suite/wikipedia/Guardians%20of%20the%20Galaxy%20(film)%20-%20Wikipedia,%20the%20free%20encyclopedia.html)
|          7.32 MiB -- js
|             3.07 MiB -- malloc-heap
|             3.00 MiB -- gc-heap
|                2.48 MiB -- used
|                0.34 MiB -- decommitted
|                0.09 MiB -- unused
|                0.09 MiB -- admin
|             1.25 MiB -- non-heap
```
Most of the changes are plumbing to get the script task communicating
with the memory profiler task.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6572)
<!-- Reviewable:end -->
2015-07-15 17:37:30 -06: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
bors-servo
10f3a89313 Auto merge of #6637 - notriddle:master, r=jdm
Don't crash when Firefox doesn't send autoMargins.

Firefox Developer Tools doesn't always send autoMargins, as seen in this message:

    {"type":"getLayout","node":"node14","to":"pageStyle9"}

So don't use unwrap.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6637)
<!-- Reviewable:end -->
2015-07-15 15:36:25 -06:00
Michael Wu
2752d3398e Directly append children to output node in parse_html_fragment 2015-07-15 17:09:26 -04:00
bors-servo
ef9715203e Auto merge of #6583 - pcwalton:serializable-display-list, r=metajack
gfx: Make display lists serializable using `serde`.

This commit introduces the `serde` dependency, which we will use to
serialize messages going between processes in multiprocess Servo.

This also adds a new debugging flag, `-Z print-display-list-json`,
allowing the output of display list serialization to be visualized.
This will be useful for our experiments with alternate rasterizers.

r? @metajack

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6583)
<!-- Reviewable:end -->
2015-07-15 14:04:55 -06:00
Patrick Walton
6eacb0c995 gfx: Make display lists serializable using serde.
This commit introduces the `serde` dependency, which we will use to
serialize messages going between processes in multiprocess Servo.

This also adds a new debugging flag, `-Z print-display-list-json`,
allowing the output of display list serialization to be visualized.
This will be useful for our experiments with alternate rasterizers.
2015-07-15 19:04:17 -07:00
Michael Howell
602c8bb415 Don't crash when Firefox doesn't send autoMargins. 2015-07-15 12:30:33 -07:00
bors-servo
b6b95085fb Auto merge of #6628 - michaelwu:slim-domrectlist, r=jdm
Remove window field from domrectlist

Nothing uses this field AFAICT.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6628)
<!-- Reviewable:end -->
2015-07-15 04:56:24 -06:00
Ms2ger
ba71eb21b0 Initialize info directly in get_system_heap_allocated. 2015-07-15 10:08:45 +02:00
bors-servo
8fa6e0abdc Auto merge of #6634 - Ms2ger:ws-parse, r=metajack
Remove parse_web_socket_url in favour of functions in rust-websocket.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6634)
<!-- Reviewable:end -->
2015-07-14 23:37:57 -06:00
Ms2ger
6a61a5dcf5 Remove parse_web_socket_url in favour of functions in rust-websocket. 2015-07-15 11:26:49 +02:00
Michael Wu
c90be8e1dc Remove window field from domrectlist 2015-07-14 21:27:04 -04:00
bors-servo
da5f1abaa7 Auto merge of #6630 - mt2d2:remove_unused_mut, r=metajack
Remove unused mut.

rustc complains about unneeded mut; remove this instance.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6630)
<!-- Reviewable:end -->
2015-07-14 17:37:43 -06:00
Michael Tremel
ff915ae86e Remove unused mut. 2015-07-14 22:16:44 -07:00
bors-servo
9af229b830 Auto merge of #6591 - servo:rustup_2015-07-10, r=larsbergstrom
Upgrade to rustc 1.3.0-dev (fddfd089b 2015-07-10)

Depends on https://github.com/jgraham/webdriver-rust/pull/12.

Fixes #6020.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6591)
<!-- Reviewable:end -->
2015-07-14 13:40:22 -06:00
Martin Robinson
efdf2cd601 Update to latest rust-layers, azure, and skia
GLRasterizationContext is now responsible for doing GPU rasterization.
It can coexist with its target NativeSurface, so we don't have to
continually recreate NativeSurfaces when doing GPU rasterization.
2015-07-14 17:48:50 -07:00
Lars Bergstrom
96d8fee731 Remove double linking of static libs from task_info and azure 2015-07-15 00:51:48 +02:00
Simon Sapin
83d2a11d86 Upgrade to rustc 1.3.0-dev (fddfd089b 2015-07-10) 2015-07-15 00:46:43 +02:00
bors-servo
e06eaa0064 Auto merge of #6618 - pcwalton:content-process-code-shuffling, r=larsbergstrom
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.

r? @larsbergstrom

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6618)
<!-- Reviewable:end -->
2015-07-14 12:11:09 -06:00
Patrick Walton
c2195c490d compositing: Use the pre-existing script channel in the same-domain
iframe case instead of creating a new one.

Fixes test timeouts.
2015-07-14 15:27:36 -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
bors-servo
27d7f94254 Auto merge of #6626 - mbrubeck:gfx-dead, r=glennw
Remove dead code from gfx/text

r? @pcwalton

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6626)
<!-- Reviewable:end -->
2015-07-14 09:40:52 -06:00
Matt Brubeck
e0d98acabc Remove dead code from gfx/text 2015-07-14 14:32:45 -07:00
bors-servo
64751b8eef Auto merge of #6596 - pcwalton:layout-control-ipc, r=jdm
compositing: Make `ScriptListener` and `LayoutControlChan` messages go over IPC.

r? @jdm

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6596)
<!-- Reviewable:end -->
2015-07-14 08:46:07 -06:00
Patrick Walton
9ce65c08a5 layout: Make the LayoutControlChan use IPC. 2015-07-14 13:45:52 -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
bors-servo
7de4ba0f82 Auto merge of #6624 - dzbarsky:23338, r=jdm
Remove some more unnecessary let bindings



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6624)
<!-- Reviewable:end -->
2015-07-14 07:21:10 -06:00
David Zbarsky
bc1eb97671 Remove some more unnecessary let bindings 2015-07-14 14:48:16 -04:00
bors-servo
2947d78e4e Auto merge of #6584 - Ms2ger:wpt_20150709, r=jdm
Update web-platform-tests to revision 5e3ea8f49fee68c327388bfd1dd1375a8ce12a0e.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6584)
<!-- Reviewable:end -->
2015-07-14 05:33:35 -06:00
bors-servo
a2903091e4 Auto merge of #6622 - Ms2ger:send-invalid-state, r=metajack
Throw an InvalidStateError from WebSocket#send when it is called too early.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6622)
<!-- Reviewable:end -->
2015-07-14 03:34:47 -06:00
Ms2ger
48b94ec02b Throw an InvalidStateError from WebSocket#send when it is called too early. 2015-07-14 17:27:10 +02:00
bors-servo
556c0e1509 Auto merge of #6621 - Ms2ger:repeat, r=SimonSapin
Move away from the repeat().take().collect() pattern.

This was the preferred pattern between the deprecation of Vec::from_elem and
the addition of the count argument to the vec![] macro.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6621)
<!-- Reviewable:end -->
2015-07-14 02:42:26 -06:00
Ms2ger
ce4d442941 Move away from the repeat().take().collect() pattern.
This was the preferred pattern between the deprecation of Vec::from_elem and
the addition of the count argument to the vec![] macro.
2015-07-14 16:19:30 +02:00
Ms2ger
bfb96b9448 Update web-platform-tests to revision 5e3ea8f49fee68c327388bfd1dd1375a8ce12a0e. 2015-07-14 10:38:54 +02:00
bors-servo
d91a6f3834 Auto merge of #6620 - Ms2ger:ws-crash, r=jdm
Stop panicking while establishing a WebSocket connection.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6620)
<!-- Reviewable:end -->
2015-07-14 02:06:17 -06:00