aboutsummaryrefslogtreecommitdiffstats
path: root/python
Commit message (Collapse)AuthorAgeFilesLines
* tests: Use Ahem font provided by WPT harness. (#37054)Josh Matthews2 days1-1/+1
| | | | | | | | | | | #37021 exposed that our tests are trying to load a local file path for Ahem.ttf, but this stops working when we implement the specified CORS protections for our font requests. Luckily, the WPT suite already provides a same-origin version of the same font, so we can just update our CSS to use that font face instead. Testing: Existing WPT coverage. Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Report `add_subsuite` action in unexpected log (#37323)sagudev4 days1-1/+3
| | | | | | | | This is needed for subsuites to work with update-wpt. Testing: We do not have tests for WPT scripts, but I manually tested that update-wpt does not throw anymore. Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* mach: Allow using ASAN on ohos (#37185)Jonathan Schwender7 days4-13/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow using ASAN on OpenHarmony by adding target specific configuration. This also relaxes the version requirement for the clang compiler when using asan, since asan also has runtime checks, which should fail if instrumented code relies on an incompatible libasan version (not tested). Additional comments: - Remove `TARGET_LDFLAGS = -static-libasan` since anyway rustc invokes the linker, so this flag has no effect. - Enable frame pointers with ASAN, since we are anyway debugging. It should probably be the default anyway. - We pass the with_asan option also to mach package, since hvigor needs to know that we are building for ASAN, otherwise it leads to a crash at startup. Testing: Tested manually on arm64 OpenHarmony. Known issues: ASAN increases the stack usage, and this can cause segfaults due to hitting the stack protector on more complex pages. A follow-up PR could address this by increasing the stack size when compiled with asan in threads that hit this issue. --------- Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
* bootstrap: Add `winget` fallback (#32836)Jonathan Schwender2025-05-271-25/+45
| | | | | | | | | | | | | | | | | When `choco` is not available, we can install the same packages from winget. winget is an official package manager from Microsoft, which is available by default on Windows 11. Note: `winget` also has non-interactive installation options, but accepting license agreements should still be the responsibility of the user, so we don't add any such option for now. --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix: Bootstrap on windows without `choco` available. Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
* Use `ruff` to enforce python code formatting (#37117)zefr0x2025-05-2642-2129/+2101
| | | | | | | | | | Requires servo/servo#37045 for deps and config. Testing: No need for tests to test tests. Fixes: servo/servo#37041 --------- Signed-off-by: zefr0x <zer0-x.7ty50@aleeas.com>
* use ruff rather than flake8 for python code linting (#37045)zefr0x2025-05-244-20/+15
| | | | | | | | | | The initially used config is compatible with flake8 rules, including all pycodestyle (pep8) and pyflakes rules. Testing: Broke some python files and used `mach test-tidy --all` to test the linting. Fixes: servo/servo#37041 Signed-off-by: zefr0x <zer0-x.7ty50@aleeas.com>
* Animation: update image active frame when update the rendering (#36286)TIN TUN AUNG2025-05-231-0/+1
| | | | | | | | | | | | | | | | | | | | | When no CSS animation exist, register timer for image animation, update animated image active image frame as part of update_the_rendering, mark node as dirty if the corresponding image need update. Added unit test to test ImageAnimationState. Part of https://github.com/servo/servo/issues/36057, the last step to let the Animated Image "Move". Testing: Introduced new WPT RefTest for animated image, but fail because of https://github.com/servo/servo/issues/36931. New unit test for `ImageAnimationState`. Fixes: https://github.com/servo/servo/issues/22903 https://github.com/servo/servo/issues/36057 [Try](https://github.com/rayguo17/servo/actions/runs/14724729664) --------- Signed-off-by: rayguo17 <rayguo17@gmail.com>
* Replace hsts preload list hashmap with an FST (#37015)Sebastian C2025-05-201-18/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reduces the memory used by the preload list to just 1.9MB. The total memory savings in HSTS from pre-https://github.com/servo/servo/commit/103cbed928b0b9ecd7084b5e9dcab135eca19327 is now 62MB, or 96%. And in terms of total resident memory is a 7.5% reduction. The DAFSA/DAWG used by Firefox is 1.1MB so there could be additional gains available but this seems like the best option based on maintained libraries available (I could not find a good maintained library for DAFSAs in Rust). The main trick is this: the FST map API is currently designed to map byte sequences to u64 values. Because we only need to determine if a preloaded domain has the `includeSubdomains` flag set, we encode that into the lowest bit of the ids in the map. This way finding an entry in the map directly provides us with the `includeSubdomains` flag and we don't need to keep another mapping in memory or on disk. Updated the `./mach update-hsts-preload` command to generate the new FST map file. (Not sure if I need to update any dev-dependencies anywhere for this change) This change also replaces the use of "mozilla.org" with "example.com" in the HSTS unit tests to make sure that entries in the preload list do not influence the tests (since example.com should not ever end up on the preload list) Testing: Updated unit tests Fixes: #25929 --------- Signed-off-by: Sebastian C <sebsebmc@gmail.com>
* build(deps): bump setuptools from 70.0.0 to 78.1.1 in /python (#37050)dependabot[bot]2025-05-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bumps [setuptools](https://github.com/pypa/setuptools) from 70.0.0 to 78.1.1. <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/pypa/setuptools/blob/main/NEWS.rst">setuptools's changelog</a>.</em></p> <blockquote> <h1>v78.1.1</h1> <h2>Bugfixes</h2> <ul> <li>More fully sanitized the filename in PackageIndex._download. (<a href="https://redirect.github.com/pypa/setuptools/issues/4946">#4946</a>)</li> </ul> <h1>v78.1.0</h1> <h2>Features</h2> <ul> <li>Restore access to _get_vc_env with a warning. (<a href="https://redirect.github.com/pypa/setuptools/issues/4874">#4874</a>)</li> </ul> <h1>v78.0.2</h1> <h2>Bugfixes</h2> <ul> <li>Postponed removals of deprecated dash-separated and uppercase fields in <code>setup.cfg</code>. All packages with deprecated configurations are advised to move before 2026. (<a href="https://redirect.github.com/pypa/setuptools/issues/4911">#4911</a>)</li> </ul> <h1>v78.0.1</h1> <h2>Misc</h2> <ul> <li><a href="https://redirect.github.com/pypa/setuptools/issues/4909">#4909</a></li> </ul> <h1>v78.0.0</h1> <h2>Bugfixes</h2> <ul> <li>Reverted distutils changes that broke the monkey patching of command classes. (<a href="https://redirect.github.com/pypa/setuptools/issues/4902">#4902</a>)</li> </ul> <h2>Deprecations and Removals</h2> <ul> <li>Setuptools no longer accepts options containing uppercase or dash characters in <code>setup.cfg</code>.</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/pypa/setuptools/commit/8e4868a036b7fae3208d16cb4e5fe6d63c3752df"><code>8e4868a</code></a> Bump version: 78.1.0 → 78.1.1</li> <li><a href="https://github.com/pypa/setuptools/commit/100e9a61ad24d5a147ada57357425a8d40626d09"><code>100e9a6</code></a> Merge pull request <a href="https://redirect.github.com/pypa/setuptools/issues/4951">#4951</a></li> <li><a href="https://github.com/pypa/setuptools/commit/8faf1d7e0ca309983252e4f21837b73ee12e960f"><code>8faf1d7</code></a> Add news fragment.</li> <li><a href="https://github.com/pypa/setuptools/commit/2ca4a9fe4758fcd39d771d3d3a5b4840aacebdf7"><code>2ca4a9f</code></a> Rely on re.sub to perform the decision in one expression.</li> <li><a href="https://github.com/pypa/setuptools/commit/e409e8002932f2b86aae7b1abc8f8c2ebf96df2c"><code>e409e80</code></a> Extract _sanitize method for sanitizing the filename.</li> <li><a href="https://github.com/pypa/setuptools/commit/250a6d17978f9f6ac3ac887091f2d32886fbbb0b"><code>250a6d1</code></a> Add a check to ensure the name resolves relative to the tmpdir.</li> <li><a href="https://github.com/pypa/setuptools/commit/d8390feaa99091d1ba9626bec0e4ba7072fc507a"><code>d8390fe</code></a> Extract _resolve_download_filename with test.</li> <li><a href="https://github.com/pypa/setuptools/commit/4e1e89392de5cb405e7844cdc8b20fc2755dbaba"><code>4e1e893</code></a> Merge <a href="https://github.com/jaraco/skeleton">https://github.com/jaraco/skeleton</a></li> <li><a href="https://github.com/pypa/setuptools/commit/3a3144f0d2887fa37c06550f42a101e9eebd953a"><code>3a3144f</code></a> Fix typo: <code>pyproject.license</code> -&gt; <code>project.license</code> (<a href="https://redirect.github.com/pypa/setuptools/issues/4931">#4931</a>)</li> <li><a href="https://github.com/pypa/setuptools/commit/d751068fd2627d6d8f1729e39cbcd8119049998f"><code>d751068</code></a> Fix typo: pyproject.license -&gt; project.license</li> <li>Additional commits viewable in <a href="https://github.com/pypa/setuptools/compare/v70.0.0...v78.1.1">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=setuptools&package-manager=pip&previous-version=70.0.0&new-version=78.1.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/servo/servo/network/alerts). </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* CI: add `build-args` (#36947)sagudev2025-05-121-9/+24
| | | | | | | | | Add `build-args` input in CI and try_parser job definition so we can pass own build args to `./mach build` Testing: There are tests for try parser and I tested CI in my fork. Fixes: partial fix #36823 Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Extend --with-asan to support C/C++ code (#36873)Jonathan Schwender2025-05-111-6/+52
| | | | | | | | | | | | | `--with-asan` now also will instrument C/C++ code. This also increases the requirements on the user environment, since a clang compiler with the same major version as the LLVM version rustc is using must be in PATH. ASAN without C/C++ code is IMHO not so interesting, so I'm not sure if it would be worth adding a separate flag. Testing: Manual testing with `--with-asan`. I believe we don't run ASAN in CI yet, although perhaps we should. Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
* Devtools: add more test cases (#36910)delan azabani2025-05-091-27/+84
| | | | | | | | | | | | | | | This patch adds test cases for Debugger > Sources with inline module scripts and external classic scripts. We also fix the big test case in #36401 to receive and assert the worker script URLs. Testing: this patch improves test coverage for the Debugger > Sources feature Part of: #36325 --------- Signed-off-by: Delan Azabani <dazabani@igalia.com> Signed-off-by: atbrakhi <atbrakhi@igalia.com> Co-authored-by: atbrakhi <atbrakhi@igalia.com>
* Devtools: add automated test for Debugger > Sources (#36401)delan azabani2025-05-077-0/+177
| | | | | | | | | | | | | | | | | | | This patch adds our first automated test for devtools, covering the changes in #36164. These tests are not run in CI yet, but you can run them as follows: ```sh $ ./mach build --release $ ./mach test-devtools ``` Testing: this patch adds automated tests! Start of: #36325 --------- Signed-off-by: Delan Azabani <dazabani@igalia.com> Co-authored-by: atbrakhi <atbrakhi@igalia.com> Co-authored-by: Aria Edmonds <aria@ar1as.space>
* Establish baseline webdriver conformance results (#35024)Josh Matthews2025-05-011-0/+8
| | | | | | | | | | | | | | | | https://github.com/web-platform-tests/wpt/pull/50041 allows us to start running the webdriver conformance tests in Servo, which will make it easier for us to track regressions/improvements in our webdriver server implementation. --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes are part of #15274 - [x] There are tests for these changes --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Fix `mach test-jquery` (#36786)Simon Wülker2025-05-011-3/+3
| | | | | Fixes https://github.com/servo/servo/issues/36740 Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Fix taplo test target directories (#36690)Kingsley Yung2025-04-251-1/+1
| | | | | | | | | | | | | The command `./mach test-tidy` did not check the TOML files in the subdirectories of components/shared/, since the argument for taglo command was written as `components/shared/*.toml`. This patch fixes it to include those TOML files in test-tidy. Testing: It only involves python script for test-tidy. No test is needed. Fixes: #36659 Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
* layout: Combine `layout_2020` and `layout_thread_2020` into a crate called ↵Martin Robinson2025-04-191-1/+1
| | | | | | | | | | | | | | | | | | `layout` (#36613) Now that legacy layout has been removed, the name `layout_2020` doesn't make much sense any longer, also it's 2025 now for better or worse. The split between the "layout thread" and "layout" also doesn't make as much sense since layout doesn't run on it's own thread. There's a possibility that it will in the future, but that should be something that the user of the crate controls rather than layout iself. This is part of the larger layout interface cleanup and optimization that @Looriool and I are doing. Testing: Covered by existing tests as this is just code movement. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* chore: Update wgpu to v25 (#36486)sagudev2025-04-181-0/+6
| | | | | | | | | | Updates wgpu to v25 and remove some verbose logging from CTS (that also causes OOM). Testing: WebGPU CTS --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* CI: Add `number_of_chunks` (#36584)sagudev2025-04-181-0/+10
| | | | | | | | | | | This allows changing number of chunks used for WPT testing (sometimes useful for WebGPU). Testing: Manual try runs Fixes: #30062 --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* mach try: Add `wpt` alias for `linux-wpt` (#36416)sagudev2025-04-091-0/+7
| | | | | | | | Add `wpt` alias for `linux-wpt` in try_parser, because that's the what I have in muscle memory. Testing: Tested with new try_parser unit tests. Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* `compositing`: Combine `webrender_traits` and `compositing_traits` (#36372)Martin Robinson2025-04-061-1/+1
| | | | | | | | | | | | | | | These two traits both exposed different parts of the compositing API, but now that the compositor doesn't depend directly on `script` any longer and the `script_traits` crate has been split into the `constellation_traits` crate, this can be finally be cleaned up without causing circular dependencies. In addition, some unit tests for the `IOPCompositor`'s scroll node tree are also moved into `compositing_traits` as well. Testing: This just combines two crates, so no new tests are necessary. Fixes: #35984. Signed-off-by: Martin Robinson <mrobinson@igalia.com> Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Stub out Trusted Types interfaces (#36355)Tim van der Lippe2025-04-051-0/+1
| | | | | | | | | | | | Some methods are implemented fully, while others are implemented partly. With these implementations, there are no observed crashes when running the trusted-types web-platform-tests. Most notably, the tests/wpt/tests/trusted-types/idlharness.window.js is now fully passing. Part of #36258 Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
* Implement TestUtils (#36301)Sebastian C2025-04-041-0/+1
| | | | | | | | | | | | | | | | Implement the TestUtils namespace from https://testutils.spec.whatwg.org/. This should make the `js/builtins/weakrefs` tests run faster and more consistently. This change will enable other WPT tests but no tests exist currently for TestUtils itself. Fixes: #36290 --------- Signed-off-by: Sebastian C <sebsebmc@gmail.com> Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> Co-authored-by: sagudev <16504129+sagudev@users.noreply.github.com>
* mach: Fix cross-compiling from windows to non windows (#36070)Jonathan Schwender2025-04-041-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Since we switched to using `aws-lc-rs` instead of `ring`, cross-compiling on windows (to non-windows) had been broken. Using the default MSVC Generator results in CMake erroneously being configured for the host platform, with failing compiler checks. Switching to Ninja fixes that issue. The CMake build rules of aws-lc-rs also make use of `tr` and assume it is installed, hence we provide a helpful error message suggesting to try using mach from `git bash` which does provide the `tr` command. <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix cross-compiling servo on windows hosts to non-windows targets - [x] These changes do not require tests because: We don't test cross-compiling from windows hosts in CI. These changes were manually tested by compiling for OpenHarmony on windows. Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
* Fix broken unit-test of webview (#36238)Shubham Gupta2025-04-021-0/+1
| | | | | | | | | | | This PR fixes the broken unit-test after [#35662](https://github.com/servo/servo/pull/35662) Testing: Verified locally and CI confirms too. Fixes: Migrate the test to use new API cc: @xiaochengh Signed-off-by: Shubham Gupta <shubham13297@gmail.com>
* devtools: Fix id collisions by using incrementing counters (#35971)Delan Azabani2025-04-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Devtools clients need a `browserId`, `browsingContextID`, and `outerWindowID`, which correspond to WebViewId, BrowsingContextId, and PipelineId in Servo. These u32 values were previously derived from our sharded (u32,u32) id values by taking only the `index` (second u32) and ignoring the `namespace_id` (first u32), leading to collisions. This patch fixes that by mapping those Servo ids to sequential u32 values. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #35954 <!-- Either: --> - [x] There are tests for these changes OR - [ ] These changes do not require tests because ___ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> --------- Signed-off-by: Delan Azabani <dazabani@igalia.com>
* Devtools parser: reassemble fragmented messages (#36033)Delan Azabani2025-03-291-0/+20
| | | | | | | | | | | | | | | * Devtools parser: reassemble fragmented messages Co-authored-by: Aria Edmonds <8436007+ar1a@users.noreply.github.com> Signed-off-by: Delan Azabani <dazabani@igalia.com> * Enable devtools parser tests on Linux only for now Signed-off-by: Delan Azabani <dazabani@igalia.com> --------- Signed-off-by: Delan Azabani <dazabani@igalia.com> Co-authored-by: Aria Edmonds <8436007+ar1a@users.noreply.github.com>
* Check for existence of 'sudo' on Linux in ./mach bootstrap (#35739)Tom Overlund2025-03-281-0/+14
| | | | | | | | | | | | | * Check for existence of sudo command in ./mach bootstrap on Linux (#35736) Signed-off-by: Tom Overlund <tomov@dilacero.org> * Remove extraneous semicolon from previous commit (test-tidy fix). Signed-off-by: Tom Overlund <tomov@dilacero.org> --------- Signed-off-by: Tom Overlund <tomov@dilacero.org>
* Install tshark for automated tests in #36033 (#36201)Delan Azabani2025-03-281-7/+8
| | | Signed-off-by: Delan Azabani <dazabani@igalia.com>
* Start implementing the `URLPattern` API (#36144)Simon Wülker2025-03-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Start working on a basic URLPattern implementation This is API part of Interop 2025, so we should definitely support it! This change implements the basic workflow for parsing and compiling URL patterns. Parts of it are stubbed out and will be implemented later. For now the API is preference-gated behind "dom_urlpattern_enabled". Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Preference-gate the URLPattern API Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Update WPT expectations Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Fix full wildcard value (Should be ".*" not "*") Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Add `Path2D` (#35783)Lukas Lihotzki2025-03-261-0/+3
| | | Signed-off-by: Lukas Lihotzki <lukas@lihotzki.de>
* Remove references to 2020 layout in try_parser.py (#36047)MDCODE2472025-03-251-40/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove references to 2020 layout in try_parser.py Signed-off-by: MDCODE247 <ammedabubakard500@gmail.com> * Removed all references to CHANGE Signed-off-by: MDCODE247 <ammedabubakard500@gmail.com> * Updated .yml workflow files Signed-off-by: MDCODE247 <ammedabubakard500@gmail.com> * update more references Signed-off-by: MDCODE247 <ammedabubakard500@gmail.com> * fixed right hand argument Signed-off-by: MDCODE247 <ammedabubakard500@gmail.com> * Fixing more references Signed-off-by: MDCODE247 <ammedabubakard500@gmail.com> * mach: remove unused import in try_parser.py Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * ci: update reference to wpt_layout in try.yml Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> --------- Signed-off-by: MDCODE247 <ammedabubakard500@gmail.com> Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* metrics: Simplify `ProgressiveWebMetrics` (#35985)Martin Robinson2025-03-211-0/+1
| | | | | | | | | | | | | | | | Simply how `ProgressiveWebMetrics` works: 1. Keep only a single struct instead of one in layout and one script that both implement the `ProgressiveWebMetrics` trait. Since layout and script are the same thread these can now just be a single `ProgressiveWebMetrics` struct stored in script. 2. Have the compositor be responsible for informing the Constellation (which informs the ScripThread) about paint metrics. This makes communication flow one way and removes one dependency between the compositor and script (of two). 3. All units tests are moved into the `metrics` crate itself since there is only one struct there now. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* libservo: Notify delegates of send errors in request objects (#35668)Delan Azabani2025-03-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | * libservo: Notify delegates of send errors in request objects Signed-off-by: Delan Azabani <dazabani@igalia.com> * Remove webview error sender for simplicity Signed-off-by: Delan Azabani <dazabani@igalia.com> * Remove error sender trait, now that there is only one impl Signed-off-by: Delan Azabani <dazabani@igalia.com> * Address review feedback Signed-off-by: Delan Azabani <dazabani@igalia.com> * Add unit tests Signed-off-by: Delan Azabani <dazabani@igalia.com> --------- Signed-off-by: Delan Azabani <dazabani@igalia.com>
* Remove legacy layout (layout 2013) (#35943)Oriol Brufau2025-03-135-43/+7
| | | | | | We were already not compiling it and not running tests on it by default. So it's simpler to just completely remove it. Signed-off-by: Oriol Brufau <obrufau@igalia.com>
* Use new stylo crate renames (#35898)Nico Burns2025-03-121-1/+1
| | | Signed-off-by: Nico Burns <nico@nicoburns.com>
* mach: Remove the `create-wpt` command (#35895)Martin Robinson2025-03-111-162/+26
| | | | | | | | | | | | | | WPT tests are very specific to the directory in which they are created. In addition, since `create-wpt` takes care of running `update-manifest` it hides the fact that any future changes to tests need this command run again. No other browser has a `create-wpt` command, instead developers are expected to craft their own tests, usually by starting from an example in the directory they create the test in. I think this works fine for Servo. Closes #35726. Closes #8427. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* mach: Install Rust toolchain during bootstrap if needed (#35795)Delan Azabani2025-03-051-0/+9
| | | Signed-off-by: Delan Azabani <dazabani@igalia.com>
* sync cargo-deny version in python/servo/platform/base.py (#35730)Yerkebulan Tulibergenov2025-03-011-2/+2
| | | Signed-off-by: Yerkebulan Tulibergenov <yerkebulan@gmail.com>
* Fix android build on arm macs (#35516)Jonathan Schwender2025-02-181-1/+16
| | | | | | | | | | The prebuilt directory only contains an `darwin-x86_64` toolchain, but that is perfectly fine, since that also works. In General, if there is only one prebuilt toolchain available, it should be a very safe assumption that it is usable on the host platform, especially if the OS matches. Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
* feat: add `Notification` Web API binding (#34842)Jason Tsai2025-02-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * feat: add Notification Web API binding Signed-off-by: Jason Tsai <git@pews.dev> * chore: update spec link Signed-off-by: Jason Tsai <git@pews.dev> * chore: fix clippy Signed-off-by: Jason Tsai <git@pews.dev> * fix: index overflow Signed-off-by: Jason Tsai <git@pews.dev> * test(tidy): add notification WebIDL standard URL Signed-off-by: Jason Tsai <git@pews.dev> * fix: allow crown::unrooted_must_root Signed-off-by: Jason Tsai <git@pews.dev> * implement GetPermission Signed-off-by: Jason Tsai <git@pews.dev> * fix silent type Signed-off-by: Jason Tsai <git@pews.dev> * add all properties Signed-off-by: Jason Tsai <git@pews.dev> * test: add Notification to global Signed-off-by: Jason Tsai <git@pews.dev> * chore: update wpt manifest and fix clippy Signed-off-by: Jason Tsai <git@pews.dev> * test: temp skip notifications Signed-off-by: Jason Tsai <git@pews.dev> * add vibration and apply suggestions Signed-off-by: Jason Tsai <git@pews.dev> * partially implement RequestPermission Signed-off-by: Jason Tsai <git@pews.dev> * call Permission request permission algorithm Signed-off-by: Jason Tsai <git@pews.dev> * chore: pub crate Notification Signed-off-by: Jason Tsai <git@pews.dev> * chore: fix clippy Signed-off-by: Jason Tsai <git@pews.dev> * chore: crown attribute Signed-off-by: Jason Tsai <git@pews.dev> * fix part of suggestions Signed-off-by: Jason Tsai <git@pews.dev> * fix: store private `Action` structure Signed-off-by: Jason Tsai <git@pews.dev> * chore: fix typo Signed-off-by: Jason Tsai <git@pews.dev> * fix: serialize images URL Signed-off-by: Jason Tsai <git@pews.dev> * fix: use globalscope as environment settings object Signed-off-by: Jason Tsai <git@pews.dev> * chore: add pref `dom_notification_enabled` and default to disabled Signed-off-by: Jason Tsai <git@pews.dev> * fix: use `descriptor_permission_state` Signed-off-by: Jason Tsai <git@pews.dev> * apply suggestions Signed-off-by: Jason Tsai <git@pews.dev> Co-authored-by: Josh Matthews <josh@joshmatthews.net> * test: remove passed meta Signed-off-by: Jason Tsai <git@pews.dev> * test: enable notification prefs in mozilla tests Signed-off-by: Jason Tsai <git@pews.dev> --------- Signed-off-by: Jason Tsai <git@pews.dev> Co-authored-by: Josh Matthews <josh@joshmatthews.net>
* libservo: Expose an `OffscreenRenderingContext` and use it for servoshell ↵Martin Robinson2025-02-171-1/+1
| | | | | | | | | | | | | | | | | | (#35465) Create a new `RenderingContext` which is used to render to a `SurfmanRenderingContext`-related offscreen buffer. This allows having a temporary place to render Servo and then blitting the results to a subsection of the parent `RenderingContext`. The goal with this change is to remove the details of how servoshell renders from the `Compositor` and prepare for the compositor-per-WebView world. Co-authred-by: Ngo Iok Ui (Wu Yu Wei) <yuweiwu@pm.me> Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* change terminal wrapper library from blessing to blessed to support running ↵TIN TUN AUNG2025-02-064-9/+9
| | | | | mach test-wpt on windows. (#35327) Signed-off-by: rayguo17 <rayguo17@gmail.com>
* crown: Pass `--cfg crown` to rustc from crown (#35073)Samson2025-01-311-7/+5
| | | | | | | | | | | | | | | | | | | | | | * 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>
* CI: temporarily stop running libservo builds by default (#35180)Delan Azabani2025-01-271-11/+8
| | | Signed-off-by: Delan Azabani <dazabani@igalia.com>
* Fix building libservo with `cargo build -p libservo` (#35116)Delan Azabani2025-01-231-5/+22
| | | | | | | | | | | | | | | | | | | * Fix building libservo with `cargo build -p libservo` Signed-off-by: Delan Azabani <dazabani@igalia.com> * Test the libservo build in CI Signed-off-by: Delan Azabani <dazabani@igalia.com> * Work around build issue on macOS (#34517) Signed-off-by: Delan Azabani <dazabani@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com> --------- Signed-off-by: Delan Azabani <dazabani@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* feat: Track the binary size for all the different platforms (#34744)DK Liao2025-01-201-52/+87
| | | | | | | | | | | | | | | | | | | * feat: Track the binary size for all the different platforms Signed-off-by: DK Liao <dklassic@gmail.com> * Add target to bencher job name Signed-off-by: DK Liao <dklassic@gmail.com> * Update .github/workflows/bencher.yml Co-authored-by: Martin Robinson <mrobinson@igalia.com> Signed-off-by: DK Liao <dklassic@gmail.com> --------- Signed-off-by: DK Liao <dklassic@gmail.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Correctly report number of expected test results from ./mach test-wpt (#35068)Simon Wülker2025-01-191-1/+4
| | | | | | The previous code was simply reporting the number of categories, instead of the sum of the number of expected tests in each category. Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* script: Feature-gate all crown support. (#35055)Josh Matthews2025-01-181-1/+4
| | | | | | | | | | | | | * script: Feature-gate all crown support. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * script: Use cfg(crown) instead of a cargo feature. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Fix check for unused subdir in wpt import script (#35036)Samson2025-01-171-3/+1
| | | | | | | Before we appended all subdirs of unused_dir to unused_dirs, which caused errors on removing because root dir was already removed. Fix #35026, tested locally. Signed-off-by: Samson <16504129+sagudev@users.noreply.github.com>