aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* build(deps): bump bytemuck from 1.17.0 to 1.17.1 (#33214)dependabot[bot]2024-08-271-2/+2
| | | | | | | | | | | | | | | Bumps [bytemuck](https://github.com/Lokathor/bytemuck) from 1.17.0 to 1.17.1. - [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md) - [Commits](https://github.com/Lokathor/bytemuck/compare/v1.17.0...v1.17.1) --- updated-dependencies: - dependency-name: bytemuck 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>
* Remove measurement of layout query wait time (#33210)Martin Robinson2024-08-275-40/+5
| | | | | | | Now that the script thread and the layout thread are the same the wait time effectively zero, so there's no need to measure it. This also removes one dependency and removes one use of legacy time. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Allow creating a `ContentSizes` from `Au` (#33208)Oriol Brufau2024-08-274-36/+21
| | | | | No change in behavior, it just simplies some code a little bit. Signed-off-by: Oriol Brufau <obrufau@igalia.com>
* Allow caching `IndependentFormattingContext::inline_content_sizes()` (#33207)Oriol Brufau2024-08-271-3/+1
| | | | | | | | | | | | For non-replaced formatting contexts, this method redirected directly to `NonReplacedFormattingContextContents::inline_content_sizes()`, which has the actual logic for the computation. Thus it was bypassing the cache, which is handled in `NonReplacedFormattingContext::inline_content_sizes()`. Therefore, this patch redirects to the latter. Signed-off-by: Oriol Brufau <obrufau@igalia.com>
* ohos: Add FFI-APIs to navigate back and forward (#33206)Jonathan Schwender2024-08-271-2/+15
| | | | | | | To be useful it requires using the latest version of the OH demo ArkTS app, but it is still compatible with older versions, as the newly added FFI functions will simply be unused in such a case. Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
* CI: use self-hosted runners for Windows build jobs (#33081)Delan Azabani2024-08-271-14/+165
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * CI: use self-hosted Windows runners in main workflow Signed-off-by: Delan Azabani <dazabani@igalia.com> * Fix a couple of robustness issues by generating a unique build id Signed-off-by: Delan Azabani <dazabani@igalia.com> * Work around needs-context expressions being busted in concurrency Signed-off-by: Delan Azabani <dazabani@igalia.com> * CI: use self-hosted Windows runners in try and try-label workflows Signed-off-by: Delan Azabani <dazabani@igalia.com> * Rename windows workflow back for simplicity Signed-off-by: Delan Azabani <dazabani@igalia.com> * Clarify why the copy resources step is for GitHub-hosted jobs only Signed-off-by: Delan Azabani <dazabani@igalia.com> * Fix cancelled status problem by dispatching instead of calling Signed-off-by: Delan Azabani <dazabani@igalia.com> * Tweak retry strategy to avoid hitting REST API rate limits Signed-off-by: Delan Azabani <dazabani@igalia.com> * Update dispatch-workflow.yml accordingly Signed-off-by: Delan Azabani <dazabani@igalia.com> * Rework to use simpler approach with runner labels Signed-off-by: Delan Azabani <dazabani@igalia.com> * Use org-scoped self-hosted runners Signed-off-by: Delan Azabani <dazabani@igalia.com> * Don’t run runner-timeout job when GitHub-hosted runner is selected Signed-off-by: Delan Azabani <dazabani@igalia.com> * Downgrade to Python 3.10 Signed-off-by: Delan Azabani <dazabani@igalia.com> * Avoid failing when RUNNER_API_TOKEN is missing (such as in forks) Signed-off-by: Delan Azabani <dazabani@igalia.com> * Fix undefined needs output when RUNNER_API_TOKEN is missing Signed-off-by: Delan Azabani <dazabani@igalia.com> * Reset working tree, in case it was dirty in the runner image Signed-off-by: Delan Azabani <dazabani@igalia.com> * Clearer runner assignment timeout jobs that fail and offer help Signed-off-by: Delan Azabani <dazabani@igalia.com> * Fix some other sources of incremental build breakage (but not PATH) Signed-off-by: Delan Azabani <dazabani@igalia.com> * Log reasons why we fall back to GitHub-hosted runners Signed-off-by: Delan Azabani <dazabani@igalia.com> * Allow self-hosted runners to be disabled via repository variable Signed-off-by: Delan Azabani <dazabani@igalia.com> * Always install crown, even on self-hosted runners Signed-off-by: Delan Azabani <dazabani@igalia.com> * Rename incremental build debugging step Signed-off-by: Delan Azabani <dazabani@igalia.com> * Clean up job friendly names Signed-off-by: Delan Azabani <dazabani@igalia.com> * Reduce fetch depth, now that this job no longer lints Signed-off-by: Delan Azabani <dazabani@igalia.com> --------- Signed-off-by: Delan Azabani <dazabani@igalia.com>
* Respect min/max constraints in the block axis of block containers (#33203)Oriol Brufau2024-08-274-19/+60
| | | | | | | | | | | | | | | Consider a block container that establishes an inline formatting context and has a definite `block-size` which is clamped by `min-block-size` or `max-block-size`. We were already sizing such container correctly, however, its contents were resolving their percentages against the unclamped `block-size` value. This patch fixes the `ContainingBlock` that we pass to the contents so that they resolve percentages correctly. Signed-off-by: Oriol Brufau <obrufau@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>
* wpt: check for wpt-prefs.json in "./servo" sub-directory (#33202)Mukilan Thiyagarajan2024-08-272-2/+17
| | | | | | | | | | | | | | | The current working directory when running on WPT runners is not the folder with the servo binary, but a parent folder into which the servo nightly tar is extracted. This means the binary is `$PWD/servo/servo` and resources directory in in `$PWD/servo/resources`, so the current hardcoded relative path `resources/wpt-prefs.json` will not work on WPT runners. This is causing crashes in WPT runner: https://github.com/web-platform-tests/wpt/runs/29284407168 https://community-tc.services.mozilla.com/tasks/J7MqNwJGQRSkIWlvB5ktPQ/runs/0/logs/live/public/logs/live.log Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* webgpu: Sync `GPUBuffer` (#33154)Samson2024-08-2712-1160/+687
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * More helpers on `Promise` Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Sync `GPUBuffer` Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Set some good expectations Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Some bad expect also on firefox Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Extract DataBlock, DataView impl from GPUBuffer Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Fix size check to work on 32bit platforms Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* 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>
* build(deps): bump serde from 1.0.208 to 1.0.209 (#33196)dependabot[bot]2024-08-262-5/+5
| | | | | | | | | | | | | | | Bumps [serde](https://github.com/serde-rs/serde) from 1.0.208 to 1.0.209. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.208...v1.0.209) --- updated-dependencies: - dependency-name: serde 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>
* build(deps): bump fastrand from 2.1.0 to 2.1.1 (#33198)dependabot[bot]2024-08-261-2/+2
| | | | | | | | | | | | | | | | Bumps [fastrand](https://github.com/smol-rs/fastrand) from 2.1.0 to 2.1.1. - [Release notes](https://github.com/smol-rs/fastrand/releases) - [Changelog](https://github.com/smol-rs/fastrand/blob/master/CHANGELOG.md) - [Commits](https://github.com/smol-rs/fastrand/compare/v2.1.0...v2.1.1) --- updated-dependencies: - dependency-name: fastrand 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>
* build(deps): bump syn from 2.0.75 to 2.0.76 (#33197)dependabot[bot]2024-08-261-2/+2
| | | | | | | | | | | | | | | Bumps [syn](https://github.com/dtolnay/syn) from 2.0.75 to 2.0.76. - [Release notes](https://github.com/dtolnay/syn/releases) - [Commits](https://github.com/dtolnay/syn/compare/2.0.75...2.0.76) --- updated-dependencies: - dependency-name: syn 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>
* build(deps): bump libz-sys from 1.1.19 to 1.1.20 (#33194)dependabot[bot]2024-08-261-2/+2
| | | | | | | | | | | | | | | Bumps [libz-sys](https://github.com/rust-lang/libz-sys) from 1.1.19 to 1.1.20. - [Release notes](https://github.com/rust-lang/libz-sys/releases) - [Commits](https://github.com/rust-lang/libz-sys/compare/1.1.19...1.1.20) --- updated-dependencies: - dependency-name: libz-sys dependency-type: indirect update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* build(deps): bump serde_json from 1.0.125 to 1.0.127 (#33195)dependabot[bot]2024-08-261-2/+2
| | | | | | | | | | | | | | | Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.125 to 1.0.127. - [Release notes](https://github.com/serde-rs/json/releases) - [Commits](https://github.com/serde-rs/json/compare/1.0.125...1.0.127) --- updated-dependencies: - dependency-name: serde_json 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>
* build(deps): bump cc from 1.1.14 to 1.1.15 (#33193)dependabot[bot]2024-08-261-2/+2
| | | | | | | | | | | | | | | | Bumps [cc](https://github.com/rust-lang/cc-rs) from 1.1.14 to 1.1.15. - [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.1.14...cc-v1.1.15) --- 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>
* build(deps): bump flate2 from 1.0.32 to 1.0.33 (#33192)dependabot[bot]2024-08-261-2/+2
| | | | | | | | | | | | | | | | Bumps [flate2](https://github.com/rust-lang/flate2-rs) from 1.0.32 to 1.0.33. - [Release notes](https://github.com/rust-lang/flate2-rs/releases) - [Changelog](https://github.com/rust-lang/flate2-rs/blob/main/CHANGELOG.md) - [Commits](https://github.com/rust-lang/flate2-rs/compare/1.0.32...1.0.33) --- updated-dependencies: - dependency-name: flate2 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>
* layout: Enable flexbox by default on non-legacy layout (#33186)Martin Robinson2024-08-2663-351/+465
| | | | | | | Flexbox is still very much in progress, but things are working well enough that we can enable it by default. It improves most pages that use flexbox now. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* mach: introduce `BuildTarget` abstraction (#33114)Mukilan Thiyagarajan2024-08-2613-513/+522
| | | | | | | | | | | | | | | | 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>
* Add `dom.allow_scripts_to_close_windows` pref. (#33187)Samson2024-08-263-1/+6
| | | | | It's also present in firefox: https://searchfox.org/mozilla-central/search?q=allow_scripts_to_close_windows Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Redesigned minibrowser toolbar to use icons instead of text (#33179)Ben2024-08-261-20/+35
| | | | | | | | | | | | | | | | | * Redesigned minibrowser toolbar to use icons instead of text Signed-off-by: Benjamin Vincent Schulenburg <bennyschulenburg@gmx.de> * Apply suggestions from code review Address a couple nits Signed-off-by: Martin Robinson <mrobinson@igalia.com> --------- Signed-off-by: Benjamin Vincent Schulenburg <bennyschulenburg@gmx.de> Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Fix a memory leak in `components/script/script_runtime.rs` and add more leak ↵Erik Hennig2024-08-262-3/+13
| | | | | | | | | | | | | | | | | | | | | | suppressions (#33175) * asan: Add suppression for known false positive Signed-off-by: ede1998 <online@erik-hennig.me> * fix: re-suppress lazy_static leaks lazy_static is still used by dependencies and still leaks from static variables. Signed-off-by: ede1998 <online@erik-hennig.me> * fix: Memory leak of Box<NetworkingTaskSource> Signed-off-by: ede1998 <online@erik-hennig.me> --------- Signed-off-by: ede1998 <online@erik-hennig.me>
* webxr: Implement XRBoundedReferenceSpace (#33176)Daniel Adams2024-08-2515-72/+146
| | | | | | | | | | | | | | | | | | | | | * Implement XRBoundedReferenceSpace Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update expectations Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update interfaces Signed-off-by: Daniel Adams <msub2official@gmail.com> * Add missing pref condition on IDL interface Signed-off-by: Daniel Adams <msub2official@gmail.com> --------- Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Add fallback value for data['message'] (#33185)Samson2024-08-251-1/+1
| | | Signed-off-by: Samson <16504129+sagudev@users.noreply.github.com>
* Fix panic in abort-block-bfcache.window.js (#33173)Taym Haddadi2024-08-252-2/+3
| | | | | | | | | | | | | * Fix panic in abort-block-bfcache.window.js Signed-off-by: Taym <haddadi.taym@gmail.com> * Update test expectation Signed-off-by: Taym <haddadi.taym@gmail.com> --------- Signed-off-by: Taym <haddadi.taym@gmail.com>
* Use global exports from derives (#33169)Samson2024-08-255-15/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * pub reexport *Traceable Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * reexport `HasParent` for derives Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * reexport DomObject, Reflector, MutDomObject Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * fmt Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Update lib.rs Signed-off-by: Samson <16504129+sagudev@users.noreply.github.com> * Update lib.rs Signed-off-by: Samson <16504129+sagudev@users.noreply.github.com> * Update lib.rs 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>
* DevTools: Inspect node styles (#33025)eri2024-08-2512-192/+802
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * feat: retrieve applied styles Signed-off-by: eri <eri@inventati.org> * feat: preliminary style showing Signed-off-by: eri <eri@inventati.org> * chore: some style tests Signed-off-by: eri <eri@inventati.org> * feat: edit style rules Signed-off-by: eri <eri@inventati.org> * feat: css database Signed-off-by: eri <eri@inventati.org> * feat: computed styles Signed-off-by: eri <eri@inventati.org> * feat: inherited styles Signed-off-by: eri <eri@inventati.org> * feat: get stylesheet styles Signed-off-by: eri <eri@inventati.org> * feat: all styles in inspector Signed-off-by: eri <eri@inventati.org> * feat: multiple stylesheets Signed-off-by: eri <eri@inventati.org> * refactor: clean up Signed-off-by: eri <eri@inventati.org> * Some minor cleanup Signed-off-by: Martin Robinson <mrobinson@igalia.com> --------- Signed-off-by: eri <eri@inventati.org> Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* script: fix `querySelector` returning the root (#33174)Nolan Lawson2024-08-253-9/+4
| | | Signed-off-by: Nolan Lawson <nolan@nolanlawson.com>
* Use webrender `UploadMethod::Immediate` with ANGLE (#33177)Cristian Brinza2024-08-251-1/+10
| | | | | | | | | | | | | * Use webrender UploadMethod::Immediate with ANGLE Signed-off-by: crbrz <cristianb@gmail.com> * Added comment with Gecko link Signed-off-by: crbrz <cristianb@gmail.com> --------- Signed-off-by: crbrz <cristianb@gmail.com>
* Update web-platform-tests to revision ↵Servo WPT Sync2024-08-25702-6446/+27346
| | | | | b'd988aeeb33edc4d452899921799b8bed69fff65d' (#33178) Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
* script: Update list of non-TS pseudo classes supported by Servo (#33165)Martin Robinson2024-08-2410-68/+58
| | | | | | Also remove some code duplication by moving some of the code into the `Element` impl. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* script: Fix panic in `htmlimageelement.rs` using `str::find()` to find ↵Kopanov Anton2024-08-247-194/+284
| | | | | | | | | | | | | | | | | | | | | character boundaries. (#32980) * fix loop with chars().enumerate() by using find() Signed-off-by: Kopanov Anton <anton.kopanov@ya.ru> * Add documentation to parser and fix some small issues - Rename the properties of `Descriptor` so that they are full words - Use the Rust-parser to parse doubles - Add documentation and restructure parser to be more readable Signed-off-by: Martin Robinson <mrobinson@igalia.com> --------- Signed-off-by: Kopanov Anton <anton.kopanov@ya.ru> Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Allow prefs to be overridden from a file and set WPT-specific prefs from ↵Daniel Adams2024-08-2410-15/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | file (#33163) * Allow prefs to be passed in from a separate file Signed-off-by: Daniel Adams <msub2official@gmail.com> * Add wpt-prefs.json for setting WPT-specific prefs Signed-off-by: Daniel Adams <msub2official@gmail.com> * fix argument to read_prefs_file Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update test_parse_pref test Signed-off-by: Daniel Adams <msub2official@gmail.com> * Add line in executorservo.py to read from wpt-prefs.json Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update MANIFEST.json Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update expectations Signed-off-by: Daniel Adams <msub2official@gmail.com> * Disable dom.webxr.test for interfaces test Signed-off-by: Daniel Adams <msub2official@gmail.com> --------- Signed-off-by: Daniel Adams <msub2official@gmail.com>
* layout: Add support for flex items with `position: relative` (#33151)Martin Robinson2024-08-234-81/+207
| | | Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* build(deps): bump quote from 1.0.36 to 1.0.37 (#33167)dependabot[bot]2024-08-231-2/+2
| | | | | | | | | | | | | | | Bumps [quote](https://github.com/dtolnay/quote) from 1.0.36 to 1.0.37. - [Release notes](https://github.com/dtolnay/quote/releases) - [Commits](https://github.com/dtolnay/quote/compare/1.0.36...1.0.37) --- updated-dependencies: - dependency-name: quote dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* build(deps): bump cc from 1.1.13 to 1.1.14 (#33166)dependabot[bot]2024-08-231-2/+2
| | | | | | | | | | | | | | | | Bumps [cc](https://github.com/rust-lang/cc-rs) from 1.1.13 to 1.1.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.1.13...cc-v1.1.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>
* shaping: Don't assume there's a space glyph when rendering tabs (#32979)Martin Robinson2024-08-237-40/+75
| | | | | | | | | | | | | | | | | | Previously if a font didn't have a space advance and it was needed to make advances for tabs, Servo would try to read the advance from the font. If the font didn't have a space glyph, Servo would panic. This fixes that issue by making the space advance part of the `FontMetrics` of a font (like Gecko) and falling back properly if that glyph doesn't exist. The rendered glyph is still the "space" glyph, but we make sure to select a font that supports that glyph explicitly. This prevents a crash, but tabs still aren't handled properly. In reality, tab stops should be calculated in layout and the size of the space character of the current font shouldn't come into play. The addition of the space advance metric will make this easier. Fixes #32970. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* CI: Add separate Lint&Tidy check and remove test-tidy from linux (#33150)Samson2024-08-2312-79/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* Print reason when tests are skipped. (#33077)Josh Matthews2024-08-231-11/+20
| | | | | | | | | | | | | | * Print reason when tests are skipped. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Print reason tests are skipped in Servo's WPT formatter Signed-off-by: Martin Robinson <mrobinson@igalia.com> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net> Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* layout: Clean up inline layout data structures (#33149)Martin Robinson2024-08-223-194/+154
| | | | | | | | | | | | | | | | - Rename `InlineFormattingContextState` to `InlineFormattingContextLayout`. - Have `InlineFormattingContextLayout` hold a reference to the `InlineFormattingContext`, so that it does not need to be passed around as an argument - Have `LineItemLayout` hold a reference to `InlineFormattingContextLayout` to avoid duplicating so much data. - Rename some members of `LineItemLayout` to make it clearer what they do. - Give beter names to many lifetimes and combine some that are effectively the same. Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Rakhi Sharma <atbrakhi@igalia.com>
* Start marking functions that can transitively trigger a GC (#33144)Josh Matthews2024-08-22140-304/+1336
| | | | | | | | | | | | | | | | | * Mark JS reflector wrappers as CanGc. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Propagate CanGc from reflect_dom_object_with_proto. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Mark DOM constructors as GC operations. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Implement crypto.randomUUID() (#33158)webbeef2024-08-226-65/+16
| | | Signed-off-by: webbeef <me@webbeef.org>
* make protocol handlers registrable (#33104)webbeef2024-08-2219-219/+516
| | | Signed-off-by: webbeef <me@webbeef.org>
* webxr: Update XRWebGLLayer interface to latest spec (#33157)Daniel Adams2024-08-224-14/+22
| | | | | | | | | | | | | * Update XRWebGLLayer interface to latest spec Signed-off-by: Daniel Adams <msub2official@gmail.com> * Add missing spec links Signed-off-by: Daniel Adams <msub2official@gmail.com> --------- Signed-off-by: Daniel Adams <msub2official@gmail.com>
* build(deps): bump flate2 from 1.0.31 to 1.0.32 (#33141)dependabot[bot]2024-08-212-7/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * build(deps): bump flate2 from 1.0.31 to 1.0.32 Bumps [flate2](https://github.com/rust-lang/flate2-rs) from 1.0.31 to 1.0.32. - [Release notes](https://github.com/rust-lang/flate2-rs/releases) - [Changelog](https://github.com/rust-lang/flate2-rs/blob/main/CHANGELOG.md) - [Commits](https://github.com/rust-lang/flate2-rs/compare/1.0.31...1.0.32) --- updated-dependencies: - dependency-name: flate2 dependency-type: indirect update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * Allow duplicate miniz_oxide. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Josh Matthews <josh@joshmatthews.net> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Josh Matthews <josh@joshmatthews.net>
* background_hang_monitor: Add musl compatibility (#33153)A. Wilcox2024-08-213-4/+19
| | | | | | | musl does not have libunwind readily available; even if it did, it has no concept of ucontext (needing an external lib). Similar to ohos, disable the background hang monitor and use the DummySampler. Signed-off-by: A. Wilcox <AWilcox@Wilcox-Tech.com>
* webxr: Update XRInputSource interface to latest spec (#33155)Daniel Adams2024-08-217-10/+19
| | | | | | | | | | | | | | | | | * Update XRInputSource interface to latest spec Signed-off-by: Daniel Adams <msub2official@gmail.com> * Bump webxr version Signed-off-by: Daniel Adams <msub2official@gmail.com> * Add missing spec link Signed-off-by: Daniel Adams <msub2official@gmail.com> --------- Signed-off-by: Daniel Adams <msub2official@gmail.com>
* layout: Add initial support for bidirectional text (BiDi) (#33148)Martin Robinson2024-08-21189-760/+545
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds supports for right-to-left text assigning bidi levels to all line items when necessary. This includes support for the `dir` attribute as well as corresponding CSS properties like `unicode-bidi`. It only implements right-to-left rendering for inline layout at the moment and doesn't include support for `dir=auto`. Because of missing features, this causes quite a few tests to start failing, as references become incorrect due to right-to-left rendering being active in some cases, but not others (before it didn't exist at all). Analysis of most of the new failures: ``` - /css/css-flexbox/gap-001-rtl.html /css/css-flexbox/gap-004-rtl.html - Require implementing BiDi in Flexbox, because the start and end inline margins are opposite the order of items. - /css/CSS2/bidi-text/direction-applies-to-*.xht /css/CSS2/bidi-text/direction-applies-to-002.xht /css/CSS2/bidi-text/direction-applies-to-003.xht /css/CSS2/bidi-text/direction-applies-to-004.xht - Broken due to a bug in tables, not allocating the right amount of width for a column. - /css/css-lists/inline-list.html - This fails because we wrongly insert a soft wrap opportunity between the start of an inline box and its first content. - /css/css-text/bidi/bidi-lines-001.html /css/css-text/bidi/bidi-lines-002.html /css/CSS2/text/bidi-flag-emoji.html - We do not fully support unicode-bidi: plaintext - /css/css-text/text-align/text-align-end-010.html /css/css-text/text-align/text-align-justify-006.html /css/css-text/text-align/text-align-start-010.html /html/dom/elements/global-attributes/* - We do not support dir=auto yet. - /css/css-text/white-space/tab-bidi-001.html - Servo doesn't support tab stops - /css/CSS2/positioning/abspos-block-level-001.html /css/css-text/word-break/word-break-normal-ar-000.html - Do not yet support RTL layout in block - /css/css-text/white-space/pre-wrap-018.html - Even in RTL contexts, spaces at the end of the line must hang and not be reordered - /css/css-text/white-space/trailing-space-and-text-alignment-rtl-002.html - We are letting spaces hang with white-space: pre, but they shouldn't hang. ``` Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Rakhi Sharma <atbrakhi@igalia.com>
* webgpu: Align `writeBuffer` with spec (#33147)Samson2024-08-214-37/+24
| | | | | | | | | | | | | | | | | * Sync `WriteBuffer` Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Set good expectations Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Change assert to debug_assert Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>