Commit graph

449 commits

Author SHA1 Message Date
dependabot[bot]
18f0d92e99
build(deps): bump the napi-ohos-related group with 4 updates (#38555)
Bumps the napi-ohos-related group with 4 updates:
[napi-derive-ohos](https://github.com/ohos-rs/ohos-rs),
[napi-ohos](https://github.com/ohos-rs/ohos-rs),
[napi-derive-backend-ohos](https://github.com/ohos-rs/ohos-rs) and
[napi-sys-ohos](https://github.com/ohos-rs/ohos-rs).

Updates `napi-derive-ohos` from 1.0.4 to 1.1.0
<details>
<summary>Commits</summary>
<ul>
<li><a
href="eaba5da8af"><code>eaba5da</code></a>
Merge pull request <a
href="https://redirect.github.com/ohos-rs/ohos-rs/issues/139">#139</a>
from ohos-rs/feat-0719</li>
<li><a
href="165538b516"><code>165538b</code></a>
fix: lint warning</li>
<li><a
href="19530e3598"><code>19530e3</code></a>
Bump version</li>
<li><a
href="ed8d46d825"><code>ed8d46d</code></a>
Merge branch 'main' into feat-0719</li>
<li><a
href="7c3dc968c1"><code>7c3dc96</code></a>
perf(napi): optimize HashMap allocation in FromNapiValue implementation
for H...</li>
<li><a
href="06a48c5e18"><code>06a48c5</code></a>
Merge branch 'main' into feat-0719</li>
<li><a
href="9f0dc581be"><code>9f0dc58</code></a>
chore(release): publish</li>
<li><a
href="cf6d8b0334"><code>cf6d8b0</code></a>
fix(cli): rename options (<a
href="https://redirect.github.com/ohos-rs/ohos-rs/issues/2804">#2804</a>)</li>
<li><a
href="5816924e6e"><code>5816924</code></a>
chore(release): publish</li>
<li><a
href="c6cf127e7e"><code>c6cf127</code></a>
chore(cli): upgrade all NAPI-RS projects (<a
href="https://redirect.github.com/ohos-rs/ohos-rs/issues/2803">#2803</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/ohos-rs/ohos-rs/compare/ohrs@1.0.4...ohrs@1.1.0">compare
view</a></li>
</ul>
</details>
<br />

Updates `napi-ohos` from 1.0.4 to 1.1.0
<details>
<summary>Commits</summary>
<ul>
<li><a
href="eaba5da8af"><code>eaba5da</code></a>
Merge pull request <a
href="https://redirect.github.com/ohos-rs/ohos-rs/issues/139">#139</a>
from ohos-rs/feat-0719</li>
<li><a
href="165538b516"><code>165538b</code></a>
fix: lint warning</li>
<li><a
href="19530e3598"><code>19530e3</code></a>
Bump version</li>
<li><a
href="ed8d46d825"><code>ed8d46d</code></a>
Merge branch 'main' into feat-0719</li>
<li><a
href="7c3dc968c1"><code>7c3dc96</code></a>
perf(napi): optimize HashMap allocation in FromNapiValue implementation
for H...</li>
<li><a
href="06a48c5e18"><code>06a48c5</code></a>
Merge branch 'main' into feat-0719</li>
<li><a
href="9f0dc581be"><code>9f0dc58</code></a>
chore(release): publish</li>
<li><a
href="cf6d8b0334"><code>cf6d8b0</code></a>
fix(cli): rename options (<a
href="https://redirect.github.com/ohos-rs/ohos-rs/issues/2804">#2804</a>)</li>
<li><a
href="5816924e6e"><code>5816924</code></a>
chore(release): publish</li>
<li><a
href="c6cf127e7e"><code>c6cf127</code></a>
chore(cli): upgrade all NAPI-RS projects (<a
href="https://redirect.github.com/ohos-rs/ohos-rs/issues/2803">#2803</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/ohos-rs/ohos-rs/compare/ohrs@1.0.4...ohrs@1.1.0">compare
view</a></li>
</ul>
</details>
<br />

Updates `napi-derive-backend-ohos` from 1.0.4 to 1.1.0
<details>
<summary>Commits</summary>
<ul>
<li><a
href="eaba5da8af"><code>eaba5da</code></a>
Merge pull request <a
href="https://redirect.github.com/ohos-rs/ohos-rs/issues/139">#139</a>
from ohos-rs/feat-0719</li>
<li><a
href="165538b516"><code>165538b</code></a>
fix: lint warning</li>
<li><a
href="19530e3598"><code>19530e3</code></a>
Bump version</li>
<li><a
href="ed8d46d825"><code>ed8d46d</code></a>
Merge branch 'main' into feat-0719</li>
<li><a
href="7c3dc968c1"><code>7c3dc96</code></a>
perf(napi): optimize HashMap allocation in FromNapiValue implementation
for H...</li>
<li><a
href="06a48c5e18"><code>06a48c5</code></a>
Merge branch 'main' into feat-0719</li>
<li><a
href="9f0dc581be"><code>9f0dc58</code></a>
chore(release): publish</li>
<li><a
href="cf6d8b0334"><code>cf6d8b0</code></a>
fix(cli): rename options (<a
href="https://redirect.github.com/ohos-rs/ohos-rs/issues/2804">#2804</a>)</li>
<li><a
href="5816924e6e"><code>5816924</code></a>
chore(release): publish</li>
<li><a
href="c6cf127e7e"><code>c6cf127</code></a>
chore(cli): upgrade all NAPI-RS projects (<a
href="https://redirect.github.com/ohos-rs/ohos-rs/issues/2803">#2803</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/ohos-rs/ohos-rs/compare/ohrs@1.0.4...ohrs@1.1.0">compare
view</a></li>
</ul>
</details>
<br />

Updates `napi-sys-ohos` from 1.0.4 to 1.1.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/ohos-rs/ohos-rs/releases">napi-sys-ohos's
releases</a>.</em></p>
<blockquote>
<h2>ohrs@1.1.0</h2>
<h2>What's Changed</h2>
<ul>
<li>feat: allow build and artifact skip libs logic by <a
href="https://github.com/richerfu"><code>@​richerfu</code></a> in <a
href="https://redirect.github.com/ohos-rs/ohos-rs/pull/119">ohos-rs/ohos-rs#119</a></li>
<li>fix: remove ArkRuntime Send and Sync implenment by <a
href="https://github.com/richerfu"><code>@​richerfu</code></a> in <a
href="https://redirect.github.com/ohos-rs/ohos-rs/pull/120">ohos-rs/ohos-rs#120</a></li>
<li>feat 0306 by <a
href="https://github.com/richerfu"><code>@​richerfu</code></a> in <a
href="https://redirect.github.com/ohos-rs/ohos-rs/pull/121">ohos-rs/ohos-rs#121</a></li>
<li>feat: add export default for template by <a
href="https://github.com/richerfu"><code>@​richerfu</code></a> in <a
href="https://redirect.github.com/ohos-rs/ohos-rs/pull/128">ohos-rs/ohos-rs#128</a></li>
<li>fix: should ignore some path and convert path to absolute path by <a
href="https://github.com/richerfu"><code>@​richerfu</code></a> in <a
href="https://redirect.github.com/ohos-rs/ohos-rs/pull/129">ohos-rs/ohos-rs#129</a></li>
<li>Merge code by <a
href="https://github.com/richerfu"><code>@​richerfu</code></a> in <a
href="https://redirect.github.com/ohos-rs/ohos-rs/pull/133">ohos-rs/ohos-rs#133</a></li>
<li>feat: add vscode setting by default by <a
href="https://github.com/richerfu"><code>@​richerfu</code></a> in <a
href="https://redirect.github.com/ohos-rs/ohos-rs/pull/134">ohos-rs/ohos-rs#134</a></li>
<li>feat(cli): support dtsCache flag by <a
href="https://github.com/richerfu"><code>@​richerfu</code></a> in <a
href="https://redirect.github.com/ohos-rs/ohos-rs/pull/135">ohos-rs/ohos-rs#135</a></li>
<li>feat: Sync napi-rs by <a
href="https://github.com/richerfu"><code>@​richerfu</code></a> in <a
href="https://redirect.github.com/ohos-rs/ohos-rs/pull/139">ohos-rs/ohos-rs#139</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/ohos-rs/ohos-rs/compare/ohrs@1.0.4...ohrs@1.1.0">https://github.com/ohos-rs/ohos-rs/compare/ohrs@1.0.4...ohrs@1.1.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="eaba5da8af"><code>eaba5da</code></a>
Merge pull request <a
href="https://redirect.github.com/ohos-rs/ohos-rs/issues/139">#139</a>
from ohos-rs/feat-0719</li>
<li><a
href="165538b516"><code>165538b</code></a>
fix: lint warning</li>
<li><a
href="19530e3598"><code>19530e3</code></a>
Bump version</li>
<li><a
href="ed8d46d825"><code>ed8d46d</code></a>
Merge branch 'main' into feat-0719</li>
<li><a
href="7c3dc968c1"><code>7c3dc96</code></a>
perf(napi): optimize HashMap allocation in FromNapiValue implementation
for H...</li>
<li><a
href="06a48c5e18"><code>06a48c5</code></a>
Merge branch 'main' into feat-0719</li>
<li><a
href="9f0dc581be"><code>9f0dc58</code></a>
chore(release): publish</li>
<li><a
href="cf6d8b0334"><code>cf6d8b0</code></a>
fix(cli): rename options (<a
href="https://redirect.github.com/ohos-rs/ohos-rs/issues/2804">#2804</a>)</li>
<li><a
href="5816924e6e"><code>5816924</code></a>
chore(release): publish</li>
<li><a
href="c6cf127e7e"><code>c6cf127</code></a>
chore(cli): upgrade all NAPI-RS projects (<a
href="https://redirect.github.com/ohos-rs/ohos-rs/issues/2803">#2803</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/ohos-rs/ohos-rs/compare/ohrs@1.0.4...ohrs@1.1.0">compare
view</a></li>
</ul>
</details>
<br />


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: Jonathan Schwender <schwenderjonathan@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2025-08-13 12:52:00 +00:00
Jonathan Schwender
d0d952d1fa
build(deps): bump nix from 0.29.0 to 0.30.1 (#38650)
Bumps [nix](https://github.com/nix-rust/nix) from 0.29.0 to 0.30.1.
- [Changelog](https://github.com/nix-rust/nix/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nix-rust/nix/compare/v0.29.0...v0.30.1)

Closes: #38145
Testing: Covered by existing tests

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2025-08-13 09:51:40 +00:00
Euclid Ye
6029976365
webdriver: Synchronize "close window" command & Return correct error type (#38620)
1. Synchronize [Close
Window](https://w3c.github.io/webdriver/#dfn-close-window) command to
reduce intermittency
2. There was a update last month exposing that we are not returning
correct error type for Session getter.
https://github.com/web-platform-tests/wpt/pull/53735
3. Other trivial fix

Testing: 
- `/webdriver/tests/classic/close_window/close.py` can now fully pass.
- `/webdriver/tests/classic/delete_session/*` can now fully pass.

---------

Signed-off-by: Euclid Ye <euclid.ye@huawei.com>
2025-08-13 04:06:39 +00:00
Abdelrahman Hossam
2e2bfc6067
Basic webdriver support to servoshell on ohos (#38386)
Adding basic webdriver support to servoshell on ohos and basic
communication between the ohos device and script.

Testing: Manual testing and tracing logs

Signed-off-by: abdelrahman1234567 <abdelrahman.hossameldin.awadalla@huawei.com>
2025-08-12 06:26:53 +00:00
Martin Robinson
b75c3feb97
script/compositor: Send mouseleave events when cursor moves between <iframe>s (#38539)
Properly send `mouseleave` events when the cursor moves between
`<iframe>`s. This allows a better handling of cursor changes and status
text updates. Specifically, we do not need to continuously update the
cursor and the value can be cached in the `Document`. In addition,
status updates can now be sent properly when moving focus between
`<iframe>`s.

Note that style updates for `:hover` values are still broken, but less
so than before. Now the hover state on the `Node` is updated, but for
some
reason the restyle isn't taking place properly. This maintains the
status quo as far as behavior goes when hover moves between `<iframe>`s.

This change also adds a helper data structure to `Document` which will
eventually be responsible for event handling.

Testing: Cursor and status change are currently very hard to test as
the API test harness makes this difficult at the moment.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
2025-08-11 12:31:54 +00:00
Mukilan Thiyagarajan
4c05758ded
script: support inline SVG by serializing the subtree (#38188)
This patch adds support for rendering static inline SVG documents in the
DOM tree by serializing the SVGElement's subtree and leveraging the
existing resvg based SVG stack for rendering. Serialiing the subtree is
necessary as resvg's tree representation (roxmltree) is immutable, so we
can't construct the tree incrementally.

Few other design choices here:
1. The `SVGSVGElement` is now treated as a replaced element and the
   layout code is responsible for plumbing the serialized SVG source
   (encoded as a base64 data: url) into the image cache, much like how
   background images are handled.
2. The serialization is done on the script thread after an initial
   layout pass. This is necessary because the serialization code asserts
that it is invoked from script thread i.e we can't call it from layout
   workers.
3. The serialized SVG data: url is cached to avoid recomputing it on
   subsequent layouts. The cache is invalidated when the SVGSVGElement's
   subtree is mutated.

The original SVGSVGElement code was behind the `dom_svg_enabled` pref.
This patch also removes the preference and make SVG support using resvg
available unconditionally.

Below is the analysis of the new test failures:

These tests use inline SVG but used to pass by accident.
They now fail because they contain SVG with no intrinsic
sizing which is not handled by resvg in a way that would
allows us to distinguish it from the sized case. The same
limitation applies to non-inline SVG.

 - /css/CSS2/positioning/absolute-replaced-width-003a.xht
 - /css/CSS2/positioning/absolute-replaced-width-003b.xht
 - /css/CSS2/positioning/absolute-replaced-width-003c.xht

These tests employ CSS styles in the HTML that
target the elements in inline SVG, which is not currently
supported.

-
/css/compositing/mix-blend-mode/mix-blend-mode-plus-lighter-svg-basic.html
 - /css/compositing/mix-blend-mode/mix-blend-mode-plus-lighter-svg.html

This is a tentative test that uses the unsupported 'border-shape' CSS
property. The ref uses SVG, so it used to pass accidentally. The ref
still doesn't render correctly since it also relies on styling SVG
elements using CSS classes in the HTML (instead of inline in SVG).

 - /css/css-borders/tentative/border-shape/border-shape-stroke.html

These tests use the attribute 'clip-path=circle(...)' in the
test, but this doesn't seem to work in resvg.

 - /css/css-masking/clip-path/clip-path-borderBox-1b.html
 - /css/css-masking/clip-path/clip-path-contentBox-1b.html
 - /css/css-masking/clip-path/clip-path-contentBox-1c.html
 - /css/css-masking/clip-path/clip-path-fillBox-1b.html
 - /css/css-masking/clip-path/clip-path-marginBox-1a.html
 - /css/css-masking/clip-path/clip-path-paddingBox-1b.html
 - /css/css-masking/clip-path/clip-path-strokeBox-1b.html
 - /css/css-masking/clip-path/clip-path-strokeBox-1c.html
 - /css/css-masking/clip-path/clip-path-viewBox-1a.html
 - /css/css-masking/clip-path/clip-path-viewBox-1b.html
 - /css/css-masking/clip-path/clip-path-viewBox-1d.html
 - /css/css-masking/clip-path/svg-clip-path-circle-offset.html
 - /css/css-masking/clip-path/svg-clip-path-ellipse-offset.html

Additionally, the below two tests use a `foreignObject` SVG element
which
embeds a html div fragment. This is also not supported by resvg.

 - /css/css-masking/clip-path/clip-path-viewBox-1d.html
 - /css/css-masking/clip-path/clip-path-fillBox-1b.html

The following test fails because of apparent pixel differences
between a circle rendered purely using CSS clip-path vs a circle
rendered in SVG using resvg.

 - /css/css-masking/clip-path/clip-path-contentBox-1c.html

These tests style the inline SVG elements using CSS in the HTML or
separate stylesheet. This is not supported by this implementation.

 - /css-transforms/document-styles/svg-document-styles-{001..004}.html
 - /css-transforms/document-styles/svg-document-styles-012.html
 - /css-transforms/external-styles/svg-external-styles-{001..004}.html
 - /css-transforms/external-styles/svg-external-styles-014.html

These tests seem like they should pass, but they fail because of what
seems like an anti-aliasing issue in the rendering engine. The
transformed element has a thin outline which is causing pixel difference
with the ref:

 - /css/css-transforms/group/svg-transform-group-008.html
 - /css/css-transforms/group/svg-transform-group-009.html
 - /css/css-transforms/group/svg-transform-nested-009.html
 - /css/css-transforms/group/svg-transform-nested-013.html
 - /css/css-transforms/group/svg-transform-nested-014.html
 - /css/css-transforms/group/svg-transform-nested-018.html
 - /css/css-transforms/group/svg-transform-nested-019.html
 - /css/css-transforms/group/svg-transform-nested-008.html

The below tests fail because resvg is calculating the wrong size for the
'rect' inside the SVG. The dimensions of the SVG are established via the
CSS in the HTML, so it seems resvg is using incorrect coordinates for
the children of the svg when explict width/height are not specified in
the root svg element.

 - /css/css-transforms/group/svg-transform-group-011.html
 - /css/css-transforms/group/svg-transform-nested-021.html
 - /css/css-transforms/group/svg-transform-nested-029.html

All these tests use an SVG that doesn't have width nor height attributes
and this causes resvg to use incorrect coordinates for the SVG's
children. In addition, the following tests use the CSS syntax for
transforms inside the SVG (using style attribute) which is not supported
by resvg (it only supports the SVG 1.1 transform syntax).

 - /css/css-transforms/inline-styles/svg-inline-styles-{001..004}.html
 - /css/css-transforms/inline-styles/svg-inline-styles-012.html

In the case of these four tests, the `style` attribute specifies an
invalid transform, but resvg doesn't fallback to the transform specified
via the `transform`  attribute on the same element.

 - /css/css-transforms/inline-styles/svg-inline-styles-005.html
 - /css/css-transforms/inline-styles/svg-inline-styles-006.html
 - /css/css-transforms/inline-styles/svg-inline-styles-010.html
 - /css/css-transforms/inline-styles/svg-inline-styles-013.html

The following test fails because of the lack of width/height in SVG as
described above but it also exposes gaps in our CSS tranform
implementation.

 - /css/css-transforms/preserve3d-and-filter-with-perspective.html

These tests failure because resvg doesn't handle the SVG without
explicit width and height, but specified via CSS in the HTML. In
addition, there are pixel differences between the ref due to
antialiasing issues.

 - /css/css-transforms/matrix/svg-matrix-{005...008}.html
 - /css/css-transforms/matrix/svg-matrix-010.html
 - /css/css-transforms/matrix/svg-matrix-012.html
 - /css/css-transforms/matrix/svg-matrix-{015..069}.html
 - /css/css-transforms/rotate/svg-rotate-angle-45-001.html
 - /css/css-transforms/rotate/svg-rotate-angle-45-011.html
 - /css/css-transforms/rotate/svg-rotate-angle-45-022.html
 - /css/css-transforms/scale/svg-scale-006.html
 - /css/css-transforms/scale/svg-scale-007.html

These tests seem to be failing due to some sort of antialiasing issue,
where a transformed SVG element has a thin border that causes pixel
differences compared to the solid colored reference.

 - /css/css-transforms/skewX/svg-skewx-001.html
 - /css/css-transforms/skewX/svg-skewx-006.html
 - /css/css-transforms/skewX/svg-skewx-011.html
 - /css/css-transforms/skewX/svg-skewx-016.html
 - /css/css-transforms/skewX/svg-skewx-021.html
 - /css/css-transforms/skewX/svg-skewxy-001.html
 - /css/css-transforms/skewY/svg-skewy-001.html
 - /css/css-transforms/skewY/svg-skewy-006.html
 - /css/css-transforms/skewY/svg-skewy-011.html
 - /css/css-transforms/skewY/svg-skewy-016.html
 - /css/css-transforms/skewY/svg-skewy-021.html

These tests specify several SVG attributes such as transform,
vector-effect etc via CSS in the HTML (rather than inline in SVG). The
current implementation doesn't support this.

 - /css/css-transforms/transform-box/stroke-box-mutation-001.html
 - /css/css-transforms/transform-box/stroke-box-mutation-002.html
 - /css/css-transforms/transform-box/stroke-box-mutation-003.html
 - /css/css-transforms/transform-box/stroke-box-mutation-004.html
 - /css/css-transforms/transform-box/svgbox-stroke-box-002.html
 - /css/css-transforms/transform-box/svgbox-stroke-box-003.html
 - /css/css-transforms/transform-box/svgbox-stroke-box-004.html
 - /css/css-transforms/transform-box/svgbox-stroke-box-005.html

These tests depend on 'transform-origin' specified on an element inside
an SVG, but this transform is influenced by the 'tranform-box' set via
CSS in the HTML itself (not the SVG). The current implementation doesn't
support styling the SVG using document styles, so these tests just fail.

- /css/css-transforms/transform-origin/svg-origin-relative-length-*.html

These tests check the fallback behaviour when invalid syntax is
encountered in the 'transform-origin' value. resvg doesn't correctly
fallback to 0,0 causing the tests to fail.

-
/css/css-transforms/transform-origin/svg-origin-relative-length-invalid-001.html
-
/css/css-transforms/transform-origin/svg-origin-relative-length-invalid-002.html
-
/css/css-transforms/transform-origin/svg-origin-relative-length-invalid-003.html
-
/css/css-transforms/transform-origin/svg-origin-relative-length-invalid-004.html

These tests use unimplemented Canvas APIs like 'beginLayer' and
the 'CanvasFilter' constructor and hence fail at runtime.

-
/html/canvas/element/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.html
-
/html/canvas/element/filters/2d.filter.layers.gaussianBlur.tentative.html
-
/html/canvas/element/layers/2d.layer.anisotropic-blur.isotropic.tentative.html
-
/html/canvas/element/layers/2d.layer.anisotropic-blur.mostly-x.tentative.html
-
/html/canvas/element/layers/2d.layer.anisotropic-blur.mostly-y.tentative.html
-
/html/canvas/element/layers/2d.layer.anisotropic-blur.x-only.tentative.html
-
/html/canvas/element/layers/2d.layer.anisotropic-blur.y-only.tentative.html
-
/html/canvas/element/layers/2d.layer.css-filters.blur-and-shadow.tentative.html
 - /html/canvas/element/layers/2d.layer.css-filters.blur.tentative.html
- /html/canvas/element/layers/2d.layer.css-filters.shadow.tentative.html
 - /html/canvas/element/layers/2d.layer.ctm.layer-filter.tentative.html
-
/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.dropShadow.tentative.html
-
/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.html
-
/html/canvas/offscreen/filters/2d.filter.layers.dropShadow.tentative.html
-
/html/canvas/offscreen/filters/2d.filter.layers.gaussianBlur.tentative.html
-
/html/canvas/offscreen/layers/2d.layer.anisotropic-blur.isotropic.tentative.html
-
/html/canvas/offscreen/layers/2d.layer.anisotropic-blur.mostly-x.tentative.html
-
/html/canvas/offscreen/layers/2d.layer.anisotropic-blur.mostly-y.tentative.html
-
/html/canvas/offscreen/layers/2d.layer.anisotropic-blur.x-only.tentative.html
-
/html/canvas/offscreen/layers/2d.layer.anisotropic-blur.y-only.tentative.html
-
/html/canvas/offscreen/layers/2d.layer.css-filters.blur-and-shadow.tentative.html
- /html/canvas/offscreen/layers/2d.layer.css-filters.blur.tentative.html
-
/html/canvas/offscreen/layers/2d.layer.css-filters.shadow.tentative.html
- /html/canvas/offscreen/layers/2d.layer.ctm.layer-filter.tentative.html

These tests fail because resvg doesn't seem to honour the 'translate'
CSS property specified on an SVG element using an inline 'style'
attribute.

 - /css/css-transforms/translate/svg-translate-with-units.html
-
/css/css-transforms/translate/translate-and-transform-attribute-in-svg.html
-
/css/css-transforms/translate/translate-and-transform-css-property-in-svg.html
 - /css/css-transforms/translate/translate-in-svg.html

These tests seem to fail due to the filter effect implementation in
resvg either not being complete or spec compliant.

 - /css/filter-effects/feconvolve-divisor.html
 - /css/filter-effects/feconvolve-region-001.html
 - /css/filter-effects/feconvolve-region-002.html
 - /css/filter-effects/filter-subregion-01.html
 - /css/filter-effects/svg-feimage-002.html
 - /css/filter-effects/svg-feimage-003.html
 - /css/filter-effects/svg-feimage-004.html
 - /css/filter-effects/svg-feoffset-001.html

The test /css/filter-effects/svg-feimage-004.html should ideally PASS
but currently fails because we don't propagate height/width set using
CSS in HTML element to the root SVG, so resvg uses the wrong dimensions
when rendering the children of the SVG.

These failures are due to deficienies in our current implementation
i.e we don't support styling SVG elements using CSS in HTML.

-
/css/css-transforms/gradientTransform/svg-gradientTransform-combination-001.html
 - /css/selectors/sharing-in-svg-use.html

The below test fails as our current implementation relies on resvg to
tell us the intrinsic ratio of the SVG, but this doesn't always work
correctly.

 - /css/css-sizing/svg-intrinsic-size-005.html

This failure is due to lack of proper fallback to no-op transform in
resvg when the `rotate()` syntax is specified with an invalid list e.g
`rotate(90,)`.

 - /css/css-transforms/rotate/svg-rotate-3args-invalid-002.html

This test only passes in CI and based on the raw log output, it seems
that no text inside the SVG is rendered in the CI. This could be an font
stack related issue.

 - /css/css-display/display-contents-svg-elements.html

This test asserts that the CSP blocks loads triggered using `use`
elements in SVG. It used to TIMEOUT as without inline SVG support, no
CSP violation event was triggered. It fails now since the event is now
triggered for the load of the SVG itself (our current implementation
loads inline SVGs as serialized base64 data: urls). This doesn't match
the blocked URL in the use element though.

 - /content-security-policy/img-src/svg-use-blocked.tentative.html

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
2025-08-11 11:07:59 +00:00
Martin Robinson
be7625fc1e
tidy: Replace custom panic/unwrap lint with clippy lint (#38593)
This change replaces our custom `panic` / `unwrap` lint with the one
from clippy. This rule as not properly applied in servoshell, so this
change fixes some clippy errors raised by the new configuration.

Testing: This change removes the tidy tests for the custom lints, but
otherwise the behavior is tested as part of clippy itself.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2025-08-11 11:04:11 +00:00
lumiscosity
757dbc0eda
servoshell: make the color picker and select picker closeable (#38373)
Addresses the first half of #38347 by making it possible to close the
select picker and the color picker by pressing ESC or clicking off the
modal. Marking this as draft since I need some help with squashing a bug
- the "clicking off" part only triggers after moving the mouse or
pressing any key, and I'm not sure why.

Testing: Manual.
Fixes: First half of #38347.

---------

Signed-off-by: lumiscosity <averyrudelphe@gmail.com>
2025-08-06 11:49:47 +00:00
Leo Ring
bcc8314dd5
Servoshell: Update Window::inner_size on WindowEvent::Resized (fix resize bug) (#38461)
Just adds back a line that was omitted when a different commit was
reverted, see the issue for details, I've tested on Gnome Wayland with
Fedora 42 and the bug is fixed

Fixes: https://github.com/servo/servo/issues/38441
cc @yezhizhen

Signed-off-by: Leo Ring <leoring03@gmail.com>
2025-08-04 13:56:54 +00:00
Euclid Ye
f0eb6c2b97
servoshell: Sync window toolbar height with minibrowser (#38328)
Toolbar size can be changed if resized, such as entering fullscreen.
Hit-test had wrong offsets after fullscreen/resize as
`WindowEvent::CursorMoved` set wrong coordinates for
`webview_relative_mouse_point` due to outdated toolbar height.

Testing: #38297 now works properly.
Fixes: #38297

---------

Signed-off-by: Euclid Ye <euclid.ye@huawei.com>
2025-08-03 19:16:15 +00:00
Tim van der Lippe
dbb886fad2
Implement initial version of navigator.sendBeacon (#38301)
Gated behind the feature flag `dom_navigator_sendbeacon_enabled` as the
`keep-alive` fetch parameter is crucial for real-life use cases such as
analytics requests.

Part of #4577
Part of #38302

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
2025-08-02 15:14:07 +00:00
Euclid Ye
58425f6ae2
Replace all sort with unstable sort (#38427)
["When applicable, unstable sorting is preferred because it is generally
faster than stable sorting and it doesn’t allocate auxiliary
memory."](https://doc.rust-lang.org/std/vec/struct.Vec.html#method.sort)

Binary also reduced by 1KB in Release.

Testing: No behaviour change as semantically all current usage does not
have any pair with `std::cmp::Ordering::Equal`.

Signed-off-by: Euclid Ye <euclid.ye@huawei.com>
2025-08-02 12:41:03 +00:00
Euclid Ye
625d636b04
compositor: Add more doc for size of different RenderingContext implementation (#38399)
For more details, see
https://github.com/servo/servo/issues/38369#issuecomment-3138378527.

Fixes:
https://github.com/servo/servo/issues/38369#issuecomment-3138458772
Testing: Just adding docs.

Signed-off-by: Euclid Ye <euclid.ye@huawei.com>
2025-08-01 09:07:32 +00:00
Kenzie Raditya Tirtarahardja
05ad9026f5
cargo: Upgrade keyboard-types to 0.8.0 and xcomponent-sys to 0.3.4 (#38375)
With some adjustment for `NamedKey`. The two crates need to be bumped
together to avoid duplicate of `keyboard-types` action.

---------

Signed-off-by: PotatoCP <Kenzie.Raditya.Tirtarahardja@huawei.com>
2025-08-01 08:14:38 +00:00
Euclid Ye
d38781d71d
servoshell: Revert #38307 to fix resize bug (#38381)
Also added some comments to make things clear.
For details, see
https://github.com/servo/servo/issues/38369#issuecomment-3138378527

Testing: Tested on X11 Ubuntu, Wayland Ubuntu, macOS, Windows.
Fixes: #38369

Co-authored-by: minghuaw <michael.wu1107@gmail.com>

---------

Signed-off-by: Euclid Ye <euclid.ye@huawei.com>
Co-authored-by: minghuaw <michael.wu1107@gmail.com>
2025-07-31 08:55:00 +00:00
shuppy
c09e117bfe
script: Create a debugger script for the SpiderMonkey Debugger API (#38331)
to use the [SpiderMonkey Debugger
API](https://firefox-source-docs.mozilla.org/js/Debugger/), we need to
call it from an internal debugger script that we will supply. this
script must run in the same runtime as the debuggee(s), but in a
separate
[compartment](https://udn.realityripple.com/docs/Mozilla/Projects/SpiderMonkey/Compartments)
([more
details](https://hacks.mozilla.org/2020/03/future-proofing-firefoxs-javascript-debugger-implementation/)).

this patch defines a new DebuggerGlobalScope type and a new debugger
script resource. when creating each script thread, we create a debugger
global, load the debugger script from resources/debugger.js, and run
that script in the global to initialise the Debugger API.

subsequent patches will use the debugger script as an RPC mechanism for
the Debugger API.

Testing: no testable effects yet, but will be used in #37667
Fixes: part of #36027

---------

Signed-off-by: Delan Azabani <dazabani@igalia.com>
Co-authored-by: atbrakhi <atbrakhi@igalia.com>
2025-07-31 06:17:23 +00:00
batu_hoang
37ac4ffeb4
Rework on webdriver wait for navigation complete (#38234)
For current implementation, when a command may trigger a navigation,
webdriver only waits for document readiness state.
However, not all navigations make change in document.
This PR handles more cases for waiting for a navigation, and apply to
`element_click`.

- Before sending a command which may trigger a navigation, `webdriver`
sets `load status send` to `embedder`, `constelltation` and `script
thread` to listen to `navigation events`.
- Webdriver check if there is a navigation with `script thread`.
- If the navigation is loading a new url, webdriver checks if the
request is approved with `constellation`, then waits for document
readiness state.
- If the navigation is a hashchange, webdriver waits untill all new
generated dom events have been processed.

Testing: 
`tests/wpt/tests/webdriver/tests/classic/element_click/navigate.py`
`tests/wpt/tests/webdriver/tests/classic/element_click/user_prompts.py`
https://github.com/longvatrong111/servo/actions/runs/16488690749

cc: @xiaochengh

---------

Signed-off-by: batu_hoang <hoang.binh.trong@huawei.com>
2025-07-30 07:24:07 +00:00
Euclid Ye
8b3e7b1c6a
webdriver: Keep constellation alive and Open new top-level browsing context with new session request when none is open (#37410)
Keep Constellation alive even when all browsing context closed in
WebDriver mode. In this case, when creating a new session, we would open
a new top-level browsing context.

Fixes: #37408
Testing: `./mach test-wpt -r
.\tests\wpt\tests\webdriver\tests\classic\close_window\close.py
--product servodriver`

---------

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
Signed-off-by: Euclid Ye <euclid.ye@huawei.com>
2025-07-30 06:41:58 +00:00
Euclid Ye
a5d4c49ec6
cargo: Use workspace dependency for winit and upgrade to 0.30.12 (#38261)
Use workspace dependency to sync the `winit` version between examples &
libservo.
Upgrade winit to 0.30.12.

Fixes: The hope is lost as it doesn't fix anything..

---------

Signed-off-by: Euclid Ye <euclid.ye@huawei.com>
2025-07-29 09:45:22 +00:00
Euclid Ye
61273a4321
servoshell: Remove redundant WindowEvent::Resized handler (#38307)
They are redundant as marked in #38174 as rendering related rect already
updated in `minibrowser::update`. As a result, we are able to remove
`window_rendering_context` and `inner_size` fields from `struct Window`.

Testing: No regression/behaviour change in all tests running with headed
window.
Fixes:
https://github.com/servo/servo/issues/38255#issuecomment-3117642340

Signed-off-by: Euclid Ye <euclid.ye@huawei.com>
2025-07-29 08:44:42 +00:00
Euclid Ye
213b532712
cargo: Remove last traces of webdriver from libservo (#38314)
The feature which enables optional dependency & function is never used
and can be safely removed.

Testing: It can still builds.

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
2025-07-28 14:47:56 +00:00
sagudev
a67998b520
canvas: Gate raqote backend behind feature (enabled for now) (#38312)
We want to eventually remove raqote backend, but for now we can gate it
behind a feature (still enabled by default in servoshell) like the rest
of backends. `dom_canvas_backend=auto` will select first available
backend. Builds on top of https://github.com/servo/servo/pull/38310 to
support cases where no backend is available.

Testing: It compiles with or without feature

---------

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2025-07-28 11:54:40 +00:00
sagudev
056b1538c0
canvas: Add vello_cpu backend (#38282)
vello_cpu does not have any tests timeouts, because we do not need
download stuff from GPU as all work happens on CPU. So performance wise
it's better then classic vello at least for our usecase. There are some
vello bugs, but I think we will be able to sort them out within
upstream, eventually. Interestingly enough there are no new PASS like
they were with classic vello.

Difference with raqote can be observed here:
https://github.com/sagudev/servo/actions/runs/16549241085/attempts/1#summary-46802486798

## Known vello problems:

- https://github.com/linebender/vello/issues/1119
- https://github.com/linebender/vello/issues/1056
-
`/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.coloralpha.html`
- `kurbo::Cap::Butt` is defect (only visible with big lineWidth)
https://github.com/linebender/vello/issues/1063
  - `/html/canvas/element/line-styles/2d.line.cross.html`
  - `/html/canvas/element/line-styles/2d.line.miter.acute.html`
- other lack of strong correct problems
(https://github.com/linebender/vello/issues/1063#issuecomment-2998084736):
  - `/html/canvas/element/path-objects/2d.path.rect.selfintersect.html`
- `putImageData(getImageData(...), ...)` is lossy (precision problems,
might be due to ImageData being unmultiplied)
-
`/html/canvas/element/pixel-manipulation/2d.imageData.put.unchanged.html`

Testing: Tested using vello_cpu_canvas subsuite

---------

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2025-07-27 19:56:38 +00:00
Euclid Ye
a3de3ffa75
webdriver: Implement maximize window for both headless&headed window (#38271)
- Implement [Maximize
Window](https://w3c.github.io/webdriver/#maximize-window)
- Previously, headless window screen size is same as inner size if not
specified in preference. We make it double as required by the test to
not have max window initially.
- Some other random cleanup.

Testing: webdriver Stress test for maximize window (headed + headless).

---------

Signed-off-by: Euclid Ye <euclid.ye@huawei.com>
2025-07-26 12:21:17 +00:00
sagudev
d678901122
canvas: Add vello backend (#36821)
Add vello backend by implementing Backend traits in canvas crate (so
this lives in canvas_paint_thread - embedded process). Current
implementation uses normal wgpu, so we block on GPU work. Vello backend
is gated behind `vello` feature and `dom_canvas_vello_enabled` pref.

Feature-wise this backend is on on par with raqote (sometimes better
sometimes worse), but performance wise it's worse.

## Known vello problems:

- image roundtrip does not work (fixed in
https://github.com/linebender/vello/pull/974)
- https://github.com/linebender/vello/issues/1066 (fixed)
- clip layers are not working properly:
https://github.com/linebender/vello/issues/1061
  - `/html/canvas/element/pixel-manipulation/2d.imageData.put.*`
  - `/html/canvas/element/path-objects/2d.path.clip.intersect.html`
- https://github.com/linebender/vello/issues/1056
-
`/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.coloralpha.html`
- `kurbo::Cap::Butt` is defect (only visible with big lineWidth)
https://github.com/linebender/vello/issues/1063
  - `/html/canvas/element/line-styles/2d.line.cross.html`
  - `/html/canvas/element/line-styles/2d.line.miter.acute.html`
- other lack of strong correct problems
(https://github.com/linebender/vello/issues/1063#issuecomment-2998084736):
  - `/html/canvas/element/path-objects/2d.path.rect.selfintersect.html`
- There is currently no way to do put image properly in vello as we
would need to ignore all clips and other stuff (we try to work around
this on best effort basis)
https://github.com/linebender/vello/issues/1088
  - `/html/canvas/element/pixel-manipulation/2d.imageData.put.*`
- precision problems
  - `/html/canvas/element/path-objects/2d.path.stroke.scale2.html`
  - `/html/canvas/element/path-objects/2d.path.arc.scale.1.html`

## Known servo problems

- bad performance due to blocking on GPU work
  - some get/put intensive tests `TIMEOUT`
- proper shadow support (non-blocker as we already are living without it
now)
- support for rect shadow is there but unimplemented currently as that's
the state in raqote

Testing: `mach try vello` will run normal WPT (with raqote) +
vello_canvas subsuite that runs only on `/html/canvas/element`. All
subsuite expectations are stored separately.
Fixes: #36823
Fixes: #35230

---------

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2025-07-26 04:53:10 +00:00
Leo Ring
87bbe0b374
servoshell: Properly set RenderingContext size after resizing (#38257)
The tab bar would disappear on resizes, this just reverts the change
which introduced the bug.

Testing: servoshell doesn't currently have tests, so this change does
not come with a test.
Fixes: https://github.com/servo/servo/issues/38255

Signed-off-by: Leo Ring <leoring03@gmail.com>
2025-07-25 12:05:50 +00:00
Euclid Ye
928934d4b0
servoshell: Respond resize with authentic result and Adjust minimum window size (#38258)
- We no longer pretend that resize is always successful and simplify the
result computation.
- Adjust minimum window size to match other browsers and the test
expectation.
- Restrict some unnecessary access specifier.

Testing: ` ./mach test-wpt -r
"tests\wpt\tests\webdriver\tests\classic\set_window_rect\set.py"
--log-raw "D:\servo test log\set.txt" --product servodriver
{--headless}`
Fixes: #37804 as Task 8 is last task.

---------

Signed-off-by: Euclid Ye <euclid.ye@huawei.com>
2025-07-25 02:31:18 +00:00
Euclid Ye
3bc104c8e4
servoshell: Add window position for headless window (#38249)
Add virtual `window_position` to headless window so that `moveTo` and
WebDriver window command can work properly.

Testing: `./mach test-wpt -r
"tests\wpt\tests\webdriver\tests\classic\set_window_rect\set.py"
--product servodriver --headless`
Fixes: Task 7 of #37804.

---------

Signed-off-by: Euclid Ye <euclid.ye@huawei.com>
2025-07-24 17:57:58 +00:00
Josh Matthews
be38bd4636
servo: Track async webview focus operations (#38243)
https://github.com/servo/servo/pull/38160 added a webdriver-specific API
to support waiting on focus operations to complete. These changes
replace that with a generalized pattern, where a unique ID is created
for each focus operation and the embedder can receive notifications
about each focus operation when it is complete, regardless of whether
the focus was actually changed.

Testing: Existing test coverage from
https://github.com/servo/servo/pull/38160/ is unchanged.

---------

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2025-07-24 06:01:11 +00:00
Euclid Ye
0b8986c8da
servoshell: Consider window decorations when handling resize requests from web content (#38174)
Also fix some docs. This is used by JS `resizeTo`, `resizeBy` and
webdriver [set window
rect](https://w3c.github.io/webdriver/#set-window-rect).

Testing: Can now pass more tests for headed window.
Fixes: Well.. Originally the attempt is to address
https://github.com/servo/servo/issues/38093#issuecomment-3092284104. But
it turns out as a more general problem to be fixed in another PR.

---------

Signed-off-by: Euclid Ye <euclid.ye@huawei.com>
2025-07-24 05:42:04 +00:00
Euclid Ye
f726737f24
Reduce redundancy in servoshell webdriver message forwarding and add log for script::handle_send_keys_non_typeable (#38238)
There was a new commit for after
https://github.com/servo/servo/pull/38189#discussion_r2224805172, but
that does not seem to update/stop MQ.
Also removed `forward_webdriver_command` in servoshell according to
https://github.com/servo/servo/pull/38212#discussion_r2221854327.

---------

Signed-off-by: Euclid Ye <euclid.ye@huawei.com>
2025-07-24 04:22:04 +00:00
Narfinger
6ace7ad577
OHOS: Clean up some compile warnings (#38240)
This cleans up some compile warnings about unused functions.

Testing: Does not change functionality, OHOS and Linux still compile
(hopefully the other builds too).

---------

Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
Co-authored-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2025-07-24 03:29:49 +00:00
Euclid Ye
4ff6b1d4a7
Implement setting position through webdriver for headed window (#38209)
Previously, we pretend we are able to set position in response. Now we
can really do it.

Testing: Able to set position accurately when tested locally.
Fixes: Task 5 of #37804.

---------

Signed-off-by: Euclid Ye <euclid.ye@huawei.com>
2025-07-22 18:26:37 +00:00
Euclid Ye
57fc569818
Remove Webdriver Server's access to Constellation (#38212)
`WebDriverCommandMsg::TakeScreenshot` was the last thing blocking us
from removing constellation access in webdriver server. Now we can
happily remove it.

Surprisingly, this reduces binary size by 185KB for release profile in
Windows. #37737 removes a net total of 300 lines, but only reduced 98KB.

Testing: No regression after testing.

Signed-off-by: Euclid Ye <euclid.ye@huawei.com>
2025-07-22 10:17:19 +00:00
Euclid Ye
b0a29393a9
WebDriver: Wait focus to complete when switching window (#38160)
Previously the webdriver do not wait for focus to complete, which can
cause some instability.

No matter interact as human or webdriver, the focus chain always goes
as: Embedder forwards -> Constellation (do some updates) -> Embedder (do
some updates).

---------

Signed-off-by: Euclid Ye <euclid.ye@huawei.com>
2025-07-21 04:18:21 +00:00
batu_hoang
f0e10e63e2
webdriver: Implement send alert text (#38140)
Implement webdriver `SendAlertText` command

Tests:
https://github.com/longvatrong111/servo/actions/runs/16342669929
https://github.com/longvatrong111/servo/actions/runs/16342671477

cc: @xiaochengh

---------

Signed-off-by: batu_hoang <hoang.binh.trong@huawei.com>
Signed-off-by: batu_hoang <longvatrong111@gmail.com>
2025-07-17 21:24:50 +00:00
Euclid Ye
5911cd891f
servoshell: Fix scroll speed for Desktop (#37982)
According to discussion
https://github.com/servo/servo/pull/34063#discussion_r2187147615, this
PR
1. adds `PIXEL_DELTA_FACTOR` to increase scroll speed for
`MouseScrollDelta::PixelDelta`, which is used by macOS and
high-precision mouse.
2. adds `LINE_WIDTH` to increase x-axis scroll speed for
`MouseScrollDelta::LineDelta`, which is used by Linux and Windows.
3. Increase mouse scroll speed in general to match other browsers
4. Reduce keyboard scroll offset to scroll exactly "one line", to match
other browsers.

Testing: Example in #35037 can now scroll in x-axis as fast as y-axis,
similar to other browsers.
Fixes: part of #38072.

---------

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
Signed-off-by: Euclid Ye <euclid.ye@huawei.com>
2025-07-17 17:43:30 +00:00
Euclid Ye
fe2c13c777
doc: Add doc for compositor/webview/embedder related to window/rect/inner_size/rendering_context (#38110)
Add docs before actually fixing #38089, #38090, #37978, #38093.

Testing: Just adding docs.

---------

Signed-off-by: Euclid Ye <euclid.ye@huawei.com>
2025-07-17 13:40:28 +00:00
batu_hoang
345733a5c5
webdriver: Add handle any user prompts step for all commands (#38035)
- Add `handler any user prompt` step for all commands.
- Enable webdriver tests which were blocked by `handle any user prompt`
step.

---------

Signed-off-by: batu_hoang <hoang.binh.trong@huawei.com>
2025-07-17 09:47:47 +00:00
sagudev
86ea2641f8
servoshell: Update egui to 0.32 (#38119)
We also need to bump egui-file-dialog and accesskit_winit. Changes are
done based on migration paths provided by egui.

Testing: No tests for servoshell
Fixes: #38117

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2025-07-16 19:42:16 +00:00
Abdelrahman Hossam
2ea95c8813
servoshell: Send all button events to the WebView regardless of what button is pressed (#38053)
Sending all mouse button events (Left, Right, Middle, Back, Forward) to
the constellation for processing. Before, only left and right mouse
buttons were handled.

Testing: There is no new test for this. Manually testing was done. We
currently
do not have a good way to test user interaction in servoshell.
Fixes: #37996

Signed-off-by: abdelrahman1234567 <abdelrahman.hossameldin.awadalla@huawei.com>
2025-07-16 06:53:55 +00:00
Euclid Ye
2e3c280f46
webdriver: improve perform pointermove & wheel actions with more accurate coordinates (#38095)
1. Create `get_origin_relative_coordinates` according to
[spec](https://w3c.github.io/webdriver/#dfn-get-coordinates-relative-to-an-origin)
to be reused
2. Add previously missing offset for PointerOrigin::Element
3. Refactor code for perform pointermove/wheel to be closer to spec.
4. Handle some issues with spec:
https://github.com/w3c/webdriver/issues/1758

Testing: Several new passing cases as we are more precise with
coordinates now.
Fixes: Part of #38042.

---------

Signed-off-by: Euclid Ye <euclid.ye@huawei.com>
2025-07-16 02:03:34 +00:00
Euclid Ye
547ce67514
servoshell: reduce duplication for conversion between physical/logical position/size (#38082)
With helper functions introduced in #38020, this is now becoming
reality.

Testing: No behaviour change.
Fixes: #37937

Signed-off-by: Euclid Ye <euclid.ye@huawei.com>
2025-07-15 11:27:11 +00:00
batu_hoang
8e2d2bde6f
Webdriver GoBack and GoForward commands wait for navigation complete (#37950)
After sending `GoBack` or `GoForward` command, webdriver wait for the
navigation complete.
It can be achieved by waiting for
`WebViewDelegate::notify_history_changed`

Testing: 
`tests/wpt/meta/webdriver/tests/classic/back/back.py`
`tests/wpt/meta/webdriver/tests/classic/forward/forward.py`

---------

Signed-off-by: batu_hoang <longvatrong111@gmail.com>
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
Signed-off-by: batu_hoang <hoang.binh.trong@huawei.com>
Co-authored-by: Josh Matthews <josh@joshmatthews.net>
2025-07-15 10:41:50 +00:00
batu_hoang
f155c95e1b
webdriver: Element click waits for navigation complete (#37935)
Step 11 in https://w3c.github.io/webdriver/#dfn-element-click

> [Try](https://w3c.github.io/webdriver/#dfn-try) to [wait for
navigation to
complete](https://w3c.github.io/webdriver/#dfn-wait-for-navigation-to-complete)
with session.

This fixes issue in which element_click triggers navigation, but
incoming commands still interact with old page.

Testing:
https://github.com/longvatrong111/servo/actions/runs/16175767947
https://github.com/longvatrong111/servo/actions/runs/16175770044

Signed-off-by: batu_hoang <longvatrong111@gmail.com>
2025-07-15 06:51:05 +00:00
Andrei Volykhin
bf0e3f84d0
imagebitmap: Remove ImageBitmap from experimental web platform features (#38050)
Enable by default the DOM "ImageBitmap" interface previously gated
behind
"dom.imagebitmap.enabled" preference as experimental web platform
feature.

https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#imagebitmap

NOTE: Non blocking non supported functionality:
- vector HTMImageElement, bitmap/vector SVGImageElement
- EXIF image orientation

Testing: Covered by existing WPT tests

Fixes: #34112

Signed-off-by: Andrei Volykhin <andrei.volykhin@gmail.com>
2025-07-14 10:20:02 +00:00
Michael Mc Donnell
c2df8a1bf5
Add Linux .desktop file (#38038)
I'm trying to use Servo as a daily driver. I like to pin the most often
used apps to the my taskbar (Dash to Panel in Gnome). I also launch apps
from the menu (Arc Menu). Adding a .desktop file make it show up in the
menu. I could not get pinning to work until I set the name with `winit`.
This is because the name is used to match it with the icon. I used the
Gnome Looking Glass (lg) command to determine that the name was not set.

Testing: I followed the instructions that I put in the .desktop file. I
copied the .desktop file to the right folder, set up a link to the svg
icon, and adjusted the paths to point to the compiled executable.

---------

Signed-off-by: Michael Mc Donnell <michael@mcdonnell.dk>
2025-07-13 23:07:12 +00:00
Euclid Ye
c5aeac3cea
script: Get the window rectangle from the WebViewDelegate instead of via the compositor (#37960)
Previously, `screenX`, `screenY`, `outerHeight`, `outerWidth`, `moveBy`,
`resizeBy` ask compositor for window rectangle, which then return
"inner" rectangle after consulting Embedder.

This PR 
1. removes `GetClientWindowRect` from compositor, and directly let
script ask embedder.
2. add `window_size` to `ScreenGeometry`
3. add a lot of docs to `ScreenGeometry`

Testing: `tests\wpt\mozilla\tests\mozilla\window_resizeTo.html` can now
pass for Headed Window.
Fixes: #37824

---------

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
2025-07-11 18:31:24 +00:00
Narfinger
90a73f7021
OHOS: Fix speedometer hang sometimes. (#37995)
This fixes the speedometer hang on CI.
Sometimes on CI we have the servoshell app not being in the foreground
(because popups have higher priority). Then, for some reason the
eventloop does not get pumped after some time.
This fixes this and is consistent with the current code in android.

Here is a succesful run
https://github.com/Narfinger/servo/actions/runs/16214904687/job/45782241427.
This needs also https://github.com/servo/servo/pull/37994 to be
successful but these two PR are independent.

Testing: Having the usb popup on the screen while running speedometer
without this changes hangs consistently (until input which calls
present_if_needed). With this change the hang does not occur anymore.
Fixes: I think https://github.com/servo/servo/issues/37727 is the same
issue and I confirmed that in the above case testinput does nothing
useful. We will see if this occurs again.

Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
2025-07-11 09:22:48 +00:00
Kenzie Raditya Tirtarahardja
a475175949
Webdriver: Send Keys use webview::notify_input_event (#37911)
Previously, we SendKeys will be forwarded to constellation by the
embedder. Now we use webview.notify_input_event, which will send
WebDriverCommandMsg::ForwardInputEvent for the KeyboardEvent and
CompositionEvent.

Fixes: part of https://github.com/servo/servo/issues/37370

---------

Signed-off-by: PotatoCP <kenzieradityatirtarahardja18@gmail.com>
2025-07-10 12:37:01 +00:00