Commit graph

50891 commits

Author SHA1 Message Date
Steven Novaryo
67a5f285ed
dom: Implement minimal IntersectionObserver workflow (#35551)
* Add very rough implemnentation of observation steps

Signed-off-by: stevennovaryo <steven.novaryo@gmail.com>

* Fix entry reflection and propagate can_gc

Signed-off-by: stevennovaryo <steven.novaryo@gmail.com>

* Fix BorrowError and add fragment find descendant

Signed-off-by: stevennovaryo <steven.novaryo@gmail.com>

* Implement is descendant in containing block path correctly

Signed-off-by: stevennovaryo <steven.novaryo@gmail.com>

* Fix unrooted error and tidy issues

Signed-off-by: stevennovaryo <steven.novaryo@gmail.com>

* Fix comments

Signed-off-by: stevennovaryo <steven.novaryo@gmail.com>

* Remove is descendant of other node query

I suppose these changes is better separated to other PRs.

Signed-off-by: stevennovaryo <steven.novaryo@gmail.com>

* Fix intersection and refactor registration

Signed-off-by: stevennovaryo <steven.novaryo@gmail.com>

* Use AppUnit more and propagate GlobalScope better

Signed-off-by: stevennovaryo <steven.novaryo@gmail.com>

* Update WPT expectations

Signed-off-by: stevennovaryo <steven.novaryo@gmail.com>

* Revert delay changes

Signed-off-by: stevennovaryo <steven.novaryo@gmail.com>

* Align compute intersection algo to other browser actual behavior

Signed-off-by: stevennovaryo <steven.novaryo@gmail.com>

* Align processing documents and note several issues

Signed-off-by: stevennovaryo <steven.novaryo@gmail.com>

* Update WPT

Signed-off-by: stevennovaryo <steven.novaryo@gmail.com>

* Minor lint

Signed-off-by: stevennovaryo <steven.novaryo@gmail.com>

* Fix top level browsing context

Signed-off-by: stevennovaryo <steven.novaryo@gmail.com>

* Make Registration rootable

Signed-off-by: stevennovaryo <steven.novaryo@gmail.com>

* Avoid reflow inside observation step algo

Signed-off-by: stevennovaryo <steven.novaryo@gmail.com>

* Using borrow for iterating registration

Signed-off-by: stevennovaryo <steven.novaryo@gmail.com>

* Fix document disconnect

Signed-off-by: stevennovaryo <steven.novaryo@gmail.com>

* Update WPT

Signed-off-by: stevennovaryo <steven.novaryo@gmail.com>

* Address comments and minor quality suggestions

Signed-off-by: stevennovaryo <steven.novaryo@gmail.com>

* Root the observer before nofifying any of it

Signed-off-by: stevennovaryo <steven.novaryo@gmail.com>

* Tidy docs

Signed-off-by: stevennovaryo <steven.novaryo@gmail.com>

* Account not found element and refactor observation step

Signed-off-by: stevennovaryo <steven.novaryo@gmail.com>

* Fix documentations

Signed-off-by: stevennovaryo <steven.novaryo@gmail.com>

* Ignore position of document viewport

Signed-off-by: stevennovaryo <steven.novaryo@gmail.com>

* Refactor root intersection rectangle

Signed-off-by: stevennovaryo <steven.novaryo@gmail.com>

* Add can GC note to the callback

Signed-off-by: stevennovaryo <steven.novaryo@gmail.com>

* Fix top-level browsing context term

Signed-off-by: stevennovaryo <steven.novaryo@gmail.com>

* Fix minor comments

Signed-off-by: stevennovaryo <steven.novaryo@gmail.com>

---------

Signed-off-by: stevennovaryo <steven.novaryo@gmail.com>
2025-03-18 11:09:44 +00:00
Simon Wülker
2113e54819
Set composed flag for mouse events dispatched by the UA (#36010)
* Add doc comments to mouse event methods

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Make MouseEvents composed by default

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2025-03-18 09:35:24 +00:00
DK Liao
bcdd34e2aa
chore: Move unsafe operations in unsafe functions to unsafe blocks (#36017)
Signed-off-by: DK Liao <dklassic@gmail.com>
2025-03-18 06:19:35 +00:00
Servo WPT Sync
eb3c48f9d3
Update web-platform-tests to revision b'18fda923cafeb4e3e0546ffcfb2302c3b1b11f98' (#36019)
Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
2025-03-18 05:51:39 +00:00
Oriol Brufau
84a1b7d4a5
Fix WPT importer (#36018)
In #35946 I accidentally removed a necessary line of code.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-03-18 02:15:36 +00:00
Arya Nair
94d12de7fd
feat: add CanGc argument to Error::to_jsval (#36014)
* feat: add CanGc argument to Error::to_jsval

Signed-off-by: Arya Nair <aryaajitnair@gmail.com>

* feat: pass CanGc to gen_type_error

Signed-off-by: Arya Nair <aryaajitnair@gmail.com>

* fix: linting issues

Signed-off-by: Arya Nair <aryaajitnair@gmail.com>

---------

Signed-off-by: Arya Nair <aryaajitnair@gmail.com>
2025-03-17 22:29:41 +00:00
Oriol Brufau
6807a6e532
Bump Stylo to df459ec (#36011)
Changelog: 6aa5733a36...df459eca2e

This fixes some potential compilation problems since servo/stylo#150
renamed some crates.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-03-17 19:11:09 +00:00
dependabot[bot]
b3c0794084
build(deps): bump foldhash from 0.1.4 to 0.1.5 (#36006)
Bumps [foldhash](https://github.com/orlp/foldhash) from 0.1.4 to 0.1.5.
- [Commits](https://github.com/orlp/foldhash/compare/v0.1.4...v0.1.5)

---
updated-dependencies:
- dependency-name: foldhash
  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>
2025-03-17 17:54:59 +00:00
dependabot[bot]
9ef9cfc3b1
build(deps): bump aws-lc-sys from 0.27.0 to 0.27.1 (#36007)
Bumps [aws-lc-sys](https://github.com/aws/aws-lc-rs) from 0.27.0 to 0.27.1.
- [Release notes](https://github.com/aws/aws-lc-rs/releases)
- [Commits](https://github.com/aws/aws-lc-rs/compare/aws-lc-sys/v0.27.0...aws-lc-sys/v0.27.1)

---
updated-dependencies:
- dependency-name: aws-lc-sys
  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>
2025-03-17 17:54:50 +00:00
dependabot[bot]
62dc2a85f2
build(deps): bump async-compression from 0.4.20 to 0.4.21 (#36004)
Bumps [async-compression](https://github.com/Nullus157/async-compression) from 0.4.20 to 0.4.21.
- [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.20...v0.4.21)

---
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>
2025-03-17 17:44:03 +00:00
dependabot[bot]
6aded958f8
build(deps): bump libz-sys from 1.1.21 to 1.1.22 (#36001)
Bumps [libz-sys](https://github.com/rust-lang/libz-sys) from 1.1.21 to 1.1.22.
- [Release notes](https://github.com/rust-lang/libz-sys/releases)
- [Commits](https://github.com/rust-lang/libz-sys/commits)

---
updated-dependencies:
- dependency-name: libz-sys
  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>
2025-03-17 17:38:51 +00:00
dependabot[bot]
b9821cda63
build(deps): bump rustls from 0.23.23 to 0.23.25 (#36000)
Bumps [rustls](https://github.com/rustls/rustls) from 0.23.23 to 0.23.25.
- [Release notes](https://github.com/rustls/rustls/releases)
- [Changelog](https://github.com/rustls/rustls/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rustls/rustls/compare/v/0.23.23...v/0.23.25)

---
updated-dependencies:
- dependency-name: rustls
  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>
2025-03-17 17:33:44 +00:00
Nico Burns
16f1ec4750
Upgrade Stylo to 2025-03-15 (#35990)
Signed-off-by: Nico Burns <nico@nicoburns.com>
2025-03-17 11:11:51 +00:00
batu_hoang
28c8c1df0c
Implement declarative shadow dom (#34964)
* Implement declarative shadow dom

Signed-off-by: batu_hoang <longvatrong111@gmail.com>

* Set allowDeclarativeShadowRoots false for innerHTML

Signed-off-by: batu_hoang <longvatrong111@gmail.com>

* Enable allowDeclarativeShadowRoots for Document

Signed-off-by: batu_hoang <longvatrong111@gmail.com>

* Expose HTMLTemplateElement to js

Signed-off-by: batu_hoang <longvatrong111@gmail.com>

* Implemenet setHTMLUnsafe and add more test cases

Signed-off-by: batu_hoang <longvatrong111@gmail.com>

* Declarative shadow dom: minor updates and expected test result update

Signed-off-by: batu_hoang <longvatrong111@gmail.com>

* Shadow-dom: add more test cases

Signed-off-by: batu_hoang <longvatrong111@gmail.com>

* Update comments according to the spec

Signed-off-by: batu_hoang <longvatrong111@gmail.com>

* Bump html5ever version

Signed-off-by: batu_hoang <longvatrong111@gmail.com>

---------

Signed-off-by: batu_hoang <longvatrong111@gmail.com>
2025-03-17 09:41:34 +00:00
Nico Burns
f483a3d34b
Upgrade to html5ever 0.30, xml5ever 0.21, markup5ever 0.15 (#35992)
Signed-off-by: Nico Burns <nico@nicoburns.com>
2025-03-16 23:01:02 +00:00
Josh Matthews
c8d8787959
Move CustomTraceable to script_bindings. (#35988)
* script: Move CustomTraceable to script_bindings.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* script: Move record binding support to script_bindings.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* Address clippy warnings.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

---------

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2025-03-16 14:08:22 +00:00
Josh Matthews
d35da38a2f
Cleanups for future script crate split (#35987)
* script: Avoid direct impl blocks on generated dicts and unions.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* script: Remove references to codegen-specific import module.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* Fix tidy.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

---------

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2025-03-16 13:46:14 +00:00
Gregory Terzian
3ecd1c0699
Use stream in file read operation (#35969)
* use read_all_bytes in file read operation

Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>

* add docs

Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>

---------

Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
2025-03-16 10:37:07 +00:00
Josh Matthews
d8fc1d8bb8
Refactor common boilerplate out of serialize/transfer implementations (#35831)
* script: Create infrastructure for reducing hand-written serializable/transferrable implementations.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* script: Clone all serializable DOM interfaces.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* script: Deserialize all serializable DOM interfaces.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* script: Serialize all serializable DOM interfaces.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* script: Transfer-receive all transferable DOM interfaces.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* script: Transfer all transferable DOM interfaces.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* Formatting.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* script: Extract boilerplate from serialize/deserialize implementations.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* script: Extract boilerplate from transfer-receive.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* script: Extract boilerplate from transfer operation.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* Tidy fixes.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* script: Check transferability of all DOM interfaces.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* Clippy fixes.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* Clippy fixes.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* Remove unnecessary duplicate crate.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* Formatting.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

---------

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2025-03-15 13:58:56 +00:00
Josh Matthews
21ecfdd088
Various fixes for webdriver conformance tests (#35737)
* servodriver: Ensure capabilities is always a non-empty value.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* webdriver: Serialize arguments object like an array.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* webdriver: Ensure script body is always valid JS.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* webdriver: Use current browsing context when getting element center point.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* webdriver: Propagate errors received from getting element center point.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* webdriver: Ensure opening a new window records a unique window handle.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* webdriver: Don't panic if script execution fails.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* webdriver: Do not update the current browsing context after closing a window.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* Formatting.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* webdriver: Use more precise check for arguments exotic object.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* Formatting.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

---------

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2025-03-15 13:54:14 +00:00
Martin Robinson
bc4ee8b56a
constellation: Remove two unused messages to the Constellation (#35972)
This also removes supporting code which becomes unused as well.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2025-03-15 12:54:48 +00:00
Oriol Brufau
7517976722
layout: Unify FlexItem::new() and FlexItemBox::main_content_size_info() (#35900)
These methods were doing virtually the same thing. So this patch moves
the common logic into a new `FlexItemBox::to_flex_item()`, which is then
called by `FlexItem::new()` and `FlexItemBox::main_content_size_info()`.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-03-14 21:37:19 +00:00
Simon Wülker
f93d65b496
script: Implement HTMLOptgroupElement::Label (#35970)
* Implement HTMLOptgroupElement::Label

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>
2025-03-14 20:33:07 +00:00
dependabot[bot]
0bc05a8414
build(deps): bump half from 2.4.1 to 2.5.0 (#35975)
Bumps [half](https://github.com/starkat99/half-rs) from 2.4.1 to 2.5.0.
- [Release notes](https://github.com/starkat99/half-rs/releases)
- [Changelog](https://github.com/starkat99/half-rs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/starkat99/half-rs/compare/v2.4.1...v2.5.0)

---
updated-dependencies:
- dependency-name: half
  dependency-type: indirect
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-14 16:55:21 +00:00
dependabot[bot]
c22d031179
build(deps): bump once_cell from 1.21.0 to 1.21.1 (#35974)
Bumps [once_cell](https://github.com/matklad/once_cell) from 1.21.0 to 1.21.1.
- [Changelog](https://github.com/matklad/once_cell/blob/master/CHANGELOG.md)
- [Commits](https://github.com/matklad/once_cell/compare/v1.21.0...v1.21.1)

---
updated-dependencies:
- dependency-name: once_cell
  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>
2025-03-14 16:54:40 +00:00
dependabot[bot]
32711a43cc
build(deps): bump prettyplease from 0.2.30 to 0.2.31 (#35973)
Bumps [prettyplease](https://github.com/dtolnay/prettyplease) from 0.2.30 to 0.2.31.
- [Release notes](https://github.com/dtolnay/prettyplease/releases)
- [Commits](https://github.com/dtolnay/prettyplease/compare/0.2.30...0.2.31)

---
updated-dependencies:
- dependency-name: prettyplease
  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>
2025-03-14 16:46:09 +00:00
chocolate-pie
455f4202c6
layout: Add support for basic transform css properties (#35926)
Signed-off-by: Chocolate Pie <106949016+chocolate-pie@users.noreply.github.com>
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
2025-03-14 14:46:20 +00:00
Sebastian C
7f2f51b59d
Bring back DOM GC checkpoint to script_thread (#35949)
Signed-off-by: Sebastian C <sebsebmc@gmail.com>
2025-03-14 07:40:04 +00:00
Oriol Brufau
7cf2fc88a0
layout: Allow lazy resolution of automatic minimum sizes (#35965)
`Size::resolve_for_min()` had an `Au` parameter, representing the value
to be used for an automatic minimum size. However, this amount isn't
trivial to compute in flexbox, so this patch changes the parameter to a
function that can be called lazily.

Note flexbox isn't currently using `Size::resolve_for_min()`, but it
will in #35961.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-03-13 22:50:16 +00:00
Xiaocheng Hu
62d6759106
Check whether an element is custom in the spec-compliant way (#35960)
* Check whether element is custom in spec-compliant way

Signed-off-by: Xiaocheng Hu <xiaochengh.work@gmail.com>

* Update tests

Signed-off-by: Xiaocheng Hu <xiaochengh.work@gmail.com>

---------

Signed-off-by: Xiaocheng Hu <xiaochengh.work@gmail.com>
2025-03-13 18:03:57 +00:00
dependabot[bot]
ea35353e9a
build(deps): bump tokio-util from 0.7.13 to 0.7.14 (#35963)
Bumps [tokio-util](https://github.com/tokio-rs/tokio) from 0.7.13 to 0.7.14.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-util-0.7.13...tokio-util-0.7.14)

---
updated-dependencies:
- dependency-name: tokio-util
  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>
2025-03-13 17:42:15 +00:00
dependabot[bot]
be08f4f019
build(deps): bump tokio from 1.44.0 to 1.44.1 (#35962)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.44.0 to 1.44.1.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.44.0...tokio-1.44.1)

---
updated-dependencies:
- dependency-name: tokio
  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>
2025-03-13 17:32:06 +00:00
Martin Robinson
be164874e7
script: Remove ThreadSafeLayoutNode::is_ignorable_whitespace (#35959)
This is now unused with the removal of legacy layout. I didn't see any
others methods in this trait that were unused.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2025-03-13 13:10:48 +00:00
Simon Wülker
e627ac5cfd
Hide servo internal shadow roots from the inspector by default (#35958)
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2025-03-13 13:08:24 +00:00
Oriol Brufau
4a9967725f
Fix Cargo.toml instructions for building Servo with a local Stylo (#35957)
And bump Stylo to servo/stylo#143

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-03-13 12:44:40 +00:00
Martin Robinson
294a649a6c
Use strum to iterate through enum variants and get their names (#35933)
`strum` allows us to avoid manually listing enum variant names and also
to get their names as static strings. We cannot use this for all cases
due to https://github.com/Peternator7/strum/issues/152, but we can
still use it to remove a lot of code.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2025-03-13 12:00:31 +00:00
atbrakhi
959720db0a
devtools: use correct id for browser_id and outer_window_id (#35884)
Signed-off-by: atbrakhi <atbrakhi@igalia.com>
2025-03-13 11:39:06 +00:00
Xiaocheng Hu
3b724d5bbf
Don't run disconnected callback on already disconnected custom elements (#35883)
* Add missing step 11 of remove a node algorithm

Signed-off-by: Xiaocheng Hu <xiaochengh.work@gmail.com>

* Rebaseline tests

Signed-off-by: Xiaocheng Hu <xiaochengh.work@gmail.com>

---------

Signed-off-by: Xiaocheng Hu <xiaochengh.work@gmail.com>
2025-03-13 11:07:08 +00:00
Taym Haddadi
2ccb818a60
script: refactor create_buffer_source_with_constructor (#35952)
Signed-off-by: Taym <haddadi.taym@gmail.com>
2025-03-13 10:28:24 +00:00
Simon Wülker
bb0d08432e
Migrate to the 2024 edition (#35755)
* Migrate to 2024 edition

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Allow unsafe_op_in_unsafe_fn lint

This lint warns by default in the 2024
edition, but is *way* too noisy for servo.

We might enable it in the future, but not now.

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Compile using the 2024 edition

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2025-03-13 10:28:11 +00:00
atbrakhi
eb2ca42824
devtools: improve ID Naming for better readability and context (#35942)
Signed-off-by: atbrakhi <atbrakhi@igalia.com>
2025-03-13 07:36:54 +00:00
Oriol Brufau
7594dc6991
Remove legacy layout (layout 2013) (#35943)
We were already not compiling it and not running tests on it by default.
So it's simpler to just completely remove it.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-03-13 07:26:57 +00:00
Oriol Brufau
f93006af95
Improve logic for establishing a stacking context (#35947)
In particular:
 - `z-index` will now work on unpositioned grid items.
 - `will-change: z-index` will only establish a stacking context if
   `z-index` applies, i.e. if the box is positioned or a flex/grid item.
 - The conditions in `establishes_stacking_context()` are reordered,
   so that the most likely ones are checked first.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-03-13 06:49:08 +00:00
Simon B / GrausamkeitEnjoyer / God's Eye View Developer
205b97d5ed
compositing: Move cursor_pos member and update it in update_cursor() (#35934)
Previously a member of IOCompositor, the `cursor_pos` DevicePoint did not reflect
the true position of the cursor. This caused flickering on mouse hover,
see [issue #35875.] The value of `cursor_pos` within IOCompositor
was always (x=0, y=0) regardless of the true cursor position
(it was never updated, must be a bug or an oversight?).

Moving `cursor_pos` to `ServoRenderer`, updating `cursor_pos` on `dispatch_input_event()`,
and storing cursor position in `ServoRenderer` through method `update_cursor()` fixes
the flickering previously observed.

Signed-off-by: devgev <leifminfagel@gmail.com>
2025-03-13 02:03:46 +00:00
Oriol Brufau
98816b753c
layout: Remove special height logic of replaced element with auto width (#35275)
When computing the intrinsic block size of a replaced element with a
computed preferred inline size of `auto`, instead of transferring the
final inline size through the aspect ratio, we were only transferring
the min and max constraints.

We did this to match other browsers, but Ian Kilpatrick agreed that this
is a bug and plans to change Blink.

CSSWG issue: https://github.com/w3c/csswg-drafts/issues/11236

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-03-13 00:57:26 +00:00
Oriol Brufau
e2daeeaceb
Change github workflows to not compile legacy layout (#35946)
Since it will be removed in #35943

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-03-12 22:09:21 +00:00
dependabot[bot]
1c60c0b62e
build(deps): bump http from 1.3.0 to 1.3.1 (#35938)
Bumps [http](https://github.com/hyperium/http) from 1.3.0 to 1.3.1.
- [Release notes](https://github.com/hyperium/http/releases)
- [Changelog](https://github.com/hyperium/http/blob/master/CHANGELOG.md)
- [Commits](https://github.com/hyperium/http/compare/v1.3.0...v1.3.1)

---
updated-dependencies:
- dependency-name: http
  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>
2025-03-12 20:12:17 +00:00
Simon Wülker
b10c53ba6b
Set is value when constructing custom elements with the new operator (#35930)
* Add doc comments throughout the code

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Set is-value for elements constructed with the "new" operator

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Allow custom elements to extend <slot>

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>
2025-03-12 17:53:27 +00:00
dependabot[bot]
bb3d28bca7
build(deps): bump quote from 1.0.39 to 1.0.40 (#35941)
Bumps [quote](https://github.com/dtolnay/quote) from 1.0.39 to 1.0.40.
- [Release notes](https://github.com/dtolnay/quote/releases)
- [Commits](https://github.com/dtolnay/quote/compare/1.0.39...1.0.40)

---
updated-dependencies:
- dependency-name: quote
  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>
2025-03-12 17:52:21 +00:00
dependabot[bot]
a6678611a5
build(deps): bump winnow from 0.7.3 to 0.7.4 (#35940)
Bumps [winnow](https://github.com/winnow-rs/winnow) from 0.7.3 to 0.7.4.
- [Changelog](https://github.com/winnow-rs/winnow/blob/main/CHANGELOG.md)
- [Commits](https://github.com/winnow-rs/winnow/compare/v0.7.3...v0.7.4)

---
updated-dependencies:
- dependency-name: winnow
  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>
2025-03-12 17:49:04 +00:00