Commit graph

4270 commits

Author SHA1 Message Date
Jack Moffitt
bc2de7f2c0 Update gleam to 0.1.7 2015-07-29 22:38:36 -06:00
bors-servo
3a112bc07f Auto merge of #6834 - jdm:named-constructor-prototype, r=Ms2ger
Use an actual byte string when defining the prototype of named constr…

…uctors. Fixes #6730.

r? @Ms2ger

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6834)
<!-- Reviewable:end -->
2015-07-29 22:07:35 -06:00
Patrick Walton
91ce54f38a servo: Update Glutin to pick up event handling fixes 2015-07-29 18:42:27 -07:00
bors-servo
bff5e325a8 Auto merge of #6802 - nnethercote:report-kind, r=jdm
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.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6802)
<!-- Reviewable:end -->
2015-07-29 19:42:00 -06:00
bors-servo
acbca7b3aa Auto merge of #6798 - dzbarsky:gCS, r=pcwalton
Implement getComputedStyle

It's not quite done but can probably be reviewed anyway.
I still need to finish up a few of the ToCss impls, I just got lazy and wanted to make sure things worked.

The computation of the used values is definitely not right, I'm going to investigate that.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6798)
<!-- Reviewable:end -->
2015-07-29 18:48:45 -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
David Zbarsky
e484d6b5e3 Implement getComputedStyle 2015-07-29 20:17:50 -04:00
bors-servo
d62f0fb7c4 Auto merge of #6827 - glennw:serialize-translate, r=pcwalton
Add ToCss serialization support for translation transforms.

Ref #6643.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6827)
<!-- Reviewable:end -->
2015-07-29 17:50:41 -06:00
David Zbarsky
cbd9695c73 Clean up Node::ReplaceChild 2015-07-29 19:41:04 -04: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
8b7120012a Auto merge of #6815 - nick-thompson:dispose_layout_data, r=jdm
Dispose layout data for every node removed from the tree

Fix for #6754.

cc @jdm – I believe this is all that's required for the fix, but until I get a better sense of #6813, I'm unsure of the best way to test this.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6815)
<!-- Reviewable:end -->
2015-07-29 16:24:46 -06: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
58fa3b69b7 Auto merge of #5851 - evilpie:background, r=SimonSapin
Implement the HTML background attribute

Fixes #5835

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5851)
<!-- Reviewable:end -->
2015-07-29 14:37:45 -06:00
bors-servo
7adc336aaa Auto merge of #6809 - Ms2ger:unrooted_must_root, r=metajack
Remove unrooted_must_root annotation from unions (fixes #2661).

The unsafety was fixed as part of the SpiderMonkey upgrade; this removes the
now unused annotation.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6809)
<!-- Reviewable:end -->
2015-07-29 13:20:20 -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
Josh Matthews
b2cf27ba5d Use an actual byte string when defining the prototype of named constructors. Fixes #6730. 2015-07-29 12:39:26 -04: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
Corey Farwell
8cfccda542 Implement ChildNode::before & ChildNode::after
Continued from #6536

The current implementations of `ChildNode::before` and
`ChildNode::after` do not match the WHATWG spec. This commit updates the
implementations to match the spec.

Our current implementation of `ChildNode::after` passes all the WPT
tests. So I made sure to add a regression test that failed with the
current implementation. There are a few other unit tests I added
to exhaust other corner cases I encountered.
2015-07-29 22:44:19 +07:00
bors-servo
416931f4be Auto merge of #6822 - pcwalton:tick-animations-more-often, r=glennw
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.

r? @glennw

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6822)
<!-- Reviewable:end -->
2015-07-29 08:40:42 -06:00
bors-servo
e74a13c01d Auto merge of #6811 - Ms2ger:auto-worker, r=jdm
Simplify AutoWorkerReset::new.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6811)
<!-- Reviewable:end -->
2015-07-29 07:54:08 -06:00
bors-servo
52c2049f2a Auto merge of #6807 - farodin91:filereader, r=jdm
Refactor FileReader #6762 #6763 #6750 #6751



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6807)
<!-- Reviewable:end -->
2015-07-29 07:07:22 -06:00
bors-servo
b43b7ba925 Auto merge of #6810 - Ms2ger:warnings, r=metajack
Remove unused import.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6810)
<!-- Reviewable:end -->
2015-07-29 06:19:25 -06:00
farodin91
5921af4c49 Refactor FileReader #6762 #6763 #6750 #6751 2015-07-29 14:18:59 +02:00
bors-servo
d707792cce Auto merge of #6828 - Ms2ger:intermittents, r=SimonSapin
Try to reduce intermittent failures.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6828)
<!-- Reviewable:end -->
2015-07-29 05:32:52 -06:00
Ms2ger
de39880fa6 Be less vocal about image parsing failures.
This should help fix some intermittent failures where this error message was
printed intertwined with the test results, causing wptrunner to not notice
the results.
2015-07-29 10:06:31 +02:00
farodin91
20f99e92d8 Adding for support Blob.{close,isClose} #6723 2015-07-29 09:54:08 +02:00
Glenn Watson
1963a5af51 Add ToCss serialization support for translation transforms.
Ref #6643.
2015-07-29 15:15:52 +10:00
bors-servo
fff104bb41 Auto merge of #6801 - glennw:hit-test-transforms, r=pcwalton
Accumulate and invert stacking context transform for hit tests.

This makes hit tests work on stacking contexts with transforms.

Ref #6643.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6801)
<!-- Reviewable:end -->
2015-07-28 23:09:08 -06:00
bors-servo
a409699a0b Auto merge of #6796 - glennw:transform-translate-fix, r=pcwalton
Change transforms to use LengthOrPercentage.

This simplifies an upcoming PR to support serializing transform values for css style declarations.

Related to issue #6643.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6796)
<!-- Reviewable:end -->
2015-07-28 20:40:57 -06: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
bors-servo
0b447651e4 Auto merge of #6794 - Ms2ger:StyledNode, r=pcwalton
Remove StyledNode.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6794)
<!-- Reviewable:end -->
2015-07-28 17:26:42 -06:00
Nick Thompson
072609ab8c Dispose layout data for every node removed from the tree 2015-07-28 12:08:20 -07:00
bors-servo
bdf01ddd60 Auto merge of #6695 - dzbarsky:extractcontents, r=Ms2ger
Implement Range#extractContents



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6695)
<!-- Reviewable:end -->
2015-07-28 13:01:33 -06:00
Matt Brubeck
e0eed0a48e Remove unused script -> layout_traits dependency 2015-07-28 10:27:08 -07:00
David Zbarsky
f44691c91d Implement Range#extractContents 2015-07-28 12:52:29 -04:00
ecoal95
bc908458ff webgl: Make context creation fallible. Fixes #6806 2015-07-28 17:34:23 +02:00
Ms2ger
741aae709b Simplify AutoWorkerReset::new. 2015-07-28 16:55:44 +02:00
Ms2ger
ce8c7b9862 Remove unused import. 2015-07-28 16:24:08 +02:00
Ms2ger
efa12e6963 Remove unrooted_must_root annotation from unions (fixes #2661).
The unsafety was fixed as part of the SpiderMonkey upgrade; this removes the
now unused annotation.
2015-07-28 16:22:41 +02:00
Bogdan Cuza
233a769c67 Add spec links 2015-07-28 13:28:41 +02:00
Glenn Watson
ddef25030b Accumulate and invert stacking context transform for hit tests.
This makes hit tests work on stacking contexts with transforms.

Ref #6643.
2015-07-28 14:38:09 +10:00
bors-servo
e0bd80f807 Auto merge of #6662 - tschneidereit:client-geometry, r=glennw,pcwatson
Implement Element.client{Top,Left,Width,Height}

This isn't done, but contains a working implementation of at least `clientTop`. Feedback would be much appreciated: it's probably far from ideal.

Implementing `clientLeft` is straight-forward, I think, but `clientWidth` and `clientHeight` require accessing the `border_box` - and I don't know how that works, yet.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6662)
<!-- Reviewable:end -->
2015-07-27 20:45:05 -06:00
bors-servo
2672f2bbe4 Auto merge of #6782 - notriddle:empty-vec, r=jdm
Use empty Vec instead of None.

Closes #6764

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6782)
<!-- Reviewable:end -->
2015-07-27 19:45:09 -06:00
Glenn Watson
c27388cb81 Change transforms to use LengthOrPercentage.
This simplifies an upcoming PR to support serializing transform values for css style declarations.

Related to issue #6643.
2015-07-28 09:42:05 +10:00
Ms2ger
cf793a8813 Inline ThreadSafeLayoutNode::get_style. 2015-07-27 19:57:38 +02:00
Ms2ger
3984e39011 Replace the StyledNode trait with inherent methods. 2015-07-27 19:57:33 +02:00
bors-servo
4bc1db3fe8 Auto merge of #6745 - pcwalton:devtools-ipc, r=jdm
devtools: Convert the developer tools to run over IPC.

This was a large, invasive change.

r? @jdm

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6745)
<!-- Reviewable:end -->
2015-07-27 11:09:38 -06:00
Patrick Walton
164e10202c devtools: Convert the developer tools to run over IPC. 2015-07-27 09:10:01 -07:00
Ms2ger
760f5c70c5 Remove unused StyledNode::has_style method. 2015-07-27 15:57:26 +02:00