This removes some complains that clippy will have in 1.95.
As this is mostly just match guards, it doesn't update MSRV.
Testing: This is equivalent exchanges, so current WPT would find
anything.
---------
Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
All callers were constructing a DOMString only to have it immediately
converted back to String inside internal_warn, resulting in an
unnecessary allocation and clone. This changes the parameter type to
String and updates all call sites to pass the result of format! or
.to_string() directly.
Fixes: #43091
---------
Signed-off-by: Kelechi Ebiri <ebiritg@gmail.com>
This change merges http://github.com/servo/media into this repository.
It is only used by Servo and version upgrades are complicated by having
two repositories. In addition, this avoids the need to refer to
individual commit hashes in the Servo `Cargo.toml`. The hope is that
merging these two repositories will lead to better code organization /
simplification like we have seen with the WebXR support. Initiailly, the
idea was that this media support could be shared with the wider Rust
ecosystem, but I think that hasn't worked out as planned due to the fact
that it is difficult to use the various media packaes outside of the
Servo project and the fact that no one seems to be doing this.
Some changes were made when importing the code:
- The second commit in this PR addresses new clippy warnings from the
imported code.
- GStreamer Packages are no longer renamed in the media code, so that
they are named the same as they are currently in Servo.
- Some examples are not ported as they require being run interactively
and depend on older version of important libraries like winit.
Having these dependencies in the core part of Servo isn't very
convenient. Removed examples:
- `audio_decoder.rs`: This is meant to be run interactively with a
file so isn't very useful for testing.
- Depended on winit GUI (`player` subdirectory):
- `media_element_source_node.rs`
- `play_media_stream.rs`
- `simple_player.rs`
- `muted_player.rs`
- `siple_webrtc.rs`: Depended on `webrtc` library:
Testing: This is covered by existing tests. In addition, the job which
runs
the media examples is added to the unit test workflow.
---------
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Fix crash when creating an AudioNode from a closed AudioContext
Testing: added crash test.
Fixes: #36856
Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
Bumps the servo-media-related group with 12 updates:
| Package | From | To |
| --- | --- | --- |
| [servo-media](https://github.com/servo/media) | ``2c036f2`` |
``fb304a8`` |
| [servo-media-dummy](https://github.com/servo/media) | ``2c036f2`` |
``fb304a8`` |
| [servo-media-gstreamer](https://github.com/servo/media) | ``2c036f2``
| ``fb304a8`` |
| servo-media-audio | ``2c036f2`` | ``fb304a8`` |
| servo-media-derive | ``2c036f2`` | ``fb304a8`` |
| servo-media-gstreamer-render | ``2c036f2`` | ``fb304a8`` |
| servo-media-gstreamer-render-android | ``2c036f2`` | ``fb304a8`` |
| servo-media-gstreamer-render-unix | ``2c036f2`` | ``fb304a8`` |
| servo-media-player | ``2c036f2`` | ``fb304a8`` |
| servo-media-streams | ``2c036f2`` | ``fb304a8`` |
| servo-media-traits | ``2c036f2`` | ``fb304a8`` |
| servo-media-webrtc | ``2c036f2`` | ``fb304a8`` |
Updates `servo-media` from `2c036f2` to `fb304a8`
<details>
<summary>Commits</summary>
<ul>
<li><a
href="fb304a885a"><code>fb304a8</code></a>
Don't allow node creation once the context is closed (<a
href="https://redirect.github.com/servo/media/issues/475">#475</a>)</li>
<li>See full diff in <a
href="2c036f20bb...fb304a885a">compare
view</a></li>
</ul>
</details>
<br />
Updates `servo-media-dummy` from `2c036f2` to `fb304a8`
<details>
<summary>Commits</summary>
<ul>
<li><a
href="fb304a885a"><code>fb304a8</code></a>
Don't allow node creation once the context is closed (<a
href="https://redirect.github.com/servo/media/issues/475">#475</a>)</li>
<li>See full diff in <a
href="2c036f20bb...fb304a885a">compare
view</a></li>
</ul>
</details>
<br />
Updates `servo-media-gstreamer` from `2c036f2` to `fb304a8`
<details>
<summary>Commits</summary>
<ul>
<li><a
href="fb304a885a"><code>fb304a8</code></a>
Don't allow node creation once the context is closed (<a
href="https://redirect.github.com/servo/media/issues/475">#475</a>)</li>
<li>See full diff in <a
href="2c036f20bb...fb304a885a">compare
view</a></li>
</ul>
</details>
<br />
Updates `servo-media-audio` from `2c036f2` to `fb304a8`
Updates `servo-media-derive` from `2c036f2` to `fb304a8`
Updates `servo-media-gstreamer-render` from `2c036f2` to `fb304a8`
Updates `servo-media-gstreamer-render-android` from `2c036f2` to
`fb304a8`
Updates `servo-media-gstreamer-render-unix` from `2c036f2` to `fb304a8`
Updates `servo-media-player` from `2c036f2` to `fb304a8`
Updates `servo-media-streams` from `2c036f2` to `fb304a8`
Updates `servo-media-traits` from `2c036f2` to `fb304a8`
Updates `servo-media-webrtc` from `2c036f2` to `fb304a8`
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 show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions
</details>
---------
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Euclid Ye <yezhizhenjiakang@gmail.com>
I used find and replace to finish the job. All this PR does is replace
all `Error::<error_name>` occurrences with `Error::<error_name>(None)`.
Testing: Refactor
Fixes: #39053
Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
Adding an optional message to be attached to a IndexSizeError.
The enum definition of IndexSize is now `IndexSize(Option<String>)`.
Future PRs should probably add more appropriate messages to some of the
`IndexSize(None)`s.
Testing: Just a refactor
Fixes: Partially #39053
Signed-off-by: WaterWhisperer <waterwhisperer24@qq.com>
Servo has a lot of comments like this:
```rust
// https://example-spec.com/#do-the-thing
fn do_the_thing() {}
```
and I keep turning these into doc comments whenever I'm working close to
one of them. Doing so allows me to hover over a function call in an IDE
and open its specification without having to jump to the function
definition first. This change fixes all of these comments at once.
This was done using `find components -name '*.rs' -exec perl -i -0777
-pe 's|^([ \t]*)// (https?://.*)\n\1(fn )|\1/// <$2>\n\1$3|mg' {} +`.
Note that these comments should be doc comments even within trait `impl`
blocks, because rustdoc will use them as fallback documentation when the
method definition on the trait does not have documentation.
Testing: Comments only, no testing required
Preparation for https://github.com/servo/servo/pull/39552
---------
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
Adding an optional message to be attached to an InvalidStateError.
Testing: Only a refactor, no behavior change
Fixes: Partially #39053
Signed-off-by: Excitable Snowball <excitablesnowball@gmail.com>
Moves interfaces defined by the webaudio spec (27 files) to the new
`script/dom/audio/` module from the `script/dom/` module.
Testing: Just a refactor shouldn't need any testing
Fixes: N/A
Signed-off-by: Ashwin Naren <arihant2math@gmail.com>