aboutsummaryrefslogtreecommitdiffstats
path: root/components/net
Commit message (Collapse)AuthorAgeFilesLines
* `compositing`: Combine `webrender_traits` and `compositing_traits` (#36372)Martin Robinson2025-04-062-2/+2
| | | | | | | | | | | | | | | 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>
* Make the memory reporting multi-process aware (#35863)webbeef2025-04-051-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | So far the memory reporter aggregates reports from all processes, and runs the system reporter only in the main process. Instead it is desirable to have per-process reports. We do so by: - creating a ProcessReports struct that holds includes the pid in addition to the reports themselves. - running the system memory reporter also in content processes. - updating the about:memory page to create one report per process, and add useful information like the pid and the urls loaded in a given process. <!-- 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 ![image](https://github.com/user-attachments/assets/0bafe140-539d-4d6a-8316-639309a22d4a) Signed-off-by: webbeef <me@webbeef.org>
* Check all ancestor navigable trustworthiness for mixed content (#36157)Sebastian C2025-04-052-12/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | Propagate through documents a flag that represents if any of the ancestor navigables has a potentially trustworthy origin. The "potentially trustworthy origin" concept appears to have gotten confused in a couple of places and we were instead testing if a URL had "potentially trustworthy" properties. The main test for the ancestor navigables is [mixed-content/nested-iframes](https://github.com/web-platform-tests/wpt/blob/master/mixed-content/nested-iframes.window.js) --- <!-- 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 #36108 <!-- Either: --> - [X] There are tests for these changes --------- Signed-off-by: Sebastian C <sebsebmc@gmail.com>
* Webdriver delete cookie (#36306)Euclid Ye2025-04-042-0/+19
| | | | | | | | | | 1. Implement `WebDriverCommand::DeleteCookie` 2. Remove unnecessary clone for `WebDriverCommand::GetNamedCookie` Fixes: #36287 --------- Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
* libservo: Remove a couple `EmbedderMethods` (#36276)Martin Robinson2025-04-014-15/+4
| | | | | | | | | | | | | | | | | | | | | | | - Remove `EmbedderMethods::get_user_agent_string`. This is now part of the `Preferences` data structure, which should allow it to be per-`WebView` in the future. - Remove `EmbedderMethods::get_version_string`. This was used to include some data along with WebRender captures about the Servo version. This isn't really necessary and it was done to replace code in the past that output the WebRender version, so also isn't what the original code did. I think we can just remove this entirely. The idea with these changes is that `EmbedderMethods` can be removed in a followup and the rest of the methods can be added to `ServoDelegate`. These two methods are ones that cannot be added to a delegate as they are used during `Servo` initialization. Testing: There is currently no testing for libservo. These changes are meant as preparation for adding a suite of `WebView` unit tests. Signed-off-by: Martin Robinson <mrobinson@igalia.com> Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Refuse to provide partial response from earlier ranged request to API that ↵Simon Wülker2025-03-313-13/+46
| | | | | | | did not make a range request (#36227) Part of https://github.com/servo/servo/issues/33616 Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Organize component Cargo.toml dependencies (#36224)Alex Touchet2025-03-301-4/+4
| | | Signed-off-by: Alex Touchet <26315797+atouchet@users.noreply.github.com>
* net: Add missing feature required for unit tests. (#36193)Josh Matthews2025-03-281-1/+1
| | | Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* fix: does_settings_prohibit_mixed_security_contexts typo (#36135)Arya Nair2025-03-241-2/+2
| | | Signed-off-by: Arya Nair <aryaajitnair@gmail.com>
* pixels: Extend Image to allow for multiple frames (#36058)TIN TUN AUNG2025-03-211-3/+4
| | | Signed-off-by: rayguo17 <rayguo17@gmail.com>
* Create `config_dir` if none exist for caching (#35761)Euclid Ye2025-03-181-3/+3
| | | | | | | | | | | | | | | | | | | | | * Create config_dir if none exist for caching Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com> * remove specialized behaviour for ohos; copy prefs.json if necessary Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com> * downgrade the log to trace verbosity Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com> * update wpt-test Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com> --------- Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
* Migrate to the 2024 edition (#35755)Simon Wülker2025-03-131-3/+3
| | | | | | | | | | | | | | | | | | | | | | * Migrate to 2024 edition Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Allow unsafe_op_in_unsafe_fn lint This lint warns by default in the 2024 edition, but is *way* too noisy for servo. We might enable it in the future, but not now. Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Compile using the 2024 edition Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Implement `nonce` attribute to pass more CSP checks (#35876)Simon Wülker2025-03-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add doc comments to RequestBuilder fields/methods Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Implement Request::cryptographic_nonce_metadata Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Implement HTMLOrSVGElement::nonce Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Set request cryptographic nonce metadata for link elements Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Set request's cryptographic nonce when fetching scripts Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Forward request nonce to rust-content-security-policy Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Update WPT expectations Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Add an about:memory page (#35728)webbeef2025-03-071-0/+13
| | | | | | | | | | | | | | | | | This patch exposes a servo internal DOM API that is only made available to about: pages on the navigator object to request memory reports. The about:memory page itself is loaded like other html resources (eg. bad cert, net error) and makes use of this new API. On the implementation side, notable changes: - components/script/routed_promise.rs abstracts the setup used to fulfill a promise when the work needs to be routed through the constellation. The goal is to migrate other similar promise APIs in followup (eg. dom/webgpu/gpu.rs, bluetooth.rs). - a new message is added to request a report from the memory reporter, and the memory reporter creates a json representation of the set of memory reports. - the post-processing of memory reports is done in Javascript in the about-memory.html page, providing the same results as the current Rust code that outputs to stdout. We can decide later if we want to remove the current output. Signed-off-by: webbeef <me@webbeef.org>
* Update rustfmt to the 2024 style edition (#35764)Simon Wülker2025-03-0323-262/+336
| | | | | | | | | | | | | * Use 2024 style edition Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Reformat all code Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Don’t prompt user for credentials for non-Navigate request (#35664)Isaac Marovitz2025-02-262-1/+57
| | | Signed-off-by: Isaac Marovitz <isaacryu@icloud.com>
* Update to rust 1.85 (#35628)Simon Wülker2025-02-245-15/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | * Update to rust 1.85 This is needed for cargo-deny Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Upgrade crown Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Clippy fixes Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Re-upgrade cargo-deny to 0.18 Keeping it locked to 0.18 just in case they update their required rustc version again Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* libservo: Convert `intercept_web_resource_load` into `load_web_resource` ↵Martin Robinson2025-02-217-130/+107
| | | | | | | | | | | | | | | | | | | | | (#35564) Rework the `WebViewDelegate::intercept_web_resource_load` into `WebViewDelegate::load_web_resource` and clean up internal messaging. The main thing here is adding objects which manage the response to these delegate methods. Now we have `WebResourceLoad` and `InterceptedWebResourceLoad` which make it much harder to misuse the API. In addition, the internal messaging for this is cleaned up. Canceling and finishing the load are unrelated to the HTTP body so they are no longer subtypes of an HttpBodyData message. Processing of messages is made a bit more efficient by collecting all body chunks in a vector and only flattening the chunks at the end. Finally, "interceptor" is a much more common spelling than "intercepter" so I've gone ahead and made this change everywhere. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* net: Use the unfiltered response status when comparing against cached ↵Josh Matthews2025-02-161-2/+4
| | | | | resources. (#35483) Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* libservo: Add a delegate method for HTTP authentication (#35400)Martin Robinson2025-02-103-74/+55
| | | | | | | | | | | | Add a delegate method for HTTP authentication and a related `AuthenticationRequest` object that carries with it the URL as well as whether or not the authentication request is for a proxy or not. This is now separate from the prompt API because requesting authentication doesn't necessarily involve prompting -- this is an implementation detail of the embedder. In addition, the internal bits are cleaned up slightly. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Remove unintended `dbg!` from `components/net/fetch/methods.rs` (#35401)Samson2025-02-101-1/+0
| | | | | It was accidentally introduced in https://github.com/servo/servo/pull/34794 Signed-off-by: Samson <16504129+sagudev@users.noreply.github.com>
* Add support for Upgrade a mixed content request. (#34794)Shubham Gupta2025-02-101-4/+52
| | | Signed-off-by: Shubham Gupta <shubham13297@gmail.com>
* Modify the checks for upgrade-request algorithm (#35357)Shubham Gupta2025-02-072-9/+4
| | | Signed-off-by: Shubham Gupta <shubham13297@gmail.com>
* deps: Upgrade to `webrender@0.66` (#35325)Martin Robinson2025-02-072-2/+2
| | | | | | | | | In addition to some small API changes, this downstream version of WebRender no longer depends on a very old version of time. This is the last step toward removing the dependency on `time0.1`. The review for this commit should also include: https://github.com/servo/webrender/commit/9f552bebab81a73e62068c42d94be2f9c0586ce4 Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Cleanup blocking fetch operations with bad ports (#35324)Simon Wülker2025-02-062-43/+22
| | | | | | | | | | | Blocking a fetch due to a bad port should be grouped together with CSP blocks as per the spec, but these steps were previously seperated. Additionally, remove handling of ftp in should_request_be_blocked_due_to_a_bad_port, since it did nothing anyways. Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Add support for Upgrade request to a potentially trustworthy URL. (#34986)Shubham Gupta2025-02-052-6/+91
| | | | | | | | | | | | | | | | * Add support for Upgrade request to a potentially trustworthy URL. Signed-off-by: Shubham Gupta <shubham13297@gmail.com> * script: Support inheritable insecure request policy in documents and workers. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Shubham Gupta <shubham13297@gmail.com> Signed-off-by: Josh Matthews <josh@joshmatthews.net> Co-authored-by: Shubham Gupta <shubham.gupta@chromium.org> Co-authored-by: Josh Matthews <josh@joshmatthews.net>
* servoshell: Migrate to egui-file-dialog from tinyfiledialogs (#34823)chickenleaf2025-02-042-4/+4
| | | | | | This is the first step toward completely replacing tinyfiledialogs with an egui-based solution. Signed-off-by: L Ashwin B <lashwinib@gmail.com>
* Update implementations of `HTTP-network fetch` and `HTTP-network-or-cache ↵arthmis2025-02-041-26/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | fetch` to take `fetchParams` as an argument (#35205) * change http-network-or-cache-fetch to take FetchParams argument instead of request Signed-off-by: Lloyd Massiah <artmis9@protonmail.com> * change http-network-fetch to take fetchParams as an argument Signed-off-by: Lloyd Massiah <artmis9@protonmail.com> * run formatter Signed-off-by: Lloyd Massiah <artmis9@protonmail.com> * renaming variable to be similar to step in spec Signed-off-by: Lloyd Massiah <artmis9@protonmail.com> * refixing usage of http_request after rebasing Signed-off-by: Lloyd Massiah <artmis9@protonmail.com> --------- Signed-off-by: Lloyd Massiah <artmis9@protonmail.com>
* Use aws-lc-rs as rust-tls provider (#35106)Jonathan Schwender2025-01-302-2/+2
| | | Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
* Include `WebViewId` into EmbedderMsg variants where possible (#35211)Delan Azabani2025-01-3010-136/+147
| | | | | | | | | | | | | | | | | `EmbedderMsg` was previously paired with an implicit `Option<WebViewId>`, even though almost all variants were either always `Some` or always `None`, depending on whether there was a `WebView involved. This patch adds the `WebViewId` to as many `EmbedderMsg` variants as possible, so we can call their associated `WebView` delegate methods without needing to check and unwrap the `Option`. In many cases, this required more changes to plumb through the `WebViewId`. Notably, all `Request`s now explicitly need a `WebView` or not, in order to ensure that it is passed when appropriate. Signed-off-by: Delan Azabani <dazabani@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* script: Do not set up an IPC route for every image load (#35041)Martin Robinson2025-01-251-46/+7
| | | | | | | | | | | | Instead of setting up a route for every image load in the DOM / Layout, route all incoming image cache responses through the `ScriptThread`. This avoids creating a set of file descriptor for every image that is loaded. This change requires having the `ImageCache` track the `PipelineId` of the original the listener so that the `ScriptThread` can route it properly to the correct `Window`. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Remove `Preferences::network_tls_ignore_unexpected_eof` (#35080)Martin Robinson2025-01-201-4/+1
| | | | | | | This workaround was introduced to handle an issue with the WPT server, but it seems that it is no longer needed. This change removes the prefernce and the workarond code. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Implement WebResourceRequested Event. (#34961)zhuhaichao5182025-01-166-8/+249
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Implement WebResourceRequested Event on the Embedder Layer Signed-off-by: zhuhaichao518 <zhuhaichao518@gmail.com> * fix and add test Signed-off-by: zhuhaichao518 <zhuhaichao518@gmail.com> * resolve comments Signed-off-by: zhuhaichao518 <zhuhaichao518@gmail.com> * remove sample code in webview Signed-off-by: zhuhaichao518 <zhuhaichao518@gmail.com> * remove typo Signed-off-by: zhuhaichao518 <zhuhaichao518@gmail.com> * ./mach format Signed-off-by: zhuhaichao518 <zhuhaichao518@gmail.com> * fix test fail caused by interception message Signed-off-by: zhuhaichao518 <zhuhaichao518@gmail.com> * update impl for is_for_main_frame Signed-off-by: zhuhaichao518 <zhuhaichao518@gmail.com> --------- Signed-off-by: zhuhaichao518 <zhuhaichao518@gmail.com>
* api: Flatten and simplify Servo preferences (#34966)Martin Robinson2025-01-149-16/+20
| | | | | | | | | | | | | | | | | | | Flatten and simplify Servo's preferences code. In addition, have both preferences and options passed in as arguments to `Servo::new()` and make sure not to use the globally set preferences in `servoshell` (as much as possible now). Instead of a complex procedural macro to generate preferences, just expose a very simple derive macro that adds string based getters and setters. - All command-line parsing is moved to servoshell. - There is no longer the concept of a missing preference. - Preferences no longer have to be part of the resources bundle because they now have reasonable default values. - servoshell specific preferences are no longer part of the preferences exposed by the Servo API. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Add Content Range Header and add one for blob end range (#34797)TIN TUN AUNG2025-01-141-6/+43
| | | Signed-off-by: rayguo17 <rayguo17@gmail.com>
* add minimal implementation of FetchParams (#34833)arthmis2025-01-129-154/+234
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * add minimal implementation of fetchParams and fetch controller for cancellation support fix something removing fetch params from http network or cache fetch due to implementation difficult Signed-off-by: Lloyd Massiah <artmis9@protonmail.com> * run formatter Signed-off-by: Lloyd Massiah <artmis9@protonmail.com> * fix incorrect spec implementation and add comments with related step number and description Signed-off-by: Lloyd Massiah <artmis9@protonmail.com> * fix double borrow issue Signed-off-by: Lloyd Massiah <artmis9@protonmail.com> * remove unused code from FetchParams Signed-off-by: Lloyd Massiah <artmis9@protonmail.com> * add workaround for double mutable borrow error Signed-off-by: Lloyd Massiah <artmis9@protonmail.com> * remove unnecessary comments, move import and format Signed-off-by: Lloyd Massiah <artmis9@protonmail.com> * fix comments that state spec instructions Signed-off-by: Lloyd Massiah <artmis9@protonmail.com> * update comment Signed-off-by: Lloyd Massiah <artmis9@protonmail.com> * refactor tests Signed-off-by: Lloyd Massiah <artmis9@protonmail.com> * refactor tests Signed-off-by: Lloyd Massiah <artmis9@protonmail.com> --------- Signed-off-by: Lloyd Massiah <artmis9@protonmail.com> Co-authored-by: lazypassion <25536767+lazypassion@users.noreply.github.com>
* net: Raed RippyPNG resource once at startup. (#34954)Josh Matthews2025-01-121-3/+1
| | | Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* net: Use `RequestId` to cancel fetches instead of creating an IPC channel ↵Martin Robinson2025-01-116-54/+80
| | | | | | | | | | | | | | | | | | (#34883) Instead of creating an IPC channel for every fetch, allow cancelling fetches based on the `RequestId` of the original request. This requires that `RequestId`s be UUIDs so that they are unique between processes that might communicating with the resource process. In addition, the resource process loop now keeps a `HashMap` or `Weak` handles to cancellers and cleans them up. This allows for creating mutiple `FetchCanceller`s in `script` for a single fetch request, allowing integration of the media and video elements to integrate with the `Document` canceller list -- meaning these fetches also get cancelled when the `Document` unloads. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* script: Move navigation fetching to the `ScriptThread` (#34919)Martin Robinson2025-01-102-22/+4
| | | | | | | | | | | | | | | | | | | | This allows reusing the asynchrnous fetch mechanism that we use for page resources and is likely a step toward removing the `FetchThread`. Benefits: - Reduces IPC traffic during navigation. Now instead of bouncing between the constellation and the `ScriptThread` responses are sent directly to the `ScriptThread`. - Allows cancelling loads after redirects, which was not possible before. There is the question of what to do when a redirect is cross-origin (#23037). This currently isn't handled properly as the `Constellation` sends data to the same `Pipeline` that initiated the load. This change doesn't fix this issue, but does make it more possible for the `ScriptThread` to shut down the pipeline and ask the `Constellation` to replace it with a new one. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Add http2 feature for hyper-util (#34920)Oriol Brufau2025-01-091-1/+1
| | | | | This fixes an error when running `./mach clippy -r -p layout_2020`. Signed-off-by: Oriol Brufau <obrufau@igalia.com>
* build(deps): bump async-tungstenite from 0.28.0 to 0.28.2 (#34904)dependabot[bot]2025-01-081-1/+0
| | | | | | | | | | | | | | | Bumps [async-tungstenite](https://github.com/sdroege/async-tungstenite) from 0.28.0 to 0.28.2. - [Changelog](https://github.com/sdroege/async-tungstenite/blob/main/CHANGELOG.md) - [Commits](https://github.com/sdroege/async-tungstenite/compare/0.28.0...0.28.2) --- updated-dependencies: - dependency-name: async-tungstenite 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>
* Update all network-related dependencies to the latest versions (#34630)Josh Matthews2025-01-0814-940/+1109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Update all network-related dependencies to the latest versions: * rustls * hyper * http * headers * tungstenite * async-tungstenite Signed-off-by: Josh Matthews <josh@joshmatthews.net> * net: Fix panics with 1xx responses in WPT tests. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * net: Use reported response length when calculating available ranges. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * net: Remove unreachable match arm. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * net: Clean up commented fragments in blob and file handlers. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * net: Remove unreachable match arm. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * net: Fix clippy warning. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * net: Cleanup. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * net: Fix up unit tests for dependency upgrades. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Update aws-lc-sys to fix Windows builds. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * net: Use ring instead of aws-lc-sys. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * embedding: Require embedder to initialize a rustls CryptoProvider. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Disable aws-lc-rs pending OhOS build fixes. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* fix: add source browsing context to `Request` and HTTP credentials prompt ↵Jason Tsai2025-01-031-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#34808) * fix: add source browsing ctx id to request when initiate navigation Signed-off-by: Jason Tsai <git@pews.dev> * chore: clippy Signed-off-by: Jason Tsai <git@pews.dev> * Update components/net/http_loader.rs Co-authored-by: Martin Robinson <mrobinson@igalia.com> Signed-off-by: Jason Tsai <git@pews.dev> * chore: apply suggestions Co-authored-by: Martin Robinson <mrobinson@igalia.com> Signed-off-by: Jason Tsai <git@pews.dev> * chore: fix naming Signed-off-by: Jason Tsai <git@pews.dev> * refactor: set request browsing ctx id on pre page load Signed-off-by: Jason Tsai <git@pews.dev> --------- Signed-off-by: Jason Tsai <git@pews.dev> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Upgrade rustc to 1.83 (#34793)Nico Burns2025-01-012-9/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Upgrade rustc to 1.83 Signed-off-by: Nico Burns <nico@nicoburns.com> * Fix crown (change copied from linked clippy function) Signed-off-by: Nico Burns <nico@nicoburns.com> * Fix named lifetime lint Signed-off-by: Nico Burns <nico@nicoburns.com> * Bump shell.nix Signed-off-by: Nico Burns <nico@nicoburns.com> * Fix non-local impl warnings Signed-off-by: Nico Burns <nico@nicoburns.com> * Format with 1.83 formatting changes Signed-off-by: Nico Burns <nico@nicoburns.com> * Fix manual non-local impl Signed-off-by: Nico Burns <nico@nicoburns.com> * More fixes for crown Signed-off-by: Nico Burns <nico@nicoburns.com> * Fix tidy Signed-off-by: Nico Burns <nico@nicoburns.com> * Fix needless_return lints Signed-off-by: Nico Burns <nico@nicoburns.com> * Fix doc comment lint Signed-off-by: Nico Burns <nico@nicoburns.com> * Fix missing wait lint Signed-off-by: Nico Burns <nico@nicoburns.com> * Allow needless_lifetimes lint Signed-off-by: Nico Burns <nico@nicoburns.com> * more doc comments Signed-off-by: Nico Burns <nico@nicoburns.com> * More needless_returns Signed-off-by: Nico Burns <nico@nicoburns.com> * is_empty lint Signed-off-by: Nico Burns <nico@nicoburns.com> * Fix needless_lifetime lints Signed-off-by: Nico Burns <nico@nicoburns.com> * fix div_ceil lint Signed-off-by: Nico Burns <nico@nicoburns.com> * Allow non-minimal bool Signed-off-by: Nico Burns <nico@nicoburns.com> * Non-local impl in constellation Signed-off-by: Nico Burns <nico@nicoburns.com> * Missing wait in constellation Signed-off-by: Nico Burns <nico@nicoburns.com> * fmt Signed-off-by: Nico Burns <nico@nicoburns.com> * remove useless lints table Signed-off-by: Nico Burns <nico@nicoburns.com> * Fixup comments Signed-off-by: Nico Burns <nico@nicoburns.com> * Allow non-local definition in sandboxing code to simplify feature flagging Signed-off-by: Nico Burns <nico@nicoburns.com> * Remove wait calls and allow zombie_processes lint Signed-off-by: Nico Burns <nico@nicoburns.com> --------- Signed-off-by: Nico Burns <nico@nicoburns.com>
* Prompt user for credentials when http request needs it (#34620)arthmis2024-12-285-49/+351
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * prompt user to get their credentials Signed-off-by: Lloyd Massiah artmis9@protonmail.com move credential prompt to a function Signed-off-by: Lloyd Massiah <artmis9@protonmail.com> * add prompt for step 15.4 Signed-off-by: Lloyd Massiah <artmis9@protonmail.com> * add new prompt definition for user credentials Signed-off-by: Lloyd Massiah <artmis9@protonmail.com> * remove default implementation for HttpState which allowed making the embedder_proxy non-optional - default implementation was only used in tests so created an alternative create_http_state function Signed-off-by: Lloyd Massiah <artmis9@protonmail.com> add credentials to authentication cache Signed-off-by: Lloyd Massiah <artmis9@protonmail.com> * add tests that are successful for the happy path Signed-off-by: Lloyd Massiah <artmis9@protonmail.com> * add test for user cancels prompt and user inputs incorrect credentials, and refactor shared code between tests Signed-off-by: Lloyd Massiah <artmis9@protonmail.com> * handle error when setting username and password in Url and ran formatting Signed-off-by: Lloyd Massiah <artmis9@protonmail.com> renaming test functions Signed-off-by: Lloyd Massiah <artmis9@protonmail.com> * change authentication flag to false for proxy authentication. The spec doesn't specify that the flag should be true, and the flag is by default false Signed-off-by: Lloyd Massiah <artmis9@protonmail.com> * clean up test code a bit Signed-off-by: Lloyd Massiah <artmis9@protonmail.com> * add skeleton implementation to support open harmony and android Signed-off-by: Lloyd Massiah <artmis9@protonmail.com> * update warning message to include Android Signed-off-by: Lloyd Massiah <artmis9@protonmail.com> * fix build error for OH os and Android Signed-off-by: Lloyd Massiah <artmis9@protonmail.com> * remove unused import to fix warning Signed-off-by: Lloyd Massiah <artmis9@protonmail.com> --------- Signed-off-by: Lloyd Massiah <artmis9@protonmail.com> Co-authored-by: lazypassion <25536767+lazypassion@users.noreply.github.com>
* Optimize mutex usage in fetch by locking once and using scoped MutexGuard ↵Wulan Seruniati Salim2024-12-221-11/+5
| | | | | (#34737) Signed-off-by: Wulan Seruniati Salim <wulanseruniati@gmail.com>
* Save http response reason instead of inferring it from status code (#34694)Simon Wülker2024-12-181-9/+12
| | | | | | | | | | | | | | | | | * Don't unnecessarily clone responses twice when sending them to devtools Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Store http response reason instead of inferring it later Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Update wpt expectations Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* websocket: Revert use of h2 in websocket ALPN. (#34634)Josh Matthews2024-12-161-1/+1
| | | Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* build: upgrade rustc to 1.81.0 (#34270)Mukilan Thiyagarajan2024-12-122-4/+2
| | | Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* Update response handling in main_fetch (#34570)shanehandley2024-12-112-17/+11
| | | Signed-off-by: Shane Handley <shanehandley@fastmail.com>