Commit graph

9715 commits

Author SHA1 Message Date
bors-servo
0b0ea17dca
Auto merge of #26716 - jdm:selfsigned, r=Manishearth,asajeffrey
Add UI for bypassing SSL handshake failures

There are several parts to these changes:
1. resurrecting the network error classification code to distinguish between SSL failures and other network errors
1. adding an SSL verification callback to support verifying certs against a list that can change at runtime, rather than just at program initialization
1. exposing a privileged chrome://allowcert URI which accepts the PEM cert contents along with a secret token
1. extracting the PEM cert contents out of the network layer when a handshake failure occurs, and getting them into the HTML that is parsed when an SSL failure occurs
1. adding a button in the handshake failure page that performs an XHR to chrome://allowcert with knowledge of the secret token and the PEM cert contents, before reloading the original URL that failed

The presence of the secret token means that while the chrome://allowcert URL is currently visible to web content, they cannot make use of it to inject arbitrary certs into the verification process.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #26683
- [x] These changes do not require tests because the UI requires user activation and can't clearly be automated
2020-06-09 21:59:09 -04:00
bors-servo
7eacfa4f0d
Auto merge of #26823 - jdm:single-renderapi, r=asajeffrey
Update webrender

These changes reflect changes in webrender's API that make RenderApiSender and RenderApi objects more challenging to share. This PR moves us to a model where:
* the compositor owns the main RenderApi object
* other threads that need to create transactions or manipulate fonts proxy those operations to the compositor (script/layout use IPC, while other threads use non-IPC channels)
* the webgl thread owns its own independent RenderApi
2020-06-09 19:34:08 -04:00
Josh Matthews
125bfceafd script: Don't panic when IPC WebRender APIs fail during shutdown. 2020-06-09 15:52:03 -04:00
Josh Matthews
6a6662195e net: Add option to temporarily accept certs that failed the handshake. 2020-06-09 15:03:18 -04:00
Josh Matthews
0ce2aa917a net: Pass certs that fail the SSL handshake out of the network layer. 2020-06-09 15:03:18 -04:00
Josh Matthews
b7a640b517 net: Treat SSL handshake errors differently from other hyper errors. 2020-06-09 15:03:18 -04:00
bors-servo
8e3d12bfcb
Auto merge of #26794 - gterzian:update_xhr, r=jdm
Update XHR send to use XMLHttpRequestBodyInit

<!-- Please describe your changes on the following line: -->

FIX #26723

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #___ (GitHub issue number if applicable)

<!-- 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. -->
2020-06-09 10:25:11 -04:00
bors-servo
00b57b4fd9
Auto merge of #26792 - servo:static-mut, r=nox
Replace `static mut` with `const`, `static`+`AtomicPtr`, or `static`+`UnsafeCell`

Fixes https://github.com/servo/servo/issues/26550
2020-06-05 09:56:41 -04:00
Gregory Terzian
dc690653da update XHR send to use XMLHttpRequestBodyInit 2020-06-05 15:08:57 +08:00
bors-servo
bce6eccced
Auto merge of #26790 - jdm:fewer-generics, r=SimonSapin
Reduce scope of generic code in script

Combined, these changes account for almost 100k lines of generated code in a debug build for the script crate.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] There are tests for these changes
2020-06-04 20:55:08 -04:00
Josh Matthews
a5d0e0b1c1 Extract some thread local use from generic code. 2020-06-04 20:54:36 -04:00
Josh Matthews
ec0b5d55d7 Move thread state checks out of generic methods to reduce generated code duplication. 2020-06-04 20:54:36 -04:00
Josh Matthews
6dc4488bc7 Remove unnecessary generic from private_from_proto_check. 2020-06-04 20:54:36 -04:00
bors-servo
59ec134bb8
Auto merge of #26789 - CYBAI:svgelement-style, r=jdm
Introduce ElementCSSInlineStyle for SVGElement

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #26777 and fix #26032 and fix #21990
- [x] There are tests for these changes

<!-- 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. -->
2020-06-04 18:27:13 -04:00
Simon Sapin
57d89675b0 Use atomic pointers instead of static mut for DOM proxy handlers 2020-06-05 00:11:37 +02:00
Simon Sapin
3367db6067 Keep DOM proxy handlers as separate named items rather than in one array 2020-06-05 00:11:37 +02:00
bors-servo
e2d980a071
Auto merge of #26480 - CYBAI:missing-on, r=jdm
Prefix `on` for function name of inline events

While checking what needs to be done for the spec-update, I've noticed the logic of checking `is window-reflecting element (e.g. body and frameset)` is already handled by the `is` casting function.

However, we still failed to pass the tests because we're missing `on` prefix for inline functions.

I'm not sure if this patch is good enough (or maybe at least I need to add a comment for why adding `on` prefix?).

Besides, I checked [how Gecko handles](https://searchfox.org/mozilla-central/rev/8bc4e35c9bb47c1fe3131e6155d9f482e1efef9a/dom/events/EventListenerManager.cpp#1012-1022) and looks like they also just pass the atom directly.
But, the [generated atom](https://searchfox.org/mozilla-central/source/__GENERATED__/xpcom/ds/nsGkAtomList.h#775) is prefixed with `on` which is correct to just pass it into the `CompileFunction`.

---
<!-- 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 #26479
- [x] There are tests for these changes

<!-- 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. -->
2020-06-04 16:45:22 -04:00
CYBAI
c561a3eb0e Introduce ElementCSSInlineStyle for SVGElement 2020-06-05 00:10:19 +09:00
Simon Sapin
36920abfe8 Use const instead of static mut in script/dom/eventtarget.rs
There is no mutability there.
2020-06-04 14:33:53 +02:00
bors-servo
8536cee72c
Auto merge of #25873 - gterzian:implement_readablestream_support, r=jdm
Implement readablestream support

<!-- Please describe your changes on the following line: -->

FIX #21482
FIX #24876
FIX #26392

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #___ (GitHub issue number if applicable)

<!-- 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. -->
2020-06-04 03:04:00 -04:00
Gregory Terzian
c1b76533fa partially integrate streaming request bodies with http re-direct 2020-06-04 11:38:38 +08:00
Gregory Terzian
ad4dea7d84 bypass SM for in-memory streams in request bodies, dis-allow other cases in sync XHR 2020-06-04 11:38:38 +08:00
Gregory Terzian
48d4aec5b6 require entered realm, use aes, to append native promise handler 2020-06-04 11:38:37 +08:00
Gregory Terzian
bd5796c90b integrate readablestream with fetch and blob 2020-06-04 11:38:35 +08:00
bors-servo
4d95efeebf
Auto merge of #26775 - servo:gecko-sync, r=emilio
style: sync changes from mozilla-central.
2020-06-03 23:02:22 -04:00
bors-servo
0281acea95
Auto merge of #26769 - kunalmohan:gpu-render-pass, r=kvark
Implement GPURenderPassEncoder

Add webidls for GPURenderPassEncoder and  GPURenderEncoderBase and
implement relevant methods.

<!-- Please describe your changes on the following line: -->
r?@kvark

---
<!-- 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
- [ ] 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. -->
2020-06-03 21:56:03 -04:00
Emilio Cobos Álvarez
332aec212c style: Miscellaneous servo build fixes. 2020-06-04 01:50:36 +02:00
bors-servo
7758d4ff62
Auto merge of #25432 - warren-fisher:HTMLConstructor, r=jdm
Extract some of CGClassConstructHook to utils.rs

<!-- Please describe your changes on the following line: -->

Moving some of the functionality from the massive tripled quoted string in CGClassConstructHook in `components/script/dom/bindings/codegen/CodegenRust.py` to `components/script/dom/bindings/utils.rs`. Must be made unsafe because of UnwrapObjectDynamic and other functions. Added imports as necessary as well, as well as cleaning up using test-tidy.

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

<!-- Either: -->
- [x] There are tests for these changes OR
- [ ] These changes do not require tests because the issue says so

<!-- 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. -->
2020-06-03 16:59:32 -04:00
Kunal Mohan
3b5ede153d Update wgpu-core and wgpu-types 2020-06-04 01:19:13 +05:30
Warren Fisher
2da07ed164 Reduce code duplication. Move some of CodegenRust.py to htmlconstructor.rs 2020-06-03 15:13:34 -04:00
Kunal Mohan
1d4efb48ba Implement GPURenderPassEncoder
Add webidls for GPURenderPassEncoder and  GPURenderEncoderBase and
implement relevant methods.
2020-06-04 00:27:58 +05:30
bors-servo
ff3d5c5125
Auto merge of #26628 - gterzian:shutdown_workers, r=asajeffrey
Improve worker shutdown

<!-- Please describe your changes on the following line: -->
FIX #26548
FIX #25212

and also  a step towards https://github.com/servo/servo/issues/26502

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #___ (GitHub issue number if applicable)

<!-- 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. -->
2020-06-03 13:44:09 -04:00
Gregory Terzian
f4d258d674 remove messagaging and worker infra on workerscope exits 2020-06-03 12:32:45 +08:00
Gregory Terzian
6f34b52e39 properly shutdown dedicated workers when the owning scope shuts-down 2020-06-03 12:32:45 +08:00
Gregory Terzian
5174739244 turn serviceworker event-loop back on 2020-06-03 12:32:45 +08:00
Gregory Terzian
947fa8bbb7 add a control chan to workers, use to signal shutdown 2020-06-03 12:32:47 +08:00
bors-servo
ea491b4117
Auto merge of #26757 - jdm:unneeded-generic, r=SimonSapin
Remove unnecessary generics from low-level script code

This should remove one of the larger offenders from the cargo-llvm-lines output for the script crate.
2020-06-03 00:30:33 -04:00
Josh Matthews
1feeb23514 dom: Extract non-generic code from Root::new. 2020-06-02 15:36:54 -04:00
Josh Matthews
96698779cc dom: Remove unnecessary generic from private_from_proto_check_static. 2020-06-02 15:36:54 -04:00
skrzyp1
ee6906443f reading unminified scripts from disk 2020-06-02 21:23:45 +02:00
Kunal Mohan
af95d92231 Implement GPUTexture and GPUTextureView 2020-06-01 23:28:12 +05:30
Kunal Mohan
d9db350df5 Improve webidl precision
Allow enum variants staring with digit
2020-06-01 19:24:34 +05:30
bors-servo
e0f3e9b980
Auto merge of #26714 - kunalmohan:gpu-render-pipeline, r=jdm
Implement GPURenderPipeline

<!-- Please describe your changes on the following line: -->
We need to wait for #26699 to merge before this.
A significant amount of validation still needs to be added. I plan on doing that in a follow-up PR.
r?@kvark

---
<!-- 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
- [ ] 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. -->
2020-05-30 14:22:47 -04:00
Bastien Orivel
c4273d86f2 Fix the webidl for Headers
Make the HeadersInit type match the spec.

Fixes #26441
2020-05-30 12:46:51 +02:00
Kunal Mohan
130de8b8e6 Implement GPURenderPipeline
Add webidl for GPURenderPipeline and implement GPUDevice.createRenderPipeline()
2020-05-30 11:38:32 +05:30
Kunal Mohan
f014f15d4e Allow sequence of nullable dictionary items in webidl
of type "sequence<Dict?> x"
2020-05-30 11:01:13 +05:30
bors-servo
1a61937031
Auto merge of #26718 - jdm:codegen-sequence, r=Manishearth
Improve precision of sequence types for WebIDL codegen.

Unlike #26699, this doesn't attempt to improve any of the resulting types and only maintains the status quo.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] There are tests for these changes
2020-05-29 22:10:21 -04:00
Josh Matthews
c4f8167b6f dom: Improve precision of sequence types for WebIDL codegen. 2020-05-29 15:16:55 -04:00
Gregory Terzian
ed688fe2c1 add mechanism to join on service- and dedicated-worker threads 2020-05-29 18:24:47 +08:00
Simon Sapin
d4227b5b0d Remove some unused dependency declarations
This is based on compiling with `RUSTFLAGS="-W unused_crate_dependencies"` (CC https://github.com/rust-lang/rust/pull/72342) in a recent Nightly (more so than used in the tree as of this writing, CC https://github.com/servo/servo/issues/26661 for work-arounds).

Only one crate is actually removed from the dependency graph, others are still dependended from other places.
2020-05-29 00:04:34 +02:00