Commit graph

1467 commits

Author SHA1 Message Date
Taym Haddadi
65cbc95d38
Replace time with std::time in components/devtools (#30927)
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
2024-01-03 16:52:04 +00:00
Martin Robinson
f4d3af296c Move *_traits and other shared types to shared
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`.
2023-11-03 15:38:18 +00:00
Martin Robinson
a53271d31e
Update network stack dependencies (#30612)
- webpki-roots
- webpki
- async-tungstenite
- rustls
- rustls-webpki
- ring
2023-11-02 18:41:25 +00:00
Delan Azabani
a3d2f0c586
Enable debug assertions for all builds other than official releases (#30509)
* 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
2023-10-26 08:22:14 +00:00
Samson
aad2dccc9c
Strict import formatting (grouping and granularity) (#30325)
* strict imports formatting

* Reformat all imports
2023-09-11 19:16:54 +00:00
Samson
711dbbd4af
remove extern crate (#30311)
* 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>
2023-09-08 12:11:31 +00:00
Delan Azabani
c3c6c95a9b
constellation: crash to a new “sad tab” error page (#30290)
* 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
2023-09-06 09:52:37 +00:00
Martin Robinson
1b6351486c
Replace immeta dependency with imsz (#30294)
`immeta` is no longer maintained and `imsz` seems to have support for
more image formats as well as having no dependencies itself.
2023-09-06 09:20:08 +00:00
Samson
c0bee7cb86
Format toml files (#30112)
* Add taplo fmt config for toml fmt

* fmt toml files

* Add even-better-toml to extensions recommendations
2023-08-17 15:07:43 +00:00
Martin Robinson
bce7622cde
Switch to rustls and webpki-roots (#30025)
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.
2023-08-08 14:00:10 +00:00
Tuna
4c8db6af87
bump base64 from 0.10 to 0.21 (#29804)
* bump base64 from 0.10 to 0.21

* Fix configuration of bitflags

---------

Co-authored-by: Martin Robinson <mrobinson@igalia.com>
2023-08-02 21:25:37 +00:00
shanehandley
00241e84bc
Remove customised implementation of hsts headers. (#30046)
This looks to have originally been implemented due to missing functionality in the headers crate, which has since been added and released.
2023-07-31 08:53:53 +00:00
Martin Robinson
3230162fd0
Try to use WebRender types more
The newer versions of WebRender move types around between `webrender` and
`webrender_api` and this will reduce the churn during the upgrade.
2023-07-10 17:35:50 +02:00
Martin Robinson
49277f5c3f
Vendor the current version of WebRender
This is a step toward upgrading WebRender, which will be upgraded and
patched in the `third_party` directory. This change vendors the current
private branch of WebRender that we use and adds a `patches` directory
which tracks the changes on top of the upstream WebRender commit
described by third_party/webrender/patches/head.
2023-07-03 17:55:17 +02:00
Martin Robinson
78464eeabc Update uuid
This is required to use the new version of gleam and update ipc-channels
without duplicating the dependency in the future.
2023-06-26 16:27:12 +02:00
Fabrice Desré
0d0540fc95 Update tungstenite 2023-05-20 21:55:00 +00:00
bors-servo
2426a38a4d
Auto merge of #29748 - Loirooriol:sync, r=mrobinson
Backport several style changes from Gecko

<!-- 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 #___ (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. -->
2023-05-19 22:49:36 +02:00
Oriol Brufau
29bca57333 Further changes required by Servo 2023-05-19 19:05:24 +02:00
bors-servo
918557ad6d
Auto merge of #29752 - mrobinson:fix-29741-by-extending-request-builder, 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. -->
2023-05-18 10:45:00 +02:00
Iver Småge men bærbar
ed239931bb use response tainting::cors in cors preflight 2023-05-18 09:33:56 +02:00
Martin Robinson
2f4c47bfe7 Start the transition to workspace dependencies
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.
2023-05-17 11:59:35 +02:00
atbrakhi
55de8e3ddc Make sender and receiver name more coherent 2023-05-08 09:23:10 +02:00
2shiori17
b7d0451d56 Fix concept-header-list-get-decode-split 2023-03-26 20:07:12 +09:00
2shiori17
b6e4e44ccf Fix return value of concept-header-list-get to Option<Vec<u8>> 2023-03-26 19:57:39 +09:00
2shiori17
74ecc2bd64 Remove net from dependencies 2023-03-20 22:12:50 +09:00
2shiori17
ee1f241231 Implement concept-header-list-sort-and-combine 2023-03-06 23:34:04 +09:00
Fabrice Desré
fec4c589b2 Switch to the sha2 crate for SRI digests.
This removes one (simple) use of OpenSSL
2023-02-24 18:38:06 -08:00
Martin Robinson
6defd7011b Fix intermittency when loading poster images
Wait until a poster image is cached to in order to unblock document load. If
not, the document may continue loading before the image is ready to use,
leading to intermittency in test output. Now load is unblocked when
getting the ImageResponse from the cache, which allows the code to
properly unblock the load when the entire load fails or succeeds.

This reveals several false passes in the `object-view-box` test suite
which were very flaky.

Fixes #29204.
Fixes #29188.
Fixes #29179.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2023-01-11 12:27:27 +01:00
BurtonQin
1552e1baa2 components/net: Fix a double-lock in image_cache 2022-10-10 05:36:36 +00:00
Josh Matthews
0625ab92b8 Update cookie/hyper_serde. 2022-04-01 02:11:51 -04:00
Naveen Gattu
a48a111cee Upgrade Hyper 2022-01-16 09:34:17 -08:00
Josh Matthews
08ff81b09a Fix warnings. 2022-01-03 13:05:19 -05:00
Josh Matthews
e87bbb093a Update async-tungestenite. 2022-01-03 13:05:10 -05:00
Naveen Gattu
903e0cd857 Non-blocking network IO 2021-12-23 11:16:24 -08:00
Naveen Gattu
94ea422404
more concise 2021-11-29 06:59:30 -08:00
Naveen Gattu
733019e029
if let destructuring 2021-11-29 06:50:30 -08:00
Naveen Gattu
49ea36399d
more concise 2021-11-28 21:47:36 -08:00
Naveen Gattu
d6ca82cec2 preserve fragment 2021-11-28 21:29:25 -08:00
Josh Matthews
01681e79c4 Update nightly rustc. 2021-11-01 08:46:18 -04:00
bors-servo
6dc6dc7eb7
Auto merge of #28528 - teymour-aldridge:shorthand, r=jdm
Use struct shorthand initialization.

<!-- 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 #___ (GitHub issue number if applicable)

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because they don't really change any logic

<!-- 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. -->
2021-06-25 21:56:22 -04:00
teymour-aldridge
5b2cd844d7
Bump time to latest v0.1.x version. 2021-06-25 17:19:14 +01:00
teymour-aldridge
e962a7c9c7
test tidy 2021-06-25 13:16:08 +01:00
teymour-aldridge
506032129d
Use struct shorthand initialization. 2021-06-25 12:03:42 +01:00
bors-servo
ce4f965587
Auto merge of #28420 - dominiccooney:rlsnightly, r=jdm
Update toolchain to nightly-2021-05-18

The nightly-2021-03-12 toolchain doesn't have RLS on Windows. This
breaks code completion in Visual Studio Code because the rust plugin
picks up the project toolchain.

RLS is available in all tier one platforms in nightly-2021-05-18 per:
https://rust-lang.github.io/rustup-components-history/

Signed-off-by: Dominic Cooney <dominic.cooney@gmail.com>

<!-- Please describe your changes on the following line: -->
Update toolchain to nightly-2021-05-18

---
<!-- 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 (note, except tabs/spaces issue in an unrelated file... happy to fix in this PR)
- [ ] These changes fix #___ (GitHub issue number if applicable)

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because changing the toolchain, covered by existing tests

<!-- 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. -->
2021-06-17 17:38:10 -04:00
Josh Matthews
eeec647120
Fix tidy error. 2021-05-28 10:39:42 -04:00
Josh Matthews
3fce671f61
Disable warnings on windows. 2021-05-28 00:40:26 -04:00
Josh Matthews
a883b594cc
Disable fetch tests on windows. 2021-05-27 23:30:41 -04:00
Josh Matthews
8583e505c8
Don't error on unused imports. 2021-05-27 21:48:31 -04:00
Josh Matthews
46de44340f
Disable more unit tests for windows. 2021-05-27 19:45:17 -04:00
Josh Matthews
de22668748
Disable all http_loader unit tests on windows. 2021-05-27 00:07:13 -04:00