**Targets `serviceworker-next`**
I'm still working on how to convert this to a `WindowClient`.
Testing: WPT
Fixes: Partially #40781
Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
**Doesn't target main**
`WindowClient` is used to represent a globalscope that represents a
window as a source in ExtendableMessageEvent. We don't actually need any
of the methods other than `postMessage` for WPT to pass/not timeout, so
I've commented/stubbed them out for now.
Testing: WPT
Fixes: Partially #40781
Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
Fix the issue that was causing timeouts in serviceworker WPT tests.
Doesn't fully unblock WPT: `dispatch_jsval` needs to accept a `source`
parameter, and that `source` needs to be retrieved from `postMessage`.
It goes through several layers of indirection, so I've deferred that to
a different PR.
Testing: WPT
Fixes: #40767
---------
Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
Implements `getRegistrations`, and `getRegistration`, mainly for the
sake of WPT tests.
Testing: WPT
---------
Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
We replace many places that use `SafeJSContext` with `JSContext` and I
also rewrote `is_platform_object_same_origin` to use new `JSContext`.
Unfortunately using wrappers2 in them causes crashes (in handle code),
so I reverted that part in last commit and will fix handles in mozjs
later.
Testing: Refactor, but it is covered by WPT tests
Part of #40600
---------
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Fix RefCell already borrowed panic in
HTMLMediaElement::set_audio_renderer
Testing: new crash test should pass.
Fixes: #40720
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) | ``1beaae4`` |
``7ba5e7d`` |
| [servo-media-dummy](https://github.com/servo/media) | ``1beaae4`` |
``7ba5e7d`` |
| [servo-media-gstreamer](https://github.com/servo/media) | ``1beaae4``
| ``7ba5e7d`` |
| servo-media-audio | ``1beaae4`` | ``7ba5e7d`` |
| servo-media-derive | ``1beaae4`` | ``7ba5e7d`` |
| servo-media-gstreamer-render | ``1beaae4`` | ``7ba5e7d`` |
| servo-media-gstreamer-render-android | ``1beaae4`` | ``7ba5e7d`` |
| servo-media-gstreamer-render-unix | ``1beaae4`` | ``7ba5e7d`` |
| servo-media-player | ``1beaae4`` | ``7ba5e7d`` |
| servo-media-streams | ``1beaae4`` | ``7ba5e7d`` |
| servo-media-traits | ``1beaae4`` | ``7ba5e7d`` |
| servo-media-webrtc | ``1beaae4`` | ``7ba5e7d`` |
Updates `servo-media` from `1beaae4` to `7ba5e7d`
<details>
<summary>Commits</summary>
<ul>
<li><a
href="7ba5e7d9b3"><code>7ba5e7d</code></a>
Return an empty slice on safe slice casting error (<a
href="https://redirect.github.com/servo/media/issues/462">#462</a>)</li>
<li>See full diff in <a
href="1beaae45bd...7ba5e7d9b3">compare
view</a></li>
</ul>
</details>
<br />
Updates `servo-media-dummy` from `1beaae4` to `7ba5e7d`
<details>
<summary>Commits</summary>
<ul>
<li><a
href="7ba5e7d9b3"><code>7ba5e7d</code></a>
Return an empty slice on safe slice casting error (<a
href="https://redirect.github.com/servo/media/issues/462">#462</a>)</li>
<li>See full diff in <a
href="1beaae45bd...7ba5e7d9b3">compare
view</a></li>
</ul>
</details>
<br />
Updates `servo-media-gstreamer` from `1beaae4` to `7ba5e7d`
<details>
<summary>Commits</summary>
<ul>
<li><a
href="7ba5e7d9b3"><code>7ba5e7d</code></a>
Return an empty slice on safe slice casting error (<a
href="https://redirect.github.com/servo/media/issues/462">#462</a>)</li>
<li>See full diff in <a
href="1beaae45bd...7ba5e7d9b3">compare
view</a></li>
</ul>
</details>
<br />
Updates `servo-media-audio` from `1beaae4` to `7ba5e7d`
Updates `servo-media-derive` from `1beaae4` to `7ba5e7d`
Updates `servo-media-gstreamer-render` from `1beaae4` to `7ba5e7d`
Updates `servo-media-gstreamer-render-android` from `1beaae4` to
`7ba5e7d`
Updates `servo-media-gstreamer-render-unix` from `1beaae4` to `7ba5e7d`
Updates `servo-media-player` from `1beaae4` to `7ba5e7d`
Updates `servo-media-streams` from `1beaae4` to `7ba5e7d`
Updates `servo-media-traits` from `1beaae4` to `7ba5e7d`
Updates `servo-media-webrtc` from `1beaae4` to `7ba5e7d`
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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
We end up only calling `.iter` on these `Vec`s anyways.
Testing: No behaviour change intended, regressions are covered by
existing tests
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
Make external image handlers per-`Painter`, but make some of the shared
data that they use such as the `SwapChains` global to all `Painter`s.
This allows making the WebGL thread and the WebXR thread global to all
`Painter`s as well.
This is necessary to support multiple painters sharing the same WebGL
thread.
Testing: This doesn't really change behavior yet, so is covered by
existing tests.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
Currently, a single `surfman::Device` is used for all WebGL contexts.
This cannot work when we have multiple rendering contexts. So, extract
the surfman `Connection` and `Adapter` into a per-painter data structure
(`PainterSurfmanDetailsMap`) and store the `Device` directly in the
WebGL context.
This patch also modifies the WebXR traits so that the `Device` doesn't
need to be explictly passed into most methods.
*This is a reland of #40594* with the following changes:
- Do not remove WebGL contexts from the context map before cleaning up
the
WebXR layers. The layer cleanup process consults the map.
- When cleanup up layers, be sure to replace the WebXRBridge in the
WebGLThread data structure.
- Allow failing to the Device when processing WebXR commands. WebXR
sometimes tries to access contexts after they have been removed.
Testing: Should be covered by existing tests.
---------
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
Support for sending build notifications was removed in #37818, but the
dependency in `requirements.txt` was not removed. This PR fixest that.
Testing: This change just removes an unsued build dependency, so no
testing is necessary.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Nowadays the renderer will always wake up the event loop when it needs
to paint
a new frame, so we can always use `ControlFlow::Wait`. This should be a
more efficient way to run animations.
Testing: This should not change behavior, but should make servoshell a
bit more
efficient.
Closes: #21855
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
https://github.com/codecov/test-results-action
The repository now carries a deprecation warning and warns about upload
issues (which we seem to be hitting).
Migrate to the codecov action as recommended.
Testing: CI change
Fixes: Should hopefully fix CI errors.
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
There are multiple motivating factors for this change:
1. `tracing-rs` can and is commonly used for structured logging, to gain
understanding in what is happening in concurrent code. We would like to
attempt to make a distinction of the performance tracing related usage
and the logging related usage.
2. This reduces boilerplate code. We don't have to feature guard every
span anymore, since the macro will do it for us.
3. This makes it easier to add multiple options for the trace backend
(i.e. exchanging tracing-rs for hitrace on OpenHarmony or System Tracing
in Android), or something entirely custom.
4. This makes it easier to add further compile-time options to control
the amount of tracing. E.g. a future PR could add options to enable
tracing based on environment variables set at compile time. Tracing adds
runtime overhead, even if the runtime switch is disabled, so having more
fine-grained options to partially enabled tracing could be useful.
Testing: Tested manually by building with and without the `tracing`
feature. In CI we also build with the tracing feature in the HarmonyOS
build. We don't have any automated tests for the correctness / presence
of the traced entries.
---------
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
Some unit tests attempt to wait for the WebView to be paint ready before
executing. The previous code would wait for a frame ready message from
the WebView before running, but this was subject to timing issues due to
the frame being sent before the load complete message. This changes
makes it so that the WebView explicitly triggers another rendering
update and then waits for a frame. It should be guaranteed that the next
frame will be one that reflects load completeness.
Special thanks to jmunroe on Zulip for investigation into this issue.
Testing: This seems to eliminate flaky timeouts on my machine. I ran
the unit tests in a loop, stopping if any error (such as a timeout
happened).
Before this would stop within a minute or two, but I could not reproduce
the issue with this change after several minutes.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
In incremental layout, changes to the `quotes` attribute of a
pseudo-elment can cause the content of the pseudo-element to change so
should cause a box rebuild. This change does that, hopefully fixing
flaky tests.
Testing: This doesn't have any test changes, but should fix the test
situation described in #40419.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
Add Contents::ReplacedWithWidget for video elements with UA control
widget, to allow Traverse into the children of video element during Box
Tree Construction, Generate
IndependentFormattingContextContent::ReplacedWithWidgets, to store both
the `ReplacedContents` and `BlockFormattingContext`. During fragment
tree generation process, first layout the Image Fragment, and then
Layout the Inner Controls BlockFormattingContext. Doing this allow us to
determine the size of Inner Controls widget based on the size of the
Image Fragment. Minor Fix: ::before/::after pseudo elment should be
suppress for replaced element.
Testing: Should show the controls widget for `<video controls></video>`,
and should not affect any existing WPT test. Since how to display UA
widget of Video Element is not defined in the spec, expectedly there has
no existing WPT test that testing this.
Fixes https://github.com/servo/servo/issues/40452
Fixes https://github.com/servo/servo/issues/31414
---------
Signed-off-by: rayguo17 <tin.tun.aung1@huawei.com>
Every time a touchmove event is added, it updates the cursor, causing
frequent hit testing and affecting the performance of scrolling. Adding
a flag to mark the current touchmove is done for compatibility with
touch events. In this case, the last_mouse_move_position will not be
updated.
Testing: No new use cases will be approved; it's just for performance
optimization.
Fixes: A solution for #39433
Signed-off-by: kongbai1996 <1782765876@qq.com>
[//]: # (dependabot-start)
⚠️ **Dependabot is rebasing this PR** ⚠️
Rebasing might not happen immediately, so don't worry if this takes some
time.
Note: if you make any changes to this PR yourself, they will take
precedence over the rebase.
---
[//]: # (dependabot-end)
Bumps [cc](https://github.com/rust-lang/cc-rs) from 1.2.45 to 1.2.46.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/rust-lang/cc-rs/releases">cc's
releases</a>.</em></p>
<blockquote>
<h2>cc-v1.2.46</h2>
<h3>Other</h3>
<ul>
<li>Add Visual Studio 2026 support (<a
href="https://redirect.github.com/rust-lang/cc-rs/pull/1609">#1609</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/rust-lang/cc-rs/blob/main/CHANGELOG.md">cc's
changelog</a>.</em></p>
<blockquote>
<h2><a
href="https://github.com/rust-lang/cc-rs/compare/cc-v1.2.45...cc-v1.2.46">1.2.46</a>
- 2025-11-14</h2>
<h3>Other</h3>
<ul>
<li>Add Visual Studio 2026 support (<a
href="https://redirect.github.com/rust-lang/cc-rs/pull/1609">#1609</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="15145d16f7"><code>15145d1</code></a>
chore: release (<a
href="https://redirect.github.com/rust-lang/cc-rs/issues/1611">#1611</a>)</li>
<li><a
href="ef4d378ff9"><code>ef4d378</code></a>
Add Visual Studio 2026 support (<a
href="https://redirect.github.com/rust-lang/cc-rs/issues/1609">#1609</a>)</li>
<li>See full diff in <a
href="https://github.com/rust-lang/cc-rs/compare/cc-v1.2.45...cc-v1.2.46">compare
view</a></li>
</ul>
</details>
<br />
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
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 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)
</details>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [clap](https://github.com/clap-rs/clap) from 4.5.51 to 4.5.52.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/clap-rs/clap/releases">clap's
releases</a>.</em></p>
<blockquote>
<h2>v4.5.52</h2>
<h2>[4.5.52] - 2025-11-17</h2>
<h3>Fixes</h3>
<ul>
<li>Don't panic when <code>args_conflicts_with_subcommands</code>
conflicts with an <code>ArgGroup</code></li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/clap-rs/clap/blob/master/CHANGELOG.md">clap's
changelog</a>.</em></p>
<blockquote>
<h2>[4.5.52] - 2025-11-17</h2>
<h3>Fixes</h3>
<ul>
<li>Don't panic when <code>args_conflicts_with_subcommands</code>
conflicts with an <code>ArgGroup</code></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="783b291358"><code>783b291</code></a>
chore: Release</li>
<li><a
href="a88013aab0"><code>a88013a</code></a>
docs: Update changelog</li>
<li><a
href="a3c623042a"><code>a3c6230</code></a>
Merge pull request <a
href="https://redirect.github.com/clap-rs/clap/issues/6000">#6000</a>
from mernen/fix-zsh-dynamic-completion</li>
<li><a
href="951536ee69"><code>951536e</code></a>
chore: Release</li>
<li><a
href="3c527af7f4"><code>3c527af</code></a>
chore: Update transitive clap</li>
<li><a
href="8520a7acb5"><code>8520a7a</code></a>
chore: Release</li>
<li><a
href="2826eede74"><code>2826eed</code></a>
chore(nushell): Require newer clap_complete</li>
<li><a
href="c17d25fc41"><code>c17d25f</code></a>
docs: Update changelog</li>
<li><a
href="493a71a83b"><code>493a71a</code></a>
Merge pull request <a
href="https://redirect.github.com/clap-rs/clap/issues/5999">#5999</a>
from cenviity/push-tqqzyttsoktu</li>
<li><a
href="c758212a47"><code>c758212</code></a>
feat(help): Merge lists of short and long aliases</li>
<li>Additional commits viewable in <a
href="https://github.com/clap-rs/clap/compare/clap_complete-v4.5.51...clap_complete-v4.5.52">compare
view</a></li>
</ul>
</details>
<br />
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
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 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)
</details>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [sea-query](https://github.com/SeaQL/sea-query) from 1.0.0-rc.17
to 1.0.0-rc.18.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/SeaQL/sea-query/commits">compare view</a></li>
</ul>
</details>
<br />
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
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 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)
</details>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
When a Node with a pseudo-element style that uses `content: attr()`
has one of its attributes mutated, trigger a reflow starting at that
node. This is a crude implementation, because we currently aren't taking
into account what attributes changed, but at least it works.
Testing: This doesn't have any test changes, but should fix the test
situation described in #40419.
---------
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
This new data structure allows passing more information when popping up
context menus. It's possible in the future that it will be adapted into
a more generic "hit test result" type API ala WebKit, but for now, this
is probably
enough.
Testing: This change includes new API test assertions.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This should help identify flaky unit tests, since codecov will gather
statistics of tests (of the last 60 days) and allow us to easily
identify flaky unit-tests. [Test page on
codecov](https://app.codecov.io/github/servo/servo/tests) based on an
uploaded report from a try run.
Additionally add a catch-all parameter for `test-unit` which is passed
through to the `cargo nextest` invocation, useful for e.g. stressing a
test via `--stress-count`.
Testing: Manually tested with [try
run](https://github.com/servo/servo/actions/runs/18529823800)
---------
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
If the insets of an absolutely positioned box are big enough that the
inset-modified containing block (IMCB) would get a negative size, we
will now adjust the weaker inset so that the size of the IMCB becomes
zero instead.
This affects auto sizes, auto margins, and self-alignment.
This behavior matches Blink for the most part. However, while Blink also
ensures a non-negative IMCB size, it doesn't necessarily do so by
adjusting the weaker inset, so the alignment may differ.
Blink is fine with adopting this behavior, as resolved by the CSSWG in
https://github.com/w3c/csswg-drafts/issues/11478
Testing: Adding new WPT
---------
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
The user agent on the `internal play steps` (step 2) must to seek to the
earliest possible position if the playback has ended, but the definition
of the `ended playback` prevents looping when the loop attribute was
added after playback has ended (already registered whatwg html issue).
```
- playback ended (`ended` event)
- loop = true
- play() (no seeking - playback hasn't ended)
```
Currently this edge case if not yet reflected in the HTML specification
so let's do the same as other browsers and ignore the `loop` attribute
for `play` seek.
See https://html.spec.whatwg.org/multipage/#internal-play-steps
See https://github.com/whatwg/html/issues/4487
Testing: Improvements in the following tests
-
html/semantics/embedded-content/media-elements/playing-the-media-resource/loop-from-ended.tentative.html
Signed-off-by: Andrei Volykhin <andrei.volykhin@gmail.com>
The exported [upstream PR] failed to merge due to lint issues and there
was also a suggestion to move the test to a different folder.
Since that upstream PR has now been merged manually, backport these
fixes to Servo's copy of WPT.
[upstream PR]: https://github.com/web-platform-tests/wpt/pull/56050
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
In `NormalizedAlgorithm::get_key_length`, we match the wrong enum
variants for HKDF and PBKDF2. Therefore, the function wrongly returns
`NotSupportedError` for them. It causes a few WPT tests fail. This patch
fix it with correct enum variants.
Testing: Pass some WPT tests that were expected to fail.
Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
Currently, a single `surfman::Device` is used for all WebGL contexts.
This cannot work when we have multiple rendering contexts. So, extract
the surfman `Connection` and `Adapter` into a per-painter data structure
(`PainterSurfmanDetailsMap`) and store the `Device` directly in the
WebGL context.
This patch also modifies the WebXR traits so that the `Device` doesn't
need to be explictly passed into most methods.
Testing: Should be covered by existing tests.
---------
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
The current logic fails when the `Content-Type` header includes the
character encoding other parameters like `qs`.
Fixes: #40630
---------
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
This web API is alternative API to `throw e`, which is why we can reuse
a lot of the existing machinery.
The one testcase that isn't passing yet is because it reports an empty
`TypeError`. The current logic in `ErrorInfo` only retrieves the message
data, but doesn't include the type of the exception. For that, we need
to use `(*report)._base.errorNumber` and map that back to the original
type codes. However, deferring that to a follow-up as that requires some
more work in mozjs.
Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
I did part of a refactor to address a review but didn't finish it. Fixes
white input/button in dark mode.
Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
I mistakenly made this method have public visibility in a recent PR
Testing: This doesn't change behavior and is thus covered by existing
tests.
Fixes: #40667
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Before, we used shorthands for profiles selection (`--release`,
`--production`), but it would be more correct to just use actual
`--profile` so we do not need shorthands for all of them.
Motivation: I want to create "profiling" builds in CI.
Testing: CI change is covered by CI.
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Fixes a major source of intermittency in IndexedDB: the dispatching of
the complete event. This ensures that all requests are processed before
it is fired.
Fixes: #39162Fixes: #39221
... and likely many more.
---------
Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
Companion to https://github.com/servo/mozjs/pull/650
We added 3 new options to bindings.conf, each more powerful then the
previous one, so one should use the least powerful as possible to keep
things flexible:
1 `cx_no_gc` prepends argument `&JSContext`, which allows creating NoGC
tokens and using functions that do not trigger GC.
2. `cx` prepends argument `&mut JSContext`, which allows everything that
previous one allows, but it also allows calling GC triggering functions.
3. `realm` prepends argument `&mut CurrentRealm`, which can be deref_mut
to `&mut JSContext` (so it can do everything that previous can), but it
also ensures that there is current entered realm, which can be used for
creation of InRealm.
next steps: #40600
reviewable per commit
Testing: It's just refactoring
try run: https://github.com/sagudev/servo/actions/runs/19287700927
---------
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Previously, we always kill the instance when tests finish instead of
normally shutting down. That blocked clean-ups works, such as Code
Coverage we wanted to add, and other things I'm not aware of.
Testing: We have tested for a week and checked the logs of CI to confirm
it works normally now.
---------
Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
We only need to clear the viewport and with wrong transform this will
not do.
Testing: Existing WPT tests
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
When script is looking up an attribute for layout then it only needs to
care about the attribute value. The `Attr` node itself is not required.
If we want to lazily construct attribute nodes in the future
(https://github.com/servo/servo/issues/36697) then we should use `Attr`
as little as possible.
This also ends up simplifying the code by accident.
Testing: No behaviour change intended, regressions are covered by
existing tests.
Part of https://github.com/servo/servo/issues/36697
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This was due to the fact that two PRs doing this landed around the same
time. This PR eliminates the duplicate check.
Testing: This should not change behavior so is covered by existing
tests.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>