Commit Graph

553 Commits

Author SHA1 Message Date
Martin Robinson
1e8d1cf081 Remove our macOS-only task-info crate (#41132)
This crate is just using system APIs to get the resident and virtual
memory size of the current process. We can do this directly with
`mach2`, which also allows more flexibility if we want to fetch other
values in the future.

This does require duplicating `mach2` as the version used by `gilrs` is
older. Presumably, some future release of `gilrs` will upgrade soon.

Testing: There aren't really tests for this, but I tested it manually by
running the memory reporter and ensuring that both the old and new
values were
the same.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2025-12-08 12:04:26 +00:00
Anonmiraj
b207be05d9 change some allows to expects (#41040)
Changed some allow to expects and removed the unfulfilled expectations.

Testing: Refactor
Part of: #40383

Signed-off-by: anonmiraj <nabilmalek48@gmail.com>
2025-12-05 07:23:32 +00:00
Mukilan Thiyagarajan
7e744697d7 libservo: Trigger shutdown internally from Servo's Drop impl (#41012)
Remove the public API to trigger shutdown and instead trigger the
process from `Servo`'s implementation of `Drop` trait.

This makes it hard to create issues involving the order of destruction
of `Servo` and `WebView`s. It will also allow us to implement
asynchronous shutdown in the future.

Testing: Should be covered by existing unit tests.

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
2025-12-03 08:26:30 +00:00
Jonathan Schwender
323d1cf987 servoshell: Prepare November release (0.0.3) (#40962)
As discussed in the tsc-channel, prepare for the next release by cutting
a version on the last day of the month.

Note: The actual release would happen ~ 2 weeks from now, when the blog
post for november is ready.

This commit was produced by running `./mach release 0.0.3`.

Testing: Not required. Additional pre-release testing will happen after
the version bump and before the release, with potential patches being
cherry-picked to a release branch.

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2025-12-02 04:41:50 +00:00
Martin Robinson
6d4937b5d6 servoshell: Add architectural support for opening multiple windows (#40883)
This change is a major re-architecture of servoshell to support multiple
windows. Unfortunately it was not possible to do this incrementally, but
@mukilan and I did this together so we feel more confident about these
changes.

The main change here is that now the `HashMap` of windows that `App`
has can be filled with more than one `ServoShellWindow`.
`ServoShellWindow` is a wrapper around a `PlatformWindow` which can
either be headed, headless, or for embedded platforms. Embedded
platforms (Android and OHOS) are only expected to have a single window,
but there is no reason that more windows cannot be added.

There is still a little bit more work to be done in order to fully
enable
mulitple windows, so this change is just the architectural preparation.

This change enables the embedded and desktop versions of servoshell to
start to be fully integrated so that the entire `RunningAppState` is
shared between them.


Testing: servoshell is the test harness so these changes are covered
by the WPT tests.

---------

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
2025-11-27 10:41:32 +00:00
Narfinger
8215c5227a OHOS: Set the correct input type for url field (#40862)
This makes it mostly that the correct keyboard will be selected and we
don't start with an uppercase letter.

Testing: Compiled on OHOS and looked on the phone.

Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
2025-11-24 16:11:46 +00:00
Martin Robinson
39676a6f60 libservo: Remove Servo::animating() (#40799)
Instead of relying on `Sevo::animating()` in servoshell to drive the
event loop, it is sufficient to just let the `RefreshDriver` wake it up
when it is time to re-render.

This allows us to remove `Servo::animating()` completely. It is a bit
odd that there is a global API to track this, rather than per-`WebView`
or window, so this change just removes it entirely.

Testing: This should make the main loop of headless servoshell more
efficient,
but I do not think this difference is going to be observable in any way.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2025-11-21 17:35:45 +00:00
Jonathan Schwender
641a1f4cfc Update servoshell to v0.0.2 (#40614)
Ran ./mach release 0.0.2 to update the version number and update the
license.html
This is in preperation for the v0.0.2 release with the next nightly, as
discussed on zulip.

Testing: Not tested

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2025-11-13 15:49:06 +00:00
richerfu
680e8c7917 ohos: Support resize for tablet (#40391)
This change can allow resize window in pad and pc device.

---------

Signed-off-by: richerfu <southorange0929@foxmail.com>
2025-11-04 07:21:22 +00:00
Martin Robinson
493acd7e43 servoshell: Add a VsyncRefreshDriver for Android (#40306)
This adds an implementation of `VsyncRefreshDriver` ensuring that frame
updates are driven by the system compositor.

Testing: This should increase the smoothness of animations, but I'm
not sure how to test that exactly.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2025-11-03 08:00:29 +00:00
Jonathan Schwender
e285c9137c installer: Change windows installation directory (#40311)
Change the installation directory to Servo.
This was discussed during the October TSC meeting
and removes the outdated reference to mozilla research.

Testing: Manually tested the windows installer 
Fixes: #40068

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2025-10-31 14:47:08 +00:00
Sam
53d8c59e77 cargo: Bump Rust to 1.91 (#39471)
Rust 1.90 uses lld by default on linux, which should improve link time
and memory usage (I personally override ld with lld globally). And
because of miscompilations we observed on 1.90 we need to skip to 1.91.

Testing: Existing tests.
try run: https://github.com/sagudev/servo/actions/runs/18951980580

---------

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2025-10-30 21:14:10 +00:00
Martin Robinson
20179bca45 android: Let Servo handle touch events (#40240)
This change makes it so that Servo handles touch events on Android.
Flinging becomes a bit less native, but with two big benefits:

1. Before touch event handling on Android wasn't standards compliant,
   because web content didn't get a chance to call `preventDefault()` on
   touch events, whcih important for proper site behavior.
2. This unifies all touch event handling across Servo platforms. This
   means that improvements to things like fling will benefit all
   platforms equally. In addition, fling on Android can be integrated
   into Servo's animation handler.

Generally, this also just makes things much simpler to reason about on
Android.

Testing: This kind of input handling isn't tested in Servo yet.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2025-10-28 15:45:22 +00:00
Martin Robinson
37ae099695 compositing: Fully implement pinch zoom (#40083)
This change adds a full implementation of pinch zoom, including
center-aware zooming. Before this kind of pinch zooming was only enabled
on OpenHarmony. Now all pinch zooms must come with a focal point, which
determines the center point of the zoom. This enables full pinch zoom on
Android and has OpenHarmony use the same system for pinch zoom.

Every WebView now has a `PinchZoom` which describes the viewport of the
pinch zoom and handles panning with proper chaining of zoom viewport
panning to scroll layer scrolling.  In addition, the collection of touch
actions is simplified by storing an array and turning each into a
ScrollZoomEvent when appropriate.

Caveats:
-  We've noticed some hard to diagnose bugs with clamping the panning
  viewport, but we'll tackle those later once we figure out how to
  reliably reproduce them.
- Keyboard scroll events currently do not properly pan the pinch zoom
   viewport. This will be handled in a followup.

Testing: There are currently no tests for this kind of touch interaction
as there's no way to read the pinch zoom from a WebView. It's processed
asynchronously. Once that API is added, we should be able to add some
simple tests, but many things are still unaccessible such as the pan
position in the pinch zoom viewport.
Fixes #4224.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Rakhi Sharma <atbrakhi@igalia.com>
2025-10-23 13:52:27 +00:00
Josh Matthews
855445983d android: Add UI setting for experimental features (#40054)
These commits add a new settings screen to the app, then add:
1) a setting to disable a developer-targeted UI element (an indicator
about whether the app is polling continuously for events)
2) a toggle for experimental web platform features

The page needs to be reloaded after switching the toggle before any
changes can be observed.

Testing: Manually tested by visiting https://developer.mozilla.org with
the setting enabled and disabled. No automated testing for Android yet.
Fixes: #39791

---------

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2025-10-22 13:29:57 +00:00
Josh Matthews
cf077efe68 servoview: Focus the view when a touch input occurs. (#40049)
Focusing the location bar in the Android app shows the onscreen
keyboard, but clicking on a link in the current document does not make
it disappear. This change ensures the input focus is reset appropriately
and ensures the keyboard disappear when the location bar is not being
edited.

Testing: Manually tested. No automated tests for Android app at this
time.
Fixes: #40008

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2025-10-21 07:39:15 +00:00
Jonathan Schwender
205b049fcd mach: Android: Support custom profiles (#39982)
Use Release mode for gradle for production builds and Debug for any
other builds.
This fixes an exception when building for android with a custom cargo
profile.
`SERVO_TARGET_DIR` is read in `apk/jni/Android.mk` and specifies the
folder
libservoshell.so is expected to be in.

Testing: Tested manually with `./mach build --android --production`
Fixes: #34564

---------

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
Signed-off-by: Jonathan Schwender <55576758+jschwe@users.noreply.github.com>
Co-authored-by: Mukilan Thiyagarajan <mukilanthiagarajan@gmail.com>
2025-10-20 17:00:00 +00:00
Josh Matthews
3a29c20fff servoshell: Hook up Android software keyboard to embedder events. (#40009)
This is the most basic integration possible. Current limitations
include:
* the done button doesn't trigger form submission/keyboard hiding
* IME events don't trigger inputs (ie. pressing and holding a letter to
get more options)

However, it is infinitely better than the current integration.

Testing: Manually tested in the Android emulator.
Fixes: #12127 (we can open more specific issues after this)

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2025-10-20 13:57:04 +00:00
Sam
aaa7f83176 crown: Check closure bodies for unrooted types and fix root TransmitBodyPromise* (#39534)
We should also check closure bodies for unrooted expressions. 

Testing: New crown tests
Fixes: #37331
Fixes (partial): #37330

---------

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2025-09-29 08:57:23 +00:00
lumiscosity
d0bf02d00c Convert Android resources to lossless .webp (#39437)
Another tiny binary size win for Android! .webp assets are supported
since API level 17, and Servo is built against 33, so this shouldn't
cause issues.

Testing: Manual.

Signed-off-by: lumiscosity <averyrudelphe@gmail.com>
2025-09-22 16:00:14 +00:00
webbeef
3225d19907 cargo: Bump rustc to 1.89 (#36818)
Update Rustc to 1.89.

Reviewable by commit.

Leftover work:
- #37330 
- #38777

---------

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Co-authored-by: sagudev <16504129+sagudev@users.noreply.github.com>
2025-08-19 11:07:53 +00:00
Martin Robinson
8743a11ba4 tidy: Add a rule ensuring that // comments are followed by a space in Rust (#38698)
This shows up sometimes in code reviews, so it makes sense that tidy
enforces it. `rustfmt` supports this via comment normalization, but it
does many other things and is still an unstable feature (with bugs).

Testing: There are new tidy tests for this change.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2025-08-18 12:09:09 +00:00
lumiscosity
eda83564f3 Losslessly optimize Android resources (#38332)
Losslessly optimizes the Android resources. These are the only non-test
PNGs remaining in the project, to my knowledge.

Testing: Unnecessary, since this only optimizes assets.

Signed-off-by: maple! <averyrudelphe@gmail.com>
2025-07-29 12:15:50 +00:00
Narfinger
4615464388 OHOS CI allow profile (#37963)
OHOS CI: We now allow a profile flag. The profile name will be prepended
to all measurements.
This allows us to distinguish different build profiles in bencher.
Additionally we are more robust on duplicated entries for some
measurements.

Testing: Tested on CI with a run here:
https://github.com/Narfinger/servo/actions/runs/16168150429/job/45635086884
Fixes: https://github.com/servo/servo/issues/37890

Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
2025-07-10 00:58:15 +00:00
Narfinger
c3f441d7ab OHOS CI: Allow benchmarking of files and show smaps (#37881)
OHOS CI: Now we can benchmark specific files. These files need to be in
the runs.json and in the supprt/hitrace-bench folder.
A simple testcase of parsing html from string is included (taken from
https://github.com/servo/servo/issues/37223).
We copy all files in
support/hitrace-bench into the hap of the phone.
These files can use the console.log javascript command to get their
measured output.

Additionally, this now supports reporting resident-accordings-to-smaps
which is a slightly different memory than resident.

This needs update to hitrace-bench 0.7 which will be completed once the
PR is marked ready.

Testing: On action runner here:
https://github.com/Narfinger/servo/actions/runs/16118101025/job/45477031813

Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
2025-07-08 11:01:02 +00:00
Martin Robinson
89bfa26f00 libservo|compositor: Have scroll offset directionality match that of WebRender and the web (#37752)
Previously, our Servo-specific spatial tree scroll offsets were opposite
to
that of WebRender and also the web platform. This is due to the fact,
likely, that `winit` wheel directionality is also flipped. This change
has both the Servo spatial tree and the API take offsets that are
consistent with the web.

Any possible changes to the meaning of wheel directionality will be
handled in a followup change.

This is a breaking change to the Servo API.

Testing: This change updates unit tests.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
2025-07-03 13:04:06 +00:00
Martin Robinson
f0eb29206d Make the crown disabled warning clearer and less scary (#37535)
Instead of printing a Rust compilation warning, simply print a message
before every build (when using `mach`) that shows the build
configuration and whether or not `crown` is enabled.

Fixes #32597.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2025-06-19 12:44:26 +00:00
Narfinger
3b73b83a9f Allow OHOS servoshell to have a simple multiple tab implementation. (#36891)
Currently we just pause the compositor and replace the window in it
while having separate bookkeeping to remember which window belongs to
which tab.
Currently there are no tests for OHOS, so we cannot test the changes.

---------

Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
Co-authored-by: Jonathan Schwender <55576758+jschwe@users.noreply.github.com>
2025-06-16 08:17:31 +00:00
Narfinger
099fd10317 OHOS: Use native API to get most of the information needed for starting servoshell. (#37392)
Uses the native ohos-api crates to get the required information for
starting servoshell.
This increases the minimum API version requirement to API-14.

Testing: Tested on device.

---------

Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
Co-authored-by: Jonathan Schwender <55576758+jschwe@users.noreply.github.com>
2025-06-13 09:38:56 +00:00
Narfinger
ea5a20ab8d OHOS: update ci to use api-14 and newer action (#37395)
Update the CI to use api version 14 and 5.0.2 sdk. Additionally, update
the action. This is required because of
https://github.com/servo/servo/pull/37392.

Testing: CI does not have tests.

---------

Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
Co-authored-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2025-06-11 19:34:09 +00:00
Narfinger
5114e24db1 Servoshell: Refactor save_output_image and implement into OHOS (#37237)
Split out `save_output_image_if_necessary` into its own file so the code
can be shared by servoshell on the desktop and ohos.
Additionally, hook it up to the loop in OHOS and have OHOS allow
exiting.

Testing: Manual testing on ohos and desktop.

---------

Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
2025-06-11 08:51:44 +00:00
Narfinger
d42fe20403 Hitrace-bench will now report simple memory results to bencher.dev. (#37215)
Hitrace-bench will now report simple memory information. This includes
LayoutThread memory, JS memory, image-cache. The CI needs update to
hitrace-bench 0.5.0 which will have happened when t his PR is marked
ready.


- Action Run:
https://github.com/Narfinger/servo/actions/runs/15387749215
- Bencher output:
https://bencher.dev/perf/servo-ci?branches=e50d3058-235a-4437-9bd1-84b850cf7bcc&heads=e3e709a5-0309-416d-a5f1-283f3e401d0a&testbeds=62fa0d12-4dc9-4063-b445-aad7c4ed08b3&benchmarks=6bc5e3f4-8610-4fb4-bac6-652a110d7125&measures=80b345a8-20ec-4866-b12a-20fbf690adf8&start_time=1746261995000&end_time=1748853995000&report=ec3e632c-9c00-4b69-908a-457894cc7d40&key=true&reports_per_page=4&branches_per_page=8&testbeds_per_page=8&benchmarks_per_page=8&plots_per_page=8&reports_page=1&branches_page=1&testbeds_page=1&benchmarks_page=1&plots_page=1


Testing: CI does not have test but tested on own ci.

Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
2025-06-02 15:56:15 +00:00
Jonathan Schwender
78f74d0d5e ohos: servoshell: Use Flex{Column} to avoid Column bug (#37087)
The `Column()` height and thus also the XComponent height extends beyond
the physical display for unknown reasons. This is a problem on websites
that have a footer bar, since the footer is partially below the display
end.
Using Flex with Column direction works as expected.

Testing: Manual inspection with DevEco Testing inspecting the height of
the children elements in ArkUI
Fixes: Part of the servoshell surface extending beyond the physical
screen on ohos

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2025-05-24 01:37:46 +00:00
Narfinger
4c1a09e17b Improved OHOS Benchmarking to use different websites (#37055)
Workflow changes includes to allow a given runs.json file to be read by
hitrace-bench and perform the benchmarks.
It depends on the updated CI tools. Requires CI modification in
https://github.com/servo/ci-runners/pull/36.

Testing: This change was tested on the CI.
https://github.com/Narfinger/servo/actions/runs/15157760046/job/42616776563
A corresponding bencher output is here:
https://bencher.dev/console/projects/servo-ci/reports/99a369f7-e6c3-4141-83f9-0ecddac484a5?back=L2NvbnNvbGUvcHJvamVjdHMvc2Vydm8tY2kvcmVwb3J0cz9wZXJfcGFnZT04JnBhZ2U9MQ%3D%3D

Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
2025-05-22 01:31:35 +00:00
Josh Matthews
471f3f49bc crown: Do not check trait item projections. (#36095)
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2025-03-22 19:55:27 +00:00
Euclid Ye
86957be5f0 Create config_dir if none exist for caching (#35761)
* Create config_dir if none exist for caching

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

* remove specialized behaviour for ohos; copy prefs.json if necessary

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

* downgrade the log to trace verbosity

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

* update wpt-test

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

---------

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
2025-03-18 18:36:33 +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
Jonathan Schwender
78f7d525cc Rename ohos app bundle (#35790)
The `shell` suffix causes issues with the startup profiling tools on
OpenHarmony. The profiler fails to detect the start of the app.
This is fixed by renaming the app. I tried various
different variations and identified the `shell`
suffix to be the culprit.
E.g. `org.servo.shell` has the same issue, so its not
a length issue.

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2025-03-05 07:56:00 +00:00
Martin Robinson
23524a5413 libservo: Move size handling to RenderContext from WindowMethods (#35621)
This is the first step toward removing `WindowMethods`, which will
gradually be integrated into the `WebView` and `WebViewDelegate`. Sizing
of the `WebView` is now handled by the a size associated with a
`RenderingContext`. `WebView`s will eventually just paint the entire
size of their `RenderingContext`. Notes:

- This is transitionary step so now there is a `WebView::resize` and a
  `WebView::move_resize`. The first is the future which will resize the
  `WebView` and its associated `RenderingContext`. The second is a
  function that the virtual `WebView`s that will soon be replaced by a
  the one-`WebView` per `WebView` model.
- We do not need to call `WebView::move_resize` at as much any longer
  because the default size of the `WebView` is to take up the whole
  `RenderingContext`.
- `SurfmanRenderingContext` is no longer exposed in the API, as a
  surfman context doesn't naturally have a size unless a surface is
  bound to it.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2025-02-25 15:03:53 +00:00
Simon Wülker
be6765447d Update to rust 1.85 (#35628)
* Update to rust 1.85

This is needed for cargo-deny

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

* Upgrade crown

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

* Clippy fixes

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

* Re-upgrade cargo-deny to 0.18

Keeping it locked to 0.18 just in case they
update their required rustc version again

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

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2025-02-24 17:44:35 +00:00
Martin Robinson
71bfd2d13f libservo: Don't bounce ready-to-present frame notifications to the Constellation (#35369)
Instead of telling the Constellation to tell the embedder that new
frames are ready, have the compositor tell the embedder directly. This
should reduce frame latency. Now, after processing compositor
updates, run any pending `WebView::new_frame_ready` delegate methods.

This change also removes the `refresh` call from the Java interface as
that was the only other place that the compositor was rendering the
WebRender scene outside of event looping spinning. This `refresh` call
was completely unused.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2025-02-12 08:25:58 +00:00
Samson
724f701f79 crown: Pass --cfg crown to rustc from crown (#35073)
* crown: Pass `--cfg crown` to rustc from crown

also includes minor fix in crown for wrapper running based on clippy code

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

* fix doc

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

* Update python/servo/command_base.py

Co-authored-by: Martin Robinson <mrobinson@igalia.com>
Signed-off-by: Samson <16504129+sagudev@users.noreply.github.com>

---------

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Signed-off-by: Samson <16504129+sagudev@users.noreply.github.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
2025-01-31 18:08:04 +00:00
Josh Matthews
a014da590a Support future uses of traits with associated types in rooting analysis (#34359)
* crown: Support Rc<T::Promise> and callback objects parameterized over a trait..

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

* crown: Verify that attributes match between trait associated types and impls.

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

* crown: Check type aliases as part of associated type checks.

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

* crown: Add periods to all diagnostic messages.

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

* Tidy.

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

* Fix compile-fail test expectations.

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

---------

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2025-01-16 20:22:40 +00:00
Nico Burns
deb819f233 Upgrade rustc to 1.83 (#34793)
* Upgrade rustc to 1.83

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Fix crown (change copied from linked clippy function)

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Fix named lifetime lint

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Bump shell.nix

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Fix non-local impl warnings

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Format with 1.83 formatting changes

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Fix manual non-local impl

Signed-off-by: Nico Burns <nico@nicoburns.com>

* More fixes for crown

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Fix tidy

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Fix needless_return lints

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Fix doc comment lint

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Fix missing wait lint

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Allow needless_lifetimes lint

Signed-off-by: Nico Burns <nico@nicoburns.com>

* more doc comments

Signed-off-by: Nico Burns <nico@nicoburns.com>

* More needless_returns

Signed-off-by: Nico Burns <nico@nicoburns.com>

* is_empty lint

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Fix needless_lifetime lints

Signed-off-by: Nico Burns <nico@nicoburns.com>

* fix div_ceil lint

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Allow non-minimal bool

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Non-local impl in constellation

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Missing wait in constellation

Signed-off-by: Nico Burns <nico@nicoburns.com>

* fmt

Signed-off-by: Nico Burns <nico@nicoburns.com>

* remove useless lints table

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Fixup comments

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Allow non-local definition in sandboxing code to simplify feature flagging

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Remove wait calls and allow zombie_processes lint

Signed-off-by: Nico Burns <nico@nicoburns.com>

---------

Signed-off-by: Nico Burns <nico@nicoburns.com>
2025-01-01 09:38:28 +00:00
Jonathan Schwender
6a816649d6 Upgrade Rust to 1.82.0 (#34592)
* Fix deprecated PanicInfo alias

Fixes:
```rust
use of deprecated type alias `std::panic::PanicInfo`: use `PanicHookInfo` instead
```

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>

* build: upgrade rustc to 1.82.0

Tracking issue for the silenced lints:
https://github.com/servo/servo/issues/34591

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>

---------

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2024-12-12 12:00:51 +00:00
Mukilan Thiyagarajan
7fcde1f7a3 build: upgrade rustc to 1.81.0 (#34270)
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
2024-12-12 07:26:16 +00:00
Jonathan Schwender
dfcbb18a8b android: Fix flinging downwards (#34584)
* android: Fix onScroll source

Scrolling should be based on `e2`, the second event, since dX and
dY are relative to e2 and not e1.

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>

* android: Fix flinging down on android.

We need to ensure x and y are inside the window, otherwise servo will
not scroll!

Our fling implementation will set `mCurX` and `mCurY` to a very high
initial value when flinging with a negative velocity, since we don't
know the size of our content page and the android `OverScroller`
needs to know the size of the page.

Setting the page size to a ridiculously high value ensures that flinging
will not be cut of short, even if we fling farther then the edge of the
screen, starting from the touch up point.

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>

---------

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2024-12-12 04:54:50 +00:00
Jonathan Schwender
bb1d2bd0f2 ohos: Improve argument filtering (#34422)
This avoids future crashes if new unknown parameters
are passed by the runtime to the app.
It does make it slightly more inconvenient for the user,
since they must use `=` and space at the right place now.
This will also be updated in the book accordingly

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2024-12-02 08:17:53 +00:00
Jonathan Schwender
7489e3d5f4 ohos: Support swiping to go back (#34433)
Override the `onBackPress` callback, which by default
brings the application to the background and instead
tell servo to go back one page.
Users can invoke this by swiping from the left edge to the middle.
There is no equivalent callback / gesture to go forward.
In the default browser swiping from the right side to the middle
also invokes the goBack callback.

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2024-12-01 12:06:04 +00:00
Josh Matthews
c60e4afbee Support custom derives for generated types (#34356)
* script: Derive more Default implementations for dictionaries.

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

* script: Support arbitrary derives on generated enums.

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

* script: Support arbitrary derives for generated dictionaries.

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

* script: Support arbitrary derives for generated unions.

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

* script: Derive more impls for generated dicts and unions.

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

* script: Implement FromStr for generated enums.

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

* Fix clippy.

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

* crown: Allow returning unrooted values from Default::default.

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

---------

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2024-11-24 18:15:50 +00:00