Instead of using raw pointer of JSAutoStructuredCloneBuffer, use its
wrapper JSAutoStructuredCloneBufferWrapper, which implements the Drop
trait that can prevent leakage when structured cloning fails.
Testing: Refactoring. Existing tests should be enough.
Fixes: #37966
---------
Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
We just need to pass user provided FillRule via IPC to canvas paint
thread, then pass it all down to backend, which will handle it.
Testing: Added WPT tests.
---------
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
This PR changes surface type from `Vec<u8>` to `Vec<u32>` as this is
native type of raqote's backend. We used unsafe for `Vec<u8>` <->
`Vec<u32>` casting that is replaced with bytemuck. Bytemuck is already
in cargo lock.
Testing: Existing WPT tests.
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
This will allow reusing those conversions in vello_cpu backend.
Testing: Just refactor
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Handler::handle_add_cookie did not configure the attributes "Expires"
and "SameSite". This patch adds them.
Testing: Passing WPT tests that were expected to fail.
Fixes: https://github.com/servo/servo/pull/37715#issuecomment-3069734014
Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
- 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>
This change aims to supplement the missing incremental box tree
construction when text-related styles change. Since certain text style
adjustments can alter visible text content and typography. Therefore,
the parent nodes of such text are marked as needing to re-collect their
box tree children to ensure the correct display of text.
Signed-off-by: sharpshooter_pt <ibluegalaxy_taoj@163.com>
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: #36823Fixes: #35230
---------
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
#37684 provided the backend for this change. The key range interface
just wraps a `IndexedDBKeyRange` and exposes the methods from it as per
the spec.
Spec: https://www.w3.org/TR/IndexedDB-2/#keyrange
Testing: WPT tests (some regressions have been exposed, but that's fine)
---------
Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
Co-authored-by: Josh Matthews <josh@joshmatthews.net>
Currently we had `GetImageData` and `SendPixels` to obtain pixels from
script thread. This PR unifies those into single `GetImageData` that
does not need canvas size and has optional rect (for obtaining sub
image).
Testing: Existing WPT tests
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Bumps [litrs](https://github.com/LukasKalbertodt/litrs) from 0.4.1 to
0.4.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/LukasKalbertodt/litrs/releases">litrs's
releases</a>.</em></p>
<blockquote>
<h2>v0.4.2</h2>
<ul>
<li>Fix incorrect byte string value with non-ASCII <code>\xHH</code>
byte string escapes
<ul>
<li><code>ByteStringLit::parse(r#"b"\xff""#).unwrap().value()</code>
would return <code>[0xc3, 0xbf]</code> instead of
<code>[0xff]</code>.</li>
</ul>
</li>
<li>Remove CR LF normalization to align with spec
<ul>
<li>This is technically a breaking change, but released with a minor
version bump as it just aligns with the specification. It is extremely
unlikely to affect any real world use case.</li>
</ul>
</li>
<li>Fix incorrect error span for out-of-range Unicode escapes</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/LukasKalbertodt/litrs/blob/main/CHANGELOG.md">litrs's
changelog</a>.</em></p>
<blockquote>
<h2>[0.4.2] - 2025-07-25</h2>
<ul>
<li>Fix incorrect byte string value with non-ASCII <code>\xHH</code>
byte string escapes
<ul>
<li><code>ByteStringLit::parse(r#"b"\xff""#).unwrap().value()</code>
would return <code>[0xc3, 0xbf]</code> instead of
<code>[0xff]</code>.</li>
</ul>
</li>
<li>Remove CR LF normalization to align with spec
<ul>
<li>This is technically a breaking change, but released with a minor
version bump as it just aligns with the specification. It is extremely
unlikely to affect any real world use case.</li>
</ul>
</li>
<li>Fix incorrect error span for out-of-range Unicode escapes</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="1dc8a3e95c"><code>1dc8a3e</code></a>
Bump version to 0.4.2</li>
<li><a
href="8c55d089c6"><code>8c55d08</code></a>
Fix incorrect error span for out-of-range Unicode escapes</li>
<li><a
href="8fe855226f"><code>8fe8552</code></a>
Fix bug with non-ASCII \xHH byte string escapes</li>
<li><a
href="ed84018240"><code>ed84018</code></a>
Refactor escape code to make it more flexible for upcoming
c-strings</li>
<li><a
href="15edbcd138"><code>15edbcd</code></a>
Remove CR LF normalization to align with spec</li>
<li><a
href="d3cf292593"><code>d3cf292</code></a>
Update CI workflow</li>
<li>See full diff in <a
href="https://github.com/LukasKalbertodt/litrs/compare/v0.4.1...v0.4.2">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>
This will be needed for vello_cpu. While we could wrap it in RefCell for
inner mut, but that would be less ergonomic and performant.
Testing: Just refactoring, but the code is covered by WPT tests.
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
This change optimizes `RestyleDamage` propagation and cleanup to reduce
unnecessary box reconstruction and relayouts, while preventing damage
from the current reflow affecting subsequent ones. Improvements include:
- For box damage caused by `NodeDamage`, `RestyleDamage::RELAYOUT` is no
longer marked immediately—avoiding erroneous propagation of
`LayoutDamage::RECOLLECT_BOX_TREE_CHILDREN` to descendants during
`RestyleDamage` propagation.
- Clearing damage for nodes whose boxes will be preserved, preventing it
from carrying over to the next reflow and increasing its workload.
Testing: This should not change observable behavior and is thus covered
by existing WPT tests. Although Servo lacks performance test cases,
manual testing shows that this modification reduces reflow time by
nearly 250ms, representing a decrease of approximately 25%.
Signed-off-by: sharpshooter_pt <ibluegalaxy_taoj@163.com>
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>
After #38214 `Backend` trait is only used as DrawTarget builder and as
type holder. By moving types and DrawTarget creation into
`GenericDrawTarget` trait, we can completely remove `Backend` trait.
Testing: Just refactor, but code is covered by WPT tests.
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
This changes extend the incremental box tree construction for inline
boxes. Since an `InlineItem` can be split into multiple `InlineItem`s by
a block element, the reason such an inline item is marked as damaged may
simply be the removal of the block element or the need to reconstruct
its box tree. Therefore, under the current LayoutDamage design,
theoretically, even damaged inline items might still have some of their
splits reusable. However, based on the principle of simplicity and
effectiveness, this PR only considers reusing undamaged inline boxes.
Testing: This should not change observable behavior and is thus covered
by existing WPT tests.
Signed-off-by: sharpshooter_pt <ibluegalaxy_taoj@163.com>
- Dates are now serialized as f64s (like how firefox does it)
- Array buffers are serialized with structured cloning (this is not the
most correct/efficent way to serialize them, however it is currently
better than not supporting array buffers at all)
- Array types are still unimplemented.
Testing: WPT
Fixes: Some panicking
---------
Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
Remote end step of [element send
keys](https://w3c.github.io/webdriver/#element-send-keys)
> Step 8.2. Set the text insertion caret using [set selection
range](https://w3c.github.io/webdriver/#dfn-set-selection-range) using
current text length for both the start and end parameters.
Also check if the element is already an active element before focusing
(Step 7.7).
Testing:
`./tests/wpt/tests/webdriver/tests/classic/element_send_keys/form_controls.py`
---------
Signed-off-by: PotatoCP <Kenzie.Raditya.Tirtarahardja@huawei.com>
Signed-off-by: Kenzie Raditya Tirtarahardja <kenzieradityatirtarahardja18@gmail.com>
Co-authored-by: Euclid Ye <yezhizhenjiakang@gmail.com>
Implements `IDBFactory.cmp`, most of the work was done by #38123.
Testing: Covered by WPT (lots of flaky results: the appropriate tests
are in tests/wpt/meta/IndexedDB/idlharness.any.js.ini)
Fixes: None
---------
Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
- 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>
I think this simplifies canvas backends greatly. Before there were many
(needless) hoops from abstract to concrete (backend) and back, now we
can do most stuff on abstract types.
Testing: Existing WPT tests
Fixes: #38022
try run: https://github.com/sagudev/servo/actions/runs/16450978211
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Bumps [prettyplease](https://github.com/dtolnay/prettyplease) from
0.2.35 to 0.2.36.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/dtolnay/prettyplease/releases">prettyplease's
releases</a>.</em></p>
<blockquote>
<h2>0.2.36</h2>
<ul>
<li>Preserve braces in <code>use path::to::{self};</code> (<a
href="https://redirect.github.com/dtolnay/prettyplease/issues/121">#121</a>,
thanks <a
href="https://github.com/charlyisidore"><code>@charlyisidore</code></a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="9ae9017fbc"><code>9ae9017</code></a>
Release 0.2.36</li>
<li><a
href="6e28f51132"><code>6e28f51</code></a>
Merge pull request <a
href="https://redirect.github.com/dtolnay/prettyplease/issues/121">#121</a>
from charlyisidore/use-self</li>
<li><a
href="27e359b2d3"><code>27e359b</code></a>
Preserve braces in <code>use std::fmt::{self};</code> <a
href="https://redirect.github.com/dtolnay/prettyplease/issues/120">dtolnay/prettyplease#120</a></li>
<li>See full diff in <a
href="https://github.com/dtolnay/prettyplease/compare/0.2.35...0.2.36">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>
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>
Bumps
[owned_ttf_parser](https://github.com/alexheretic/owned-ttf-parser) from
0.25.0 to 0.25.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/alexheretic/owned-ttf-parser/releases">owned_ttf_parser's
releases</a>.</em></p>
<blockquote>
<h2>0.25.1</h2>
<ul>
<li>Reduce size of published crate archive (148 KiB -> 9 KiB).</li>
<li>Update min <em>ttf-parser</em> to <code>0.25.1</code>.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/alexheretic/owned-ttf-parser/blob/main/CHANGELOG.md">owned_ttf_parser's
changelog</a>.</em></p>
<blockquote>
<h1>0.25.1</h1>
<ul>
<li>Reduce size of published crate archive (148 KiB -> 9 KiB).</li>
<li>Update min <em>ttf-parser</em> to <code>0.25.1</code>.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="3abee95150"><code>3abee95</code></a>
Release 0.25.1</li>
<li><a
href="4759b5593f"><code>4759b55</code></a>
Exclude test data and tools from published packages (<a
href="https://redirect.github.com/alexheretic/owned-ttf-parser/issues/18">#18</a>)</li>
<li>See full diff in <a
href="https://github.com/alexheretic/owned-ttf-parser/compare/0.25.0...0.25.1">compare
view</a></li>
</ul>
</details>
<br />
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
</details>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [ipc-channel](https://github.com/servo/ipc-channel) from 0.20.0 to
0.20.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/servo/ipc-channel/releases">ipc-channel's
releases</a>.</em></p>
<blockquote>
<h2>v0.20.1</h2>
<h2>What's Changed</h2>
<ul>
<li>Merge thread_local declarations by <a
href="https://github.com/jschwe"><code>@jschwe</code></a> in <a
href="https://redirect.github.com/servo/ipc-channel/pull/397">servo/ipc-channel#397</a></li>
<li>Remove receivers from Router IpcReceiverSet on channel close. by <a
href="https://github.com/jdm"><code>@jdm</code></a> in <a
href="https://redirect.github.com/servo/ipc-channel/pull/400">servo/ipc-channel#400</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/servo/ipc-channel/compare/v0.20.0...v0.20.1">https://github.com/servo/ipc-channel/compare/v0.20.0...v0.20.1</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="69d1d4bf8c"><code>69d1d4b</code></a>
Publish 0.20.1. (<a
href="https://redirect.github.com/servo/ipc-channel/issues/401">#401</a>)</li>
<li><a
href="4c2cbf8cae"><code>4c2cbf8</code></a>
bug: Drop macOS receivers from OsIpcReceiverSet on channel close. (<a
href="https://redirect.github.com/servo/ipc-channel/issues/400">#400</a>)</li>
<li><a
href="59d6d8099c"><code>59d6d80</code></a>
Merge thread_local declarations (<a
href="https://redirect.github.com/servo/ipc-channel/issues/397">#397</a>)</li>
<li>See full diff in <a
href="https://github.com/servo/ipc-channel/compare/v0.20.0...v0.20.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>
The user interaction triggered `scroll` event was initially implemented
in https://github.com/servo/servo/pull/36687.
In triggering the `scroll` event, the event should be batched and
triggered within update the rendering. This serves as a preparatory PR
for the JS API triggered `scroll` event.
Part of: #31665
---------
Signed-off-by: Jo Steven Novaryo <jo.steven.novaryo@huawei.com>
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions
</details>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
HTMLImageElement was missing the dimension source attribute, as step 9
from
[here](https://html.spec.whatwg.org/multipage/images.html#updating-the-source-set)
wasn't implemented. This meant that for an element like this:
```html
<picture>
<source media="(min-width: 1000px)"
srcset=""
width="84" height="29">
<img
src=""
width="25" height="25" alt="Wikimedia Foundation" lang="en" loading="lazy">
</picture>
```
The `width` and `height` attributes of the source tag were being
ignored. This broke stuff like these icons on the main page of
Wikipedia.
**Original:**
<img width="2252" height="229" alt="image"
src="https://github.com/user-attachments/assets/fa3fdd9d-5f91-43d4-bc9d-784b0a836d44"
/>
**Fixed:**
<img width="2252" height="229" alt="image"
src="https://github.com/user-attachments/assets/6f4ca4ae-e764-4394-ac31-9a92bbb456ab"
/>
Testing: If there isn't an existing test that covers this I'll make one,
waiting for the github runner to tell me whether this is covered and
then I'll amend the PR
---------
Signed-off-by: Leo Ring <leoring03@gmail.com>
Signed-off-by: Xiaocheng Hu <hu.xiaocheng@huawei.com>
Signed-off-by: Xiaocheng Hu <xiaochengh.work@gmail.com>
Co-authored-by: Xiaocheng Hu <hu.xiaocheng@huawei.com>
Co-authored-by: Xiaocheng Hu <xiaochengh.work@gmail.com>
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>
This change is in accordance with highlighting the usage of various zoom
options.
`pinch_zoom`: `Mobile-style` zoom using pinch gesture
`page_zoom`: `Desktop-style` zoom (`Ctrl` + `+`/`-`)
It just renames the variable `viewport_zoom` to `pinch_zoom` for better
clarity
Testing: Testing not required, as it's just renaming of variable .
---------
Signed-off-by: Shubham Gupta <shubham13297@gmail.com>
Signed-off-by: Xiaocheng Hu <xiaochengh.work@gmail.com>
Co-authored-by: Xiaocheng Hu <xiaochengh.work@gmail.com>
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>
As previously discussed in #38229. To recap: `badcert.jpg` was made
unused in 8422dac811 and `tumbeast.png`
and its associated file of `not-found.html` were superseded at some
point by a message in `neterror.html` (if it were still used, it'd
surely be
[embedded](https://github.com/servo/servo/blob/main/components/shared/embedder/resources.rs).)
This PR also removes two unnecessary spaces inside of the new tab's CSS
file, ensuring a consistent 2 space indentation in the file and saving 2
bytes.
Testing: Unnecessary, as this commit only removes unused assets (and
fixes one style nit).
Signed-off-by: maple! <averyrudelphe@gmail.com>
Losslessly optimizes the PNG images in the `resources` folder with:
```
oxipng -o max -a -s
oxipng -o max --zopfli -a -s
```
Tests are unaffected by this commit in order to avoid potential
breakages.
As an aside: shouldn't `tumbeast.png` and `badcert.jpg` be removed? For
`tumbeast.png`, the related page `resources/not-found.html` doesn't seem
to be reachable by any means (the usual dry error message is used
instead, as far as my testing goes, neither `about:not-found` nor
`servo:not-found` work), and the only use of `badcert.jpg` (in
`badcert.html`) got removed in 8422dac811.
Testing: Unnecessary. Since the optimized images haven't changed their
extension, so long as Servo's PNG parsing is correct, there should be no
change aside from reduced binary sizes.
Signed-off-by: maple! <averyrudelphe@gmail.com>
Bumps [hyper-util](https://github.com/hyperium/hyper-util) from 0.1.15
to 0.1.16.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/hyperium/hyper-util/blob/master/CHANGELOG.md">hyper-util's
changelog</a>.</em></p>
<blockquote>
<h1>0.1.16 (2025-07-22)</h1>
<ul>
<li>Add <code>impl Clone</code> for <code>proxy::Tunnel</code>
service.</li>
<li>Fix <code>proxy::Matcher</code> to detect SOCKS4 schemes.</li>
<li>Fix <code>legacy::Client</code> pool idle checker to trigger less
aggresively, saving CPU.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="5cefcd804e"><code>5cefcd8</code></a>
v0.1.16</li>
<li><a
href="0d4ca3f50d"><code>0d4ca3f</code></a>
chore(cargo): move tokio/net feature to client (<a
href="https://redirect.github.com/hyperium/hyper-util/issues/218">#218</a>)</li>
<li><a
href="89b2cffaf0"><code>89b2cff</code></a>
fix(proxy): Fix SOCKS4 proxy protocol parsing and matching (<a
href="https://redirect.github.com/hyperium/hyper-util/issues/219">#219</a>)</li>
<li><a
href="39fd779bb2"><code>39fd779</code></a>
tests(client): fix flaky pool test (<a
href="https://redirect.github.com/hyperium/hyper-util/issues/220">#220</a>)</li>
<li><a
href="24714a39ca"><code>24714a3</code></a>
fix(client): cap pool idle interval to a minimum (<a
href="https://redirect.github.com/hyperium/hyper-util/issues/217">#217</a>)</li>
<li><a
href="f0dcda37f8"><code>f0dcda3</code></a>
deps: allow socket2 0.6 (<a
href="https://redirect.github.com/hyperium/hyper-util/issues/213">#213</a>)</li>
<li><a
href="dd63305975"><code>dd63305</code></a>
refactor(client): simplify pool idle task with async/await (<a
href="https://redirect.github.com/hyperium/hyper-util/issues/216">#216</a>)</li>
<li><a
href="afd758b265"><code>afd758b</code></a>
fix(client): don't spawn pool idle interval if timeout is 0 (<a
href="https://redirect.github.com/hyperium/hyper-util/issues/215">#215</a>)</li>
<li><a
href="9f7a5e01e3"><code>9f7a5e0</code></a>
feat(client): implement Clone for Tunnel (<a
href="https://redirect.github.com/hyperium/hyper-util/issues/212">#212</a>)</li>
<li>See full diff in <a
href="https://github.com/hyperium/hyper-util/compare/v0.1.15...v0.1.16">compare
view</a></li>
</ul>
</details>
<br />
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
</details>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [aws-lc-rs](https://github.com/aws/aws-lc-rs) from 1.13.2 to
1.13.3.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/aws/aws-lc-rs/releases">aws-lc-rs's
releases</a>.</em></p>
<blockquote>
<h2>aws-lc-rs v1.13.3</h2>
<h2>What's Changed</h2>
<ul>
<li>Rename ML-DSA by <a
href="https://github.com/justsmth"><code>@justsmth</code></a> in <a
href="https://redirect.github.com/aws/aws-lc-rs/pull/844">aws/aws-lc-rs#844</a></li>
</ul>
<h2>Other Merged PRs</h2>
<ul>
<li>Skip aws-lc-rs "publish dryrun" job when -sys crates not
published by <a
href="https://github.com/justsmth"><code>@justsmth</code></a> in <a
href="https://redirect.github.com/aws/aws-lc-rs/pull/840">aws/aws-lc-rs#840</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/aws/aws-lc-rs/compare/v1.13.2...v1.13.3">https://github.com/aws/aws-lc-rs/compare/v1.13.2...v1.13.3</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="78258d2b58"><code>78258d2</code></a>
Fix publish dryrun when -sys crates update (<a
href="https://redirect.github.com/aws/aws-lc-rs/issues/840">#840</a>)</li>
<li><a
href="3efb4fa9d2"><code>3efb4fa</code></a>
Rename ML-DSA (<a
href="https://redirect.github.com/aws/aws-lc-rs/issues/844">#844</a>)</li>
<li>See full diff in <a
href="https://github.com/aws/aws-lc-rs/compare/v1.13.2...v1.13.3">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>
Remove unused `Cargo.toml` dependency to reduce binary size.
Testing: Can still compile in different platforms.
Signed-off-by: Euclid Ye <euclid.ye@huawei.com>
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/)).
when creating two globals in the same runtime, Servo will generally try
to reuse an existing compartment for the second global, and there are
other places in script where we rely on this reuse. but for the debugger
script, we can’t do this.
this patch adds a `use_system_compartment` flag to global object
descriptors, which isolates the global in its own compartment in both
possible directions:
- it forces the global to create a new compartment, preventing the reuse
of any debuggee’s compartment
- it fails the check in select_compartment(), preventing future
debuggees from reusing the global’s compartment
Testing: manually tested working in devtools debugger patch (#37667),
where it will undergo automated tests
---------
Signed-off-by: Delan Azabani <dazabani@igalia.com>
Co-authored-by: atbrakhi <atbrakhi@igalia.com>
OHOS CI now has the build profile before the test cases to distringuish
dev, release, production and similar.
Testing: Tested on CI with a run here:
https://github.com/Narfinger/servo/actions/runs/16465984131/job/46543984398
Fixes: Same name in speedometer CI will have very different speeds
because of different profiles. This will fix this behaviour.
Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
Implement Step 8 of remote end steps of [Element Send
keys](https://w3c.github.io/webdriver/#element-send-keys), specifically
for non-typeable form control.
---------
Signed-off-by: PotatoCP <Kenzie.Raditya.Tirtarahardja@huawei.com>
Depends on #37427.
In addition to the changes introduced by
https://github.com/servo/servo/pull/37065, there are several performance
improvements and nits as follows:
- Use the internal pseudo element for style matching, this will reduce
the performance regression by ~66%.
- Manual construction of the `Text` node inside a text container. This
is followed by the modification of the inner `Text` node instead of
using `SetTextContent` which is more expensive.
- Use `implemented_pseudo_element` instead of
`text_control_inner_editor` `NodeFlag` to handle the special cases that
these elements should follow, specifically the:
- focus delegation workaround;
- selections; and
- line height resolving.
- More documentation.
Servo's side of: https://github.com/servo/stylo/pull/217
Testing: No new unexpected WPT failure, except for the one introduced by
https://github.com/servo/servo/pull/37065/.
Fixes: #36307#37205
---------
Signed-off-by: stevennovaryo <steven.novaryo@gmail.com>