Commit graph

19894 commits

Author SHA1 Message Date
bors-servo
16e6bdce6e
Auto merge of #21685 - AnshulMalik:format-range, r=jdm
format components/range using rustfmt

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21685)
<!-- Reviewable:end -->
2018-09-12 08:14:58 -04:00
Anshul Malik
3dc2d31f88 format components/range using rustfmt 2018-09-12 12:32:31 +05:30
bors-servo
8c3b192466
Auto merge of #21672 - kingdido999:master, r=jdm
Format components metrics and msg #21373

```bash
rustfmt components/metrics/lib.rs
rustfmt components/msg/*.rs
rustfmt components/msg/tests/*.rs
```

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21672)
<!-- Reviewable:end -->
2018-09-12 01:52:08 -04:00
bors-servo
d3dcfd1131
Auto merge of #21679 - AnshulMalik:format-selectors, r=jdm
format components/selectors

Format with `rustfmt components/selectors/*.rs`
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21679)
<!-- Reviewable:end -->
2018-09-11 23:24:25 -04:00
Anshul Malik
a28c642fc7 format components/selectors 2018-09-12 00:24:20 +05:30
Matt Brubeck
a77d05538b Switch from new-ordered-float back to ordered-float
The `new-ordered-float` fork has been merged back into the original
`ordered-float` crate.
2018-09-11 09:59:01 -07:00
bors-servo
049eb6887e
Auto merge of #21539 - ferjm:multichannel.audio.decoder, r=Manishearth
Add support for multichannel decoded audio

- [X] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [X] There are tests for these changes

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21539)
<!-- Reviewable:end -->
2018-09-11 08:41:25 -04:00
Fernando Jiménez Moreno
f423ede07f Add support for multichannel decoded audio 2018-09-11 10:38:56 +02:00
kingdido999
7f4ca21928 Format msg #21373 2018-09-11 15:04:55 +08:00
kingdido999
b3b188a6ff Format metrics #21373 2018-09-11 15:04:41 +08:00
bors-servo
b0ee750fba
Auto merge of #21660 - servo:webgl, r=jdm
Some more drive-by fixes for rgba8_image_to_tex_image_data

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21660)
<!-- Reviewable:end -->
2018-09-10 19:21:45 -04:00
bors-servo
795e7f6002
Auto merge of #21661 - chansuke:format_size_of_test, r=jdm
Format component size_of_test

<!-- Please describe your changes on the following line: -->
Format `components/size_of_test` by:
```
rustfmt components/size_of_test/*.rs
```
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [ ] These changes fix part of #21373.
- [x] These changes do not require tests because they format code only.

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21661)
<!-- Reviewable:end -->
2018-09-10 17:12:06 -04:00
bors-servo
6cad3f4f40
Auto merge of #21657 - AnshulMalik:format-profile_traits, r=jdm
format components/profile_traits

Issue: #21373

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21657)
<!-- Reviewable:end -->
2018-09-10 15:25:58 -04:00
bors-servo
1127bcf69c
Auto merge of #21655 - kingdido999:master, r=jdm
Format jstraceable_derive #21373

```bash
rustfmt components/jstraceable_derive/*.rs
```

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21655)
<!-- Reviewable:end -->
2018-09-10 14:08:06 -04:00
bors-servo
948f0c9548
Auto merge of #21664 - chansuke:format_servo, r=jdm
Format component servo

<!-- Please describe your changes on the following line: -->
Format components with:

`rustfmt components/servo/*.rs`

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [ ] These changes fix part of #21373.
- [x] These changes do not require tests because

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21664)
<!-- Reviewable:end -->
2018-09-10 13:05:12 -04:00
bors-servo
e122341a1d
Auto merge of #21651 - AnshulMalik:format-profile, r=jdm
format components/profile

Issue #21373

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21651)
<!-- Reviewable:end -->
2018-09-10 11:49:56 -04:00
chansuke
f2c9c3dc43 Format component servo 2018-09-11 00:47:01 +09:00
bors-servo
78ad1df0b0
Auto merge of #21645 - AgustinCB:add-websocket-task-queue, r=jdm
Add Websocket task source

According to the doc: https://html.spec.whatwg.org/multipage/web-sockets.html#network

The task source for all tasks queued in the websocket section are the
websocket task source, so this commit also updates those references to
use the appropriate one.

Also, while working on this, I made a typo here: 5dd6e21c2e/components/script/dom/window.rs (L191)

Setting the name incorrectly. The error, however, was this:

```bash
error[E0412]: cannot find type `WebsocketEventTaskSource` in this scope
     --> components/script/dom/window.rs:171:1
       |
171 | #[dom_struct]
       | ^^^^^^^^^^^^^ did you mean `WebsocketTaskSource`?
```

Which isn't useful at all. Not sure if it's a rustc problem or something related with htis code base, but I thought it was worth mentioning.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #21590
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because they don't include new behavior and existing tests should cover this code.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21645)
<!-- Reviewable:end -->
2018-09-10 09:11:44 -04:00
chansuke
52a11d8237 Format component size_of_test 2018-09-10 21:31:38 +09:00
Anthony Ramine
dac7740b8c Reuse input buffer for RGB/UNSIGNED_BYTE in rgba8_image_to_tex_image_data 2018-09-10 14:13:23 +02:00
Anthony Ramine
e1486f7d71 Reuse input vector for LUMINANCE_ALPHA/HALF_FLOAT 2018-09-10 12:43:38 +02:00
Anthony Ramine
7e7441749b Fix the remaining LUMINANCE* cases in rgba8_image_to_tex_image_data 2018-09-10 12:41:57 +02:00
Anshul Malik
ce9231c471 format components/profile_traits 2018-09-10 09:56:01 +05:30
kingdido999
1cd092db63 Format jstraceable_derive #21373 2018-09-10 11:03:38 +08:00
bors-servo
6cb39fad47
Auto merge of #21620 - chansuke:format_style_traits, r=jdm
Format component of style_traits

<!-- Please describe your changes on the following line: -->
Format `style_traits` with:
```
rustfmt components/style_traits/*.rs
```

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [ ] These changes fix part of #21373.
- [x] These changes do not require tests because they format the components only.

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21620)
<!-- Reviewable:end -->
2018-09-09 16:18:18 -04:00
bors-servo
129b97ad08
Auto merge of #21648 - kingdido999:master, r=jdm
Format gfx_traits and hashglobe #21373

```bash
rustfmt components/gfx_traits/*.rs
rustfmt components/hashglobe/src/*.rs
```

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21648)
<!-- Reviewable:end -->
2018-09-09 13:34:03 -04:00
bors-servo
c8fd63802e
Auto merge of #21652 - chansuke:format_style, r=emilio
Format component `style`

<!-- Please describe your changes on the following line: -->
Format `components/style` with:
```
rustfmt components/style/*.rs
```

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix part of #21373.
- [x] These changes do not require tests because they format the components only.

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21652)
<!-- Reviewable:end -->
2018-09-09 12:40:12 -04:00
bors-servo
186393a3be
Auto merge of #21646 - servo:webgl, r=jdm
Fix some texture conversions

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21646)
<!-- Reviewable:end -->
2018-09-09 11:52:22 -04:00
Anshul Malik
72748de721 format components/profile - #21373 2018-09-09 20:08:00 +05:30
chansuke
8dab4d659a
Format style component. 2018-09-09 16:24:45 +02:00
Boris Chiou
31fc6cd565
style: Use the standalone struct and enum for the flags in SVG path.
We define the standalone types for using derive macro easily and overriding
the behaviors of this traits. This could avoid defining the general
behavior of booleans.

Depends on D4788

Differential Revision: https://phabricator.services.mozilla.com/D4813
2018-09-09 16:09:08 +02:00
Boris Chiou
b0604c9be5
style: Make offset-path: path() animatable.
Here, we change the animation type of offset-path as ComputedValue, so
we could do animation on it. Also enable the wpt for offset-path
interpolation. In test_transition_per_property.html, we add some basic tests
ifor offset-path.

ToAnimatedZero for PathCommand will be dropped later.

Because the animations of arcs with mismatched flags are fallen back to
discrete animations, the result of getComputedValue is not normalized in this
case. This makes some wpt failed even though the progress is 100%.

Depends on D4786

Differential Revision: https://phabricator.services.mozilla.com/D4787
2018-09-09 16:08:56 +02:00
Boris Chiou
14911b96e0
style: Make SVGPathData and clip-path: path() animatable.
Implement Animate trait for SVGPathData.

The basic idea is: we normalize |this| and |other| svg paths, and then
do interpolation on the normalized svg paths. The normalization is to
convert relative coordinates into absolute coordinates, so we could do
real number interpolation on each path command directly.

In this patch, we also make |clip-path:path()| animatable.

Differential Revision: https://phabricator.services.mozilla.com/D4786
2018-09-09 16:08:24 +02:00
Anthony Ramine
6d3609dbe8 Fix the UNSIGNED_SHORT_4_4_4_4 case of premultiply_pixels 2018-09-09 12:22:01 +02:00
Anthony Ramine
d8b7394fa3 Fix the UNSIGNED_SHORT_5_5_5_1 case of premultiply_pixels 2018-09-09 12:21:56 +02:00
Anthony Ramine
f726f18291 Remove some useless argument mutability
I wonder why this doesn't trigger a warning.
2018-09-09 12:21:55 +02:00
Anthony Ramine
e61c7b757f Fix the LUMINANCE of rgba8_image_to_tex_image_data
The internal format and format values match, thus the canvas or image input
must be interpreted as already in LUMINANCE format.
2018-09-09 12:21:54 +02:00
Anthony Ramine
9a362391d5 Fix the LUMINANCE_ALPHA case of rgba8_image_to_tex_image_data
The internal format and format values match, thus the canvas or image input
must be interpreted as already in LUMINANCE_ALPHA format.
2018-09-09 12:21:54 +02:00
kingdido999
951bda3600 Format hashglobe #21373 2018-09-09 10:14:36 +08:00
kingdido999
2c9e32a09e Format gfx_traits #21373 2018-09-09 10:11:08 +08:00
Agustin Chiappe Berrini
5dd6e21c2e Add Websocket task source
According to the doc: https://html.spec.whatwg.org/multipage/web-sockets.html#network

The task source for all tasks queued in the websocket section are the
websocket task source, so this commit also updates those references to
use the appropriate one.
2018-09-08 17:01:27 -04:00
bors-servo
9c1c58a498
Auto merge of #21643 - servo:webgl, r=jdm
Reuse the input vector in more cases of rgba8_image_to_tex_image_data

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21643)
<!-- Reviewable:end -->
2018-09-08 13:18:08 -04:00
Anthony Ramine
74e6f40abe Reuse the input vector in more cases of rgba8_image_to_tex_image_data 2018-09-08 18:21:45 +02:00
Anthony Ramine
6a692228fc Fix the ALPHA/FLOAT case of rgba8_image_to_tex_image_data
I'm pretty sure this is supposed to write the ALPHA component.
2018-09-08 18:06:51 +02:00
bors-servo
5929086c36
Auto merge of #21641 - servo:webgl, r=jdm
Some drive-by perf improvements on the WebGL stack

This avoids a bunch of pointless buffer and texture copies, but is far from eliminating all which could be eliminated.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21641)
<!-- Reviewable:end -->
2018-09-08 10:33:21 -04:00
Anthony Ramine
e192e4d97f Reuse input of rgba8_image_to_tex_image_data in some cases 2018-09-08 13:42:07 +02:00
Anthony Ramine
27951bb7c8 Make rgba8_image_to_tex_image_data not overallocate in some case 2018-09-08 13:42:07 +02:00
Anthony Ramine
145086e150 Make rgba8_image_to_tex_image_data a free-standing function 2018-09-08 13:42:06 +02:00
Anthony Ramine
a5f9d03229 Make remove_premultiplied_alpha mutate its input 2018-09-08 13:42:06 +02:00
Anthony Ramine
1864edbb36 Make premultiply_pixels mutate its input 2018-09-08 13:42:06 +02:00