aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo
Commit message (Collapse)AuthorAgeFilesLines
* clippy: Fix a variety of clippy warnings in `fonts`, `layout_2020` and the ↵chickenleaf2024-10-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DOM code (#33894) * fixed some clippy warnings Signed-off-by: L Ashwin B <lashwinib@gmail.com> * Delete extra file Signed-off-by: chickenleaf <lashwinib@gmail.com> * preserved newline in compositionevent.rs Co-authored-by: Martin Robinson <mrobinson@igalia.com> Signed-off-by: chickenleaf <lashwinib@gmail.com> * removed the newline in PrototypeList Signed-off-by: L Ashwin B <lashwinib@gmail.com> * removed the trailing whitespace Signed-off-by: L Ashwin B <lashwinib@gmail.com> --------- Signed-off-by: L Ashwin B <lashwinib@gmail.com> Signed-off-by: chickenleaf <lashwinib@gmail.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* ohos: publish nightly builds (#33801)Mukilan Thiyagarajan2024-10-111-0/+4
| | | Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* Fix mach run bustage (#33563)Jonathan Schwender2024-09-273-9/+17
| | | | | | Move `--flavor` to a new "Packaging options" group, so that we can only apply the flavor option to the commands that support it. Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
* ohos: Support product flavors (#33512)Jonathan Schwender2024-09-265-13/+22
| | | | | | | | | | | | | | | | | | | * ohos: Support product flavors Support different product flavors (e.g. with different signing configurations) by supporting --flavor on ohos. The flavor influences the package path for OH packages, so allow the flavor parameter on build + package + install Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com> * Fix smoketest Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> --------- Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com> Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
* ohos: Bundle resource files in hap (#33513)Jonathan Schwender2024-09-241-0/+4
| | | | | | | | | | Bundle resource files into the .hap, so they are available as files in the application sandbox, instead of included into the shared library. This should slightly reduce the binary size in debug and release mode. Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com> Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
* openharmony: add servoshell for ohos (#33295)Mukilan Thiyagarajan2024-09-203-9/+112
| | | | | | | | | | | | | * openharmony: add servoshell for ohos Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * ohos: handle missing signing config on forks Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> --------- Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* android: publish nightly builds for aarch64 (#33435)Mukilan Thiyagarajan2024-09-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * android: publish nightly builds for aarch64 Publish the aarch64 apk and aar packages to both Github Releases and S3 so that it can be linked from servo.org. The focus is on getting a working version of the APK on the homepage, so few issues are resolved with temporary solutions: 1) We publish the "release" profile instead of "production" since the latter will need changes in the gradle configuration (the changes required was previously blocked on #32720 which is now closed). 2) The scheme for the version code is simple and doesn't consider other factors such as API level and product variants discussed in the Android docs (https://developer.android.com/google/play/publishing/multiple-apks#VersionCodes) This should be fine for now as we don't publish to any store yet. The change also makes it so that the 'Release nightly' workflow will endup building all 4 variants for the Android target, but only aarch64 is uploaded. This is because GH Actions doesn't have a good way to skip a specific job in a matrix and the additionally code complexity needed to acheive it (either generating a JSON dynamically in a new job and using `fromJSON` in the matrix definition or skipping each individual step based on matrix.target and `inputs.upload`) didn't seem worth the cost saved (this is executed only once a day). Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * android: add attestation for nightly build artifacts Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> --------- Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* Fix packaging when cross compiling (#33454)Jonathan Schwender2024-09-141-3/+2
| | | | | | We need to check the compilation target, not the host platform. Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
* mach: remove python2 compatibility code (#33410)Jonathan Schwender2024-09-111-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * util.py: Remove six We don't need to support python2 anymore, so we can just use `str(x)` instead of `six.ensure_str(x)` Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com> * config.py: Remove six We don't need to support python2 anymore, so we can just use `str(x)` instead of `six.ensure_str(x)` Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com> * main.py: Remove six We don't need to support python2 anymore, so we can just use `str(x)` instead of `six.ensure_str(x)` Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com> * main.py: Fix `--settings` being ignored Previously `paths` was unused in this function, and the usage for the settings_file would have no effect. Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com> * terminal.py: Remove `six` Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com> * registrar.py: Remove `six` Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com> * mach/util.py: Remove `six` Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com> * mach: Remove python2 from the list of programming languages Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com> --------- Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
* fix clean-cargo-cache command (#33408)Gae242024-09-111-1/+1
| | | Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
* android: make aarch64 the default target (#33379)Mukilan Thiyagarajan2024-09-092-3/+3
| | | Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* bootstrap: Avoid needless sudo when pkgs are installed (#33281)Jonathan Schwender2024-09-021-4/+7
| | | | | | | | | | | | - Previously on fedora `./mach bootstrap` would always detect it needs to reinstall packages and require root permissions. - use custom queryformat for `rpm -qa` to to just get the package name (e.g. `openssl-libs` instead of `openssl-libs-3.2.2-3.fc40.i686` - Use a list to store the output result instead of one string - Fedora (40) installs `zlib-ng` instead of `zlib` and `libjpeg-turbo` instead of `libjpeg`, meaning that `rpm` / dnf commands report `zlib` as not installed. Specifying the actually installed package avoids this problem. Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
* android: Fix install (#33277)Jonathan Schwender2024-09-011-1/+1
| | | | | | self.config["android"]["target"] is unset, causing an exception. We can just use self.target.triple() instead. Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
* mach: Add `test-speedometer` command and `--bmf-output` to speedometer and ↵Samson2024-08-291-4/+45
| | | | | | | | | | | | | | | dromaeo (#33247) * Allow exporting Dromaeo results as BMF JSON Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Add speedometer runner Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* mach: Extract binary select into common_command_arguments (#33205)Samson2024-08-283-43/+57
| | | | | | | | | | | | | | | | | | | * Extract binary select into common_command_arguments Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * fixups Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Small English edit Signed-off-by: Martin Robinson <mrobinson@igalia.com> --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Fixed build error on macos (#33200)Ben2024-08-271-1/+1
| | | | | | This was due to uname reporting the architecture as arm64 instead of aarch64 on macos Signed-off-by: Benjamin Vincent Schulenburg <bennyschulenburg@gmx.de>
* mach: Do not manually install toolchain for non-cross builds (#33190)Martin Robinson2024-08-271-6/+10
| | | | | | | | | | | | | | | | | | | | * mach: Do not manually install toolchain for non-cross builds This fixes the Apple Silicon build where the installed toolchain does not match the host triple. We only install toolchains manually for cross builds, because cargo and friends will do this automatically when executing. Signed-off-by: Martin Robinson <mrobinson@igalia.com> * fix lints Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> --------- Signed-off-by: Martin Robinson <mrobinson@igalia.com> Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* mach: introduce `BuildTarget` abstraction (#33114)Mukilan Thiyagarajan2024-08-2612-512/+521
| | | | | | | | | | | | | | | | Introduce a new `BuildTarget` abstraction to centralize the code for supporting different ways of choosing the build target (e.g --android, --target x86_64-linux-android , --target aarch64-linux-ohos). This is currently handled in an adhoc fashion in different commands ( mach package, install, run) leading to a proliferation of keyword parameters for the commands and duplicated logic. The patch introduces a new `allow_target_configuration` decorator to do the validation and parsing of these parameters into the appropriate `BuildTarget` subclass, which is now stored as an instance attribute of the CommandBase class. All the code that previously relied on `self.cross_compile_target` has been switched to use the BuildTarget. Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* CI: Add separate Lint&Tidy check and remove test-tidy from linux (#33150)Samson2024-08-231-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Create separate Lint&Tidy check Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Remove quick-check as it's not longer relevant Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Add clippy to rust-toolchain Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * fix try parser test expectations Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * use lint in result Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Lint & Tidy -> Lint 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>
* webgpu: Sync various parts of spec (#33009)Samson2024-08-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Sync `GPUObjectDescriptorBase` (label is not option anymore) Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Sync `GPUFeatureName` Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * shader_f16 feature is not usable in wgpu so disable it Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * sync `GPUTextureFormat` Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * `validate_texture_format_required_features` Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Sync `GPUTexture` attributes Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Make `entryPoint` in `GPUProgrammableStage` optional Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Set good expectations Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Bad expectations because naga does not support cons declarations Also fail on firefox, where skipped before due to missing device features Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Bad expectation, also fails on firefox Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Bad expectations, because naga does not support `let pos = positions[vertex_index];` Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Set expectation external texture does not work in firefox too (again naga) Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * set bad expectations, because naga does not support `enable` Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Set bad expectations for, `Texture with '' label has been destroyed` also fails in firefox with same reason Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * one bad expectation also on firefox Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * expect that also matches firefox Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * more expect Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Use only 1 proc for _webgpu Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * better doc comment Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* wpt-tests-to-run -> wpt-args and make them last so they can override already ↵Samson2024-08-191-11/+11
| | | | | | | provide (#33115) d options Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* mach: remove unused maven packaging code (#33083)Mukilan Thiyagarajan2024-08-161-39/+1
| | | | | | This code is unused and unmaintained. We can bring it back from version control if needed in the future. Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* ohos: Fix x86_64-unknown-linux-ohos (#33029)Jonathan Schwender2024-08-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | * ohos: Fix compilation for x86_64 Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> * ohos: Use the SDK compiler-wrapper When compiling for x86_64-unknown-linux-ohos without the compiler wrapper, for some reason mozjs_sys will be refercing a wrong mangled symbol resulting in the following error when loading the .so at runtime: ``` _ZNSt3__111this_thread9sleep_forERKNS_6chrono8durationIxNS_5ratioILl1ELl1000000000EEEEE: symbol not found ``` This problem does not occur when compiling for aarch64 or when using the compiler wrapper. In this case the correct symbol `_ZNSt4__n111this_thread9sleep_forERKNS_6chrono8durationIxNS_5ratioILl1ELl1000000000EEEEE` is referenced. It's unclear why manually passing the flags via CFLAGS / CXXFLAGS does not work. Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> --------- Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
* Use correct feature name for JS backtraces. (#32998)Josh Matthews2024-08-101-1/+1
| | | Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Fix visual_studio.py to call vswhere with -utf8 (#32949)hatoo2024-08-061-1/+2
| | | | | | | In Japanese Windows, `vswhere` puts cp932 string in default and fails to load json in Pyhton. This fixes it by adding `-utf8` option Signed-off-by: hatoo <hato2000@gmail.com>
* mach: Add support for paths with spaces on Windows (#32936)Mukilan Thiyagarajan2024-08-051-12/+18
| | | | | | | | | | | | | | | | The default user name in Windows installations is of the form "FirstName LastName", so it seems likely that there will be spaces in the user's path. Based on my testing on Windows 11, the only Servo's bootstrap script has trouble dealing with spaces in paths. This patch fixes that by quoting such paths correctly. Our direct and indirect dependencies seem to handle these without issue and Servo does build and run correctly with this patch. In this patch, the logic for gstreamer bootstrap now uses powershell instead of directly invoking msiexec.exe via cmd.exe as I was unable to get the installer to run correctly, even with quoting. Some extra hacks were necessary to propagate the exit code correctly to mach. Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* build: Fix a print statement when repackaging GStreamer (#32932)Martin Robinson2024-08-051-1/+1
| | | | | | I neglected to put make a string a formatted string, which means that the variable won't be included in the output properly. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* build: Speed up first run after build on macOS (#32928)Martin Robinson2024-08-044-113/+160
| | | | | | | | | | | | | | GStreamer has to process plugins each time they are added when initializing. When those files have changed, this triggers macOS security protections which can add many seconds to access time. This change eliminates that problem after the first packaging of libraries by skipping packaging if everything is up-to-date and not overwriting the dylibs everytime. In addition, it moves a lot of the code for packaging GStreamer libraries on macOS into the `gstreamer` module and adds type-safety and comments to the Python. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Enabled WAV decoding support in gstreamer (#32924)Ben2024-08-031-0/+1
| | | Signed-off-by: Benjamin Vincent Schulenburg <bennyschulenburg@gmx.de>
* Update mozjs (SpiderMonkey) to 128.0 (#32769)Samson2024-07-291-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Update mozjs Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Fix changed readTransfer callback https://bugzilla.mozilla.org/show_bug.cgi?id=1842713 Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Use NewExternalArrayBuffer from glue https://github.com/servo/mozjs/pull/474/commits/d33454be74ec5b8d8faf51fab3ed477b8913898b Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Fix columnorigin and filename being in latin1 Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * fixup newexternalarray Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Float16 (this might require more work for codegen support) https://bugzilla.mozilla.org/show_bug.cgi?id=1833647 Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * js.strict is removed https://bugzilla.mozilla.org/show_bug.cgi?id=1621603 Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * asm options are now somewhere else https://hg.mozilla.org/mozilla-central/rev/26045c88e3972957087d535e7f259e08857bd2a2 Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Comment out offthread compilation Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Set NDK to 26 Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Fix 1-origin handling Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Expect `FinalizationRegistry` interface Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Good expectations Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * more expectations Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Add `WeakRef` to interfaces expectation Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * mozjs upgrade: fixes for Android Android NDK's layout has changed in r26 and 'lib64' no longer exists under `toolchain/llvm/prebuilt/linux-x86_64`. The libraries that used to be it are now present in `lib` folder itself. This patch updates the build configuration to use the `lib` folder instead when configuring the LIBCLANG_PATH environment variable. This patch also updates to a newer mozjs version that includes fixes for linker errors faced on Android (see #32769). Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * Patch libz-sys & update mozjs Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * update NDK version in README Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * Use servo/mozjs Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Update mozjs again Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* Remove googlevr feature (#32840)Daniel Adams2024-07-242-12/+3
| | | | | | | | | | | | | | | | | * Remove googlevr feature Signed-off-by: Daniel Adams <msub2official@gmail.com> * Remove googlevr and oculusvr from python scripts Signed-off-by: Daniel Adams <msub2official@gmail.com> * Remove vr checks entirely Signed-off-by: Daniel Adams <msub2official@gmail.com> --------- Signed-off-by: Daniel Adams <msub2official@gmail.com>
* shell: set `no-wgl` flag in servoshell instead (#32753)Ngo Iok Ui (Wu Yu Wei)2024-07-101-4/+1
| | | | | | | | | | | | | * Set no-wgl flag in servoshell instead Signed-off-by: Wu Yu Wei <yuweiwu@pm.me> * Remove unused comment Signed-off-by: Wu Yu Wei <yuweiwu@pm.me> --------- Signed-off-by: Wu Yu Wei <yuweiwu@pm.me>
* android: fix application name used in ./mach run (#32652)Mukilan Thiyagarajan2024-07-011-4/+7
| | | | | | | This patch also switches the code to python format strings so that the application name can be interpolated where needed. Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* mach: Expose a `--skip-static-analysis` to `mach boostrap` (#32587)Martin Robinson2024-06-242-6/+10
| | | | | This should speed up runners which just need to run the WPT tests. Fixes #32582.
* android: Rename the Android app to reflect servo.org ownership and ↵Martin Robinson2024-06-243-7/+7
| | | | | `servoshell` (#32554) Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Make `crown` optional (#32494)Jonathan Schwender2024-06-241-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Make `crown` optional Add the optional `--use-crown` flag to mach * --use-crown for all platforms in CI Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> * Add documentation for `--use-crown` Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> * Update python/servo/command_base.py Co-authored-by: Mukilan Thiyagarajan <mukilanthiagarajan@gmail.com> Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com> * Raise Error if CARGO_BUILD_RUSTC conflicts with --use-crown Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com> * add dummy RUSTFLAG to trigger re-checking Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com> --------- Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com> Co-authored-by: Mukilan Thiyagarajan <mukilanthiagarajan@gmail.com>
* Rename `gfx` to `fonts` (#32556)Martin Robinson2024-06-191-1/+1
| | | | | | | | | This crate only takes care of fonts now as graphics related things are split into other crates. In addition, this exposes data structures at the top of the crate, hiding the implementation details and making it simpler to import them. Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-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>
* 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-122-1/+12
| | | | | | | | | | | | | | | | | | | | | | | * 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>