The low-level media `seek` request could be initiated by script (DOM
method call or setting of an IDL attribute), by the user agent (seeking
data) or by the media engine itself (e.g. gst_play_set_rate()).
And to distinguish between them we will use the latest seek position (in
seconds) to be able abort processing the `seek` algorithm steps (13-17)
for a `seek` request initiated by the media engine.
See https://html.spec.whatwg.org/multipage/#dom-media-seek
If the `seeking` is in progress, any callback which affects the current
playback position (`position changed`, `end of the playback`) shouldn't
be processed (event marshalling over IPC router is non-state
conditional).
Testing: Regression in the following test causes by gstreamer issue when
the `gst_play_set_rate()` overrides the latest seek requested position
unconditionally and the user agent receives the `seek completion` event
with the unexpected seek position (0.5+ instead of 0.0).
- html/semantics/embedded-content/media-elements/preserves-pitch.html
See https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/4762
Fixes: https://github.com/servo/servo/issues/37057
Signed-off-by: Andrei Volykhin <andrei.volykhin@gmail.com>
When for example changing the hover state of an element, we were
dirtying it with ContentOrHeritage damage, which forced it to be laid
out again.
This was added in #39102 in order to fix#38989, but for the most part
it's no longer needed.
However, we will now dirty when a `<textarea>` or `<input>` which can be
selected gets or loses focus. This is to ensure that the caret or
selections get correctly updated.
Testing: Manually tested that #38989 is not regressing
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
Finish exposing the `SimpleDialog` API in libservo, abstracting away the
response senders into structures with methods. In addition, add a
default behavior so that embedders do not have to explicitly send a
reponse when dialogs are ignored. This makes the API much harder to
misuse.
Finally, the WebDriver API for setting the prompt dialog entry
field is corrected to actually set that value rather than the message.
This makes sense as part of this change as the type safety of the
structures makes setting the message (the old, wrong behavior) harder
to implement.
Testing: This causes a WebDriver conformance test to start passing.
---------
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
Finish adding ChaCha20-Poly1305 support to WebCrypto API.
This patch implements encrypt operation and decrypt operation of
ChaCha20-Poly1305, using the crate `chacha20poly1305` to support the
cryptographic calculation. The get key length operation of
ChaCha20-Poly1305 is also included in this patch.
Testing: Pass some WPT tests that were expected to fail.
Fixes: Part of #40687
Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
The CSS `order` property affects the order of boxes in the box tree.
Therefore, when it changes, we need to reconstruct it.
Testing: Adding new test
Fixes: #40813
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Previously, when window.open() was called with a javascript: URL, the
script would execute unconditionally without any CSP enforcement. The
CSP list was not propagated from the opener to the newly opened
document.
This commit fixes two issues:
1. Propagate CSP from opener to new document The CSP list from the
existing (opener) document is now copied to the target document before
navigation, ensuring CSP policies are enforced.
2. Report CSP violations to the correct window Per the CSP spec,
violations should be reported to the navigation request's client (the
opener window), not the target window. To achieve this, we check CSP
early in window.open() while both windows are accessible, before
entering the normal navigation flow where only the target window is
available.
Testing: new wpt successes:
-
`content-security-policy/script-src/javascript-window-open-blocked.html`
-
`content-security-policy/unsafe-hashes/javascript_src_denied_missing_unsafe_hashes-window_open.html`
-
`content-security-policy/unsafe-hashes/javascript_src_denied_wrong_hash-window_open.html`
Fixes: part of #36437
Signed-off-by: Dyego Aurélio <dyegoaurelio@gmail.com>
`Element::each_custom_state` is called from Layout, but it creates
`DomRef` types on the stack, which can only be done on the main script
thread. Since layout might be doing styling and element consultation on
workers threads, expose a Layout-safe version of this change, which
doesn't have this issue.
Testing: This fixes two panics encountered during WPT tests.
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>
Continue on adding ChaCha20-Poly1305 support to WebCrypto API.
This patch implements generate key operation of ChaCha20-Poly1305, using
the crate `chacha20poly1305` to support the cryptographic calculation.
Testing: Pass some WPT tests that were expected to fail.
Fixes: Part of #40687
Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
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>
This implementation is not actually specified (see #40973 and
https://github.com/w3c/csswg-drafts/issues/556), but the implementation
that we have is backwards. Other retargeting uses that describe
"retarget _something_ against _another thing_" map to
`something.retarget(another_thing)`, but what the current code was doing
for element[s]FromPoint was the equivalent of "retarget _this_ against
each element", which is obviously wrong.
Testing: Newly-passing tests.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
updates several methods in `ReadableByteStream` to use `.expect()`
instead of `?` where the spec indicates an infallible operation (denoted
by `!`).
Testing: `./mach test-wpt /streams/readable-byte-streams`
Fixes: part of #36906
Signed-off-by: WaterWhisperer <waterwhisperer24@qq.com>
Currently starting a script `EventLoop` depends on sending data about
the initial `Pipeline`. This change breaks this dependency. The goal
here is to:
1. Allow `ScriptThread`s to be shared between `WebView`s. This will
allow more flexiblity with the way that `ScriptThread`s are created,
which should allow us to perserve system resources by allowing them
to be shared between `WebView`s. With this change, we can do away
with the `InitialPipelineState` entirely, which was gather
information necessary for both a new `EventLoop` and a new
`Pipeline`. We no longer have to do many clones when reusing an
existing even loop.
1. Simplify the way that `EventLoop`s and `Pipeline`s are spawned. Now
`Pipeline`s are spawned in the same way no matter what.
Now the general order of operations when starting a pipeline is:
1. Get or create an event loop for the pipeline:
- If the event loop needs to be spawn, spawned it in a new thread or
process.
2. Send the spawn pipeline message to the event loop (kept alive via an
`Rc`.
Testing: This should not change behavior in a way that is observable, so
should
be covered by existing tests.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Start adding ChaCha20-Poly1305 support to WebCrypto API.
This patch implements "import key" operation and "export key" operation
of ChaCha20-Poly1305, using the crate `chacha20poly1305` to support the
cryptographic calculation.
Testing: Pass some WPT tests that were expected to fail.
Fixes: Part of #40687
Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
This PR introduces a new storage coordination thread, intended to serve
as the central point for managing all current and future storage
endpoints in Servo.
In addition to the new coordination thread, this PR also lays the
infrastructure required to develop a parallel, next-generation IndexedDB
implementation under the indexeddb_next feature flag living on a
separate branch.
Testing: Unit and WPT tests continue to pass
---------
Signed-off-by: Jan Varga <jvarga@igalia.com>
Finish adding Argon2 support to WebCrypto API, using the crate `argon2`
to support the cryptographic calculation.
This patch implements "derive bits" operation and the "get key length"
operation of Argon2. Actual error messages are also provided for the
existing "import key" operation of Argon2.
Testing: Pass some WPT tests that were expected to fail.
Fixes: Part of #40687
Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
To ensure that tests that modify cookies but don't finish cleanly don't
leave cookie values that interfere with subsequent tests, we need to
clear the cookie storage in between each test that's run.
Testing: Can't test the test runner, just have to watch the patterns in
our test runs.
Fixes: #40668Fixes: #40672Fixes: #40673Fixes: #40674Fixes: #40695Fixes: #40697
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
Start adding Argon2 support to WebCrypto API.
This patch implements import key operation of Argon2.
Testing:
- Pass some WPT tests that were expected to fail.
- Some new FAIL expectations are added to
`argon2.tentative.https.any.js.ini`, which require the
not-yet-implemented derive bits operation of Argon2. These tests were
skipped by WPT when the import key operation of Argon2 had not been
implemented at the time.
Fixes: Part of #40687
Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
The specification of Modern Algorithms in the Web Cryptography API
(https://wicg.github.io/webcrypto-modern-algos/) adds new key formats
and key usages to support modern cryptographic algorithms.
This patch adds those new key formats and key usages, preparing for the
implementation of the new algorithms.
Testing: No behavioral changes in existing cryptographic algorithms.
Existing tests suffice.
Fixes: Part of #40687
---------
Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
Currently when we call a `Focus` we always scroll a focusable element to
the center of the container. However, this would causes a different
behavior where UAs wouldn't scroll when a focus is called to a visible
element. This PR add implementations following the behavior of Firefox
[nsFocusManager::ScrollIntoView](e613f4df35/dom/base/nsFocusManager.cpp (L3121)),
where we are scrolling to the element if it is not visible.
This would enhance the user experience of focusing an input element,
where we should avoid moving the element if it is visible.
Incidentally fix a calculation bug for the calculation of
`ScrollIntoView` with `nearest` block or inline option.
Testing: Private WPT for the implementation defined behavior and public
WPT for the bug.
---------
Signed-off-by: Jo Steven Novaryo <steven.novaryo@gmail.com>
Currently the sequence order of the DOM method calls and the media
player API calls is mismatched because some media player operations (*)
posted to media task with delayed processing (while should be processed
immediately).
- DOM (script): pause -> seek -> play
- Media: seek -> pause* -> play*
Also the associated queued media events can be fired and processed by
script somehow (e.g. by calling `seek` in event listener handler) even
before the calling of the media player `play/pause` API.
To handle it the application will try to update media state (by calling
media player API) on each DOM `play, pause` method calls and on some
`ready state` changes with checking if the media element can be
potencially playing.
See https://html.spec.whatwg.org/multipage/#potentially-playing
Testing: No expected testing results changes because there are
unexpected `seek completion` signals from the media engine with invalid
time positions which are affecting passing test score (by masking false
positive results).
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/4762
Signed-off-by: Andrei Volykhin <andrei.volykhin@gmail.com>
This implements the solution from #26488 that prevents implementing Drop
manually for DOM interfaces, which is very easy to write in a way that
can cause memory safety errors during JS runtime teardown. Since we have
a bunch of pre-existing implementations that we are working on removing,
this PR adds an opt-out mechanism that those interfaces use.
Testing: Compile-time code generation; not possible to test.
Fixes: part of #26488
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
We were trying to update the dirty root to be the common ancestor of the
old dirty root and the element noted with dirty descendants. But that
would panic if when the old dirty root had been disconnected.
In that case, just set the dirty root to be the element, as if the old
dirty root was None.
Testing: Adding a crashtest, and one existing test now fails instead of
crashing
Fixes: #40920
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
`ScriptThread`s start with an initial `Pipeline`, but that `Pipeline`
should not be used for any `ScriptThread` global data as a
`ScriptThread` can have any number of `Pipeline`s that come and go.
There's no architectural reason why a `ScriptThread` should be
associated with only a single `WebView`.
This change makes it so that the `ScriptThread` no longer uses the
`PipelineId` and the `WebViewId` of the initial `Pipeline` to initialize
itself. Instead a `ScriptEventLoopId` is used to uniquely identify every
`ScriptThread` in both the `ScriptThread` and the `Constellation`.
The remaining use was for crash reporting. Now when a crash happens, it
launches the sad tab in all `WebView`s that depeneded on that
`ScriptThread`.
This is a change which should allow simplifying the way that
`EventLoop`s/`ScriptThread`s are started in the `Constellation`, which
will be handled in a followup.
Testing: This shouldn't change behavior except in the case where a
`ScriptThread` is used in more than a single `WebView`, which should
work
properly now. I tested this change manually by running servoshell in
multiprocess mode while causing a panic to happen due to a null pointer
dereference. The sad tab appeared after this change, so things seem to
work
properly still. Testing crashes is tricky with the way we test servo
now.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
fixes an intermittent RefCell already borrowed panic in the
ReadableStream implementation by tightening the borrow scope of
ReadableStream::reader in the error and cancel.
Testing: super hard to make crash test for this.
Fixes: #40894
Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
The new audio/video tracks should be added to the media element from the
initial `metadata` event from the media engine because there are
possibility of the multiple `metadata` events without any associated
`media track` state changes and previously the application added new
tracks into lists unconditionally.
The registered issue to handle possible dynamic `media track` state
changes from the media engine gracefully.
https://github.com/servo/media/issues/473
Testing: Improvements in the following tests
-
html/semantics/embedded-content/the-video-element/video_size_preserved_after_ended.html
Fixes: https://github.com/servo/servo/issues/32623
Signed-off-by: Andrei Volykhin <andrei.volykhin@gmail.com>
The `scripts_traits` crate was the only crate depending on `strum` with
the
`derive` feature. This accidentally allowed other crates to import strum
macros via `strum::` without declaring their own dependency on
`strum_macros`,
causing compilation issues when running `./mach test-unit -p net`.
This PR makes the imports consistent across the code base by:
- replacing all `strum_macro::` imports with `strum::` imports
- removing strum_macro dependencies
- adding derive feature to the strum workspace
Testing: Unit tests continue to pass
Signed-off-by: Jan Varga <jvarga@igalia.com>
I got trigged by this:
<img width="1589" height="919" alt="image"
src="https://github.com/user-attachments/assets/ad827309-551a-452a-9af3-b857b71dc4cd"
/>
Servo is the only one TIMEOUT on this test, but we don't have a
`tests/wpt/meta/streams/queuing-strategies.any.js.ini`, when I run it
locally I get one test TIMEOUT and another one CRASH, this should fix
it.
Before this fix:
```
[queuing-strategies.any.worker.html]
expected: CRASH
[queuing-strategies.any.html]
expected: TIMEOUT
[ByteLengthQueuingStrategy: size behaves as expected with strange arguments]
expected: TIMEOUT
```
Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
The media engine signals with the `PlayerEvent::EnoughData` event that
the media source has enough data and the application should stop pushing
more data to avoid excessive buffer queueing and wait
`PlayerEvent::NeedData` event to continue.
Note that the source buffer size - MAX_SRC_QUEUE_SIZE (50MB).
This event is reflecting the state of the media source so the
application shouldn't change the media element ready state somehow.
Testing: No expected testing results changes
Fixes (partially): https://github.com/servo/servo/issues/40740
Signed-off-by: Andrei Volykhin <andrei.volykhin@gmail.com>
The media session is allowed to control the state of the media element
(play, pause) and is holding DOM reference, so the latest registered
media element is not be able to be GCed, so let's use the weak reference
to break this dependency.
Note that `weakReference` property was added to interfaces
- HTMLMediaElement: The `Mutable/WeakRef` requires T to be bound by
`WeakReferenceable`
- HTMLAudio/VideoElement: The `DOM_WEAK_SLOT` must be reserved by
concrete DOM JS class
Testing: No expected testing results changes
The media session UI functionality is implemented for Android and didn't
test due lack of testing sample.
Fixes: https://github.com/servo/servo/issues/40854
Signed-off-by: Andrei Volykhin <andrei.volykhin@gmail.com>
script: add CanGc as argument to methods in HTMLOptionElement
Testing: These changes do not require tests because they are a refactor.
Addresses part of https://github.com/servo/servo/issues/34573
Signed-off-by: Yerkebulan Tulibergenov <yerkebulan@gmail.com>
Implement brotli support for CompressionStream and DecompressionStream
Testing: brotli test should pass
Fixes: #40831
---------
Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
After #40639, this variant holds a single value, and I don't think think
using named fields was providing much extra clarity.
Testing: not needed, no behavior change
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
updates several methods in `ReadableStream` to use `.expect()` instead
of `?` where the spec indicates an infallible operation (denoted by
`!`).
Testing: `mach test-wpt /streams/`
Fixes: part of #36906
Signed-off-by: WaterWhisperer <waterwhisperer24@qq.com>
The MediaSession `setPositionState` method should only update the
position state and propagate it to the platform media session UI
controller and shouldn't change somehow the properties of the media
element directly (duration, playback rate or position).
See
https://w3c.github.io/mediasession/#dom-mediasession-setpositionstate
Testing: Improvements in the following tests
- /mediasession/positionstate.html
The media session UI functionality is implemented for Android and didn't
test due lack of testing sample.
Signed-off-by: Andrei Volykhin <andrei.volykhin@gmail.com>
Add CommandEvent
This is behind the new dom_command_invokers_enabled pref.
Testing: Existing WPTs
---------
Signed-off-by: Luke Warlow <lwarlow@igalia.com>
*Describe the changes that this pull request makes here. This will be
the commit message.*
Move CSP DOM interfaces to `script/dom/security`
Testing: Just a refactor, it doesn't require tests
Fixes: part of #38901
Signed-off-by: Dyego Aurélio <dyegoaurelio@gmail.com>
Rebase of #37021 with review comments applied. These changes bundle up
the required information from the relevant global when a stylesheet is
added so that any requests for web fonts match the specification.
Testing: Newly passing tests.
Fixes: #36590
---------
Signed-off-by: Uthman Yahaya Baba <uthmanyahayababa@gmail.com>
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
Co-authored-by: Uthman Yahaya Baba <uthmanyahayababa@gmail.com>
Implements digest operation of CShake, including `cSHAKE128` and
`cSHAKE256`, using the crate `sha3` and `digest` for the CShake
calculation.
Testing: Pass WPT tests that were expected to fail.
Fixes: Part of #40687
Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
This both reduces unnecessary string comparisons and fixes several cases
where two string arguments were passed in the wrong order.
Depends on https://github.com/servo/servo/pull/40811.
Testing: New passing tests.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
Allows for key ranges to be deleted, as per spec.
Testing: WPT
---------
Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
The current implementation doesn't match the specification and is broken
in a way that makes nytimes.com endlessly attempt to enqueue resource
timing entries, making the page completely unresposive to user input.
This PR makes some surgical changes that fix the NYTimes behaviour and
add some comments to make it easier to further improve the
implementation in the future.
Testing: Various WPT that used to timeout now fail instead.
Fixes: #40808
---------
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
The enum variant `ExportedKey::Raw(Vec<u8>)` is actually used when a key
is exported in "raw", "spki" or "pkcs8" format. Naming it as `Raw` could
be confusing.
This patch renames `ExportedKey::Raw` to `ExportedKey::Bytes`.
Testing: No behavioral change. Existing tests suffice.
Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>