Commit graph

8505 commits

Author SHA1 Message Date
bors-servo
ba5568a0a6
Auto merge of #26921 - mrobinson:animation-set-key, r=jdm
Add DocumentAnimationSet and AnimationSetKey

This will be used in order to hold animations for pseudo elements in the
DocumentAnimationSet. Also no longer store the OpaqueNode in the
animation and transition data structures. This is already part of the
DocumentAnimationSet key.

---
<!-- 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 do not require tests because they should not change behavior.

<!-- 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-16 03:25:29 -04:00
bors-servo
abc3ed40c9
Auto merge of #26872 - kunalmohan:gpu-canvas-context, r=kvark,jdm
Implement GPUSwapChain and GPUCanvasContext and interface with Webrender

<!-- 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-15 14:22:21 -04:00
bors-servo
f31d345c81
Auto merge of #26902 - jdm:focus-fixes, r=nox
Focus correctness improvements

These changes improve the behaviour of focus in Hubs rooms, and are expected to improve web compat around other dynamic pages that receive keyboard events as well.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #26901 and fix #26900.
- [x] There are tests for these changes
2020-06-15 11:49:30 -04:00
Josh Matthews
d55424e88f Update document focus when element focusability changes. 2020-06-15 11:22:28 -04:00
Josh Matthews
757371f4f0 Make clicking on an element request focus for focusable elements. 2020-06-15 11:22:28 -04:00
Martin Robinson
4a3995bb37 Add DocumentAnimationSet and AnimationSetKey
This will be used in order to hold animations for pseudo elements in the
DocumentAnimationSet. Also no longer store the OpaqueNode in the
animation and transition data structures. This is already part of the
DocumentAnimationSet key.
2020-06-15 10:28:30 +02:00
bors-servo
581ade575e
Auto merge of #26810 - CYBAI:fix-infinite-stream, r=gterzian
Fix infinite stream and its missing incumbent script environment when newing a new stream

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #26807
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because ___
2020-06-13 10:01:33 -04:00
Kunal Mohan
71401e0855 Implement GPUSwapChain and GPUCanvasContext and interface with Webrender 2020-06-13 17:46:12 +05:30
CYBAI
9798373d5e Enter incumbent script to ensure it has incumbent global 2020-06-13 11:23:20 +09:00
CYBAI
dc2c2c8dfb Move away from Promise.all way and check if we need to finish manually
In the previous Promise.all way, we registered a promise for every
module script which means we will need to do many complex checkings like
"is this top level?" and it will make us much more difficult to understand
how the module script algorithm works.

In the new manual checking way, we will only register promises for top
level modules to notify its owner (e.g. the script element) to finish
the load. So, we can understand it much more easily and would be more
spec-aligned.

Also, I think the `Ready` and `FetchFailed` status are quite confusing
and we actually don't need them so they're removed in this patch. Then,
we will always go to `Finished` instead.

It would basically be following steps:

                                          +-----------------+
                                          | Failed to fetch | ----------+
+--------------+       +----------+     / +-----------------+           |
| Fetch module | ----> | Fetching | ---+                                v
+--------------+       +----------+     \ +---------+        +---------------------+
                                          | Fetched |        | Advance to Finished |
                                          +---------+        +---------------------+
                                               |                        ^
                                               v                        |
                                      +-------------------+             |
                                      | Fetch descendants | ----- if no descendants
                                      +-------------------+
                                               |
                                               V
                                     +----------------------+
                                     | Fetching Descendants |
                                     +----------------------+

In `Advance to Finished`, it means that module script is about to finished so it will

1. Notify all of its `ready` and `not finished` parents to finish
2. Link (instantiate) the module
3. Resolve its promise to notify owner(s) to finish
2020-06-13 11:11:25 +09:00
Utsav Oza
34d0c313dc Enable textAlign, textBaseline and direction attributes for canvas 2020-06-10 22:34:20 +05:30
Utsav Oza
15fd256302 Store resolved font style in canvas context state 2020-06-10 22:10:44 +05:30
Utsav Oza
f3cb7a1910 Add todos for missing steps while processing parse font query 2020-06-10 22:10:43 +05:30
Utsav Oza
7883718c12 Query layout to resolve canvas font property value 2020-06-10 22:10:42 +05:30
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