aboutsummaryrefslogtreecommitdiffstats
path: root/components/net_traits
Commit message (Collapse)AuthorAgeFilesLines
* Move `*_traits` and other shared types to `shared`Martin Robinson2023-11-0316-3255/+0
| | | | | | | | | | | | This is the start of the organization of types that are in their own crates in order to break dependency cycles between other crates. The idea here is that putting these packages into their own directory is the first step toward cleaning them up. They have grown organically and it is difficult to explain to new folks where to put new shared types. Many of these crates contain more than traits or don't contain traits at all. Notably, `script_traits` isn't touched because it is vendored from Gecko. Eventually this will move to `third_party`.
* Enable debug assertions for all builds other than official releases (#30509)Delan Azabani2023-10-261-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Run main and try jobs with debug assertions * use single quotes in workflow expressions * set force-debug-assertions in main.yml * set force-debug-assertions as part of decision job * fix typo in MachCommands.build * fix more hardcoded profile names * fix tidy * split cargo_profile_option on windows * Fix running servoshell and unit tests through a symlink * rename steps to make them less confusing * fix more hardcoded cargo profile options * fix missing inputs in linux-wpt and mac-wpt * make filename an inherent method of Resource * rework release-with-debug-assertions profile to production profile * rework resource logic to eliminate std_test_override * set production flag in nightly release builds * clean up servobuild.example and windows.yml * oops forgot to check in embedder_traits/build.rs * fix mach test-unit behaviour through symlink * unit tests only need current_dir and ancestors * fix macOS package smoketest breakage * expect css/css-color/currentcolor-003 to crash under layout 2013 * fix more references to {force,release-with}-debug-assertions * fix local build failures under --profile production
* Rename messages forwarded from the constellation to the compositor (#30496)Martin Robinson2023-10-051-5/+5
| | | | | | The constellation forwards messages from other tasks to the compositor. Mainly, these are passed to WebRender. This change updates the names of these messages so it is clearer where they are coming from and where they are going.
* Strict import formatting (grouping and granularity) (#30325)Samson2023-09-119-34/+46
| | | | | * strict imports formatting * Reformat all imports
* remove `extern crate` (#30311)Samson2023-09-089-11/+22
| | | | | | | | | | | * remove extern crate * Update components/script_plugins/lib.rs Co-authored-by: Martin Robinson <mrobinson@igalia.com> --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* constellation: crash to a new “sad tab” error page (#30290)Delan Azabani2023-09-062-1/+15
| | | | | | | | | | | | | | | | | | | | | * constellation: crash to a new “sad tab” page * check in resources/crash.html * use a separate enum variant instead of keying on reason * fmt + tidy * rename Resource::Crash to Resource::CrashHTML * clean up crash page and add details (reason + backtrace) * avoid repeating crash errors in script::script_thread warn log * make new LoadData init more idiomatic * clarify comments and new fields * fix doc comment style
* Switch to rustls and webpki-roots (#30025)Martin Robinson2023-08-082-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change replaces OpenSSL with rustls and also the manually curated CA certs file with webpki-roots (effectively the same thing, but as a crate). Generally speaking the design of the network stack is the same. Changes: - Code around certificate overrides needed to be refactored to work with rustls so the various thread-safe list of certificates is refactored into `CertificateErrorOverrideManager` - hyper-rustls takes care of setting ALPN protocols for HTTP requests, so for WebSockets this is moved to the WebSocket code. - The safe set of cypher suites is chosen, which seem to correspond to the "Modern" configuration from [1]. This can be adjusted later. - Instead of passing a string of PEM CA certificates around, an enum is used that includes parsed Certificates (or the default which reads them from webpki-roots). - Code for starting up an SSL server for testing is cleaned up a little, due to the fact that the certificates need to be overriden explicitly now. This is due to the fact that the `webpki` crate is more stringent with self-signed certificates than SSL (CA certificates cannot used as end-entity certificates). [2] 1. https://wiki.mozilla.org/Security/Server_Side_TLS 2. https://github.com/briansmith/webpki/issues/114 Fixes #7888. Fixes #13749. Fixes #26835. Fixes #29291.
* Try to `use` WebRender types moreMartin Robinson2023-07-101-1/+2
| | | | | The newer versions of WebRender move types around between `webrender` and `webrender_api` and this will reduce the churn during the upgrade.
* Auto merge of #29637 - ↵bors-servo2023-05-181-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AnthonyJ3:Use-same-origin-as-default-credential-mode-for-RequestInit-fix, r=mukilan Use same-origin as default credential mode for RequestInit fix <!-- Please describe your changes on the following line: --> - Updated the default credential mode from omit to same-origin as per: https://github.com/whatwg/fetch/pull/1153 - Deleted instances of fallback credentials --- - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #29633 (GitHub issue number if applicable) - [X] There are tests for these changes
| * fixup! defaulted credentials mode to same-origin & removed fallback credentialsAnthonyJ32023-04-271-1/+1
| |
| * defaulted credentials mode to same-origin & removed fallback credentialsAnthonyJ32023-04-161-1/+1
| | | | | | | | Signed-off-by: AnthonyJ3 <johnsonac.3300@gmail.com>
* | Auto merge of #29752 - mrobinson:fix-29741-by-extending-request-builder, ↵bors-servo2023-05-181-1/+9
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r=mukilan Fix 29741 by extending request builder Extend RequestBuilder to include ResponseTainting and used said functionality to set response_tainting to `::CorsTainting` in `cors_preflight_fetch()`. --- <!-- 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 #29741 <!-- Either: --> - [ ] 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. -->
| * | add response tainting to request builderIver Småge men bærbar2023-05-181-1/+9
| |/
* / Start the transition to workspace dependenciesMartin Robinson2023-05-171-18/+18
|/ | | | | | | This will ultimately make it simpler to update crate dependencies and reduce duplicate when specifying requirements. Generally, this change does not touch dependencies that are only used by a single crate. We could consider moving them to workspace dependencies in the future.
* Fix return value of concept-header-list-get to Option<Vec<u8>>2shiori172023-03-261-6/+3
|
* Remove net from dependencies2shiori172023-03-202-0/+26
|
* Switch to the sha2 crate for SRI digests.Fabrice Desré2023-02-241-1/+1
| | | | This removes one (simple) use of OpenSSL
* Auto merge of #28893 - EnnuiL:master, r=jdmbors-servo2022-08-153-3/+13
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update to image 0.24.2, implement WebP support <!-- Please describe your changes on the following line: --> This PR updates image to 0.24.2 and implements WebP support. I've been watching the progress on image-rs's WebP implementation, and from what I've seen, the situation has changed from "can only decode the luma channel from lossy WebPs" to pretty much full support (with image 0.24.2 implementing support for the extended WebP format). Here are screenshots of it viewing the WebP page's example: <details> <summary>Screenshots</summary> Servo viewing the main WebP gallery: ![A screenshot of Servo viewing the WebP Gallery](https://user-images.githubusercontent.com/85590273/167732100-957fe4a9-1752-491b-90e4-ffb2aa0552a4.png) Servo viewing a lossless example from WebP's Lossless and Alpha Demonstration: ![A screenshot of Servo viewing the lossless version of the "Transparent compass card for overlays" example from WebP's Lossless and Alpha Demonstration](https://user-images.githubusercontent.com/85590273/167732333-d082c9d0-e390-49c1-bfb0-9ba3e717367c.png) Servo viewing a lossy-with-alpha example from WebP's Lossless and Alpha Demonstration ![A screenshot of Servo viewing the lossy-with-alpha version of the "Transparent compass card for overlays" example from WebP's Lossless and Alpha Demonstration](https://user-images.githubusercontent.com/85590273/167731987-393f4931-4276-4cfb-94da-adacb07e5ca9.png) </details> This also changes the package name from `piston_image` to simply `image`. It appeared to be a piece of legacy from ages ago which can be safely changed now. (PS: I'm still pretty new at Rust, please let me know if I have done any mistakes in the process) --- <!-- 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 #20045 (GitHub issue number if applicable) <!-- 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. -->
| * Implement WebP supportEnnui Langeweile2022-05-103-3/+13
| | | | | | | | | | | | This also updates the image crate to 0.24.2 Signed-off-by: Ennui Langeweile <85590273+EnnuiL@users.noreply.github.com>
* | Fix some Clippy lints.Teymour Aldridge2022-08-042-2/+2
|/
* Update cookie/hyper_serde.Josh Matthews2022-04-011-2/+2
|
* Update image/png.Josh Matthews2022-04-012-6/+3
|
* Upgrade HyperNaveen Gattu2022-01-163-7/+7
|
* Non-blocking network IONaveen Gattu2021-12-231-5/+7
|
* Fix warnings introduced in newer Rust NightlySimon Sapin2021-02-251-1/+1
| | | | | | | | | | | | This does not (yet) upgrade ./rust-toolchain The warnings: * dead_code "field is never read" * redundant_semicolons "unnecessary trailing semicolon" * non_fmt_panic "panic message is not a string literal, this is no longer accepted in Rust 2021" * unstable_name_collisions "a method with this name may be added to the standard library in the future" * legacy_derive_helpers "derive helper attribute is used before it is introduced" https://github.com/rust-lang/rust/issues/79202
* Set CORS preflight requests' `mode` to `cors`Vincent Ricard2020-10-301-0/+46
|
* Make reload button clear the network cache.Josh Matthews2020-07-271-0/+6
|
* Propagate referrer policy during about:srcdoc page loadUtsav Oza2020-07-021-0/+34
|
* Make url for "client" referrer mandatoryMatthias Deiml2020-06-171-13/+14
|
* fix streaming request bodies, terminate fetch if the body stream errorsGregory Terzian2020-06-161-3/+20
|
* Avoid sending a new chunk when the body is already doneCYBAI2020-06-131-5/+2
| | | | | | | | | | | | | | | | As discussed in https://github.com/servo/servo/issues/26807#issuecomment-640151804, we'd like to add a new flag, `in_memory_done`, to `TransmitBodyConnectHandler` so that we can correctly finish and drop the sender correctly. When we send the bytes, we will mark the body as done and we can recognize it's already done in next tick so that we can send a Done request to finish the sender. Also, when there comes a redirect request, it will go to `re-extract` route, we can set the `done` flag to `false` which means we won't stop the IPC routers yet. Then, if the re-extract sent its bytes, we will be marked as done again so that we can finish with stopping the IPC routes when Chunk request comes.
* net: fix re-extracting stream upon re-directGregory Terzian2020-06-121-17/+12
|
* net: Use a POST request for allowing certs temporarily.Josh Matthews2020-06-091-3/+3
|
* net: Add option to temporarily accept certs that failed the handshake.Josh Matthews2020-06-092-0/+6
|
* net: Pass certs that fail the SSL handshake out of the network layer.Josh Matthews2020-06-091-3/+3
|
* net: Treat SSL handshake errors differently from other hyper errors.Josh Matthews2020-06-091-2/+7
|
* partially integrate streaming request bodies with http re-directGregory Terzian2020-06-041-12/+39
|
* integrate readablestream with fetch and blobGregory Terzian2020-06-041-3/+55
|
* More Cargo.toml updatesatouchet2020-05-301-8/+8
|
* check http_state in determine_request_referrerAlexandrov Sergey2020-05-191-1/+17
|
* Convert all uses of UpdateResources api to use webrender transactions.Josh Matthews2020-05-111-4/+7
|
* Don't send a load event when a loaded image is actually the placeholderBastien Orivel2020-05-081-1/+6
| | | | | | | | | | | | The image cache returns an `ImageCacheResult::ImageAvailable `the second time you try getting the placeholder. This means that in some cases, the loading of an image would fail, then the same image would get fetched from the cache, the placeholder would be loaded from that but would be seen as a normal image, firing a load event. This made the tests in `fetch/cross-origin-resource-policy/image-loads.html` fail depending on their order.
* Implement cross origin resource policy checkBastien Orivel2020-05-081-1/+1
| | | | | I removed the window getter usage from those tests as servo does not support that yet.
* Auto merge of #26450 - ↵bors-servo2020-05-071-0/+16
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PeterZhizhin:add_referrerpolicy_to_list_of_relevant_mutations, r=jdm Add referrerpolicy to list of relevant mutations <!-- Please describe your changes on the following line: --> `img.referrerPolicy` change now mutates the image. Not all `referrerPolicy` attribute changes result in an image update event. Only valid changes are reflected. All referrerpolicy tests inside `relevant-mutations.html` WPT test now pass. --- <!-- 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 #26388 <!-- Either: --> - [x] These have tests: ``` ./mach test-wpt tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/relevant-mutations.html ```
| * Added referrerpolicy as relevant mutation for imgPeterZhizhin2020-05-071-0/+16
| | | | | | | | | | | | | | | | This fixes #26388. referrerPolicy is now calls onload for image mutations. Not all referrerPolicy attribute changes result in an image update event. Only valid changes are reflected. Referrerpolicy tests now pass.
* | Properly set the url on the Response object when the response is an ↵Bastien Orivel2020-05-062-2/+2
| | | | | | | | opaqueredirect
* | Auto merge of #26407 - mrobinson:animation-restyle-model, r=jdmbors-servo2020-05-061-11/+0
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Have animations more closely match the HTML spec These two commits do two major things: **Have animations ticks trigger a restyle**: This corrects synchronization issues with animations, where the values used in layout are out of sync with what is returned by `getComputedStyle`. **Tick the animation timer in script according to spec**: This greatly reduces the flakiness of animation and transitions tests. Fixes #13865. <!-- 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 - [ ] These changes fix #13865 <!-- 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. -->
| * | Use a restyle for animation ticksMartin Robinson2020-05-051-11/+0
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | This change corrects synchronization issues with animations, by reworking the animation processing model to do a quick restyle and incremental layout when ticking animations. While this change adds overhead to animation ticks, the idea is that this will be the fallback when synchronous behavior is required to fulfill specification requirements. In the optimistic case, many animations could be updated and applied off-the-main-thread and then resynchronized when style information is queried by script. Fixes #13865.
* / Fix the redirected attribute for ResponseBastien Orivel2020-05-052-0/+4
|/
* Don't continually re-request completed requests that had load errors.Josh Matthews2020-04-171-8/+0
|