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>
Housekeeping of WebIDL dictionaries of WebCrypto API, including:
- Add/Fix spec links in `SubtleCrypto.webidl` and `CryptoKey.webidl`.
- Sort dictionaries in `subtlecrypto.webidl` based on the spec.
- Sort the `subtle` structs in `subtlecrypto.rs`, based on the spec.
- Reduce unneeded visibility of those `subtle` structs.
Testing: No behavioral change. Existing tests suffice.
Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
We currently use the crate `aws-lc-rs` for HKDF in the WebCrypto API.
When generating output bytes from the output of HKDF-Expand operation
(OKM, Output Key Material), it enforces the requested output length must
match the length of key type (see error condition of `Okm::fill` at
https://docs.rs/aws-lc-rs/1.14.1/aws_lc_rs/hkdf/struct.Okm.html#method.fill).
However, according to the WebCrypto API specification, user should be
allowed to choose the output length
(https://w3c.github.io/webcrypto/#hkdf-operations-derive-bits). The
restriction from `aws-lc-rs` causes several HKDF-related WPT tests to
fail.
This patch switches to use a more flexible crate `hkdf`
(https://crates.io/crates/hkdf) for implementing HKDF in our WebCrypto
API, and allowing variable length output. This helps to make those
HKDF-related WPT tests pass.
Testing: Pass some WPT tests that were expected to fail.
---------
Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
This change is a rework of #22478, originally authored by @vimpunk.
It adds parsing of CSS in parallel with the main script thread. The
big idea here is that when the transfer of stylesheet bytes is
finished, the actual parsing is pushed to a worker thread from the Stylo
thread pool. This also applies for subsequent loads triggered by
`@import` statements.
The design is quite similar to the previous PR with a few significant
changes:
- Error handling works properly. The `CSSErrorReporter` is a crossbeam
`Sender` and a `PipelineId` so it can be trivially cloned and sent to
the worker thread.
- Generation checking is done both before and after parsing, in order
to both remove the race condition and avoid extra work when the
generations do not match.
- The design is reworked a bit to avoid code duplication, dropping added
lines from 345 to 160.
- Now that `process_response_eof` gives up ownership to the
`FetchResponseListener`, this change avoids all extra copies.
Testing: This shouldn't change observable behavior, so is covered
by existing tests.
Fixes: #20721Closes: #22478
---------
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: mandreyel <mandreyel@protonmail.com>
Replace `Trusted<EventTarget>` with `Dom<EventTarget>` and add the
appropriate crown attribute.
Testing: `./mach build --use-crown` succeed and no difference in
behaviour when running `./mach test-wpt tests/wpt/tests/dom/abort`
Fixes: #40631
Signed-off-by: WaterWhisperer <waterwhisperer24@qq.com>
Depends on:
- https://github.com/servo/stylo/pull/104
- https://github.com/servo/servo/pull/34926
- https://github.com/servo/servo/pull/34927
- https://github.com/servo/servo/pull/34948
In addition to that a `resolve_calc_value` function has been added which
resolves calc values during the layout process once a percentage
resolution basis is available.
~~There is 1 newly failing test and 1 newly failing subtest here.~~
These issues have now been fixed.
There are 8 new subtest failures in
`css/css-grid/grid-definition/grid-minimum-contribution-with-percentages.html`.
These are genuine failures, but are unrelated to the calc
implementation. The calc implementation is just exposing a pre-existing
bug around percentage resolution that also now correctly also applies to
`calc()` values containing percentages. The fix for would best be done
in a followup as it requires teaching Taffy about "compressible replaced
elements". (update: I have this
[implemented](https://github.com/servo/servo/pull/34948) but in the
interest of keeping it to one feature per PR I have not included it
here)
---
<!-- 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. It doesn't like the
git dependency on Taffy.
- [x] There are tests for these changes OR
---------
Signed-off-by: Nico Burns <nico@nicoburns.com>
A new event `PlayerEvent::DurationChanged` has been added to the media
engine to simplify handling changes in the duration of a media stream
(sometimes the duration could be inaccurate or even determined by the
media engine with significant delay after the initial metadata was
ready).
This new event eliminates the need to check conditions for two
consecutive `MetadataUpdated` events (the initial metadata and the
metadata with the changed duration) during the loading phase.
servo-media:
- Add new `PlayerEvent::DurationChanged` event
(https://github.com/servo/media/pull/461)
Testing: No expected changes in test results
Fixes: https://github.com/servo/servo/issues/40626
Signed-off-by: Andrei Volykhin <andrei.volykhin@gmail.com>
This implements the web-facing API's behind a flag, where we further
design the embedding API in a
follow-up PR.
It passes all relevant WPT tests, since the HTML
specification leaves it up to user agents to
determine when to process these protocol handlers.
It also uses `once_cell` to lazily construct the
regex, which is what the CSP crate also uses for
its regexes [1].
Part of #40615
[1]:
db8f2e97fe/src/lib.rs (L1550-L1569)
Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
This patch flattens nested match arms in `NormalizedAlgorithm` to
simplify our code. Moreover, primarily matching the algorithm names,
instead of matching the enum variant types, makes more sense, since some
algorithms share the same enum variant type.
Testing: Refactoring. Existing tests suffice.
Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
These WPT tests on WebCrypto API were either renamed or removed. We can
safely remove these legacy test expectations
Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
Add scroll and fling trace.
Testing: There are no related tests available for now; we will add a
test item for frame rate statistics on CI later.
Fixes: NA
Signed-off-by: kongbai1996 <1782765876@qq.com>
Tests seem to assume that resource timing is available during the "load"
event. Doing so causes some tests to pass and others to fail, which
appear to have been false passes.
This is a preparatory change for asynchronous stylesheet parsing, when
resource timing entires must be added before sending stylesheets to
another thread for parsing.
Testing: This change updates WPT test results.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Bumps [crypto-common](https://github.com/RustCrypto/traits) from 0.1.6
to 0.1.7.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="66a997ccf5"><code>66a997c</code></a>
Pin generic-array to v0.14.7 and release crypto-common v0.1.7 (<a
href="https://redirect.github.com/RustCrypto/traits/issues/2088">#2088</a>)</li>
<li>See full diff in <a
href="https://github.com/RustCrypto/traits/compare/crypto-common-v0.1.6...crypto-common-v0.1.7">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 [anstyle-wincon](https://github.com/rust-cli/anstyle) from 3.0.10
to 3.0.11.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="368a871947"><code>368a871</code></a>
chore: Release</li>
<li><a
href="4d5c297144"><code>4d5c297</code></a>
docs: Update changelog</li>
<li><a
href="263b34cb6d"><code>263b34c</code></a>
Merge pull request <a
href="https://redirect.github.com/rust-cli/anstyle/issues/284">#284</a>
from hanna-kruppe/windows-sys-0.61</li>
<li><a
href="8029e729f5"><code>8029e72</code></a>
Merge pull request <a
href="https://redirect.github.com/rust-cli/anstyle/issues/286">#286</a>
from epage/template</li>
<li><a
href="5b1cab43bc"><code>5b1cab4</code></a>
fix(syntect): Update a windows minimal dep</li>
<li><a
href="21b13fa224"><code>21b13fa</code></a>
chore(ci): Run more jobs on Windows</li>
<li><a
href="51e86faf59"><code>51e86fa</code></a>
chore: Update from '_rust/main' template</li>
<li><a
href="b0881a6ba0"><code>b0881a6</code></a>
chore(ci): Give more control over where alt version jobs run</li>
<li><a
href="829ebd7f2f"><code>829ebd7</code></a>
chore(deps): Allow windows-sys 0.61</li>
<li><a
href="36dd1a2406"><code>36dd1a2</code></a>
Merge pull request <a
href="https://redirect.github.com/rust-cli/anstyle/issues/285">#285</a>
from epage/template</li>
<li>Additional commits viewable in <a
href="https://github.com/rust-cli/anstyle/compare/anstyle-wincon-v3.0.10...anstyle-wincon-v3.0.11">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 [hyper](https://github.com/hyperium/hyper) from 1.8.0 to 1.8.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/hyperium/hyper/releases">hyper's
releases</a>.</em></p>
<blockquote>
<h2>v1.8.1</h2>
<h2>Bug Fixes</h2>
<ul>
<li><strong>http1:</strong> fix consuming extra CPU from previous change
(<a
href="https://redirect.github.com/hyperium/hyper/issues/3977">#3977</a>)
(<a
href="4492f31e94">4492f31e</a>)</li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/hyperium/hyper/compare/v1.8.0...v1.8.1">https://github.com/hyperium/hyper/compare/v1.8.0...v1.8.1</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/hyperium/hyper/blob/master/CHANGELOG.md">hyper's
changelog</a>.</em></p>
<blockquote>
<h3>v1.8.1 (2025-11-13)</h3>
<h4>Bug Fixes</h4>
<ul>
<li><strong>http1:</strong> fix consuming extra CPU from previous change
(<a
href="https://redirect.github.com/hyperium/hyper/issues/3977">#3977</a>)
(<a
href="4492f31e94">4492f31e</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="166c6cacc7"><code>166c6ca</code></a>
v1.8.1</li>
<li><a
href="4492f31e94"><code>4492f31</code></a>
fix(http1): fix consuming extra CPU from previous change (<a
href="https://redirect.github.com/hyperium/hyper/issues/3977">#3977</a>)</li>
<li>See full diff in <a
href="https://github.com/hyperium/hyper/compare/v1.8.0...v1.8.1">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 [anstyle-query](https://github.com/rust-cli/anstyle) from 1.1.4 to
1.1.5.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="368a871947"><code>368a871</code></a>
chore: Release</li>
<li><a
href="4d5c297144"><code>4d5c297</code></a>
docs: Update changelog</li>
<li><a
href="263b34cb6d"><code>263b34c</code></a>
Merge pull request <a
href="https://redirect.github.com/rust-cli/anstyle/issues/284">#284</a>
from hanna-kruppe/windows-sys-0.61</li>
<li><a
href="8029e729f5"><code>8029e72</code></a>
Merge pull request <a
href="https://redirect.github.com/rust-cli/anstyle/issues/286">#286</a>
from epage/template</li>
<li><a
href="5b1cab43bc"><code>5b1cab4</code></a>
fix(syntect): Update a windows minimal dep</li>
<li><a
href="21b13fa224"><code>21b13fa</code></a>
chore(ci): Run more jobs on Windows</li>
<li><a
href="51e86faf59"><code>51e86fa</code></a>
chore: Update from '_rust/main' template</li>
<li><a
href="b0881a6ba0"><code>b0881a6</code></a>
chore(ci): Give more control over where alt version jobs run</li>
<li><a
href="829ebd7f2f"><code>829ebd7</code></a>
chore(deps): Allow windows-sys 0.61</li>
<li><a
href="36dd1a2406"><code>36dd1a2</code></a>
Merge pull request <a
href="https://redirect.github.com/rust-cli/anstyle/issues/285">#285</a>
from epage/template</li>
<li>Additional commits viewable in <a
href="https://github.com/rust-cli/anstyle/compare/anstyle-query-v1.1.4...anstyle-query-v1.1.5">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>
converts MutationObserver's record_queue and node_list, as well as
RegisteredObserver's observer field, to use Dom<T> instead.
Testing: `./mach build --use-crown` pass locally
Fixes#40602
Signed-off-by: WaterWhisperer <waterwhisperer24@qq.com>
When a NodeSet is passed to the `id` function then we want to act as if
we were computing the union of individual `id` calls for each node in
the set. We weren't doing that before.
Depends on https://github.com/servo/servo/pull/40592
Testing: A new test starts to pass
---------
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
Ran ./mach release 0.0.2 to update the version number and update the
license.html
This is in preperation for the v0.0.2 release with the next nightly, as
discussed on zulip.
Testing: Not tested
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
The two are semantically equivalent, but `find_map` is more concise.
Testing: Covered by existing tests
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
Follow the HTML specification and split the previous `playback position`
to `current playback position` (a time on the media timeline) and
`official playbac position` (an approximation of the current playback
position that is kept stable while scripts are running) which must be
set to `the current playback position` any time the user agent provides
a stable state.
See https://html.spec.whatwg.org/multipage/#current-playback-position
See https://html.spec.whatwg.org/multipage/#official-playback-position
Note that at this point, there are no difference between the `current`
and `official` playback positions (as the time on the media timeline),
except the `seek` case.
Testing: Improvements in the following tests
-
html/semantics/embedded-content/media-elements/seeking/seek-to-max-value.htm
-
html/semantics/embedded-content/media-elements/seeking/seek-to-negative-time.htm
Fixes: https://github.com/servo/servo/issues/34496
Signed-off-by: Andrei Volykhin <andrei.volykhin@gmail.com>
The result of a predicate can depend on the position of the node in its
set, and this position is dependent on the axis that the node set came
from. This is specified in
https://www.w3.org/TR/1999/REC-xpath-19991116/#predicates.
Additionally, this change fixes a small bug in the implementation of
`preceding::` (https://github.com/servo/servo/pull/40588) where the root
of a subtree would be included twice. That wasn't discovered earlier
because nodes are deduplicated at the end of the evaluation.
Testing: New tests start to pass, this change adds more tests
---------
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This is a speculative attempt to make WebDriver WPT runs more stable.
Without this change, it seems likely that embedder controls could stay
open indefinitely during WebDriver test runs.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Testing: This should (hopefully) decrease the amount of tests that flake
when running WPT.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
We parse the `parameter` field of the `algorithm` AlgorithmIdentifier
field of `spki` and `pkcs8` of ECDH keys as an object identifier.
However, according to WebCrypto API specification, we should parse it as
an `ECParameters` ASN.1 type defined in [RFC5480].
```plaintext
ECParameters ::= CHOICE {
namedCurve OBJECT IDENTIFIER
-- implicitCurve NULL
-- specifiedCurve SpecifiedECDomain
}
```
Although our current implementation works fine since `ECParameters` is
defined as a `CHOICE` type with an object identifier as the only option,
it is technically incorrect. This patch fixes this mistake.
Testing: No behavioral change. Existing tests suffice.
Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
Similar to about:license in firefox. Generated with `cargo-about`.
A few open questions:
- When/how should it be updated (the command I used was `cargo about
generate etc/about.hbs > resources/resource_protocol/license.html`, it
takes ~20 seconds)
- How should `about.toml` be kept in sync with `deny.toml`
- What about licenses for packages that are not crates (i.e. gstreamer)
Fixes: #40266
---------
Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
Following the HTML specification, a new internal method,
`ended_playback`, has been added to differentiate it from the `ended`
attribute:
- `ended_playback`: playback has ended for the `forward/backward`
directions
- `ended` attribute: playback has ended for the `forward` direction
See https://html.spec.whatwg.org/multipage/#ended-playback
Added descriptions for the steps of the `Play`, `Pause`,
`internal_play_steps` (new), `internal_pause_steps`,
`notify_about_playing`, `change_ready_state` methods.
Testing: No expected changes in test results.
Signed-off-by: Andrei Volykhin <andrei.volykhin@gmail.com>
The `seek` method isn't explicitly exposed in the API, but is called
from various places (`currentTime`, `fastSeek`, by the `media metadata`
event) and doesn't itself create new DOM objects, so the `canGC`
argument can be omitted.
It was previously required because calling the `Seekable` method creates
a new `TimeRanges` object, but it will now be replaced by the internal
`seekable` method to avoid interaction with the JavaScript engine (and
potential garbage collector).
The `earlyest possible position` method has been changed to match the
specification and use `seekable` instead of `played`. See
https://html.spec.whatwg.org/multipage/#earliest-possible-position
Testing: No expected changes in tests
Signed-off-by: Andrei Volykhin <andrei.volykhin@gmail.com>
These two new API method make it easier to enable and disable the back
and forward buttons in the browser UI. In addition, they are used to
enable and disable the context menu items for "Back" and "Forward". This
is something that is much, much easier to do in the embedding layer,
rather than in script.
In addition, the new methods are wired up to the buttons in Servoshell.
Testing: This change includes a new API test.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Instead of using a task source for SpiderMonkey runtime callbacks, use a
`ScriptEventLoopSender`. Task sources are associated with a particular
Pipeline, but the runtime callback is run indepenently of any particular
Pipeline and could theoretically happen when no Pipeline exists at all.
This reduces the dependency of the `ScriptThread` on the existence of
the first Pipeline.
Testing: This should not change observable behavior, so is covered by
existing tests.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>