This is a preparation for publishing to crates.io. Changes include:
- Add `servo-` prefixes to avoid name collisions on crates.io
- Use `-` instead of `_` in package names.
- Rename the crates to their original names in Cargo.toml,
to keep the diff minimal
- Rename `media` to `servo-media-thread` to avoid name collision with
`servo-media` (originally from the media repository).
This is an outcome of the previous discussion at [#general > Switch
remaining git dependencies to
crates.io](https://servo.zulipchat.com/#narrow/channel/263398-general/topic/Switch.20remaining.20git.20dependencies.20to.20crates.2Eio/with/576336288)
Testing: This should be mostly covered by our CI, but some amount of
breakage is to be expected, since some package names could still be
referenced from scripts which are not tested or run in CI. [mach try
run](https://github.com/jschwe/servo/actions/runs/22502945949)
---------
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
Following the convention of other major UAs of gating the virtual
keyboard by certain user activation, adding a flags to let the embedder
knows about the user activation. This would be used to determine whether
the virtual keyboard needs to be shown or not in android and ohos.
Testing: Manual testing.
---------
Signed-off-by: Jo Steven Novaryo <steven.novaryo@gmail.com>
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
Bumps [ohos-abilitykit-sys](https://github.com/openharmony-rs/ohos-sys)
from 0.1.4 to 0.1.5.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/openharmony-rs/ohos-sys/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 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>
That way, we correctly run it whenever we invoke WPT. This is relevant
for wpt.fyi, where currently we are not seeing any test coverage in the
`/editing` tests. To make tracking of progress possible, it should be
defined in prefs, not in the `.ini` configuration.
Part of #25005
Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
Previously we listened to 0.0.0.0. which means any connection coming to
a specific port. That seems a bit ill advised as not everybody has a
good firewall setup. Now we default listen only on 127.0.0.1 but
optionally can describe a full SocketAddr such as "192.168.1.23:1234".
Side note: Cleaned up the ipc-channel syntax.
Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
Testing: Currently we don't have an automatic way to test this. Manually
run devtools and it connects.
---------
Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
Whenever I open Servoshell and reload, I want to hit F5. Alas it does
nothing.
Now it will.
Testing: This level of functionality in servoshell is not tested at the
moment.
---------
Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
No longer allow showing two context menus as once. Instead only allow a
single context menu at a time. Multiple context menus cause issues with
egui, so it's quite likely that this will cause issues with even more
embedders. This fixes an issue where egui draws scary runtime errors all
over servoshell when opening multiple context menus.
Testing: This changes adds a new WebView API test.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Similar to about:config from firefox. All preferences are editable;
editing them mid-runtime is not guaranteed to cause any effects. This is
separate from servo:preferences, which selectively groups and exposes
preferences. This probably would become more useful if/when preferences
become persistent.
<img width="1136" height="880" alt="Screenshot 2025-10-31 at 10 19
57 PM"
src="https://github.com/user-attachments/assets/2ef759d8-06a4-457f-b9df-331cc3525338"
/>
Followup work:
- Remove `getStringPreference`, `getIntPreference`, and
`getBoolPreference`. Using `getPreference` and `preferenceType` is more
flexible.
- Make more of these config options work on the fly.
- Allow for reverting config options.
---------
Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
`start_trace_ex` includes not only name, but fields and values of the
trace
Testing: I've passed LargestContentfulPaint pref and got it in the
hitrace.
---------
Signed-off-by: jane <5373400+janeoa@users.noreply.github.com>
When doing event handling on desktop servoshell, ensure that
`WindowEvent::Focused(true)` is forwarded to egui. This makes it so that
egui knows to show the text cursor in the URL bar input field.
Testing: We currently do not have a way to test visual behavior at this
level of servoshell.
Fixes: #42091.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
The patch adds the following functionality to the per-WebView
`UserContentManager` API.
- Removing a `UserScript` at that was previously added.
- Adding a new `UserStyleSheet` representing a user-origin style sheet.
allow removing user script
- Removing a previously added `UserStyleSheet`.
There might be scope for some improvements in the API:
- `UserScript` and `UserStyleSheet` have different ways of representing
the source location - a `PathBuf` and `Url` respectively. This is due to
how those values are used by the underlying evaluation APIs in script
and stylo. More investigation is needed here and could be addressed in
future patches.
Testing: New unit tests are added for the user stylesheet APIs. Existing
tests have been updated to test the removal of user scripts.
Bumps [bpaf](https://github.com/pacak/bpaf) from 0.9.22 to 0.9.23.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/pacak/bpaf/blob/master/Changelog.md">bpaf's
changelog</a>.</em></p>
<blockquote>
<h2>bpaf [0.9.23], bpaf_derive [0.5.23] - 2026-02-03</h2>
<ul>
<li>code produced by derive macro is now won't trigger missing-docs
lint</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/pacak/bpaf/commits/v0.9.23">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 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>
This adds a `cfg` to servo that uses the llvm profile-runtime function
for writing the coverage file to disk.
When the webdriver shuts down we should make sure to write the
llvm_coverage file. This is only required on platforms like android or
ohos, where there is no real exiting of the process, so we need to
manually dump the profile to disk.
See also https://clang.llvm.org/docs/SourceBasedCodeCoverage.html
Testing: Tested '/mach build -r --coverage && ./mach test-wpt -r
--coverage' and there do not seem any parsing errors anymore.
Fixes: https://github.com/servo/servo/issues/40942
---------
Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
This version bump is a bit delayed, since I forgot to open the PR before
FOSDEM. The actual release will thus likely not be based on this commit,
but backported to the release branch, to stay in sync with our monthly
report.
There still has been no resolution on the `0.1` version bump situation,
hence another bump of the patch version.
Testing: Not required
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
This switches FileManager from being behind an Arc<Mutex<FileManager>>>
to just FileManager.
This saves us the Arc and Mutex and the compiler makes sure that we do
not have Race Conditions.
FileManager is already easily cloneable because it consist of store:
Arc<> and GenericEmbedderProxy.
Testing: Compilation and unit tests are the tests.
Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
*Describe the changes that this pull request makes here. This will be
the commit message.*
Move stream file to script/dom/stream
part of https://github.com/servo/servo/issues/38901
Testing: *Describe how this pull request is tested or why it doesn't
require tests*
Fixes: *Link to an issue this pull requests fixes or remove this line if
there is no issue*
---------
Signed-off-by: hyuraku <32809703+hyuraku@users.noreply.github.com>
Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
Co-authored-by: Taym Haddadi <haddadi.taym@gmail.com>
This change finishes the big rename associated with the old
`compositing` crates. Long ago, these crates managed a compositor, like
you might find in a traditional web engine. These days, compositing is
done in WebRender so the name has stopped making much sense. Various
structs inside the crates have already been renamed and this is the
final big change necessary for the rename
Testing: This is just a rename so existing tests should cover it.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Clicking on the WebView should move focus from the egui interface to the
WebView, so that any subsequent keyboard events are sent there.
Testing: We do not have tests for this layer of servoshell and these
kind of
interactions are difficult to test without a live test runner.
Fixes: #42073Fixes: #41681
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
The test harness attempts to reset preferences to default values when
running a test in which previously-set preferences are no longer set.
This leads to confusing interactions with any preference customizations
that are present, such as `--pref whatever` or `--prefs-file
something.json`, which are not considered when calculating the default.
This PR changes that: whatever preference values are present when the
webdriver server starts is treated as the default value.
Testing: This is a servo-specific webdriver extension, and we're fixing
an interaction with the test harness. I don't see another way to test
this besides observing the impact on our test results.
Fixes: #42043
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
Bumps [bpaf](https://github.com/pacak/bpaf) from 0.9.20 to 0.9.21.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/pacak/bpaf/blob/master/Changelog.md">bpaf's
changelog</a>.</em></p>
<blockquote>
<h2>bpaf [0.9.21], bpaf_derive [0.5.21] - 2026-01-15</h2>
<ul>
<li>Documentation fixes</li>
<li>minor derive macro improvements</li>
<li>MSRV is now 1.60</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="e47b375599"><code>e47b375</code></a>
Merge pull request <a
href="https://redirect.github.com/pacak/bpaf/issues/436">#436</a> from
pacak/rc-0.9.21</li>
<li><a
href="058e815f90"><code>058e815</code></a>
Release 0.9.21</li>
<li><a
href="53d1774de6"><code>53d1774</code></a>
Merge pull request <a
href="https://redirect.github.com/pacak/bpaf/issues/435">#435</a> from
unvalley/fix-quick-start-command</li>
<li><a
href="ab3a2431ae"><code>ab3a243</code></a>
chore: fix quick start cargo add command</li>
<li><a
href="5aef3d7def"><code>5aef3d7</code></a>
Merge pull request <a
href="https://redirect.github.com/pacak/bpaf/issues/433">#433</a> from
lu-zero/fix-warning</li>
<li><a
href="81ef625300"><code>81ef625</code></a>
Fix a remaining warning</li>
<li><a
href="26d34cfaaa"><code>26d34cf</code></a>
Merge pull request <a
href="https://redirect.github.com/pacak/bpaf/issues/432">#432</a> from
lu-zero/suppress-lint</li>
<li><a
href="b19d93183a"><code>b19d931</code></a>
Suppress enum_variant_names</li>
<li><a
href="3b0fba8ab6"><code>3b0fba8</code></a>
Merge pull request <a
href="https://redirect.github.com/pacak/bpaf/issues/431">#431</a> from
lu-zero/more-clippy-lints-addressed</li>
<li><a
href="f57a714f25"><code>f57a714</code></a>
Address more clippy lints</li>
<li>Additional commits viewable in <a
href="https://github.com/pacak/bpaf/compare/v0.9.20...v0.9.21">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>
We can start initializing servo without needing to wait for the
creation of a window.
This allows us to perform initialization of servo itself,
concurrently to the app UI thread setting up the app UI.
Once the native window is ready, we can then let servo create
the first window and load the initial URL.
This is also interesting in the context of using servo as a
webview library, where loading the library / initialising the
webview and loading the first url are typically decoupled
steps.
Note: on the android port the Java code is not touched, which means that
we effectively still
perform the initialization at the same point in time on android.
The change to call the base servo initialiation from the Java app, can
be done in a seperate PR, perhaps by someone more familiar with android
than me.
Follow-up PRs will add multi-window support, which means that some of
the multi-webview related code in this PR has open todos,
which will be addressed by follow-ups.
Testing: The ohos-port is tested in CI, the android port was manually
tested by me.
---------
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
Bumps [gilrs](https://gitlab.com/gilrs-project/gilrs) from 0.11.0 to
0.11.1.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://gitlab.com/gilrs-project/gilrs/commits/master">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>
There is currently no way to disable canvas on the whole in Servo, so
one canvas backend must be enabled for the build to succeed. Currently,
the Vello GPU backend is much slower than the CPU backend, as it
downloads pixels to CPU memory before reuploading them and displaying
them. Fixing that requires allowing rendering Vello GPU contents to a
OpenGL texture or some kind of surface that can be represented by an
OpenGL texture during display.
Historically, the approach that other browsers have taken with regard to
GPU canvas is that CPU canvas is used as a fallback until the GPU
version can be counted on to be reliably faster. I think that Servo
should take the same approach. We should always expose a CPU version of
canvas and a GPU version. Embedders should not care about how these are
implemented, just that they work as expected and perform well.
Testing: This change just adjusts the build configuration option, so no
tests are necessary.
Fixes: #40779
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Follow-up to #41823.
Now that we always execute JS with callback, we can safely remove the
obsolete sync script handler.
- Rename `ExecuteAsyncScript` to `ExecuteScriptWithCallback`
- Remove `ExecuteScript` related logic.
- Rewrite async callback wrapper to simplify things.
Testing: I expect no change in behaviour. See if WPT tests agree with
it.
---------
Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
Instead of having `HeadedWindow`-specific methods here, just expose a
way to access the concrete type of a window. This is also exposed for
embedded ports and unused. They will use it in an upcoming change.
Testing: This shouldn't change behavior and is thus covered by existing
tests.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Small addition of "on_event" for HiTrace
When using the tracing-perfetto backend, servo did trace
LargestContentfullPaint, (LCP) but when using hitrace, the traces lacked
the LCP. This was due to the tracing subscriber implementation not
handling tracing-rs events.
More on `on_event` can be found here:
https://docs.rs/tracing-subscriber/latest/tracing_subscriber/layer/trait.Layer.html#method.on_event
Testing: manually tested by adding and removing
`--psn=--pref=largest_contentful_paint_enabled=true`
---------
Signed-off-by: jane <5373400+janeoa@users.noreply.github.com>
With this we stop exporting ipc-channel in libservo and switch to
GenericChannel/GenericCallback.
Testing: Generic Channels are tested all over the place.
---------
Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
Rather than this catch-all (which I copy-pasted from a usage where I
should have introduced a specific enum value), we now should always use
one of the enum values. If one does not exist, then it should be added
as such.
Follow-up for #36434
Testing: it builds
Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
With keep-alive requests implemented, this feature is now fully working.
Some tests still fail on
header parsing, which is #36801Fixes#38302
Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
Changed most #[allow]s to #[expect]s, mainly for
clippy::too_many_arguments
Removed unfulfilled expectations
This is my first opensource contribution, so please let me know if
anything should
be done differently.
Testing: Refactor
Part of: #40838
---------
Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
Signed-off-by: TimurBora <timurborisov5561@gmail.com>
Co-authored-by: Tim van der Lippe <TimvdLippe@users.noreply.github.com>
Replace `allow` with `expect` lints for `unused`, `unsafe_code`,
`dead_code`, and `non_upper_case_globals`.
Testing: So far just check it compiled on `x86_64-linux` on NixOS. Need
to use the module `system.fontconfig.enable = true;` I think in my NixOS
config.
Part of: #40383
Searching `allow\(.*\)` for `.rs` files shows the following. for
(total_results:total_files) went from `707:386` to `675:368`, a
reduction of `32:18`.
How many files is too many files per PR? I feel like the 20-30 I have is
too big.
---------
Signed-off-by: Wayne Van Son <waynevanson@gmail.com>
Bumps [ohos-ime](https://github.com/openharmony-rs/ohos-ime) from 0.4.0
to 0.4.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/openharmony-rs/ohos-ime/releases">ohos-ime's
releases</a>.</em></p>
<blockquote>
<h2>v0.4.1</h2>
<h2>What's Changed</h2>
<ul>
<li>Fix warning in get_left_text_of_cursor by <a
href="https://github.com/jschwe"><code>@jschwe</code></a> in <a
href="https://redirect.github.com/openharmony-rs/ohos-ime/pull/8">openharmony-rs/ohos-ime#8</a></li>
<li>Add support for keyboard status change by <a
href="https://github.com/jschwe"><code>@jschwe</code></a> in <a
href="https://redirect.github.com/openharmony-rs/ohos-ime/pull/9">openharmony-rs/ohos-ime#9</a></li>
<li>dispatcher: Remove duplicated code by <a
href="https://github.com/jschwe"><code>@jschwe</code></a> in <a
href="https://redirect.github.com/openharmony-rs/ohos-ime/pull/10">openharmony-rs/ohos-ime#10</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/openharmony-rs/ohos-ime/compare/v0.4.0...v0.4.1">https://github.com/openharmony-rs/ohos-ime/compare/v0.4.0...v0.4.1</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/openharmony-rs/ohos-ime/blob/main/CHANGELOG.md">ohos-ime's
changelog</a>.</em></p>
<blockquote>
<h2>v0.4.1</h2>
<ul>
<li>Update <code>Ime</code> trait with
<code>keyboard_status_changed()</code>, which is called when the
keyboard status changes.
A default implementation is provided, so this is not a breaking
change.</li>
<li>Fix a warning in get_left_text_of_cursor().</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="9dda33323b"><code>9dda333</code></a>
Bump version to 0.4.1</li>
<li><a
href="0c19a0bf7f"><code>0c19a0b</code></a>
Minor dispatcher refactor</li>
<li><a
href="4e1c13fda1"><code>4e1c13f</code></a>
Add support for keyboard status change</li>
<li><a
href="38dca19577"><code>38dca19</code></a>
Fix warning in get_left_text_of_cursor</li>
<li>See full diff in <a
href="https://github.com/openharmony-rs/ohos-ime/compare/v0.4.0...v0.4.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>
Refactor the code out of the lambda and move it into a dedicated
function. This is a first step towards untangling initialization and
window creation (see #41532 )
Testing: No functionality change, covered by existing tests
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
- The helper method now accepts args without the binary name. This
allows us to remove the injection of servo / servoshell in the tests and
on android / ohos.
- Allow parsing str slices, instead of requiring Vec<String>. This
allows removing unnecessary conversions / allocations.
Testing: Covered by existing unit, integration and wpt tests, which pass
commandline arguments.
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
This change moves the `UserContentManager` abstraction from the
`ServoBuilder` to `WebViewBuilder` so that embedders can inject content
for each `WebView` independently. It also adds basic support for runtime
mutations to the `UserContentManager` API. Only adding new scripts is
currently supported, but future changes will add support for both other
mutations such as removal of scripts and addition & removal of
stylesheets. Future changes could also optimize the way mutations are
propagated to `ScriptThread`s by sending just the "delta" rather than
the whole `UserContents` structure for each mutation.
The `UserContentManager` now becomes just a convenient handle for the
embedders to invoke the mutation API while the actual management of the
manager's content is handled by the Constellation. The mutations are
relayed to the constellation via messages. The change also separates the
serialized version containg the user contents into a new `UserContent`
structure so that the API cannot be misused.
Testing: New unit tests have been added for the different scenarios
involving UserContentManager.
---------
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
Put the Gamepad API and its supporting infrastructure behind a `gamepad`
feature flag. This allows embedders to opt-out of gamepad support at
compile time to save on binary size and reduce dependencies.
Testing:
1. `./mach build -d` (Gamepad enabled by default)
2. `cargo build -p servoshell --no-default-features --features
"libservo/clipboard,js_jit,max_log_level,webgpu"` (Gamepad Disabled)
3. `cargo build -p servoshell --features "gamepad,webxr,..."` (Gamepad &
WebXR Enabled)
Fixes: #40897
Signed-off-by: WaterWhisperer <waterwhisperer24@qq.com>
There are two bugs listed below. Basically, we never ever set
1b0bd11e11/ports/servoshell/running_app_state.rs (L253-L255)
except by WebDriver command, so it's always been `None`.
This PR lets `WindowEvent::Focused` determine `focused_window` for
`HeadedWindow`.
For those without `winit::Window`, such as
Android/OHOS/`HeadlessWindow`, the newly created window is automatically
focused.
Fixes: #41398Fixes: #41399
---------
Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
It's pretty confusing that these two struct implementations of
`PlatformWindow` are named the same thing. This PR renames them to more
accurately reflect what they are.
Testing: This PR just does a simple rename so existing tests should
suffice.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
- Use the generic channel for webdriver.
- Implement try_receive_timeout for GenericReceiver.
Testing: WPT should still work.
---------
Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
Route console messages through the embedding API instead of printing
directly, giving embedders control over console output handling.
Testing: Should be covered by exsisting tests
Fixes: #41145
Signed-off-by: atbrakhi <atbrakhi@igalia.com>
This change addresses some inconsistencies in the way that events are
handled for `egui`. It moves event and `UserInterfaceCommand` handling
to
`ServoShellWindow` which allows sharing the implementation with the
embedded ports. In addition, moving event handling there makes it
simpler to always forward mouse events to egui dialogs when they are
open.
Fixes: #41339.
Testing: There is no real testing of this layer of servoshell, which is
why this regressed in the first place.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>