Commit graph

50488 commits

Author SHA1 Message Date
Jonathan Schwender
b57eba2919
Fix android build on arm macs (#35516)
The prebuilt directory only contains an `darwin-x86_64`
toolchain, but that is perfectly fine, since that also
works.
In General, if there is only one prebuilt toolchain available,
it should be a very safe assumption that it is usable on  the host
platform, especially if the OS matches.

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2025-02-18 18:47:11 +00:00
dependabot[bot]
7d2437762f
build(deps): bump typenum from 1.17.0 to 1.18.0 (#35527)
Bumps [typenum](https://github.com/paholg/typenum) from 1.17.0 to 1.18.0.
- [Release notes](https://github.com/paholg/typenum/releases)
- [Changelog](https://github.com/paholg/typenum/blob/main/CHANGELOG.md)
- [Commits](https://github.com/paholg/typenum/compare/v1.17.0...v1.18.0)

---
updated-dependencies:
- dependency-name: typenum
  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-02-18 17:10:37 +00:00
Jason Tsai
22c3a63737
feat: add Notification Web API binding (#34842)
* feat: add Notification Web API binding

Signed-off-by: Jason Tsai <git@pews.dev>

* chore: update spec link

Signed-off-by: Jason Tsai <git@pews.dev>

* chore: fix clippy

Signed-off-by: Jason Tsai <git@pews.dev>

* fix: index overflow

Signed-off-by: Jason Tsai <git@pews.dev>

* test(tidy): add notification WebIDL standard URL

Signed-off-by: Jason Tsai <git@pews.dev>

* fix: allow crown::unrooted_must_root

Signed-off-by: Jason Tsai <git@pews.dev>

* implement GetPermission

Signed-off-by: Jason Tsai <git@pews.dev>

* fix silent type

Signed-off-by: Jason Tsai <git@pews.dev>

* add all properties

Signed-off-by: Jason Tsai <git@pews.dev>

* test: add Notification to global

Signed-off-by: Jason Tsai <git@pews.dev>

* chore: update wpt manifest and fix clippy

Signed-off-by: Jason Tsai <git@pews.dev>

* test: temp skip notifications

Signed-off-by: Jason Tsai <git@pews.dev>

* add vibration and apply suggestions

Signed-off-by: Jason Tsai <git@pews.dev>

* partially implement RequestPermission

Signed-off-by: Jason Tsai <git@pews.dev>

* call Permission request permission algorithm

Signed-off-by: Jason Tsai <git@pews.dev>

* chore: pub crate Notification

Signed-off-by: Jason Tsai <git@pews.dev>

* chore: fix clippy

Signed-off-by: Jason Tsai <git@pews.dev>

* chore: crown attribute

Signed-off-by: Jason Tsai <git@pews.dev>

* fix part of suggestions

Signed-off-by: Jason Tsai <git@pews.dev>

* fix: store private `Action` structure

Signed-off-by: Jason Tsai <git@pews.dev>

* chore: fix typo

Signed-off-by: Jason Tsai <git@pews.dev>

* fix: serialize images URL

Signed-off-by: Jason Tsai <git@pews.dev>

* fix: use globalscope as environment settings object

Signed-off-by: Jason Tsai <git@pews.dev>

* chore: add pref `dom_notification_enabled` and default to disabled

Signed-off-by: Jason Tsai <git@pews.dev>

* fix: use `descriptor_permission_state`

Signed-off-by: Jason Tsai <git@pews.dev>

* apply suggestions

Signed-off-by: Jason Tsai <git@pews.dev>
Co-authored-by: Josh Matthews <josh@joshmatthews.net>

* test: remove passed meta

Signed-off-by: Jason Tsai <git@pews.dev>

* test: enable notification prefs in mozilla tests

Signed-off-by: Jason Tsai <git@pews.dev>

---------

Signed-off-by: Jason Tsai <git@pews.dev>
Co-authored-by: Josh Matthews <josh@joshmatthews.net>
2025-02-18 16:56:57 +00:00
dependabot[bot]
14d591c462
build(deps): bump clap from 4.5.29 to 4.5.30 (#35526)
Bumps [clap](https://github.com/clap-rs/clap) from 4.5.29 to 4.5.30.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.29...clap_complete-v4.5.30)

---
updated-dependencies:
- dependency-name: clap
  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-02-18 16:55:38 +00:00
dependabot[bot]
ab51fbe1f1
build(deps): bump the gstreamer-related group with 22 updates (#35525)
Bumps the gstreamer-related group with 22 updates:

| Package | From | To |
| --- | --- | --- |
| gstreamer | `0.23.4` | `0.23.5` |
| gstreamer-base | `0.23.4` | `0.23.5` |
| gstreamer-gl | `0.23.4` | `0.23.5` |
| gstreamer-gl-sys | `0.23.4` | `0.23.5` |
| gstreamer-sys | `0.23.4` | `0.23.5` |
| gstreamer-video | `0.23.4` | `0.23.5` |
| gstreamer-app | `0.23.4` | `0.23.5` |
| gstreamer-app-sys | `0.23.4` | `0.23.5` |
| gstreamer-audio | `0.23.4` | `0.23.5` |
| gstreamer-audio-sys | `0.23.4` | `0.23.5` |
| gstreamer-base-sys | `0.23.4` | `0.23.5` |
| gstreamer-gl-egl | `0.23.4` | `0.23.5` |
| gstreamer-gl-egl-sys | `0.23.4` | `0.23.5` |
| gstreamer-gl-x11 | `0.23.4` | `0.23.5` |
| gstreamer-gl-x11-sys | `0.23.4` | `0.23.5` |
| gstreamer-player | `0.23.4` | `0.23.5` |
| gstreamer-player-sys | `0.23.4` | `0.23.5` |
| gstreamer-sdp | `0.23.4` | `0.23.5` |
| gstreamer-sdp-sys | `0.23.4` | `0.23.5` |
| gstreamer-video-sys | `0.23.4` | `0.23.5` |
| gstreamer-webrtc | `0.23.4` | `0.23.5` |
| gstreamer-webrtc-sys | `0.23.4` | `0.23.5` |


Updates `gstreamer` from 0.23.4 to 0.23.5

Updates `gstreamer-base` from 0.23.4 to 0.23.5

Updates `gstreamer-gl` from 0.23.4 to 0.23.5

Updates `gstreamer-gl-sys` from 0.23.4 to 0.23.5

Updates `gstreamer-sys` from 0.23.4 to 0.23.5

Updates `gstreamer-video` from 0.23.4 to 0.23.5

Updates `gstreamer-app` from 0.23.4 to 0.23.5

Updates `gstreamer-app-sys` from 0.23.4 to 0.23.5

Updates `gstreamer-audio` from 0.23.4 to 0.23.5

Updates `gstreamer-audio-sys` from 0.23.4 to 0.23.5

Updates `gstreamer-base-sys` from 0.23.4 to 0.23.5

Updates `gstreamer-gl-egl` from 0.23.4 to 0.23.5

Updates `gstreamer-gl-egl-sys` from 0.23.4 to 0.23.5

Updates `gstreamer-gl-x11` from 0.23.4 to 0.23.5

Updates `gstreamer-gl-x11-sys` from 0.23.4 to 0.23.5

Updates `gstreamer-player` from 0.23.4 to 0.23.5

Updates `gstreamer-player-sys` from 0.23.4 to 0.23.5

Updates `gstreamer-sdp` from 0.23.4 to 0.23.5

Updates `gstreamer-sdp-sys` from 0.23.4 to 0.23.5

Updates `gstreamer-video-sys` from 0.23.4 to 0.23.5

Updates `gstreamer-webrtc` from 0.23.4 to 0.23.5

Updates `gstreamer-webrtc-sys` from 0.23.4 to 0.23.5

---
updated-dependencies:
- dependency-name: gstreamer
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: gstreamer-related
- dependency-name: gstreamer-base
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: gstreamer-related
- dependency-name: gstreamer-gl
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: gstreamer-related
- dependency-name: gstreamer-gl-sys
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: gstreamer-related
- dependency-name: gstreamer-sys
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: gstreamer-related
- dependency-name: gstreamer-video
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: gstreamer-related
- dependency-name: gstreamer-app
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: gstreamer-related
- dependency-name: gstreamer-app-sys
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: gstreamer-related
- dependency-name: gstreamer-audio
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: gstreamer-related
- dependency-name: gstreamer-audio-sys
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: gstreamer-related
- dependency-name: gstreamer-base-sys
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: gstreamer-related
- dependency-name: gstreamer-gl-egl
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: gstreamer-related
- dependency-name: gstreamer-gl-egl-sys
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: gstreamer-related
- dependency-name: gstreamer-gl-x11
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: gstreamer-related
- dependency-name: gstreamer-gl-x11-sys
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: gstreamer-related
- dependency-name: gstreamer-player
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: gstreamer-related
- dependency-name: gstreamer-player-sys
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: gstreamer-related
- dependency-name: gstreamer-sdp
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: gstreamer-related
- dependency-name: gstreamer-sdp-sys
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: gstreamer-related
- dependency-name: gstreamer-video-sys
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: gstreamer-related
- dependency-name: gstreamer-webrtc
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: gstreamer-related
- dependency-name: gstreamer-webrtc-sys
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: gstreamer-related
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-18 16:48:04 +00:00
Martin Robinson
f34f2d9d0a
libservo: Expose SoftwareRenderingContext and WindowRenderingContext (#35501)
Expose two easy-to-use wrappers around `SurfmanRenderingContext` that
make the API simpler to use:

- `WindowRenderingContext`: This `RenderingContext` is a newtype around
  `SurfmanRenderingContext` takes a `raw-window-handle` display and window
  and creates a full window rendering context.
- `SoftwareRenderingContext`: is wraps `SurfmanRenderingContext` and
  adds a swap chain in order to expose a software GL rendering context.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2025-02-18 14:50:41 +00:00
Josh Matthews
73507f58e6
script: Add custom logging representation for DOM interfaces. (#35416)
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2025-02-18 05:28:18 +00:00
Josh Matthews
1d606bb85c
Make WebBluetooth an optional feature. (#35479)
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2025-02-18 04:13:43 +00:00
Simon Wülker
32f19c1eae
Don't attempt to report style attribute for non-htmlelements to devtools (#35519)
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2025-02-17 21:33:11 +00:00
Oriol Brufau
f01d525852
layout: Fully support sizing keywords on main size property of flex item (#35471)
Still lacking support on min and max main size properties, and on the
various cross size properties.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-02-17 21:19:50 +00:00
dependabot[bot]
daabb71b9f
build(deps): bump smallvec from 1.13.2 to 1.14.0 (#35515)
Bumps [smallvec](https://github.com/servo/rust-smallvec) from 1.13.2 to 1.14.0.
- [Release notes](https://github.com/servo/rust-smallvec/releases)
- [Commits](https://github.com/servo/rust-smallvec/compare/v1.13.2...v1.14.0)

---
updated-dependencies:
- dependency-name: smallvec
  dependency-type: direct:production
  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-02-17 19:17:47 +00:00
Oriol Brufau
c2224d5afc
layout: Partial support for sizing keywords on flex items (#35469)
* Add tests for sizing keywords on flex items

Signed-off-by: Oriol Brufau <obrufau@igalia.com>

* layout: Partial support for sizing keywords on flex items

When a flex item has `flex-basis: auto`, the used `flex-basis` is the
value of the main size property. In that case, if the main size property
was set to keyword, we were always assuming it was `auto`. Now we handle
non-`auto` keywords correctly.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>

---------

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-02-17 17:51:10 +00:00
dependabot[bot]
5fa14c97bd
build(deps): bump document-features from 0.2.10 to 0.2.11 (#35513)
Bumps [document-features](https://github.com/slint-ui/document-features) from 0.2.10 to 0.2.11.
- [Release notes](https://github.com/slint-ui/document-features/releases)
- [Changelog](https://github.com/slint-ui/document-features/blob/master/CHANGELOG.md)
- [Commits](https://github.com/slint-ui/document-features/commits)

---
updated-dependencies:
- dependency-name: document-features
  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-02-17 17:23:33 +00:00
dependabot[bot]
26d5567a44
build(deps): bump equivalent from 1.0.1 to 1.0.2 (#35512)
Bumps [equivalent](https://github.com/indexmap-rs/equivalent) from 1.0.1 to 1.0.2.
- [Commits](https://github.com/indexmap-rs/equivalent/compare/v1.0.1...v1.0.2)

---
updated-dependencies:
- dependency-name: equivalent
  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-02-17 17:19:09 +00:00
dependabot[bot]
92ac089a0c
build(deps): bump smallbitvec from 2.5.3 to 2.6.0 (#35511)
Bumps [smallbitvec](https://github.com/servo/smallbitvec) from 2.5.3 to 2.6.0.
- [Release notes](https://github.com/servo/smallbitvec/releases)
- [Commits](https://github.com/servo/smallbitvec/compare/v2.5.3...v2.6.0)

---
updated-dependencies:
- dependency-name: smallbitvec
  dependency-type: direct:production
  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-02-17 17:15:04 +00:00
dependabot[bot]
9fc51f18b5
build(deps): bump the gstreamer-related group with 4 updates (#35510)
Bumps the gstreamer-related group with 4 updates: [gio-sys](https://github.com/gtk-rs/gtk-rs-core), [glib](https://github.com/gtk-rs/gtk-rs-core), [glib-sys](https://github.com/gtk-rs/gtk-rs-core) and [gobject-sys](https://github.com/gtk-rs/gtk-rs-core).


Updates `gio-sys` from 0.20.8 to 0.20.9
- [Release notes](https://github.com/gtk-rs/gtk-rs-core/releases)
- [Changelog](https://github.com/gtk-rs/gtk-rs-core/blob/main/CHANGELOG.md)
- [Commits](https://github.com/gtk-rs/gtk-rs-core/compare/0.20.8...0.20.9)

Updates `glib` from 0.20.7 to 0.20.9
- [Release notes](https://github.com/gtk-rs/gtk-rs-core/releases)
- [Changelog](https://github.com/gtk-rs/gtk-rs-core/blob/main/CHANGELOG.md)
- [Commits](https://github.com/gtk-rs/gtk-rs-core/compare/0.20.7...0.20.9)

Updates `glib-sys` from 0.20.7 to 0.20.9
- [Release notes](https://github.com/gtk-rs/gtk-rs-core/releases)
- [Changelog](https://github.com/gtk-rs/gtk-rs-core/blob/main/CHANGELOG.md)
- [Commits](https://github.com/gtk-rs/gtk-rs-core/compare/0.20.7...0.20.9)

Updates `gobject-sys` from 0.20.7 to 0.20.9
- [Release notes](https://github.com/gtk-rs/gtk-rs-core/releases)
- [Changelog](https://github.com/gtk-rs/gtk-rs-core/blob/main/CHANGELOG.md)
- [Commits](https://github.com/gtk-rs/gtk-rs-core/compare/0.20.7...0.20.9)

---
updated-dependencies:
- dependency-name: gio-sys
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: gstreamer-related
- dependency-name: glib
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: gstreamer-related
- dependency-name: glib-sys
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: gstreamer-related
- dependency-name: gobject-sys
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: gstreamer-related
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-17 17:11:05 +00:00
Gae24
56199fd153
window: avoid NonNull<JSObject> in NamedGetter (#35508)
Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
2025-02-17 12:48:21 +00:00
Simon Wülker
f5ed44c3aa
Don't remove used fonts in collect_unused_webrender_resources (#35506)
The check on whether or not a font should be retained was inverted.

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2025-02-17 11:15:00 +00:00
Bi Fuguo
3fe42a0b5a
implement Touchevent prevent default behavior (#35031)
* implement Touchevent prevent default behavior

* The status change logic of the `TouchHandler` is changed.
> The `WaitingForScript` state is canceled. TouchAction can be identified
  based on the current touch type and numbers if touch points.
* Sends current event to script thread along with recognized `TouchAction`.
> After dispatch event, script thread sends a `TouchEventProcess(EventResult)`
  message to main thread. If the event is set to `DefaultAllowed`, the
  corresponding `TouchAction` information is added.
* After receiving `DefaultAllowed(TouchAction)` message, main thread executes corresponding action.
> `DefaultPrevented(TouchEventType)` is received. Use `prevent_click` to mark
  that the default `Click` is blocked, and `prevent_move` to mark that the
  default `Scroll` and `Zoom` are blocked. In this way, all TouchActions
  implement preventDefault.
Signed-off-by: Bi Fuguo <1782765876@qq.com>

* fix some suggestions

* support preventDefault fling
* move `TouchAction` to share touch directory
* check preventDefault everytime when touch
* fix zoom ineffective

Signed-off-by: Bi Fuguo <1782765876@qq.com>

* fix some suggestions

rename on_event_processed to  on_touch_event_processed
clear unused features

Signed-off-by: Bi Fuguo <1782765876@qq.com>

* Optimizes pan performance by continuously sliding without waiting for the eventhandler.

Signed-off-by: kongbai1996 <1782765876@qq.com>

* resolve conflict

Signed-off-by: kongbai1996 <1782765876@qq.com>

---------

Signed-off-by: Bi Fuguo <1782765876@qq.com>
Signed-off-by: kongbai1996 <1782765876@qq.com>
2025-02-17 10:50:04 +00:00
Martin Robinson
6dce329acc
libservo: Expose an OffscreenRenderingContext and use it for servoshell (#35465)
Create a new `RenderingContext` which is used to render to a
`SurfmanRenderingContext`-related offscreen buffer. This allows having a
temporary place to render Servo and then blitting the results to a
subsection of the parent `RenderingContext`.

The goal with this change is to remove the details of how servoshell
renders from the `Compositor` and prepare for the compositor-per-WebView
world.


Co-authred-by: Ngo Iok Ui (Wu Yu Wei) <yuweiwu@pm.me>

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
2025-02-17 08:35:05 +00:00
Euclid Ye
d466688526
dom: expose obsolete scheme attribute for meta tag (#35505)
* dom: expose obsolete `scheme` attribute for meta tag

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>

* update tests

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>

---------

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
2025-02-17 07:07:24 +00:00
Martin Robinson
a17b2e0cb2
servoshell: Actually set the Servo delegate in servoshell (#35502)
This was implemented, but unset.

Fixes #35481.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2025-02-16 23:13:19 +00:00
Gae24
966888615f
DataTransferItem: improve spec compliance (#35418)
* DataTransfer: remove PlainString and Binary structs

Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>

* add DataTransferItemList remove() test case

Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>

* bring datatransferitem closer to the spec

Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>

* queue a task to invoke the callback

Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>

---------

Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
2025-02-16 18:53:35 +00:00
Samson
0e9bebce0f
chore: Update wgpu (#35503)
* Update wgpu

d8833d0798
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

* Update expectations

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

* fix tidy

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

---------

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2025-02-16 18:24:13 +00:00
Josh Matthews
34c73fb452
net: Use the unfiltered response status when comparing against cached resources. (#35483)
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2025-02-16 13:19:51 +00:00
shanehandley
5ab3641a8e
script: implement HTMLHyperlinkElementUtils for HTMLAreaElement (#35482)
This makes some common functionality in HTMLAreaElement and
HTMLAnchorElement shared code.

Signed-off-by: Shane Handley <shanehandley@fastmail.com>
2025-02-16 09:54:31 +00:00
Servo WPT Sync
6d6070242b
Update web-platform-tests to revision b'de61904887c13679551c32e5e3e70b4dc870c98a' (#35480)
Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
2025-02-16 01:35:48 +00:00
Kingsley Yung
b4f48c561b
script: Take away Fallible from new_resolved and new_rejected (#35473)
* script: Take away Fallible from new_resolved and new_rejected

Both Promise::new_resolved and new_rejected only return `Ok`. We don't
need them to be fallible. Simply return `Rc<Promise>`, instead of
`Fallible<Rc<Promise>>`. Also, clean up relevant code.

Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>

* script: pull_algorithm becomes infallible

The method pull_algorithm only returns `Some(Ok(_))`, which means it is
infallible. Clean up the returned type.

Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>

* script: generic_initialize becomes infallible

The method generic_initialize only returns `Ok(())`, which means it is
infallible. Clean up the returned type.

Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>

---------

Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
2025-02-15 21:29:34 +00:00
shanehandley
3421185737
script: remove non-actionable todo from script/dom/document.rs (#35472)
Signed-off-by: Shane Handley <shanehandley@fastmail.com>
2025-02-15 03:55:53 +00:00
dependabot[bot]
453e4a81df
build(deps): bump ring from 0.17.8 to 0.17.9 (#35468)
Bumps [ring](https://github.com/briansmith/ring) from 0.17.8 to 0.17.9.
- [Commits](https://github.com/briansmith/ring/commits)

---
updated-dependencies:
- dependency-name: ring
  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-02-14 17:18:51 +00:00
dependabot[bot]
91fb70b2e6
build(deps): bump cc from 1.2.13 to 1.2.14 (#35467)
Bumps [cc](https://github.com/rust-lang/cc-rs) from 1.2.13 to 1.2.14.
- [Release notes](https://github.com/rust-lang/cc-rs/releases)
- [Changelog](https://github.com/rust-lang/cc-rs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.13...cc-v1.2.14)

---
updated-dependencies:
- dependency-name: cc
  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-02-14 17:00:34 +00:00
Martin Robinson
ebd471bb55
deps: Remove some unused Cargo.toml (#35466)
These were discovered with cargo-machete.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2025-02-14 15:33:14 +00:00
chickenleaf
32c13bcb1e
servoshell: Port input dialog code to use egui intead of tinyfiledialogs (#35464)
Signed-off-by: L Ashwin B <lashwinib@gmail.com>
2025-02-14 15:02:39 +00:00
Euclid Ye
3e1d15da9b
Fix scroll_sensitivity related naming issue (#35462)
Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
2025-02-14 10:18:25 +00:00
Euclid Ye
03fc54e682
layout: Implement overflow scroll support for different axes (#35414)
* layout: Add AxesScrollSensitivity to enable control of scroll in axis

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>

* layout_2013: Be compatible with AxesScrollSensitivity

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>

* layout: update struct AxesScrollSensitivity to euclid::Vector2D

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>

* display_list: implement From<Overflow> for ScrollSensitivity

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>

* layout: simplify and reuse scroll related logic

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>

* layout_2013: simplify and reuse scroll related logic

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>

* layout, layout_2013: revert AxesScrollSensitivity to pair struct

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>

* layout: Reimport ComputedOverflow as #35103 depends on it

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>

* layout: Add AxesOverflow to replace PhysicalVec

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>

* layout: implement scroll of viewport for different axes

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>

* layout: explicitly handle overflow match

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>

* Update components/shared/webrender/Cargo.toml

Co-authored-by: Martin Robinson <mrobinson@igalia.com>
Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>

---------

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
2025-02-14 08:14:57 +00:00
Josh Matthews
9b3e23633d
chore: Remove outdated FIXME. (#35458)
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2025-02-14 07:35:44 +00:00
Oriol Brufau
2b930814d7
layout: Basic implementation of size keywords on flex-basis (#35413)
layout: Basic implementation of size keywords on `flex-basis`

This splits the logic to resolve the used value of `flex-basis` into its
own method, which preserves size keywords.

And then it changes `flex_base_size()` to resolve the provided keywords
properly. However, it doesn't handle size keywords in the cross axis.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-02-13 15:24:06 +00:00
Oriol Brufau
3d9e7a95e0
layout: Remove BoxFragment::overflow_clip_rect() (#35443)
It had a single caller, and the relevant data was passed as parameters
because the caller needed it too. It seems simpler to just remove it
and inline the code into the caller.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-02-13 15:08:17 +00:00
Mukilan Thiyagarajan
c95bd9d052
libservo: change 'request_fullscreen_state_change' API to a notification (#35445)
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
2025-02-13 09:04:41 +00:00
Bi Fuguo
3a63622d6b
fix issue #35449: handle touch events in on_input_event. (#35450)
Signed-off-by: kongbai1996 <1782765876@qq.com>
2025-02-13 08:05:03 +00:00
Steven Novaryo
becd097585
dom: IntersectionObserver initialization (#35314)
* Add internal slot definition

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

* Add initialization for new IntersectionObserver

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

* Move observer initialization

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

* Update WPT tests

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

* Make a copy of style IntersectionObserverRootMargin

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

* Move initialization to account for rooted expression

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

* Fix some fields typing

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

* Impl rest of IntersectionObserver interface

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

* Fix tidy issue

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

* Apply types logic and tidy fix from suggestions

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

* Add allow unrooted for add registration to element

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

---------

Signed-off-by: stevennovaryo <steven.novaryo@gmail.com>
2025-02-13 07:47:29 +00:00
Samson
610a1c2303
Use surfman with glow bindings (take II) (#35422)
* Reapply "Use surfman with glow bindings (#34328)" (#35402)

This reverts commit 0fed99590a.

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

* update surfman

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

---------

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2025-02-13 07:26:38 +00:00
webbeef
48e38bcaa2
(chore): tinyfiledialog::MessageBoxIcon is only used on Linux (#35441)
This was causing a compilation warning on Mac and Windows.

Signed-off-by: webbeef <me@webbeef.org>
2025-02-13 07:24:04 +00:00
webbeef
8cd280ca3b
Update window.screenX and window.screenY when moving the embedder window (#35246)
Signed-off-by: webbeef <me@webbeef.org>
2025-02-13 03:13:32 +00:00
Oriol Brufau
f593b6d426
Protect create_spanned_slot_based_on_cell_above() against arithmetic underflow (#35437)
`Table::create_spanned_slot_based_on_cell_above()` was performing the
subtraction `self.slots.len() - 2`, which could theoretically result
in underflow if `self.slots.len()` is 0 or 1.

That shouldn't have been possible in practice, but it may be worth
addressing, to improve code robustness. So this patch:
  - Switches to `self.current_y()?.checked_sub(1)?`, which is safe and
    is easier to understand.
  - Moves `create_spanned_slot_based_on_cell_above()` to `TableBuilder`,
    since `current_y()` is there, and the method is only used when
    building the table anyways.
  - Ensures that both callers use `expect()` to assert that the method
    returned a value.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-02-12 20:11:11 +00:00
Josh Matthews
abede5b4b2
Run WPT notifications tests. (#35442)
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2025-02-12 19:04:09 +00:00
dependabot[bot]
99fa014d70
build(deps): bump miniz_oxide from 0.8.3 to 0.8.4 (#35439)
Bumps [miniz_oxide](https://github.com/Frommi/miniz_oxide) from 0.8.3 to 0.8.4.
- [Changelog](https://github.com/Frommi/miniz_oxide/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Frommi/miniz_oxide/commits)

---
updated-dependencies:
- dependency-name: miniz_oxide
  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-02-12 17:29:41 +00:00
dependabot[bot]
98a86d4175
build(deps): bump clap from 4.5.28 to 4.5.29 (#35438)
Bumps [clap](https://github.com/clap-rs/clap) from 4.5.28 to 4.5.29.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.28...clap_complete-v4.5.29)

---
updated-dependencies:
- dependency-name: clap
  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-02-12 17:26:49 +00:00
Martin Robinson
0908a47780
libservo: Expose a single InputEvent type and pass it to script (#35430)
This change exposes a single `InputEvent` type and now there is only a
single delegate method for this `WebViewDelegate::notify_input_event`.

- Clipboard events are now handled as `EditingAction` inpute events. In
  the future this can include things like "Select All", etc.

In addition, many parts of the dance to pass these events can now be
simplified due to this abstraction.

- All forwarded events are handled the same way in the `Constellation`,
  though they may carry an optional hit test (for events that have a
  `point`) which affects which `Pipeline` they are sent to.
- In the `ScriptThread` we now accept these `InputEvents` and use them
  everywhere. Now all "compositor events" are "input events".
- This allows removing several data structures which are no longer
  necessary.
- We no longer inform the embedder when an event was handled by a
  WebView as that was only important for a MDI feature that will
  no longer be so important the full-featured `WebView` API.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
2025-02-12 17:07:15 +00:00
Mukilan Thiyagarajan
b7b8619e87
script: reset spurious frame counter *only* when reflow is triggered (#35435)
I had applied a review suggestion in the previous PR to combine the
nested conditions, but this is wrong as this meant the spurious frame
callback was getting reset not just when the reflow was triggered by the
callback, but also each time the counter reached the threshold.

The test added in the previous PR also had issues with the upstream WPT
repo's lint checks - `test.step_timeout` should be used instead of the
`setTimeout` function.

This patch fixes the counter update logic and also addresses the linting
issue caught by upstream's linter.

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
2025-02-12 14:23:55 +00:00