aboutsummaryrefslogtreecommitdiffstats
path: root/python
Commit message (Collapse)AuthorAgeFilesLines
* mach: fix test-tidy to handle missing merge commit (#32551)Mukilan Thiyagarajan2024-06-191-0/+2
| | | | | | | | | This restores the behaviour prior to #32540 where the case where no merge commit being found (which happens on CI in forks because we do a shallow clone) is handled as if no changes where found. Fixes #32550. Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* Move android port code to servoshell (#32533)Jonathan Schwender2024-06-191-10/+4
| | | | Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
* ci: Use a servo.org email address for the servo-wpt-sync GitHub bot (#32515)Martin Robinson2024-06-182-2/+2
| | | | | This is the new address of the WPT sync bot. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Use workspace definitions for all crates and update to the 2021 edition (#32544)Martin Robinson2024-06-181-0/+2
|
* mach: fix test-tidy to not skip `Cargo.lock` (#32540)Mukilan Thiyagarajan2024-06-181-9/+14
| | | | | | | | | | PR #32465 broke the lint because it initializes FileList with a file name (./Cargo.lock). This causes it to always return an empty list when the `only_changed_files` parameter is `False` since `os.walk` requires a directory and not a file. Fixes #32530. Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* Fix android build on Fedora 40. (#32532)Jonathan Schwender2024-06-181-13/+15
| | | | | | | | | | | | | | | | | | | * Postfix PATH with android toolchain: We only need to edit path for the linker specified in the `.cargo/config.toml` to be found. Adding the NDK clang to the end of PATH is sufficient for that. Adding the NDK clang to the front can cause problems however, since it causes the NDK `clang` to be preferred over the system clang. This can cause problems on some systems, where compiling e.g. buildscripts for HOST subsequently fails. * Prefix target compiler and compiler flags variables with `TARGET_` so as not to influence compilation for HOST targets. * SET `CLANG_PATH` to avoid [bindgen #2682] [bindgen #2682]: https://github.com/rust-lang/rust-bindgen/issues/2682 Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
* Add OpenHarmony support to mach and CI (#32507)Jonathan Schwender2024-06-172-2/+158
| | | | | | | | | | | | | | | | | | | | | | | | * Add ohos to mach Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> * Add OpenHarmony build to CI * Rename ohos sdk action I decided to rename the upstream ohos sdk action to setup-ohos-sdk, making it clearer that is a github action repository. Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com> * Remove commented line Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> --------- Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
* asan: Add a leak suppression file with known false positives (#32511)Erik Hennig2024-06-171-0/+4
| | | Co-authored-by: Jonas Zeunert <jonas@zeunert.org>
* Add `--with-asan` (#31429)Samson2024-06-165-22/+64
|
* mach: Use `cargo rustc` instead of `cargo build` (#32484)Jonathan Schwender2024-06-131-1/+1
| | | | | | | | | This allows passing `--crate-type` and rustflags which only apply to the top-level-crate. The former is useful to merge the android and ohos apps into servoshell, while the later may be useful in the future. Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
* Add cargo-deny to mach-tidy to check license compliance. (#32465)Jonathan Schwender2024-06-125-42/+69
| | | | | | | | | | | | | | | | | | | | | | | * Use cargo-deny to check license compliance. All licenses should be MPL-2.0 or weaker. * Run cargo-deny check licenses in mach tidy * fmt * Fix inverted boolean * Move cargo deny to tidy.py * Add quotes around license in error message * Integrate `cargo-deny` into tidy fully * Fix script tests --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* base: Remove `ucd` dependency (#32424)Martin Robinson2024-06-031-6/+7
| | | | | | | | | | | | | | Remove the `ucd` dependency which has not been updated in 8 years. In addition, replace it with a generated UnicodeBlock enum which reflects the modern Unicode standard. This is generated via a Python script which is included in the repository. The generation is not part of the build process, because the Unicode database is hosted on the web and it does not change the frequently. This is done instead of bringing in the more up-to-date `unicode_blocks` dependency. `unicode_blocks` defines each block as constant, which means that they cannot be used in match statements -- which we do in Servo. Co-authored-by: Lauryn Menard <lauryn.menard@gmail.com>
* mach: Read .servobuild as utf-8 (#32431)Jonathan Schwender2024-06-031-1/+1
| | | | | | Without this on my windows machine `open` seems to default to the `gbk` codec, and then fails to read the file if it contains Windows style paths (e.g. both `ndk = D:\my_path` or `ndk = D:\\my_path` cause the `f.read()` to fail ).
* Document library crates only in mach doc (#32429)Ngo Iok Ui (Wu Yu Wei)2024-06-021-0/+3
| | | | | | | | | * Document library crates only in mach doc * Fix typo --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* mach: fix crash when sending notifications on Windows Server 2019 (#32352)Delan Azabani2024-05-231-6/+9
|
* Fix mach bootstrap --skip-platform (#32341)Delan Azabani2024-05-221-1/+2
|
* compositor: Move WebRender-ish messages and types to `webrender_traits` (#32315)Mukilan Thiyagarajan2024-05-201-0/+1
| | | | | | | | | | | | | | | | | | | | * Move WebRender related types to `webrender_traits` This refactor moves several WebRender related types from `compositing_traits`, `script_traits` and `net_traits` crates to the `webrender_traits` crate. This change also moves the `Image` type and associated function out of `net_traits` and into the `pixels` crate. Co-authored-by: Martin Robinson <mrobinson@igalia.com> Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * Move `script_traits::WebrenderIpcSender` to `webrender_traits::WebRenderScriptApi` --------- Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Move non-gfx things out of `gfx_traits` and create a `base` crate (#32296)Martin Robinson2024-05-171-1/+0
| | | | | | | | | | | | | | | | | | | | | | | For a long time, `gfx_traits` has held a lot of things unrelated to graphics and also unrelated to the `gfx` crate (which is mostly about fonts). This is a cleanup which does a few things: 1. Move non `gfx` crate things out of `gfx_traits`. This is important in order to prevent dependency cycles with a different integration between layout, script, and fonts. 2. Rename the `msg` crate to `base`. It didn't really contain anything to do with messages and instead mostly holds ids, which are used across many different crates in Servo. This new crate will hold the *rare* data types that are widely used. Details: - All BackgroundHangMonitor-related things from base to a new `background_hang_monitor_api` crate. - Moved `TraversalDirection` to `script_traits` - Moved `Epoch`-related things from `gfx_traits` to `base`. - Moved `PrintTree` to base. This should be widely useful in Servo. - Moved `WebrenderApi` from `base` to `webrender_traits` and renamed it to `WebRenderFontApi`.
* Update flake8 to work on python3.12 (#32264)Samson2024-05-091-2/+2
|
* Skip installing 'clang' if 'clang' binary already exists (#32242)Diego Pino2024-05-081-0/+5
| | | | | | | | | | | Simply installing 'clang' installs the default version of Clang for Linux. For instance, the command: 'apt install clang' installs 'clang-14' in Ubuntu 22.04. It might be possible that a more recent version of clang is already installed in the system. For instance, package 'clang-17'. In the case a 'clang' binary is already installed in the system, skip the installation of 'clang'.
* Do not use crown when building docs (#32220)Samson2024-05-041-0/+1
|
* servoshell: Upgrade `egui` and many other dependencies (#31278)Magnus Larsen2024-05-022-9/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | * servoshell: Upgrade `egui` and many other dependencies This upgrades: - `core-graphics` - `core-text` - `egui` and friends - `font-kit` - `glow` and friends - `harfbuzz-sys` - `jni` - `nix` - `raqote` - `raw-window-handle` - `winit` * Downgrade jni until we can properly upgrade * Update some test results It's unclear why these are now passing, but they are. --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* mach: Upgrade boto3 and remove Python < 3.10 dependencies (#32208)Martin Robinson2024-05-011-4/+2
| | | | | | | This change upgrades boto3, which will fix an upcoming urllib3 version conflict in the WPT and also removes all remaining dependencies for Python version < 3.10. The requirement for Servo is 3.10 now. Fixes #32201.
* bootstrap: Add a `--skip-platform` option (#32176)Martin Robinson2024-04-293-5/+12
| | | | This allows installign `taplo` and `crown` when you are installing dependencies manually.
* Run platform_bootstrap first (#31840)Samson2024-04-292-5/+7
|
* Stop publishing the Rust book in mach doc and doc.servo.org (#32142)Delan Azabani2024-04-241-23/+2
|
* ci: Retry `hdiutil create` with randomize backoff (#32005)Martin Robinson2024-04-051-5/+30
| | | | | Regularly we see that `hdiutil creat` when creating a DMG on the MacOS builder fails with "Resource busy." This change is an attempt to mitigate that by retrying the command 3 time with a randomized backoff.
* Initial internal support for multiple webviews (#31417)Ngo Iok Ui (Wu Yu Wei)2024-04-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add multiple concurrent top-level browsing contexts Co-authored-by: Delan Azabani <dazabani@igalia.com> * Rename variables and comments There are some variable and comments still use browser as names. This commit renames them to webview. * Update log message from web view to webview * Revert offscreen_framebuffer_id rename * Rename all web view to webview * Cargo fmt * Fix viewport/event/clear coordinates when multiview is disabled * Only deprecate things when multiview is enabled * Update WebViewManger with shown and invisible sets Replace visible_webviews and native_window_is_visible with shown_webviews and invisible_webviews. Add 4 more methods to set them accordingly. The behavior of is_effectively_visible will return true if the wbview is in shown_webviews set but not in invisible_webviews. * Update variant behaviors * Rename WebViewVisibilityChanged to MarkWebViewInvisible * Fix unit test by marking id 3 visible again * Update MarkWebViewInvisible and add UnmarkWebViewInvisible * Update format and doc comments * Clean up doc comments * Address style and naming changes * Rename UpdateWebView to UpdateFrameTreeForWebView * constellation: send frame tree unconditionally over focus and feature * Clarify shown and invisible sets in constellation WebViewManager * Eliminate forward_to_constellation!() * Actually remove the unused macro * Don’t gate compositor changes on multiview feature flag * Update todo in mouse event dispatch * Pass all visible webview ids in a single ReadyToPresent message * Fix compile and lint errors * servoshell: fix gap between minibrowser toolbar and webview * Fix failure in /_mozilla/mozilla/window_resizeTo.html * Fix compile warnings * Remove stray dbg!() * Remove confusing “effectively visible” logic (see #31815, #31816) * Allow embedder to show/hide/raise webviews without ipc * Update root pipeline only when painting order actually changes * Stop gating old focus and SetFrameTree behaviour behind Cargo feature * Use webview_id and WebViewId in webview-related code * Improve logging of webview-related embedder events * Allow webview Show and Raise events to optionally hide all others * Don’t do anything in response to WebViewPaintingOrder * Remove WebViewPaintingOrder, since its payload is unreliable * On MoveResizeWebView, only update root pipeline if rect changed * Rename IOCompositor methods for clarity * compositor: add event tracing; log webview ops even without ipc * Add temporary debug logging * Add more temporary debug logging * Remove temporary logging in compositor * Remove temporary debug logging * Add temporary debug logging, but defer I/O until panic * Capture a backtrace with each crash log entry * Proper error handling without panicking in WebViewManager * Clean up imports in constellation --------- Co-authored-by: Delan Azabani <dazabani@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Override timeout in WebGPU CTS to always be "long" (#31952)Samson2024-04-011-0/+4
| | | | | | | | | | | | | * Long webgpu timeout * Update expectations * reupdate expectations 2 * re * update-webgpu * Update testing_commands.py with better comment
* wpt: Limit the console output sent to the intermittent tracker (#31895)Martin Robinson2024-03-271-1/+5
| | | | | | | This is a speculative fix for #31845. Instead of sending all of the output to the dashboard, send just the first 1024 characters. This value can be adjusted in the future if it is too large or too small. Fixes #31845.
* tidy: Make sure to run WPT lints when `--all` is passed to tidy (#31874)Martin Robinson2024-03-261-1/+1
| | | This also fixes the checked in WPT manifest.
* Replace `remutex` with `parking_lot`'s `ReentrantMutex` (#31817)Martin Robinson2024-03-221-1/+0
| | | | | | Many things in Servo depend on `parking_lot`, so we can replace our homegrown remutex with `parking_lot`'s version. Fixes #12641.
* bootstrap: Make unknown distro instructions more helpful (#31750)Martin Robinson2024-03-191-2/+3
| | | | | It doesn't make sense to ask everyone to file a bug if their distribution is unsupported. We have manual build instructions for some distributions and we can add instructions for more easily.
* android: add support for x86_64 images (#31725)Mukilan Thiyagarajan2024-03-182-0/+23
| | | Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* Add RUSTC env to clippy command (#31694)eri2024-03-151-1/+3
| | | | | * python: add RUSTC env to clippy command * fix: pass env explicitly
* Add gstreamer plugins good/ugly for better codec support (#31687)Delan Azabani2024-03-151-3/+5
| | | | | * NixOS: add gst-plugins-{good,ugly} for better codec support * Add gstreamer plugins good/ugly to all other package lists
* mach: Speed up `taplo` runs on MacOS (#31452)Martin Robinson2024-02-291-2/+14
| | | | | | | | | | | | | | | | | | | `taplo` is the TOML formatter that we use. It seems to be using a very slow directory walking mechanism on MacOS. This change works around that issue by explicitly listing globs of TOML files to format and check. Before: ```text real 0m17.632s user 0m2.164s sys 0m6.916s ``` After: ```text real 0m1.519s user 0m1.391s sys 0m0.112s ```
* tidy: Fix WHATWG replacement links (#31449)Smitty2024-02-292-4/+4
|
* mach: Do not use unstable rust for `rustfmt` (#31441)Martin Robinson2024-02-281-6/+13
| | | | | | | | | | We can use stable rust if we pass the unstable configuration as command-line arguments to rustfmt itself. This prevents needing to install an unstable rust toolchain. The one downside here is that it doesn't seem that "ignore" is supported so we have to start formatting the files in "third_party." This shouldn't be a huge issue because we don't plan to check much more rust code into those directories.
* build(deps): bump mako from 1.1.2 to 1.2.2 in /python (#31434)dependabot[bot]2024-02-281-1/+1
| | | | | | | | | | | | | | | Bumps [mako](https://github.com/sqlalchemy/mako) from 1.1.2 to 1.2.2. - [Release notes](https://github.com/sqlalchemy/mako/releases) - [Changelog](https://github.com/sqlalchemy/mako/blob/main/CHANGES) - [Commits](https://github.com/sqlalchemy/mako/commits) --- updated-dependencies: - dependency-name: mako dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Move Stylo to its own repo (#31350)Delan Azabani2024-02-272-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove packages that were moved to external repo * Add workspace dependencies pointing to 2023-06-14 branch * Fix servo-tidy.toml errors * Update commit to include #31346 * Update commit to include servo/stylo#2 * Move css-properties.json lookup to target/doc/stylo * Remove dependency on vendored mako in favour of pypi dependency This also removes etc/ci/generate_workflow.py, which has been unused since at least 9e71bd6a7010d6e5723831696ae0ebe26b47682f. * Add temporary code to debug Windows test failures * Fix failures on Windows due to custom target dir * Update commit to include servo/stylo#3 * Fix license in tests/unit/style/build.rs * Document how to build with local Stylo in Cargo.toml
* style: Remove dependency on servo_config (was #31409) (#31411)Delan Azabani2024-02-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | * Initial style_config crate * Remove servo_config from style * Remove servo_config from tests/unit/style * Plumb servo prefs into stylo * Clean up dependencies * Fix formatting * Add unit tests * Add comment about avoiding clone * Fix bug where getters acquire unnecessary write lock * Remove stray dbg!() * Plumb default prefs into Stylo as well * Add comments about logging and mapping new pref types
* install libudev-dev required by gamepad API (#31376)Mukilan Thiyagarajan2024-02-191-1/+1
| | | | | | | | | | | | | | Ubuntu 20.04 does not have libudev-dev causing build failure when compiling libudev-sys, which is in-turn needed by gilrs-core. Similarly, nix build also needs the udev C library. On Ubuntu 22.04, we don't see the build failures since the build dependency 'libgstreamer-plugins-base-1.0-dev' transitively pulls in libudev-dev. Fixes #31373 Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* ci: Merge similar try jobs when possible (#31347)Martin Robinson2024-02-161-12/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | * ci: Merge similar try jobs when possible This comes up a lot when triggering wpt-2013 and wpt-2020. Instead of merging the jobs and triggering both layouts, the try parser will trigger two separate jobs. Running two of the same builds at once seems to cause the CI to fail one of them [1]. This fixes that issue. 1. An example of this: https://github.com/servo/servo/actions/runs/7892269495 * Use a list of fields for merge compatability and add more tests * Switch from comments to assert messages * Update python/servo/try_parser.py Co-authored-by: Samson <16504129+sagudev@users.noreply.github.com> * Remote 'Ditto' Co-authored-by: Samson <16504129+sagudev@users.noreply.github.com> --------- Co-authored-by: Samson <16504129+sagudev@users.noreply.github.com>
* mach: Make `./mach try` a little friendlier (#31290)Martin Robinson2024-02-083-37/+52
| | | | | | | | | | | 1. Move `./mach try` to `testing_commands.py which is a bit more consistent. 2. Make `./mach try` print out the remote name always and properly form the URL for ssh repositories. 3. Print out the try configuration matrix to make it more obvious what is being triggered remotely. 4. Better error handling. Print and error and exit if the remote isn't on GitHub and also clean up properly if something fails after making the temporary commit.
* bootstrap: More resiliently install Deiban-like platform dependencies (#31281)Martin Robinson2024-02-072-10/+12
| | | | | | | | 1. First check to see if a package is available before trying to install it. This means that we always do our best to install everything, but don't fail if we cannot. 2. Install crown and taplo first. This means that if the platform-specific bits fail, we still install Servo-specific dependencies.
* Remove duplicate pkg in APT_PKGS (#31280)atbrakhi2024-02-071-1/+0
| | | | We have `libgstreamer-plugins-base1.0-dev` twice in APT_PKGS, looks like a duplicate, this PR removes the duplicated pkg.
* Fix ./mach bootstrap failure in debian (#31276)atbrakhi2024-02-071-1/+7
| | | | Do not install `libgstreamer-plugins-good1.0-dev` on debian, install only on ubuntu.
* Make Android build optional on Nix (#31231)Smitty2024-02-021-0/+3
| | | | | | | | | | | | | | | * Make Android build optional on Nix I want to build Servo without also installing the entire Android SDK. This makes it so Android support is only built if `buildAndroid` is true. Signed-off-by: syvb <me@iter.ca> * Add Android support to nix-shell if SERVO_ANDROID_BUILD set --------- Signed-off-by: syvb <me@iter.ca>
* Fix bugs in `mach test-tidy` (#31232)Mukilan Thiyagarajan2024-01-313-5/+3
| | | | | | | | | | | | | | | | | * mach: test-tidy should return 1 for failure Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * fix lint issues Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * mach: tidy should allow spec links with trailing text Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> --------- Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>