aboutsummaryrefslogtreecommitdiffstats
path: root/components/net
Commit message (Collapse)AuthorAgeFilesLines
...
* Add prefs to limit threadpool sizes (#34478)Jonathan Schwender2024-12-075-13/+40
| | | | | | | | | | | | | | | | | | | | | | | | | * Add prefs to limit threadpool sizes Add preferences to control the size of threadpools, so that we can easily reduce the amount of runtime threads and test which pools benefit from more threads. Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com> * Add pref for Webrender threadpool Add a preference to limit the size of the webrender threadpool. Note: WebRender by default calls hooks which register the threads with a profiler instance that the embedder can register with webrender. Servo currently doesn't register such a profiler with webrender, but in the future we might also want to profile the webrender threadpool. Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com> --------- Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
* Remove some unused dependencies (#34355)Jonathan Schwender2024-11-251-1/+0
| | | | | | | | | | | | | | | * Remove unused deps This doesn't seem to remove any deps from the workspace. Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com> * ohos: Remove gaol dependency Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com> --------- Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
* Fork Stylo's `malloc_size_of` into Servo (#34332)Martin Robinson2024-11-221-83/+56
| | | | | | | | | | | | | | | | This is unfortuante, but it's the only way to stop making Stylo's `malloc_size_of` depend on so many of Servo's dependencies. This is an important step on the way toward releasing Stylo as standalone software. When possible, we defer to the implementation of `MallocSizeOf` that is in the base class. One benefit of this change is that we start properly measure the size of WebRender types, which before were always set to zero. In addition the `Measurable` class is removed in favor of simply manually implementing `MallocSizeOf`, which doesn't require uncomfortably modifying the shape of data structures. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Remove referrer policy from document (#34263)shanehandley2024-11-193-37/+46
| | | | | | | | | | | | | | | | | | | | | * Remove the referrer policy from document and rely on its policy container Signed-off-by: Shane Handley <shanehandley@fastmail.com> * Make ReferrerPolicy non-optional, instead using a new enum value to represent the empty string case Signed-off-by: Shane Handley <shanehandley@fastmail.com> * Fix clippy issue Signed-off-by: Shane Handley <shanehandley@fastmail.com> * Fix usage of Option<ReferrerPolicy> in unit test Signed-off-by: Shane Handley <shanehandley@fastmail.com> --------- Signed-off-by: Shane Handley <shanehandley@fastmail.com>
* Implement PolicyContainer and update the default ReferrerPolicy (#33977)shanehandley2024-11-081-22/+60
| | | | | | | | | | | | | | | | | | | | | * Implement PolicyContainer Signed-off-by: Shane Handley <shanehandley@fastmail.com> * implement small parts of fetch that interact with policy container Signed-off-by: Shane Handley <shanehandley@fastmail.com> * fix: allow policy container's csp list to be unset Signed-off-by: Shane Handley <shanehandley@fastmail.com> * fix: use the correct default policy when parsing from a token Signed-off-by: Shane Handley <shanehandley@fastmail.com> --------- Signed-off-by: Shane Handley <shanehandley@fastmail.com>
* net: Ensure that origin serialization is consistent (#34081)Martin Robinson2024-10-312-8/+42
| | | | | | | | | | | | | | A recent refactoring (#33531) made a change that resulted in the `Origin` header including the port even when the default port for a scheme was used. This made the serialization different from that used for `rust-url`'s `Origin::ascii_serialization()`, breaking CORS on some sites. This change makes it so that the serialization is consistent again. This change also fixes the visiblity on a few methods in `http_loader.rs` since visibility needs to be adjusted for testing anyway. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Use `ROUTER::add_typed_route` instead of `ROUTER::add_route` everywhere (#33866)Simon Wülker2024-10-183-9/+9
| | | | | | | | | | | | | * Use ROUTER::add_typed_route where possible Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Update webxr, media and ipc-channel Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* net: Start reducing number of IPCs channels used for fetch with a ↵Martin Robinson2024-10-167-259/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `FetchThread` (#33863) Instead of creating a `ROUTER` for each fetch, create a fetch thread which handles all incoming and outcoming fetch requests. Now messages involving fetches carry a "request id" which indicates which fetch is being addressed by the message. This greatly reduces the number of file descriptors used by fetch. In addition, the interface for kicking off fetches is simplified when using the `Listener` with `Document`s and the `GlobalScope`. This does not fix all leaked file descriptors / mach ports, but greatly eliminates the number used. Now tests can be run without limiting procesess on modern macOS systems. Followup work: 1. There are more instances where fetch is done using the old method. Some of these require more changes in order to be converted to the `FetchThread` approach. 2. Eliminate usage of IPC channels when doing redirects. 3. Also eliminate the IPC channel used for cancel handling. 4. This change opens up the possiblity of controlling the priority of fetch requests. Fixes #29834. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Implement fetch metadata headers (#33830)Simon Wülker2024-10-164-4/+388
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Implement sec-fetch-dest header Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Implement "is same site" algorithm Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Implement remaining sec-fetch-* headers Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Fix casing of header names Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Fix handling Destination::None in sec-fetch-dest This also removes the comment about wanting to upgrade to a newer content-security-protocol version because the csp doesn't implement the "empty" case. Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Update WPT expectations Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Remove colon from spec comment Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Adjust expected default headers Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Fix test expectations Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* doc(resources): `Preferences`, `HstsPreloadList`, `RippyPNG` (#33775)Ngo Iok Ui (Wu Yu Wei)2024-10-101-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Set to default if Preferences and HstsPreloadList are empty Signed-off-by: Wu Yu Wei <yuweiwu@pm.me> * Add documentation of Preferences, HstsPreloadList, RippyPNG Signed-off-by: Wu Yu Wei <yuweiwu@pm.me> * Add warn log when setting prefs to default Signed-off-by: Wu Yu Wei <yuweiwu@pm.me> * Add error log instead Signed-off-by: Wu Yu Wei <yuweiwu@pm.me> * Add error log to HSTS preload list Signed-off-by: Wu Yu Wei <yuweiwu@pm.me> * Apply suggestions from code review Address a couple wording nits Signed-off-by: Martin Robinson <mrobinson@igalia.com> --------- Signed-off-by: Wu Yu Wei <yuweiwu@pm.me> Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* compositor: Create a single cross-process compositor API (#33619) (#33660)Martin Robinson2024-10-091-16/+17
| | | | | | | | | | | | | | | | | | | | | | Instead of exposing many different kinds of messages to the compositor that are routed through the constellation, expose a single message type which can be sent across IPC channels. In addition, this IPC channel and the route to the crossbeam channel with the compositor is created along with the `CompositorProxy`, simplifying what needs to be passed around during pipeline initialization. Previously, some image updates (from video) were sent over IPC with a special serialization routine and some were sent via crossbeam channels (canvas). Now all updates go over the IPC channel `IpcSharedMemory` is used to avoid serialization penalties. This should improve performance and reduce copies for video, but add a memory copy overhead for canvas. This will improve in the future when canvas renders directly into a texture. All-in-all this is a simplification which opens the path toward having a standard compositor API and reduces the number of duplicate messages and proxying that had to happen in libservo. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Fix Clippy warning: Replace map().flatten() with and_then() in ↵chickenleaf2024-10-091-2/+1
| | | | | http_loader.rs (#33744) Signed-off-by: L Ashwin B <lashwinib@gmail.com>
* Fix handling of `__Secure-` and `__Host-` Cookie prefixes (#33717)Simon Wülker2024-10-092-41/+150
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Make checking for cookie prefixes case-insensitive Cookie-Prefixes like "__Host-" and "__Secure-" are case insensitive as per https://www.ietf.org/archive/id/draft-ietf-httpbis-rfc6265bis-15.html#name-storage-model. This is tested by many WPT tests in cookies/prefix, for example * cookies/prefix/__host.document-cookie.html * cookies/prefix/__host.document-cookie.https.html Since the implementation and the specification had diverged quite significantly i also updated/added spec comments where appropriate and slightly restructured code so its easier to follow. However, the only change in behaviour is the prefix check described above. Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Update WPT expectations Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Remove unused import Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Fix cookie test cases Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Fix ignore cookie with __Host prefix and no specified path attribute Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Fix another cookie test case Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Bring `http_network_or_cache_fetch` closer to the spec (#33531)Simon Wülker2024-10-081-159/+293
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Document "fetch" method Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Bring http_network_or_cache_fetch closer to the spec Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * fix test-tidy errors Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Move all code into http_loader.rs Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Don't panic if hyper/servo disagree about valid origins Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Add "otherwise" to spec comment Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Convert FIXME's to TODOs when appropriate Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Remove TODO about No-Store cache directive Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Remove indentation from multiline spec comments Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Add fetch assertions This is from a spec update where assertions about requests origin not being client were added. Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Add note about serializing headers Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Add TODO about partitioning http cache Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Convert FIXME to TODO in script/ Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Link to relevant issue for TODO comments Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Revert "compositor: Create a single cross-process compositor API (#33619)" ↵Martin Robinson2024-10-041-17/+16
| | | | | | | | | (#33645) This reverts commit f2f5614ad64927aa82aa8937ae14a6086df49d2b. This is causing intermittent crashes: https://github.com/servo/servo/actions/runs/11167043809/job/31044255019 Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* compositor: Create a single cross-process compositor API (#33619)Martin Robinson2024-10-031-16/+17
| | | | | | | | | | | | | | | | | | | | | | Instead of exposing many different kinds of messages to the compositor that are routed through the constellation, expose a single message type which can be sent across IPC channels. In addition, this IPC channel and the route to the crossbeam channel with the compositor is created along with the `CompositorProxy`, simplifying what needs to be passed around during pipeline initialization. Previously, some image updates (from video) were sent over IPC with a special serialization routine and some were sent via crossbeam channels (canvas). Now all updates go over the IPC channel `IpcSharedMemory` is used to avoid serialization penalties. This should improve performance and reduce copies for video, but add a memory copy overhead for canvas. This will improve in the future when canvas renders directly into a texture. All-in-all this is a simplification which opens the path toward having a standard compositor API and reduces the number of duplicate messages and proxying that had to happen in libservo. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* net: Refactor `Decoder` (#33611)Cristian Brinza2024-10-025-406/+239
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Refactor Decoder to be fully async Signed-off-by: crbrz <cristianb@gmail.com> * Update WPT results Signed-off-by: crbrz <cristianb@gmail.com> * Fix deflate unit test Signed-off-by: crbrz <cristianb@gmail.com> * Add compressed response update count test Signed-off-by: crbrz <cristianb@gmail.com> * Fix typo Signed-off-by: crbrz <cristianb@gmail.com> * Source error check without conversion to String Signed-off-by: crbrz <cristianb@gmail.com> * Simplify error check Signed-off-by: crbrz <cristianb@gmail.com> * Fix variable name Signed-off-by: crbrz <cristianb@gmail.com> * Added TODO note for network.tls.ignore_unexpected_eof Signed-off-by: crbrz <cristianb@gmail.com> --------- Signed-off-by: crbrz <cristianb@gmail.com>
* Create HttpStatus to safely deal with HTTP responses status. (#33581)webbeef2024-09-299-161/+98
| | | Signed-off-by: webbeef <me@webbeef.org>
* Let protocol handlers decide if they are fetchable (#33573)webbeef2024-09-283-5/+30
| | | | | | | This adds a 'is_fetchable()' method on the ProtocolHandler trait that is then used in the fetch code. The 'data:' protocol handler is updated to return true instead of hardcoding the scheme comparison, as well as the 'urlinfo:' handler since it's just a testing one. Signed-off-by: webbeef <me@webbeef.org>
* Simplify the data: protocol handler (#33500)webbeef2024-09-281-67/+27
| | | Signed-off-by: webbeef <me@webbeef.org>
* fetch: header tweaks to improve compliance with fetch spec (#33562)shanehandley2024-09-271-5/+20
| | | | | | | | | | | | | * fetch: various header tweaks to improve compliance with fetch spec Signed-off-by: Shane Handley <shanehandley@fastmail.com> * fix: simplify the authorization header removal Signed-off-by: Shane Handley <shanehandley@fastmail.com> --------- Signed-off-by: Shane Handley <shanehandley@fastmail.com>
* fix many clippy warnings (#33510)Gae242024-09-211-1/+1
| | | Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
* fetch: add an accept encoding header when the range header exists (#33496)shanehandley2024-09-191-13/+32
| | | Signed-off-by: Shane Handley <shanehandley@fastmail.com>
* Append the Sec-Purpose header for prefetch requests (#33490)shanehandley2024-09-181-23/+51
| | | Signed-off-by: Shane Handley <shanehandley@fastmail.com>
* Add `rust-version` to all `Cargo.toml` files (#33483)Martin Robinson2024-09-171-0/+1
| | | | | | | This is another step preparing for building Servo without `mach`. Fixes #33430. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Replace .map_or(false with Option::is_some_and (#33468)Simon Wülker2024-09-163-16/+16
| | | Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Improve spec conformance around request header validation (#33418)shanehandley2024-09-141-149/+2
| | | | | | | | | | | | | | | | | * fix: improve spec conformance around request header validation Signed-off-by: Shane Handley <shanehandley@fastmail.com> * account for additional test passes Signed-off-by: Shane Handley <shanehandley@fastmail.com> * fix: remove redundant .to_vec call Signed-off-by: Shane Handley <shanehandley@fastmail.com> --------- Signed-off-by: Shane Handley <shanehandley@fastmail.com>
* Stop using `time@0.1` in Servo (#33394)Martin Robinson2024-09-114-30/+23
| | | | | | | | This removes the last few uses of `time@0.1` in Servo. There are still dependencies from `style` and `webrender`, but they will be removed soon as well. The uses of this version of `time` are replaced with `std::time` types and `time@0.3` when negative `Duration` is necessary. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Initial support for `<link rel="prefetch">` (#33345)Simon Wülker2024-09-092-35/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Properly store link relations Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Send fetch request for prefetch links We don't actually *do* anything with the response yet (handle errors etc) but its a first step. Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Fire load/error events for prefetch loads Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Set prefetch destination/cors setting correctly Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Update WPT expectations Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Fix ./mach test-tidy errors Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Set correct "Accept" value for prefetch requests Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Add spec text to individual steps Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* net: use saturating_sub when substracting durations to prevent underflows ↵webbeef2024-09-081-5/+2
| | | | | | | | | | | | | | | | | | | (#33341) * net: use saturating_sub when substracting durations to prevent underflows Signed-off-by: webbeef <me@webbeef.org> * Add regression test. (#1) * Add regression test. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: webbeef <me@webbeef.org> Signed-off-by: Josh Matthews <josh@joshmatthews.net> Co-authored-by: Josh Matthews <josh@joshmatthews.net>
* script: Create a `CrossProcessInstant` to enable serializable monotonic time ↵Martin Robinson2024-09-051-16/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#33282) Up until now, Servo was using a very old version of time to get a cross-process monotonic timestamp (using `time::precise_time_ns()`). This change replaces the usage of old time with a new serializable monotonic time called `CrossProcessInstant` and uses it where `u64` timestamps were stored before. The standard library doesn't provide this functionality because it isn't something you can do reliably on all platforms. The idea is that we do our best and then fall back gracefully. This is a big change, because Servo was using `u64` timestamps all over the place some as raw values taken from `time::precise_time_ns()` and some as relative offsets from the "navigation start," which is a concept similar to DOM's `timeOrigin` (but not exactly the same). It's very difficult to fix this situation without fixing it everywhere as the `Instant` concept is supposed to be opaque. The good thing is that this change clears up all ambiguity when passing times as a `time::Duration` is unit agnostic and a `CrossProcessInstant` represents an absolute moment in time. The `time` version of `Duration` is used because it can both be negative and is also serializable. Good things: - No need too pass around `time` and `time_precise` any longer. `CrossProcessInstant` is also precise and monotonic. - The distinction between a time that is unset or at `0` (at some kind of timer epoch) is now gone. There still a lot of work to do to clean up timing, but this is the first step. In general, I've tried to preserve existing behavior, even when not spec compliant, as much as possible. I plan to submit followup PRs fixing some of the issues I've noticed. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Make all platforms use a delay during cookie tests. (#33279)Josh Matthews2024-09-011-4/+0
| | | Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* net: Stop using both versions of the `time` crate in the cookie code (#33260)Martin Robinson2024-08-303-34/+26
| | | | | | | | `std::time` is good enough for us here. `cookie` is using `time 0.3`, but Servo can convert to standard library types when getting data from `cookie`. This reduces our direct dependencies and removes more use of the very old `time 0.1` series. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* net: Stop using legacy time in the HTTP and CORS caches (#33259)Martin Robinson2024-08-303-65/+53
| | | | | This is part of switching away from using a very old version of `time`. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* make protocol handlers registrable (#33104)webbeef2024-08-2210-219/+431
| | | Signed-off-by: webbeef <me@webbeef.org>
* Remove unused constant from `components/net/fetch/methods.rs` (#33054)Martin Robinson2024-08-141-4/+1
| | | | | This was revealed by the recent switch to `LazyLock`. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Replace the lazy_static crate with std::sync::LazyLock in components/net ↵Hayashi Mikihiro2024-08-145-25/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | (#33046) * replace in net/fetch/methods.rs Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> * replace in net/hosts.rs Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> * replace in net/async_runtime.rs Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> * replace in net/tests/main.rs Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> * remove lazy_static crate from components/net Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> --------- Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
* Fix warnings after latest rust upgrade (#33043)Martin Robinson2024-08-141-0/+1
| | | | | | | This fixes various unused code warnings after the recent rust upgrade. Some of the dead code is maintained, as it is quite likely that it will be used in future changes. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Dedupliate `syn` (#33038)Martin Robinson2024-08-131-1/+1
| | | | | | | | | | | | | | This is the last step toward removing our use of `syn` version 1. It does three things: 1. Upgrades `async-recursion` to a newer version that uses `syn` 2. 2. Removes the use of `enum-iterator` that was only used to produce a trivial list of enum names. This reduces the number of crates we dependo on by 2. 3. Upgrades `media` to a version which no longer uses `syn` 1 Fixes #33034. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* clippy: Fix various clippy warnings throughout the code (#33003)Ashwin Naren2024-08-131-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * replace u64::max_value() with u64::MAX Signed-off-by: Ashwin Naren <arihant2math@gmail.com> * removed redundant import Signed-off-by: Ashwin Naren <arihant2math@gmail.com> * Fixed dereference Signed-off-by: Ashwin Naren <arihant2math@gmail.com> * Fixed a probable bug Signed-off-by: Ashwin Naren <arihant2math@gmail.com> * fixed imports Signed-off-by: Ashwin Naren <arihant2math@gmail.com> * fixed dereference Signed-off-by: Ashwin Naren <arihant2math@gmail.com> * dereference formatting Signed-off-by: Ashwin Naren <arihant2math@gmail.com> * removed unnessicary number imports Signed-off-by: Ashwin Naren <arihant2math@gmail.com> * removed unnessicary number imports Signed-off-by: Ashwin Naren <arihant2math@gmail.com> * removed excess borrow Signed-off-by: Ashwin Naren <arihant2math@gmail.com> * ran mach fmt Signed-off-by: Ashwin Naren <arihant2math@gmail.com> * fixed doc comment Signed-off-by: Ashwin Naren <arihant2math@gmail.com> * removed deref on an immutable reference Signed-off-by: Ashwin Naren <arihant2math@gmail.com> * fixed minor syntax error Signed-off-by: Ashwin Naren <arihant2math@gmail.com> * reverted clamping Signed-off-by: Ashwin Naren <arihant2math@gmail.com> * formatting Signed-off-by: Ashwin Naren <arihant2math@gmail.com> * reverted final clamp Signed-off-by: Ashwin Naren <arihant2math@gmail.com> --------- Signed-off-by: Ashwin Naren <arihant2math@gmail.com> Co-authored-by: Ashwin Naren <ashwin@pixelators.org>
* Allow navigations that include cross-origin redirects to succeed. (#32996)Josh Matthews2024-08-121-7/+18
| | | Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Update to rust 1.80.0 (#32896)Hayashi Mikihiro2024-08-071-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Update for nix Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> * Update to Rust 1.80.0 Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> * Rename to BindingMode from BindingAnnotation https://github.com/rust-lang/rust/pull/124047 Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> * Remove TypeVariableOriginKind https://github.com/rust-lang/rust/pull/123016 Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> * Remove TypeVariableOrigin https://github.com/rust-lang/rust/pull/124955 Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> * Remove LintDiagnostic::msg rust-lang/rust#125410 Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> * common.rs fmt mistake indents Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> * trace_in_no_trace.rs remove mistake space Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> * trace_in_no_trace.rs remove mistake head space Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> * Workaround for https://github.com/servo/servo/issues/32912 It's dirty but it worked on 2000 runs Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --------- Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> Co-authored-by: Samson <16504129+sagudev@users.noreply.github.com>
* dependencies: Upgrade `cookie` and rename Servo's `Cookie` to `ServoCookie` ↵Martin Robinson2024-07-269-173/+169
| | | | | | | | | | | | | | (#32861) This changes updates to the new version of the `cookie` crate in Servo which no longer uses the old `time@0.1` data types. This requires using a new version of `time` while we transition off of the old one. This is the first step in that process. In addition, the overloading of the `cookie::Cookie` name was causing a great deal of confusion, so I've renamed the Servo wrapper to `ServoCookie` like we do with `ServoUrl`. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* DevTools: Replace camel case variable names (#32726)eri2024-07-083-6/+6
| | | | | | | | | * refactor: rename to snake case * refactor: more renaming * chore: format * chore: clean
* clippy: Fix a bunch of warnings in `script` (#32680)Martin Robinson2024-07-042-8/+8
| | | This is just a portion of the errors that are remaining to be fixed.
* Add a directory listing feature for `file` URLs (#32580)Martin Robinson2024-06-264-8/+165
| | | | | Signed-off-by: Bobulous <Bobulous@users.noreply.github.com> Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Bobulous <Bobulous@users.noreply.github.com>
* Use workspace definitions for all crates and update to the 2021 edition (#32544)Martin Robinson2024-06-181-5/+5
|
* clippy: fix some leftover warnings in components/net (#32476)Peter Mikola2024-06-113-9/+20
|
* compositor: Move WebRender-ish messages and types to `webrender_traits` (#32315)Mukilan Thiyagarajan2024-05-202-11/+10
| | | | | | | | | | | | | | | | | | | | * Move WebRender related types to `webrender_traits` This refactor moves several WebRender related types from `compositing_traits`, `script_traits` and `net_traits` crates to the `webrender_traits` crate. This change also moves the `Image` type and associated function out of `net_traits` and into the `pixels` crate. Co-authored-by: Martin Robinson <mrobinson@igalia.com> Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * Move `script_traits::WebrenderIpcSender` to `webrender_traits::WebRenderScriptApi` --------- Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Move non-gfx things out of `gfx_traits` and create a `base` crate (#32296)Martin Robinson2024-05-175-5/+5
| | | | | | | | | | | | | | | | | | | | | | | For a long time, `gfx_traits` has held a lot of things unrelated to graphics and also unrelated to the `gfx` crate (which is mostly about fonts). This is a cleanup which does a few things: 1. Move non `gfx` crate things out of `gfx_traits`. This is important in order to prevent dependency cycles with a different integration between layout, script, and fonts. 2. Rename the `msg` crate to `base`. It didn't really contain anything to do with messages and instead mostly holds ids, which are used across many different crates in Servo. This new crate will hold the *rare* data types that are widely used. Details: - All BackgroundHangMonitor-related things from base to a new `background_hang_monitor_api` crate. - Moved `TraversalDirection` to `script_traits` - Moved `Epoch`-related things from `gfx_traits` to `base`. - Moved `PrintTree` to base. This should be widely useful in Servo. - Moved `WebrenderApi` from `base` to `webrender_traits` and renamed it to `WebRenderFontApi`.