Commit graph

42470 commits

Author SHA1 Message Date
Fernando Jiménez Moreno
51a9438b62 Add 1.16 feature to gstreamer 2020-06-29 16:53:49 +02:00
Fernando Jiménez Moreno
db0b9eee98 Update gstreamer-webrtc 2020-06-29 16:53:49 +02:00
Fernando Jiménez Moreno
820ea452e7 Set data channels as closed on peer connection close 2020-06-29 16:53:49 +02:00
Fernando Jiménez Moreno
2dedcaeaaf Allow receiving binary data channel messages 2020-06-29 16:53:48 +02:00
Fernando Jiménez Moreno
f855fbb604 Allow sending binary messages 2020-06-29 16:53:48 +02:00
Fernando Jiménez Moreno
7db485aeb2 RTCDataChannel.readyState getter 2020-06-29 16:53:48 +02:00
Fernando Jiménez Moreno
9d456d5d17 Use data channel ids 2020-06-29 16:53:48 +02:00
Fernando Jiménez Moreno
960b010d30 Cleanups and tidy fixes 2020-06-29 16:53:48 +02:00
Fernando Jiménez Moreno
ace0d7795e Fix rooting issues with data channels callbacks 2020-06-29 16:53:48 +02:00
Fernando Jiménez Moreno
f5c930087e Implement ondatachannel event 2020-06-29 16:53:48 +02:00
Fernando Jiménez Moreno
2c5fc3b3c8 Allow sending strings through data channels 2020-06-29 16:53:47 +02:00
Fernando Jiménez Moreno
82260a9d2b On data channel message handler 2020-06-29 16:53:47 +02:00
Fernando Jiménez Moreno
5c6dcbf54e Trigger RTCErrorEvent on data channel error 2020-06-29 16:53:47 +02:00
Fernando Jiménez Moreno
84598a5173 Introduce RTCError and RTCErrorEvent 2020-06-29 16:53:47 +02:00
Fernando Jiménez Moreno
4e6d3e7cec WebRTCDataChannel initial support 2020-06-29 16:53:47 +02:00
Fernando Jiménez Moreno
5788882b16 Update servo-media and gstreamer 2020-06-29 16:53:42 +02:00
bors-servo
e2488d2908
Auto merge of #25737 - jsjoeio:patch-1, r=paulrouget
docs(README): update mac installation

<!-- Please describe your changes on the following line: -->
This clarifies the mac installation instructions.

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because it's a change to the `README`

<!-- 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. -->
2020-06-24 08:45:42 -04:00
bors-servo
6fc77add11
Auto merge of #27063 - servo:bincodeup, r=nox
Update bincode, reduce code size of `script` by ~11%

… as measured in lines of unoptimized LLVM IR by

```
cargo llvm-lines --manifest-path ports/winit/Cargo.toml \
    -p script --features layout-2013 | head -n 30
```

… with https://github.com/dtolnay/cargo-llvm-lines
CC https://github.com/servo/servo/issues/26713

One of the top functions (in lines contribution) was a `Visitor::visit_enum` method generated by `serde_derive` for deserializing `keyboard_types:🔑:Key`, which is an enum with many variants. I had filed https://github.com/serde-rs/serde/issues/1824 to discuss this, and dtolnay proposed https://github.com/pyfisch/keyboard-types/pull/6 manually implementing `Deserialize` for that enum instead of deriving it.

However another point of note is that this function had four copies with monomorphization. I could reproduce this in a program that does nothing but deserialize an enum with bincode: https://github.com/serde-rs/serde/issues/1824#issuecomment-641244476 This suggests that bincode uses instanciates the `Deserialize` impls with four different `Deserializer` types which is three more than necessary.

https://dos.cafe/blog/bincode-1.3.html mentions changes to `Deserializer` types in a new version of bincode. And sure enough, this issue is now fixed.

Before:

```
  Lines           Copies         Function name
  -----           ------         -------------
  7022161 (100%)  180367 (100%)  (TOTAL)
   178816 (2.5%)   15437 (8.6%)  core::ptr::drop_in_place
   151022 (2.2%)    6634 (3.7%)  core::ops::function::FnOnce::call_once
   122012 (1.7%)    1000 (0.6%)  <<&mut bincode:🇩🇪:Deserializer<R,O> as serde:🇩🇪:Deserializer>::deserialize_tuple::Access<R,O> as serde:🇩🇪:SeqAccess>::next_element_seed
   101731 (1.4%)    1627 (0.9%)  core::option::Option<T>::map
    83196 (1.2%)    1192 (0.7%)  core::result::Result<T,E>::map
    51215 (0.7%)    6111 (3.4%)  core::ops::function::FnOnce::call_once{{vtable.shim}}
    47048 (0.7%)       4 (0.0%)  <keyboard_types:🔑:_IMPL_DESERIALIZE_FOR_Key::<impl serde:🇩🇪:Deserialize for keyboard_types:🔑:Key>::deserialize::__Visitor as serde:🇩🇪:Visitor>::visit_enum
    45388 (0.6%)     296 (0.2%)  <&mut bincode:🇩🇪:Deserializer<R,O> as serde:🇩🇪:Deserializer>::deserialize_enum::<impl serde:🇩🇪:EnumAccess for &mut bincode:🇩🇪:Deserializer<R,O>>::variant_seed
    44973 (0.6%)     647 (0.4%)  core::result::Result<T,E>::map_err
    39185 (0.6%)     516 (0.3%)  std:🧵:local::LocalKey<T>::try_with
    39130 (0.6%)     215 (0.1%)  alloc::raw_vec::RawVec<T,A>::grow_amortized
    35334 (0.5%)     867 (0.5%)  alloc::alloc::box_free
    34788 (0.5%)     609 (0.3%)  crossbeam_channel::context::Context::with::{{closure}}
    33810 (0.5%)     646 (0.4%)  core::ptr::swap_nonoverlapping_one
    33610 (0.5%)     552 (0.3%)  core::result::Result<T,E>::unwrap_or_else
    32144 (0.5%)     392 (0.2%)  <*const T as core::fmt::Pointer>::fmt
    32062 (0.5%)     782 (0.4%)  script::dom::bindings::root::Root<T>::new
    31589 (0.4%)     600 (0.3%)  core::result::Result<T,E>::expect
    29364 (0.4%)     116 (0.1%)  <<script_traits::webdriver_msg::_IMPL_DESERIALIZE_FOR_WebDriverScriptCommand::<impl serde:🇩🇪:Deserialize for script_traits::webdriver_msg::WebDriverScriptCommand>::deserialize::__Visitor as serde:🇩🇪:Visitor>::visit_enum::__Visitor as serde:🇩🇪:Visitor>::visit_seq
    26996 (0.4%)     346 (0.2%)  core::option::Option<T>::map_or
    26168 (0.4%)      92 (0.1%)  <<script_traits::_IMPL_DESERIALIZE_FOR_ConstellationControlMsg::<impl serde:🇩🇪:Deserialize for script_traits::ConstellationControlMsg>::deserialize::__Visitor as serde:🇩🇪:Visitor>::visit_enum::__Visitor as serde:🇩🇪:Visitor>::visit_seq
    25996 (0.4%)     388 (0.2%)  script::dom::bindings::root::Root<script::dom::bindings::root::MaybeUnreflectedDom<T>>::reflect_with
    25833 (0.4%)     641 (0.4%)  core::result::Result<T,E>::unwrap
    25180 (0.4%)       4 (0.0%)  <keyboard_types::code::_IMPL_DESERIALIZE_FOR_Code::<impl serde:🇩🇪:Deserialize for keyboard_types::code::Code>::deserialize::__Visitor as serde:🇩🇪:Visitor>::visit_enum
    24751 (0.4%)     197 (0.1%)  core::iter::traits::iterator::Iterator::try_fold
    22216 (0.3%)     376 (0.2%)  bincode::internal::deserialize_seed
    22185 (0.3%)     145 (0.1%)  hashbrown::raw::RawTable<T>::find
```

After:

```
  Lines           Copies         Function name
  -----           ------         -------------
  6239581 (100%)  169803 (100%)  (TOTAL)
   178770 (2.9%)   15434 (9.1%)  core::ptr::drop_in_place
   151022 (2.4%)    6634 (3.9%)  core::ops::function::FnOnce::call_once
   101146 (1.6%)    1618 (1.0%)  core::option::Option<T>::map
    76938 (1.2%)    1090 (0.6%)  core::result::Result<T,E>::map
    51215 (0.8%)    6111 (3.6%)  core::ops::function::FnOnce::call_once{{vtable.shim}}
    44973 (0.7%)     647 (0.4%)  core::result::Result<T,E>::map_err
    39185 (0.6%)     516 (0.3%)  std:🧵:local::LocalKey<T>::try_with
    39130 (0.6%)     215 (0.1%)  alloc::raw_vec::RawVec<T,A>::grow_amortized
    35334 (0.6%)     867 (0.5%)  alloc::alloc::box_free
    34788 (0.6%)     609 (0.4%)  crossbeam_channel::context::Context::with::{{closure}}
    33810 (0.5%)     646 (0.4%)  core::ptr::swap_nonoverlapping_one
    33610 (0.5%)     552 (0.3%)  core::result::Result<T,E>::unwrap_or_else
    32144 (0.5%)     392 (0.2%)  <*const T as core::fmt::Pointer>::fmt
    32062 (0.5%)     782 (0.5%)  script::dom::bindings::root::Root<T>::new
    31589 (0.5%)     600 (0.4%)  core::result::Result<T,E>::expect
    30069 (0.5%)     250 (0.1%)  <<&mut bincode:🇩🇪:Deserializer<R,O> as serde:🇩🇪:Deserializer>::deserialize_tuple::Access<R,O> as serde:🇩🇪:SeqAccess>::next_element_seed
    26996 (0.4%)     346 (0.2%)  core::option::Option<T>::map_or
    25996 (0.4%)     388 (0.2%)  script::dom::bindings::root::Root<script::dom::bindings::root::MaybeUnreflectedDom<T>>::reflect_with
    25833 (0.4%)     641 (0.4%)  core::result::Result<T,E>::unwrap
    24751 (0.4%)     197 (0.1%)  core::iter::traits::iterator::Iterator::try_fold
    22185 (0.4%)     145 (0.1%)  hashbrown::raw::RawTable<T>::find
    22000 (0.4%)      80 (0.0%)  hashbrown::raw::RawTable<T>::rehash_in_place
    20808 (0.3%)     289 (0.2%)  core::alloc::layout::Layout::array
    20031 (0.3%)     308 (0.2%)  core::option::Option<T>::ok_or_else
    19732 (0.3%)       2 (0.0%)  html5ever::tree_builder::TreeBuilder<Handle,Sink>::step
    18951 (0.3%)    1014 (0.6%)  core::ptr::read
    17261 (0.3%)     201 (0.1%)  core::iter::traits::iterator::Iterator::fold
```

That `visit_enum` for `Key` is not in the first 30 lines, I find it after changing the filtering command to `head -n 60`:

```
    11762 (0.2%)       1 (0.0%)  <keyboard_types:🔑:_IMPL_DESERIALIZE_FOR_Key::<impl serde:🇩🇪:Deserialize for keyboard_types:🔑:Key>::deserialize::__Visitor as serde:🇩🇪:Visitor>::visit_enum
```

It has one copy / instantiation instead of four, and contributes exactly four times fewer lines of IR.

The crate total reduced by ~782k lines, a lot more than ~35k for this `visit_enum` function. We also see that `next_element_seed` (also for bincode deserialization) now has 250 copies instead of 1000. So it looks like *everything* bincode-related was reduced by 4×
2020-06-24 08:09:51 -04:00
Simon Sapin
a215ef351a Update bincode, reduce code size of script by ~11%
… as measured in lines of unoptimized LLVM IR by

```
cargo llvm-lines --manifest-path ports/winit/Cargo.toml \
    -p script --features layout-2013 | head -n 30
```

… with https://github.com/dtolnay/cargo-llvm-lines
CC https://github.com/servo/servo/issues/26713

One of the top functions (in lines contribution) was a
`Visitor::visit_enum` method generated by `serde_derive` for deserializing
`keyboard_types:🔑:Key`, which is an enum with many variants.
I had filed https://github.com/serde-rs/serde/issues/1824 to discuss this,
and dtolnay proposed https://github.com/pyfisch/keyboard-types/pull/6
manually implementing `Deserialize` for that enum instead of deriving it.

However another point of note is that this function had four copies with
monomorphization. I could reproduce this in a program that does nothing
but deserialize an enum with bincode:
https://github.com/serde-rs/serde/issues/1824#issuecomment-641244476
This suggests that bincode uses instanciates the `Deserialize` impls
with four different `Deserializer` types which is three more than necessary.

https://dos.cafe/blog/bincode-1.3.html mentions changes to `Deserializer`
types in a new version of bincode. And sure enough, this issue is now fixed.

Before:

```
  Lines           Copies         Function name
  -----           ------         -------------
  7022161 (100%)  180367 (100%)  (TOTAL)
   178816 (2.5%)   15437 (8.6%)  core::ptr::drop_in_place
   151022 (2.2%)    6634 (3.7%)  core::ops::function::FnOnce::call_once
   122012 (1.7%)    1000 (0.6%)  <<&mut bincode:🇩🇪:Deserializer<R,O> as serde:🇩🇪:Deserializer>::deserialize_tuple::Access<R,O> as serde:🇩🇪:SeqAccess>::next_element_seed
   101731 (1.4%)    1627 (0.9%)  core::option::Option<T>::map
    83196 (1.2%)    1192 (0.7%)  core::result::Result<T,E>::map
    51215 (0.7%)    6111 (3.4%)  core::ops::function::FnOnce::call_once{{vtable.shim}}
    47048 (0.7%)       4 (0.0%)  <keyboard_types:🔑:_IMPL_DESERIALIZE_FOR_Key::<impl serde:🇩🇪:Deserialize for keyboard_types:🔑:Key>::deserialize::__Visitor as serde:🇩🇪:Visitor>::visit_enum
    45388 (0.6%)     296 (0.2%)  <&mut bincode:🇩🇪:Deserializer<R,O> as serde:🇩🇪:Deserializer>::deserialize_enum::<impl serde:🇩🇪:EnumAccess for &mut bincode:🇩🇪:Deserializer<R,O>>::variant_seed
    44973 (0.6%)     647 (0.4%)  core::result::Result<T,E>::map_err
    39185 (0.6%)     516 (0.3%)  std:🧵:local::LocalKey<T>::try_with
    39130 (0.6%)     215 (0.1%)  alloc::raw_vec::RawVec<T,A>::grow_amortized
    35334 (0.5%)     867 (0.5%)  alloc::alloc::box_free
    34788 (0.5%)     609 (0.3%)  crossbeam_channel::context::Context::with::{{closure}}
    33810 (0.5%)     646 (0.4%)  core::ptr::swap_nonoverlapping_one
    33610 (0.5%)     552 (0.3%)  core::result::Result<T,E>::unwrap_or_else
    32144 (0.5%)     392 (0.2%)  <*const T as core::fmt::Pointer>::fmt
    32062 (0.5%)     782 (0.4%)  script::dom::bindings::root::Root<T>::new
    31589 (0.4%)     600 (0.3%)  core::result::Result<T,E>::expect
    29364 (0.4%)     116 (0.1%)  <<script_traits::webdriver_msg::_IMPL_DESERIALIZE_FOR_WebDriverScriptCommand::<impl serde:🇩🇪:Deserialize for script_traits::webdriver_msg::WebDriverScriptCommand>::deserialize::__Visitor as serde:🇩🇪:Visitor>::visit_enum::__Visitor as serde:🇩🇪:Visitor>::visit_seq
    26996 (0.4%)     346 (0.2%)  core::option::Option<T>::map_or
    26168 (0.4%)      92 (0.1%)  <<script_traits::_IMPL_DESERIALIZE_FOR_ConstellationControlMsg::<impl serde:🇩🇪:Deserialize for script_traits::ConstellationControlMsg>::deserialize::__Visitor as serde:🇩🇪:Visitor>::visit_enum::__Visitor as serde:🇩🇪:Visitor>::visit_seq
    25996 (0.4%)     388 (0.2%)  script::dom::bindings::root::Root<script::dom::bindings::root::MaybeUnreflectedDom<T>>::reflect_with
    25833 (0.4%)     641 (0.4%)  core::result::Result<T,E>::unwrap
    25180 (0.4%)       4 (0.0%)  <keyboard_types::code::_IMPL_DESERIALIZE_FOR_Code::<impl serde:🇩🇪:Deserialize for keyboard_types::code::Code>::deserialize::__Visitor as serde:🇩🇪:Visitor>::visit_enum
    24751 (0.4%)     197 (0.1%)  core::iter::traits::iterator::Iterator::try_fold
    22216 (0.3%)     376 (0.2%)  bincode::internal::deserialize_seed
    22185 (0.3%)     145 (0.1%)  hashbrown::raw::RawTable<T>::find
```

After:

```
  Lines           Copies         Function name
  -----           ------         -------------
  6239581 (100%)  169803 (100%)  (TOTAL)
   178770 (2.9%)   15434 (9.1%)  core::ptr::drop_in_place
   151022 (2.4%)    6634 (3.9%)  core::ops::function::FnOnce::call_once
   101146 (1.6%)    1618 (1.0%)  core::option::Option<T>::map
    76938 (1.2%)    1090 (0.6%)  core::result::Result<T,E>::map
    51215 (0.8%)    6111 (3.6%)  core::ops::function::FnOnce::call_once{{vtable.shim}}
    44973 (0.7%)     647 (0.4%)  core::result::Result<T,E>::map_err
    39185 (0.6%)     516 (0.3%)  std:🧵:local::LocalKey<T>::try_with
    39130 (0.6%)     215 (0.1%)  alloc::raw_vec::RawVec<T,A>::grow_amortized
    35334 (0.6%)     867 (0.5%)  alloc::alloc::box_free
    34788 (0.6%)     609 (0.4%)  crossbeam_channel::context::Context::with::{{closure}}
    33810 (0.5%)     646 (0.4%)  core::ptr::swap_nonoverlapping_one
    33610 (0.5%)     552 (0.3%)  core::result::Result<T,E>::unwrap_or_else
    32144 (0.5%)     392 (0.2%)  <*const T as core::fmt::Pointer>::fmt
    32062 (0.5%)     782 (0.5%)  script::dom::bindings::root::Root<T>::new
    31589 (0.5%)     600 (0.4%)  core::result::Result<T,E>::expect
    30069 (0.5%)     250 (0.1%)  <<&mut bincode:🇩🇪:Deserializer<R,O> as serde:🇩🇪:Deserializer>::deserialize_tuple::Access<R,O> as serde:🇩🇪:SeqAccess>::next_element_seed
    26996 (0.4%)     346 (0.2%)  core::option::Option<T>::map_or
    25996 (0.4%)     388 (0.2%)  script::dom::bindings::root::Root<script::dom::bindings::root::MaybeUnreflectedDom<T>>::reflect_with
    25833 (0.4%)     641 (0.4%)  core::result::Result<T,E>::unwrap
    24751 (0.4%)     197 (0.1%)  core::iter::traits::iterator::Iterator::try_fold
    22185 (0.4%)     145 (0.1%)  hashbrown::raw::RawTable<T>::find
    22000 (0.4%)      80 (0.0%)  hashbrown::raw::RawTable<T>::rehash_in_place
    20808 (0.3%)     289 (0.2%)  core::alloc::layout::Layout::array
    20031 (0.3%)     308 (0.2%)  core::option::Option<T>::ok_or_else
    19732 (0.3%)       2 (0.0%)  html5ever::tree_builder::TreeBuilder<Handle,Sink>::step
    18951 (0.3%)    1014 (0.6%)  core::ptr::read
    17261 (0.3%)     201 (0.1%)  core::iter::traits::iterator::Iterator::fold
```

That `visit_enum` for `Key` is not in the first 30 lines, I find it after
changing the filtering command to `head -n 60`:

```
    11762 (0.2%)       1 (0.0%)  <keyboard_types:🔑:_IMPL_DESERIALIZE_FOR_Key::<impl serde:🇩🇪:Deserialize for keyboard_types:🔑:Key>::deserialize::__Visitor as serde:🇩🇪:Visitor>::visit_enum
```

It has one copy / instantiation instead of four, which contributes exactly
four times fewer lines of IR.

The crate total reduced by ~782k lines, a lot more than ~35k for this
`visit_enum` function. We see that `next_element_seed` (also for bincode
deserialization) now has 250 copies instead of 1000. So it looks like
*everything* bincode related was reduced by 4×
2020-06-24 09:37:08 +02:00
bors-servo
0838d782c6
Auto merge of #27060 - servo-wpt-sync:wpt_update_23-06-2020, r=jdm
Sync WPT with upstream (23-06-2020)

Automated downstream sync of changes from upstream as of 23-06-2020.
[no-wpt-sync]
r? @servo-wpt-sync
2020-06-24 01:05:46 -04:00
bors-servo
819f78557a
Auto merge of #27059 - paulrouget:whiteOnWhite, r=jdm
UWP console: force white background

Fix #27040
2020-06-23 23:10:47 -04:00
bors-servo
5a608d0348
Auto merge of #27047 - Transmutable:gstreamer-plugin-gl-context-doc, r=asajeffrey
Document a GStreamer plugin workaround

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

Based on conversation in Issue #27013 this documents a workaround in the gstreamer CLI for a failure of the GStreamer plugin to find usable a GL context without a downstream glimagesink

---
<!-- 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 #___ (GitHub issue number if applicable)

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because it's a document change

<!-- 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. -->
2020-06-23 21:12:46 -04:00
bors-servo
9cb19dfc8b
Auto merge of #27052 - servo:dependabot/cargo/crossbeam-queue-0.2.3, r=jdm
build(deps): bump crossbeam-queue from 0.2.1 to 0.2.3

Bumps [crossbeam-queue](https://github.com/crossbeam-rs/crossbeam) from 0.2.1 to 0.2.3.
<details>
<summary>Commits</summary>
<ul>
<li><a href="149a3c9389"><code>149a3c9</code></a> Release crossbeam-queue 0.2.3</li>
<li><a href="18363b5b3e"><code>18363b5</code></a> Merge <a href="https://github-redirect.dependabot.com/crossbeam-rs/crossbeam/issues/476">#476</a></li>
<li><a href="e32c891f37"><code>e32c891</code></a> Release new versions</li>
<li><a href="6d6591a0e1"><code>6d6591a</code></a> Merge <a href="https://github-redirect.dependabot.com/crossbeam-rs/crossbeam/issues/474">#474</a></li>
<li><a href="528c3caadb"><code>528c3ca</code></a> Undo bump of rand as it bumps MSRV</li>
<li><a href="78043c7b11"><code>78043c7</code></a> Bump crossbeam to 0.7.4</li>
<li><a href="640cec2f4b"><code>640cec2</code></a> Bump crossbeam-deque to 0.7.3</li>
<li><a href="e962784d97"><code>e962784</code></a> Bump crossbeam-queue to 0.2.2</li>
<li><a href="64ad929c5d"><code>64ad929</code></a> Bump crossbeam-epoch to 0.8.1</li>
<li><a href="909edf53da"><code>909edf5</code></a> Bump crossbeam-channel to 0.4.1</li>
<li>Additional commits viewable in <a href="https://github.com/crossbeam-rs/crossbeam/compare/crossbeam-queue-0.2.1...crossbeam-queue-0.2.3">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://api.dependabot.com/badges/compatibility_score?dependency-name=crossbeam-queue&package-manager=cargo&previous-version=0.2.1&new-version=0.2.3)](https://dependabot.com/compatibility-score/?dependency-name=crossbeam-queue&package-manager=cargo&previous-version=0.2.1&new-version=0.2.3)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language
- `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com):
- Update frequency (including time of day and day of week)
- Pull request limits (per update run and/or open at any time)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)

</details>
2020-06-23 20:06:15 -04:00
bors-servo
b2b66b9895
Auto merge of #27051 - servo:dependabot/cargo/gif-0.10.3, r=jdm
build(deps): bump gif from 0.10.0 to 0.10.3

Bumps [gif](https://github.com/image-rs/image-gif) from 0.10.0 to 0.10.3.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a href="https://github.com/image-rs/image-gif/commits/v0.10.3">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://api.dependabot.com/badges/compatibility_score?dependency-name=gif&package-manager=cargo&previous-version=0.10.0&new-version=0.10.3)](https://dependabot.com/compatibility-score/?dependency-name=gif&package-manager=cargo&previous-version=0.10.0&new-version=0.10.3)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language
- `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com):
- Update frequency (including time of day and day of week)
- Pull request limits (per update run and/or open at any time)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)

</details>
2020-06-23 17:57:35 -04:00
bors-servo
32cb62aa1b
Auto merge of #27044 - servo:flexbox, r=nox
First pass at implementing the Flex Layout Algorithm

CC https://github.com/servo/servo/issues/26639
2020-06-23 16:51:02 -04:00
bors-servo
a2d735c965
Auto merge of #27028 - servo:rustup, r=jdm
Bump rust to 1.46.0-nightly (a8cf39911 2020-06-21)

This fixes a rustfmt reporting bug when the code contains syntax errors.
2020-06-23 14:38:02 -04:00
Joe Previte
5f9a88972f
Update README.md 2020-06-23 11:09:53 -07:00
Anthony Ramine
b692318931 Bump rust to 1.46.0-nightly (a8cf39911 2020-06-21)
This fixes a rustfmt reporting bug when the code contains syntax errors.
2020-06-23 19:13:36 +02:00
bors-servo
f814d57093
Auto merge of #27056 - servo:dependabot/cargo/addr2line-0.12.2, r=jdm
build(deps): bump addr2line from 0.12.1 to 0.12.2

Bumps [addr2line](https://github.com/gimli-rs/addr2line) from 0.12.1 to 0.12.2.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/gimli-rs/addr2line/blob/master/CHANGELOG.md">addr2line's changelog</a>.</em></p>
<blockquote>
<h2>0.12.2 (2020/06/21)</h2>
<h3>Fixed</h3>
<ul>
<li>Avoid linear search for <code>DW_FORM_ref_addr</code>.
<a href="https://github-redirect.dependabot.com/gimli-rs/addr2line/pull/175">#175</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="6812d68678"><code>6812d68</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/gimli-rs/addr2line/issues/177">#177</a> from philipc/release</li>
<li><a href="84d27010c9"><code>84d2701</code></a> Bump version to 0.12.2</li>
<li><a href="d25f7b3ddc"><code>d25f7b3</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/gimli-rs/addr2line/issues/175">#175</a> from philipc/issue-171</li>
<li><a href="8e0b99b089"><code>8e0b99b</code></a> Avoid linear search for DW_FORM_ref_addr</li>
<li><a href="a8757e5275"><code>a8757e5</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/gimli-rs/addr2line/issues/173">#173</a> from philipc/issue-169</li>
<li><a href="ce518c6ab1"><code>ce518c6</code></a> Rename aux to auxiliary</li>
<li>See full diff in <a href="https://github.com/gimli-rs/addr2line/compare/0.12.1...0.12.2">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://api.dependabot.com/badges/compatibility_score?dependency-name=addr2line&package-manager=cargo&previous-version=0.12.1&new-version=0.12.2)](https://dependabot.com/compatibility-score/?dependency-name=addr2line&package-manager=cargo&previous-version=0.12.1&new-version=0.12.2)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language
- `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com):
- Update frequency (including time of day and day of week)
- Pull request limits (per update run and/or open at any time)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)

</details>
2020-06-23 12:11:09 -04:00
Josh Matthews
7876f9993a
Fix intermittent crash expectation. 2020-06-23 09:56:39 -04:00
Josh Matthews
a39d1313f2
Fix intermittent crash. 2020-06-23 09:56:16 -04:00
bors-servo
45c93cbdc6
Auto merge of #27050 - servo:dependabot/cargo/gstreamer-app-0.15.6, r=jdm
build(deps): bump gstreamer-app from 0.15.3 to 0.15.6

Bumps gstreamer-app from 0.15.3 to 0.15.6.

[![Dependabot compatibility score](https://api.dependabot.com/badges/compatibility_score?dependency-name=gstreamer-app&package-manager=cargo&previous-version=0.15.3&new-version=0.15.6)](https://dependabot.com/compatibility-score/?dependency-name=gstreamer-app&package-manager=cargo&previous-version=0.15.3&new-version=0.15.6)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language
- `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com):
- Update frequency (including time of day and day of week)
- Pull request limits (per update run and/or open at any time)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)

</details>
2020-06-23 09:15:19 -04:00
WPT Sync Bot
260441296f Update web-platform-tests to revision 401d9618fcda9dfbeac49b8055df98386f6118f1 2020-06-23 10:49:25 +00:00
Simon Sapin
22b60d8b82 Manage side effects when redoing layout for align-self: stretch flex item 2020-06-23 10:26:24 +02:00
Paul Rouget
1c2ac3f2a1 UWP console: force white background 2020-06-23 10:24:04 +02:00
dependabot-preview[bot]
5f6cff35a9
build(deps): bump addr2line from 0.12.1 to 0.12.2
Bumps [addr2line](https://github.com/gimli-rs/addr2line) from 0.12.1 to 0.12.2.
- [Release notes](https://github.com/gimli-rs/addr2line/releases)
- [Changelog](https://github.com/gimli-rs/addr2line/blob/master/CHANGELOG.md)
- [Commits](https://github.com/gimli-rs/addr2line/compare/0.12.1...0.12.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-23 08:20:07 +00:00
dependabot-preview[bot]
04e4cb5df7
build(deps): bump crossbeam-queue from 0.2.1 to 0.2.3
Bumps [crossbeam-queue](https://github.com/crossbeam-rs/crossbeam) from 0.2.1 to 0.2.3.
- [Release notes](https://github.com/crossbeam-rs/crossbeam/releases)
- [Changelog](https://github.com/crossbeam-rs/crossbeam/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crossbeam-rs/crossbeam/compare/crossbeam-queue-0.2.1...crossbeam-queue-0.2.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-23 08:15:24 +00:00
dependabot-preview[bot]
340daee654
build(deps): bump gif from 0.10.0 to 0.10.3
Bumps [gif](https://github.com/image-rs/image-gif) from 0.10.0 to 0.10.3.
- [Release notes](https://github.com/image-rs/image-gif/releases)
- [Commits](https://github.com/image-rs/image-gif/commits/v0.10.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-23 08:13:52 +00:00
dependabot-preview[bot]
7c5921ba30
build(deps): bump gstreamer-app from 0.15.3 to 0.15.6
Bumps gstreamer-app from 0.15.3 to 0.15.6.

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-23 08:13:07 +00:00
bors-servo
c76d1318f3
Auto merge of #27034 - CYBAI:fix-nested-modules, r=Manishearth
Fix nested modules while imported under more than 3 levels

This is kind of workaround to fix the issue but #26903 should provide much better solution to remove the checking.

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

<!-- 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. -->
2020-06-22 22:22:44 -04:00
Trevor F Smith
85548c0bf3 Document a workaround for the failure to find a GL context by the GStreamer plugin. 2020-06-22 18:41:47 -07:00
CYBAI
0c938b3d75 Test imports under more than 3 levels in different modules 2020-06-23 10:02:05 +09:00
CYBAI
a7221fd74c Rollback to recursively check dependency status
In https://github.com/servo/servo/pull/26395/files#diff-3fe97584f564214ec8e7ebbf91747e03L253-R318,
we moved from `recursive checking` of dependency status to check only the
_current module_'s dependency status and its descendant dependency status and
also circular dependency status.

However, it will cause an issue.

For example, if the module dependency is like following

```
a -> b -> c -> d -> e
f -> g -> h -> c -> d -> e
```

In this example, if the d module is still under fetching but g is trying
to advance to finish. Then, it will cause a panic because module d is
g's grand-grand-grand-descendant which means it's still under fetching
and we can't instantiate module g.

Ideally, we should get rid of the checking in #26903 so, before #26903
fixed, we can just move back to the recursive checking way which will
ensure all descendants are not fetching.
2020-06-23 10:01:46 +09:00
bors-servo
0916ae3b3a
Auto merge of #27042 - KallynGowdy:js-backtrace-build-fix, r=jdm
Fix building with --feature js_backtrace

This PR fixes an build error that I ran into when using the `--features js_backtrace` flag.

In particular, the error I ran into was this:
```
error[E0061]: this function takes 2 arguments but 1 argument was supplied
   --> components\script\dom\bindings\error.rs:113:45
    |
113 |         let js_stack = stack.and_then(|s| s.as_string(None));
    |                                             ^^^^^^^^^ ---- supplied 1 argument
    |                                             |
    |                                             expected 2 arguments
```

It seems that the `mozjs` crate updated the [`as_string()` method on `CapturedJSStack`](https://doc.servo.org/mozjs/rust/struct.CapturedJSStack.html#method.as_string) to take two parameters. I've chosen to use `StackFormat::Default` because that will presumably preserve the original intended behavior.

I additionally had to make the block wrapping the feature unsafe as I ran into a "must be marked as unsafe to call unsafe code" build error after fixing the above issue. Seems that this commit (0703a1ad6d) forgot that part.

#### Other Notes

After these changes, I was able to build but ran into an access violation error during runtime. When a JS error hit [`throw_dom_exception()`](https://github.com/servo/servo/blob/master/components/script/dom/bindings/error.rs#L109) and the JS stack was pulled, some sort of issue was hit inside mozjs and [`MOZ_NoReturn()`](bdccbdc656/mozjs/mfbt/Assertions.h (L235)) was called, which will obviously cause an issue.

It is worth noting that this only happened on my test platform (Hololens 2) and not on MacOS or in the Hololens 2 emulator. Additionally, the debug logs were not particularly helpful at identifying the culprit. Maybe it is worth making a full issue for?

Here's the full details:

Error message:
```
Exception thrown at 0x00007FFBCDD16784 (simpleservo.dll) in ServoApp.exe: 0xC0000005: Access violation writing location 0x0000000000000000.
```

Stack Trace:
```
simpleservo.dll!MOZ_NoReturn(int aLine) Line 236
	at E:\Projects\Yeti\servo\target\aarch64-uwp-windows-msvc\debug\build\mozjs_sys-aa48eb6c20c205d4\out\build\dist\include\mozilla\Assertions.h(236)
simpleservo.dll!js::SavedStacks::insertFrames(JSContext * cx, JS::MutableHandle<js::SavedFrame *> frame, mozilla::Variant<JS::AllFrames,JS::MaxFrames,JS::FirstSubsumedFrame> && capture) Line 0
	at E:\.cargo\git\checkouts\mozjs-fa11ffc7d4f1cc2d\9a6d8fc\mozjs\js\src\vm\SavedStacks.cpp(0)
simpleservo.dll!js::SavedStacks::saveCurrentStack(JSContext * cx, JS::MutableHandle<js::SavedFrame *> frame, mozilla::Variant<JS::AllFrames,JS::MaxFrames,JS::FirstSubsumedFrame> && capture) Line 1292
	at E:\.cargo\git\checkouts\mozjs-fa11ffc7d4f1cc2d\9a6d8fc\mozjs\js\src\vm\SavedStacks.cpp(1292)
simpleservo.dll!JS::CaptureCurrentStack(JSContext * cx, JS::MutableHandle<JSObject *> stackp, mozilla::Variant<JS::AllFrames,JS::MaxFrames,JS::FirstSubsumedFrame> && capture) Line 5926
	at E:\.cargo\git\checkouts\mozjs-fa11ffc7d4f1cc2d\9a6d8fc\mozjs\js\src\jsapi.cpp(5926)
simpleservo.dll!mozjs::rust::CapturedJSStack::new(mozjs::rust::RootedGuard<mut mozjs_sys::generated::root::JSObject*> cx, core::option::Option<u32> guard) Line 1337
	at E:\.cargo\git\checkouts\rust-mozjs-8611526964119dd6\28248e1\src\rust.rs(1337)
simpleservo.dll!script::dom::bindings::error::throw_dom_exception(script::script_runtime::JSContext cx, script::dom::globalscope::GlobalScope * global, script::dom::bindings::error::Error result) Line 114
	at E:\Projects\Yeti\servo\components\script\dom\bindings\error.rs(114)
```

Repro:

1. Make a build on Windows for the Hololens 2.
    -   This is the command I used: `C:\Python27\python.exe mach build -d --uwp --win-arm64 --features js_backtrace`
2. Open the project in Visual Studio.
3. Change the default URL in `DefaultUrl.h` to `"http://yeticgi.casualos.com/?story=test1&pagePortal=home"`.
    - Note the lack of HTTPS. There's a separate issue that causes a websocket error. Was trying to debug when I ran into this  issue.
    - The same issue occurs if you load from a build of this [this repository](https://github.com/casual-simulation/casualos). Follow the instructions in [`DEVELOPERS.md`](https://github.com/casual-simulation/casualos/blob/develop/DEVELOPERS.md) if you do.
2. Run on the [Hololens 2 via Visual Studio](https://docs.microsoft.com/en-us/windows/mixed-reality/using-visual-studio#deploying-an-app-over-wi-fi---hololens-2).
    -   If the default URL doesn't take effect, you may have to uninstall the app from the Hololens 2 and reinstall.
3. Wait for it to load and stop at a breakpoint for `SavedStacks.cpp`.
    -   It will say the source cannot be found but its actually because the breakpoint doesn't have a related line in the source code.
    -   If you continue then it will run into the access violation exception.

---
<!-- 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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because they fix a build error.

<!-- 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. -->
2020-06-22 20:05:40 -04:00
Simon Sapin
25469bdcd1 Update WPT expectations 2020-06-23 00:51:51 +02:00
Simon Sapin
3e13b3be80 Flexbox: add align-self: stretch 2020-06-23 00:51:51 +02:00
Simon Sapin
01905923db First pass at implementing the Flex Layout Algorithm
https://drafts.csswg.org/css-flexbox/#layout-algorithm
2020-06-23 00:41:27 +02:00
Simon Sapin
080f5bb763 An element establishing a formatting context *is* the containing block for its contents 2020-06-23 00:41:26 +02:00
Simon Sapin
3889f69a71 Enable the Flexbox pref for WPT with Layout 2020 2020-06-23 00:40:45 +02:00
Kallyn Gowdy
6a5a77a968 Fix building with --feature js_backtrace
- mozjs::jsapi::CapturedJSStack::as_string() (https://doc.servo.org/mozjs/rust/struct.CapturedJSStack.html#method.as_string) was updated to accept a second parameter which specifies which Stacktrace format to use. The default has been specified to preserve the (presumably) original behavior.
- The related code has also been placed in an unsafe block since the capture_stack macro calling the unsafe mozjs::jsapi::CapturedJSStack::new() function. Seems that this commit (0703a1ad6d) forgot this part.
2020-06-22 16:14:04 -04:00