aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Make DOMPoint and DOMPointReadOnly serializable (#35989)Josh Matthews2025-03-2713-45/+224
| | | | | | | | | | | | | | | | | | | | | | | * script: Make DOMPointReadOnly serializable. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * script: Make DOMPoint serializable. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * script: Shrink worker script event. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Update components/script/dom/dompoint.rs Co-authored-by: Martin Robinson <mrobinson@igalia.com> Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* script: Expose new methods for obtaining a global that require a realm. (#36116)Josh Matthews2025-03-267-19/+42
| | | Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* chore: Remove unused generation counter field from LayoutThread (#36172)Kelechi Ebiri2025-03-260-0/+0
| | | Signed-off-by: TG <ebiritg@gmail.com>
* chore: Remove unused generation counter field from LayoutThread (#36172)Kelechi Ebiri2025-03-261-7/+0
| | | Signed-off-by: TG <ebiritg@gmail.com>
* Fix Backspace deleting entire previous line in `<textarea>` (#36112)elomscansio2025-03-262-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * test(textinput): Add test for backspace at beginning of line in textarea Introduce a test to reproduce and verify the fix for backspacing at the beginning of a line in a multiline textarea. This ensures that pressing Backspace when the cursor is at the start of a line correctly removes the newline without deleting the entire previous line’s content. Related to: #27523 Signed-off-by: Emmanuel Elom <elomemmanuel007@gmail.com> * fix(textinput): Preserve selection origin when adjusting vertical position Fixes an issue where pressing Backspace at the beginning of a line in a textarea incorrectly deleted the entire previous line's content. This happened because `self.adjust_vertical(-1, select)` modified `selection_origin` and `edit_point`, but `selection_origin` was not restored before performing the horizontal adjustment. As a result, `self.selection_start()` and `self.selection_end()` were inconsistent, leading to `replace_operation` erasing the entire line. Now, we temporarily store `selection_origin` before adjusting vertical position and restore it afterward to ensure proper cursor and selection behavior. Fixes: #27523 Signed-off-by: Emmanuel Elom <elomemmanuel007@gmail.com> --------- Signed-off-by: Emmanuel Elom <elomemmanuel007@gmail.com> Co-authored-by: Josh Matthews <josh@joshmatthews.net>
* build(deps): bump quick-xml from 0.37.2 to 0.37.3 (#36170)dependabot[bot]2025-03-261-2/+2
| | | | | | | | | | | | | | | | Bumps [quick-xml](https://github.com/tafia/quick-xml) from 0.37.2 to 0.37.3. - [Release notes](https://github.com/tafia/quick-xml/releases) - [Changelog](https://github.com/tafia/quick-xml/blob/master/Changelog.md) - [Commits](https://github.com/tafia/quick-xml/compare/v0.37.2...v0.37.3) --- updated-dependencies: - dependency-name: quick-xml dependency-type: indirect update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Add `Path2D` (#35783)Lukas Lihotzki2025-03-2653-262/+1566
| | | Signed-off-by: Lukas Lihotzki <lukas@lihotzki.de>
* Stop using MutableHandle's DerefMut impl (#36160)Greg Morenz2025-03-261-2/+2
| | | Signed-off-by: Greg Morenz <greg-morenz@droid.cafe>
* Use read all bytes when consuming body (#36048)Gregory Terzian2025-03-261-192/+104
| | | | | | | | | * use read_all_bytes when consuming body pass realm as argument to dom method re-structure consume_body into one function Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com> * enter the realm of the object whose body is being consumed Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
* Stop using JS::MutableHandle's DerefMut impl (#36161)Greg Morenz2025-03-261-1/+1
| | | Signed-off-by: Greg Morenz <greg-morenz@droid.cafe>
* script: Eliminate `PseudoElementType` (#36146)Martin Robinson2025-03-267-145/+75
| | | | | | | | | | | | | Servo has a `PseudoElementType` which more or less duplicate's Stylo's `PseudoElement` with the addition of a non-pseudo element variant. This type needs to be converted into `PseudoElement` anyway when asking for the style of an element from Stylo, so eliminate Servo's version and simply use `Option<PseudoElement>` with the `None` variant meaning the non-pseudo. This is preparation for adding support for the `::marker` pseudo element. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Fix check in get_array_index_from_id to return early on ASCII char (#36136)Michael Rees2025-03-254-13/+1
| | | | | | | | | | | | | * fix: wrong ascii check in get_array_index_from_id Signed-off-by: Michael Rees <mrees@noeontheend.com> * Update WPT expectations Signed-off-by: Michael Rees <mrees@noeontheend.com> --------- Signed-off-by: Michael Rees <mrees@noeontheend.com>
* feat: add CanGc argument in get_dictionary_property (#36156)Arya Nair2025-03-256-15/+29
| | | | | | | | | | | | | * feat: add CanGc argument in get_dictionary_property Signed-off-by: Arya Nair <aryaajitnair@gmail.com> * feat: add CanGc argument in get_dictionary_property Signed-off-by: Arya Nair <aryaajitnair@gmail.com> --------- Signed-off-by: Arya Nair <aryaajitnair@gmail.com>
* Update Dependabot stylo crates again (#36154)Alex Touchet2025-03-251-4/+2
| | | Signed-off-by: Alex Touchet <26315797+atouchet@users.noreply.github.com>
* Import URLPattern tests (#36145)Simon Wülker2025-03-256-0/+4540
| | | Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* build(deps): bump rustls-webpki from 0.103.0 to 0.103.1 (#36153)dependabot[bot]2025-03-251-2/+2
| | | | | | | | | | | | | | | Bumps [rustls-webpki](https://github.com/rustls/webpki) from 0.103.0 to 0.103.1. - [Release notes](https://github.com/rustls/webpki/releases) - [Commits](https://github.com/rustls/webpki/compare/v/0.103.0...v/0.103.1) --- updated-dependencies: - dependency-name: rustls-webpki dependency-type: indirect update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* build(deps): bump thin-vec from 0.2.13 to 0.2.14 (#36150)dependabot[bot]2025-03-252-6/+6
| | | | | | | | | | | | | | | Bumps [thin-vec](https://github.com/gankra/thin-vec) from 0.2.13 to 0.2.14. - [Changelog](https://github.com/Gankra/thin-vec/blob/main/RELEASES.md) - [Commits](https://github.com/gankra/thin-vec/commits) --- updated-dependencies: - dependency-name: thin-vec dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* build(deps): bump async-compression from 0.4.21 to 0.4.22 (#36152)dependabot[bot]2025-03-251-2/+2
| | | | | | | | | | | | | | | | Bumps [async-compression](https://github.com/Nullus157/async-compression) from 0.4.21 to 0.4.22. - [Release notes](https://github.com/Nullus157/async-compression/releases) - [Changelog](https://github.com/Nullus157/async-compression/blob/main/CHANGELOG.md) - [Commits](https://github.com/Nullus157/async-compression/compare/v0.4.21...v0.4.22) --- updated-dependencies: - dependency-name: async-compression dependency-type: indirect update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* build(deps): bump time from 0.3.40 to 0.3.41 (#36149)dependabot[bot]2025-03-251-4/+4
| | | | | | | | | | | | | | | | Bumps [time](https://github.com/time-rs/time) from 0.3.40 to 0.3.41. - [Release notes](https://github.com/time-rs/time/releases) - [Changelog](https://github.com/time-rs/time/blob/main/CHANGELOG.md) - [Commits](https://github.com/time-rs/time/compare/v0.3.40...v0.3.41) --- updated-dependencies: - dependency-name: time dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* build(deps): bump stylo_malloc_size_of from `e941241` to `bc4717c` (#36148)dependabot[bot]2025-03-251-31/+31
| | | | | | | | | | | | | Bumps [stylo_malloc_size_of](https://github.com/servo/stylo) from `e941241` to `bc4717c`. - [Commits](https://github.com/servo/stylo/compare/e9412412ed5daca6bbbdda5227858b514c1ff488...bc4717c7842ad59243f00ae76ba23f998c749b94) --- updated-dependencies: - dependency-name: stylo_malloc_size_of dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* script: Support converting JS values to Rc<Promise> with ↵Josh Matthews2025-03-255-4/+27
| | | | | FromJSValConvertible. (#36097) Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Update names of stylo crates in dependabot.yml (#36137)sagudev2025-03-251-6/+7
| | | | | This is response to https://github.com/servo/servo/pull/36128 that is caused by renames that happened in upstream https://github.com/servo/stylo/pull/150. Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* build: bump nixpkgs to nixos-unstable (#36140)Mukilan Thiyagarajan2025-03-251-1/+1
| | | | | | | This fixes an issue with cargo-deny 0.16.3 that causes all crates to be reported as "yanked" even though they are not. This patch upgrades cargo-deny to 0.18.2 which works correctly. Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* Remove references to 2020 layout in try_parser.py (#36047)MDCODE2472025-03-258-64/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove references to 2020 layout in try_parser.py Signed-off-by: MDCODE247 <ammedabubakard500@gmail.com> * Removed all references to CHANGE Signed-off-by: MDCODE247 <ammedabubakard500@gmail.com> * Updated .yml workflow files Signed-off-by: MDCODE247 <ammedabubakard500@gmail.com> * update more references Signed-off-by: MDCODE247 <ammedabubakard500@gmail.com> * fixed right hand argument Signed-off-by: MDCODE247 <ammedabubakard500@gmail.com> * Fixing more references Signed-off-by: MDCODE247 <ammedabubakard500@gmail.com> * mach: remove unused import in try_parser.py Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * ci: update reference to wpt_layout in try.yml Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> --------- Signed-off-by: MDCODE247 <ammedabubakard500@gmail.com> Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* Upgrade to Stylo e941241 (#36120)Nico Burns2025-03-252-28/+15
| | | | | | | | | | | | | * Upgrade to Stylo e941241 Signed-off-by: Nico Burns <nico@nicoburns.com> * Make test less fragile Signed-off-by: Nico Burns <nico@nicoburns.com> --------- Signed-off-by: Nico Burns <nico@nicoburns.com>
* layout: Ensure compatible positioning context during flexbox block content ↵Martin Robinson2025-03-253-5/+28
| | | | | | | | | | | | | | | sizing calculation (#36123) Sometimes column Flexbox needs to do an early layout pass to determine the preferred block content size of flex items. Previously the absolutely positioned children created during this pass were discarded, but now they are cached to be possibly used during the final layout phase of the flex item. Since they are not thrown away, it is necessary that the `PositioningContext` used to collect them is compatible with their final `PositioningContext`. Fixes #36121. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* build(deps): bump jiff from 0.2.4 to 0.2.5 (#36131)dependabot[bot]2025-03-251-4/+4
| | | | | | | | | | | | | | | | Bumps [jiff](https://github.com/BurntSushi/jiff) from 0.2.4 to 0.2.5. - [Release notes](https://github.com/BurntSushi/jiff/releases) - [Changelog](https://github.com/BurntSushi/jiff/blob/master/CHANGELOG.md) - [Commits](https://github.com/BurntSushi/jiff/compare/jiff-static-0.2.4...jiff-static-0.2.5) --- updated-dependencies: - dependency-name: jiff dependency-type: indirect update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* canvas: Update the image as part of update the rendering (#35996)sagudev2025-03-2511-51/+72
| | | | | | | | | | | | | | | | | | | | | | | * Create `update_rendering` in `CanvasState` instead of manually updating in layout Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Mark as dirty and do flushes Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * fixup rebase Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Update components/script/dom/htmlcanvaselement.rs Co-authored-by: Martin Robinson <mrobinson@igalia.com> Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* servoshell: Use sRGB colorspace on macOS (#35683)Isaac Marovitz2025-03-243-1/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * servoshell: Use sRGB colorspace on macOS Signed-off-by: Isaac Marovitz <isaacryu@icloud.com> * Make lint happy Signed-off-by: Isaac Marovitz <isaacryu@icloud.com> * Address review Signed-off-by: Isaac Marovitz <isaacryu@icloud.com> * Move to helper function Signed-off-by: Isaac Marovitz <isaacryu@icloud.com> * Rebase Cargo.lock Signed-off-by: Isaac Marovitz <isaacryu@icloud.com> * Fix build Signed-off-by: Isaac Marovitz <isaacryu@icloud.com> * Fix build (again) Signed-off-by: Isaac Marovitz <isaacryu@icloud.com> --------- Signed-off-by: Isaac Marovitz <isaacryu@icloud.com>
* fix: does_settings_prohibit_mixed_security_contexts typo (#36135)Arya Nair2025-03-241-2/+2
| | | Signed-off-by: Arya Nair <aryaajitnair@gmail.com>
* build(deps): bump log from 0.4.26 to 0.4.27 (#36127)dependabot[bot]2025-03-241-2/+2
| | | | | | | | | | | | | | | | Bumps [log](https://github.com/rust-lang/log) from 0.4.26 to 0.4.27. - [Release notes](https://github.com/rust-lang/log/releases) - [Changelog](https://github.com/rust-lang/log/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/log/compare/0.4.26...0.4.27) --- updated-dependencies: - dependency-name: log dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* feat(notification): add `EmbedderMsg::ShowNotification` (#36055)Jason Tsai2025-03-246-20/+151
| | | Signed-off-by: Jason Tsai <git@pews.dev>
* layout: Cache `IndependentNonReplacedContents::layout()` (#36082)Oriol Brufau2025-03-2412-160/+216
| | | | | | | | | | | | | | | This replaces `IndependentLayout` with `CacheableLayoutResult` and stores it in `LayoutBoxBase` so it can be reused when we need to lay out a box multiple times. This is a generalization of the caching that we had for flexbox, which is now removed in favor of the new one. With this, the number of runs per second in the Chromium perf test `flexbox-deeply-nested-column-flow.html` are multiplied by 3. Signed-off-by: Oriol Brufau <obrufau@igalia.com> Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* fix: radio input element don't trigger validity state (#36103)Jerens Lensun2025-03-233-17/+4
| | | Signed-off-by: jerensl <54782057+jerensl@users.noreply.github.com>
* script: Implement `Element::GetHTML` and `ShadowRoot::GetHTML` (#36106)Simon Wülker2025-03-2312-15936/+281
| | | | | | | | | | | | | | | | | | | | | * Serialize html fragments without going through html5ever Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Implement ShadowRoot::GetHtml / Element::GetHtml Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Update WPT expectations Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Propagate CanGc annotations Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* webgpu: leverage routed_promise in calls returning promises (#35859)webbeef2025-03-2315-263/+221
| | | | | | | Using the RoutedPromiseListener let us define a different response type for each promise. This removes unreachable branches that used to exist when they all shared the same WebGPUResponse. Signed-off-by: webbeef <me@webbeef.org>
* script: Ensure promises are considered DOM interfaces when generating ↵Josh Matthews2025-03-232-3/+5
| | | | | bindings. (#36107) Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* layout: Implement the `fit-content()` sizing function (#36056)Oriol Brufau2025-03-2333-192/+100
| | | | | | | | | | | | | | Spec: https://drafts.csswg.org/css-sizing-3/#funcdef-width-fit-content It's similar to the `fit-content` keyword but, instead of clamping the stretch size between `min-content` and `max-content`, it clamps the provided argument. So now that we support `fit-content`, it's quite straightforward to add. It's just not completely clear what should happen when the argument has a cyclic percentage, so this may need some further adjustments depending on the outcome of https://github.com/w3c/csswg-drafts/issues/11805 Signed-off-by: Oriol Brufau <obrufau@igalia.com>
* Don't clear children of declarative shadow hosts when imperatively attaching ↵Simon Wülker2025-03-233-107/+1
| | | | | | | | | | | | | | | | | another shadow root (#36104) * Don't remove a declarative shadow hosts children when attaching an imperative shadow root Instead we should remove all children of the shadowroot. Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Update WPT expectations Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* compositor: Remove the script channel from the compositor (#36089)Martin Robinson2025-03-235-19/+12
| | | | | | | | | | | | This is a clean up after #36062 and #35985. It removes the script channel for each pipeline from the compositor. Now all messages are sent via the `Constellation` first, which will allow breaking the dependency on script in the compositor. In addition, scroll states are actually sent via the `Constellation`, which was an oversight from #36062. Finally, a typo in a method name is fixed. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Remove `components/shared/compositing/constellation_msg.rs` (#36102)Martin Robinson2025-03-231-92/+0
| | | | | This file is dead code and I mistakenly did not remove it in #36088. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* script: Allow opening links in a new `WebView` (#35017)webbeef2025-03-235-25/+114
| | | | | | | | | | | | | This changes starts tracking the keyboard modifier state in the `Constellation` and forwards it with every input event. The state is used to modify the target of link click so when the platform-dependent alternate action key is enabled, the target is overriden to "_blank". In addition, specification step numbers and text is updated. Signed-off-by: webbeef <me@webbeef.org> Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Fix WPT Import (#36101)sagudev2025-03-231-1/+1
| | | | | | | Log files were renamed in #36037 related https://github.com/servo/servo/pull/36098 Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Add commented patch definition for html5ever crates (#36099)Simon Wülker2025-03-231-0/+6
| | | | | | | | I find myself frequently needing to build with a local html5ever version. We have similar blocks for stylo and webrender, and I think it makes sense to have them for every group of dependencies that is owned by servo. Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* ci: Fix WPT import (#36098)sagudev2025-03-231-1/+1
| | | | | Log files were renamed in https://github.com/servo/servo/pull/36037 Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Use explicit reborrows with mozjs::MutableHandle (#35892)Greg Morenz2025-03-2314-44/+67
| | | | | | | | | | | | | | | | | | | | | * Explicitly reborrow MutableHandles Signed-off-by: Greg Morenz <greg-morenz@droid.cafe> * Unify jsapi_wrappers Signed-off-by: Greg Morenz <greg-morenz@droid.cafe> * Format mozjs changes Signed-off-by: Greg Morenz <greg-morenz@droid.cafe> * Update mozjs version Signed-off-by: Greg Morenz <greg-morenz@droid.cafe> --------- Signed-off-by: Greg Morenz <greg-morenz@droid.cafe>
* Make input element display-inside always flow-root (#35908)Kenzie Raditya Tirtarahardja2025-03-238-16/+136
| | | | Signed-off-by: Kenzie Raditya Tirtarahardja <kenzieradityatirtarahardja.18@gmail.com> Co-authored-by: Kenzie Raditya Tirtarahardja <kenzieradityatirtarahardja.18@gmail.com>
* Max assign outer block size to cell measures (#36064)Kenzie Raditya Tirtarahardja2025-03-232-7/+1
| | | | Signed-off-by: Kenzie Raditya Tirtarahardja <kenzieradityatirtarahardja.18@gmail.com> Co-authored-by: Kenzie Raditya Tirtarahardja <kenzieradityatirtarahardja.18@gmail.com>
* crown: Do not check trait item projections. (#36095)Josh Matthews2025-03-2212-22/+32
| | | Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Fix form validation for readonly inputs and update WPT expectations (#36090)elomscansio2025-03-222-28/+1
| | | | | | | | | | | | | | | | | | | The HTML specification states that an input element with the `readonly` attribute must be barred from constraint validation. Our implementation previously included an extra check (`does_readonly_apply()`) to verify if `readonly` applies to the input type, which is unnecessary. This caused three test failures in: tests/wpt/meta/html/semantics/forms/constraints/form-validation-willValidate.html.ini - Removed `does_readonly_apply()` as it is not required for validation. - Removed `tests/wpt/meta/html/semantics/forms/constraints/form-validation-willValidate.html.ini` since the test now passes. To update the Web Platform Test expectations, see: https://book.servo.org/hacking/testing.html#updating-web-platform-test-expectations Fixes servo/servo#36076 Signed-off-by: Emmanuel Elom <elomemmanuel007@gmail.com>