Commit graph

323 commits

Author SHA1 Message Date
Johann Tuffe
ec07178b6f sort all uses 2015-08-20 20:47:12 +08:00
João Oliveira
067a22a868 Replace uses of for foo in bar.iter(),
and `for foo in bar.iter_mut(), and for foo in bar.into_iter()
(continuation of #7197)
2015-08-18 01:46:11 +01:00
Josh Matthews
8bb853f643 Fix existing syntactics nits. 2015-08-16 10:30:43 -04:00
vectorijk
14ac1ef75a remove ScriptListener
ref #7175
2015-08-16 01:34:55 -07:00
João Oliveira
0038580abf Replace uses of for foo in bar.iter() and for foo in bar.iter_mut()
closes #7197
2015-08-15 02:27:39 +01:00
João Oliveira
9c11781880 replace .len() == 0 with is_empty()
closes #7198
2015-08-14 04:00:33 +01:00
bors-servo
7f0e62b6fb Auto merge of #7189 - Ms2ger:unsafe-compositing, r=larsbergstrom
Deny unsafe code in compositing.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7189)
<!-- Reviewable:end -->
2015-08-13 07:14:22 -06:00
Ms2ger
1abc7a6dab Deny unsafe code in compositing. 2015-08-13 10:52:29 +02:00
Ms2ger
ee702a7135 Use Iterator::any in collect_old_layers. 2015-08-13 10:02:33 +02:00
Glenn Watson
6506468e19 Ensure compositor layers are collected when removed from layout. 2015-08-13 09:46:58 +10:00
bors-servo
3ad49fc689 Auto merge of #7171 - Ms2ger:ScriptControlChan, r=jdm
Remove ScriptControlChan.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7171)
<!-- Reviewable:end -->
2015-08-12 08:28:29 -06:00
Ms2ger
0aae98e9c0 Pass a Sender<ConstellationControlMsg> to Pipeline::new. 2015-08-12 16:19:30 +02:00
Ms2ger
250fdc33f4 Store a Sender<ConstellationControlMsg> in Pipeline. 2015-08-12 16:15:21 +02:00
Ms2ger
fafcc0a5da Store a Sender<ConstellationControlMsg> in CompositionPipeline. 2015-08-12 16:03:38 +02:00
Ms2ger
9476474267 Store a Sender<ConstellationControlMsg> in PipelineContent. 2015-08-12 15:58:10 +02:00
Ms2ger
fdafc5c360 Store a Sender<ConstellationControlMsg> in LayoutTask. 2015-08-12 15:55:16 +02:00
Ms2ger
c05f0906d5 Store a Sender<ConstellationControlMsg> in ScriptTask. 2015-08-12 15:25:31 +02:00
Ms2ger
1ef10550b1 Avoid unwrap calls in handle_navigate_msg. 2015-08-12 15:10:03 +02:00
Patrick Walton
bf26a2373f layout: Carry out some minor style cleanups. 2015-08-10 21:27:05 -07:00
Patrick Walton
300315bb78 compositing: Add some layer tree debugging infrastructure. 2015-08-10 21:27:04 -07:00
Patrick Walton
df4acbac04 layout: Implement basic overflow: scroll functionality.
Known issues:

* Display list optimization can sometimes optimize out elements that
  should be shown. This affects the Enyo demo.

* The `overflow: scroll` container doesn't clip the inner layer properly
  when borders, border radius, etc. are present.

* `overflow-x: scroll` and `overflow-y: scroll` don't work individually;
  elements are scrolled all at once.

* Scrolling only works on absolutely-positioned elements.
2015-08-10 21:27:04 -07:00
Patrick Walton
fc13dd1169 compositor: Allow children of layers that don't want scroll events to be
scrolled.

Necessary for `overflow: scroll`.
2015-08-10 21:27:04 -07:00
Glenn Watson
30d9e75557 Update rust-layers to get 2d transform + clipping support. 2015-08-11 08:48:44 +10:00
bors-servo
a5c7508fab Auto merge of #7009 - connorimes:remove-confusing-typedefs, r=Ms2ger
Remove typedefs DevtoolsControlChan and DevtoolsControlPort



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7009)
<!-- Reviewable:end -->
2015-08-07 14:41:37 -06:00
James Graham
36da7e2270 Add DOMLoad message to constellation that is sent after the DOM Load event is dispatched. 2015-08-07 16:55:13 +01:00
bors-servo
44c4bb00c1 Auto merge of #7053 - connorimes:move-net-error-list, r=mbrubeck
Move net_error_list from net to net_traits. Fixes #7050.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7053)
<!-- Reviewable:end -->
2015-08-07 01:55:20 -06:00
Connor Imes
b526214a3d Move net_error_list from net to net_traits. Fixes #7050. 2015-08-06 16:37:08 -05:00
David Rajchenbach-Teller
d2a3a68170 Resolves #5478 - use std::process::exit instead of lib::exit in constellation.rs 2015-08-06 12:10:26 +02:00
Connor Imes
8c3cf90e6e Remove typedefs DevtoolsControlChan and DevtoolsControlPort. Fixes #6923. 2015-08-05 13:30:25 -05:00
James Graham
f52276d2cc Use hosts-replaced URL only when loading resources 2015-08-05 10:34:20 +01:00
Patrick Walton
2aa5174246 script: Make the resource task communication use IPC channels. 2015-07-31 11:28:09 -07:00
Patrick Walton
1ff7a51f0a compositing: Use an OptionalIpcSender for communication between the
layout and paint tasks.
2015-07-31 08:42:30 -07:00
Patrick Walton
3be5bbbaa3 gfx: Split the paint messages into layout and chrome messages, and make
the layout messages serializable.
2015-07-31 08:42:29 -07:00
Patrick Walton
1589fe5404 compositing: Don't count the root layer when checking to see when to
take the screenshot, as it isn't painted after first layout comes in.
2015-07-30 20:04:43 -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
Simon Sapin
2b62041997 Remove usage of the deprecated box () (expr) syntax. 2015-07-30 18:01:44 +02: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
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
bors-servo
b90fd5931d Auto merge of #6812 - ecoal95:webgl-fail, r=jdm
webgl: Make context creation fallible. Fixes #6806



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6812)
<!-- Reviewable:end -->
2015-07-29 15:29:58 -06:00
bors-servo
28e163d6c4 Auto merge of #6654 - aweinstock314:add-x11-copy-to-clipboard, r=jdm
Add copy-to-clipboard feature under x11

The main work is in the the rust-clipboard library, this PR updates Cargo.lock and adds plumbing.

0337e48b3f

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6654)
<!-- Reviewable:end -->
2015-07-29 11:26:00 -06:00
Avi Weinstock
9ba18850dd Update rust-clipboard to the version with working set_contents. 2015-07-29 12:19:39 -04:00
Avi Weinstock
f86252a60b Add set_clipboard_context function and relevant plumbing. Use Option more consistantly (less unwraps) in textinput's selection handling. 2015-07-29 12:19:37 -04:00
Patrick Walton
1094b30627 compositing: Tick animations right away when content enables animations.
Otherwise, we have to wait for the next vsync. This was capping the
framerate of the particles demo at 30 FPS in most cases.
2015-07-28 18:39:41 -07:00
ecoal95
bc908458ff webgl: Make context creation fallible. Fixes #6806 2015-07-28 17:34:23 +02:00
Patrick Walton
164e10202c devtools: Convert the developer tools to run over IPC. 2015-07-27 09:10:01 -07:00
Patrick Walton
bb99b2f3c8 script: Make most of 2D canvas and WebGL run over IPC.
To actually make the multiprocess communication work, we'll need to
reroute the task creation to the pipeline or the compositor. But this
works as a first step.
2015-07-25 00:50:12 -07:00
bors-servo
f778e0eecf Auto merge of #6629 - pcwalton:profiler-ipc, r=jdm
profile: Make the time and memory profilers run over IPC.

Uses a couple of extra threads to work around the lack of cross-process
boxed trait objects.

r? @nnethercote

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6629)
<!-- Reviewable:end -->
2015-07-24 18:55:05 -06: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
Martin Robinson
1aedead955 Have BufferMap store NativeSurfaces and rename to SurfaceMap
We currently store LayerBuffers, because previously NativeSurfaces did
not record their own size. Now we can store NativeSurfaces directly,
which saves a bit of space in the surface cache and allows us to create
LayerBuffers only in the PaintTask.

This also means that instead of sending cached LayerBuffers, the
compositor can just send cached NativeSurfaces to the PaintTask.
2015-07-24 11:12:39 -07:00
bors-servo
3f69eadc0d Auto merge of #6640 - mrobinson:memory-profiling-for-compositor, r=nnethercote
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.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6640)
<!-- Reviewable:end -->
2015-07-22 11:44:30 -06:00