Commit graph

1467 commits

Author SHA1 Message Date
bors-servo
b290ad95c1
Auto merge of #26407 - mrobinson:animation-restyle-model, r=jdm
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. -->
2020-05-06 04:12:31 -04:00
Josh Matthews
4a1732a761 Remove outdated HTTP redirection handling code. 2020-05-05 21:22:51 +02:00
Bastien Orivel
2b28042446 Fix a mistake in the redirect fetch code
The spec says to ignore both HEAD and GET in step 11
2020-05-05 20:43:56 +02:00
Bastien Orivel
566147dab3 Strip request-body-header when redirecting from a POST to GET
This doesn't change any expectation because we're not setting
response.redirected properly so all the tests fail later on when it's
asserted to be true.

Fixes #25257
2020-05-05 20:43:55 +02:00
Bastien Orivel
c14ab259d0 Implement referrer policy
Fixes #26270
2020-05-05 19:43:44 +02:00
Martin Robinson
b585ce5b1f Use a restyle for animation ticks
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.
2020-05-05 15:13:35 +02:00
atouchet
0da9ba5bbe More Cargo.toml updates 2020-04-25 18:26:49 -07:00
Josh Matthews
d4e85f9a90 Don't continually re-request completed requests that had load errors. 2020-04-17 11:59:00 -04:00
Julien Tregoat
2742fd2bea Refactor ImageCache::find_image_or_metadata API. 2020-04-17 11:58:18 -04:00
Simon Sapin
1c0549ce7f Upgrade to rustc 1.44.0-nightly (42abbd887 2020-04-07) 2020-04-09 21:33:44 +02:00
Gregory Terzian
1e017a7082 allow for a service worker network mediator per origin 2020-04-05 22:43:37 +08:00
Josh Matthews
19216627d3 Update content-security-policy. 2020-03-25 09:11:09 -04:00
Anthony Ramine
9996e48500 Remove syn 0.15 from our crate graph (fixes #24421)
This required bumps of:

* gleam
* image
* rust-webvr
* webrender
* webxr
2020-03-05 13:01:13 +01:00
bors-servo
0f9b04680a
Auto merge of #25842 - servo-wpt-sync:wpt_update_25-02-2020, r=jdm
Sync WPT with upstream (25-02-2020)

Automated downstream sync of changes from upstream as of 25-02-2020.
[no-wpt-sync]
r? @servo-wpt-sync
2020-02-25 19:01:26 -05:00
bors-servo
cd00e57c97
Auto merge of #25740 - gterzian:per_fetch_filemanager_handle, r=Manishearth
Per fetch file token for blob url

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

Depends on https://github.com/servo/servo/pull/25724

First step of https://github.com/servo/servo/issues/25226

---
<!-- 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-02-25 14:49:26 -05:00
Josh Matthews
ba83f0ffa6 Don't panic when dealing with disconnected websockets. 2020-02-25 13:53:15 -05:00
Gregory Terzian
895500e68c add a fetch token for blob urls 2020-02-21 14:26:45 +08:00
Josh Matthews
3fd3c23e17 Update ipc-channel and crossbeam-channel. 2020-02-20 11:15:13 -05:00
bors-servo
795dab71ff
Auto merge of #25768 - pshaughn:corsstar, r=jdm
Handle access-control header wildcards

<!-- Please describe your changes on the following line: -->
We were checking Access-Control-Expose-Headers for wildcards inconsistently and then discarding the result; this fixes the check and its use, passing the WPT test for having a wildcard there.

---
<!-- 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 #24913

<!-- 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. -->
2020-02-14 23:16:37 -05:00
bors-servo
4c5ec9da27
Auto merge of #25724 - gterzian:use_rayon_for_file_threads, r=Manishearth
Use rayon for file operations off the main resource thread

FIX #25723

---
<!-- 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-02-14 21:24:35 -05:00
bors-servo
55473eb441
Auto merge of #25739 - servo:rustup, r=paulrouget
Upgrade to rustc 1.43.0-nightly (5d04ce67f 2020-02-13)

~This Nightly doesn’t have rustfmt, so merging this PR is blocked on https://github.com/rust-lang/rust/issues/68917 and upgrading to a Nightly with the fix.~

Fixes #25550
2020-02-14 15:14:18 -05:00
Patrick Shaughnessy
739f09e199 Handle access-control header wildcards 2020-02-14 13:13:22 -05:00
bors-servo
cdd5dc17aa
Auto merge of #25736 - Darkspirit:ossl, r=jdm
Add OpenSSL 1.1.1 build check, Update HSTS Preload list

* This variant also works with cross-compilation. PR should fail in CI on Android at first:
  The net crate successfully compiled after switching to OpenSSL 1.1.1 on Android. It seemed openssl.sh doesn't need any changes.(?)
* Updated HSTS preload list and public suffix list.
* Configured OpenSSL [SECLEVEL=2](https://www.openssl.org/docs/man1.1.1/man3/SSL_CTX_set_security_level.html) like [Debian](https://wiki.debian.org/ContinuousIntegration/TriagingTips/openssl-1.1.1) Stable:
  > As a result RSA, DSA and DH keys shorter than [2048 bits](16a5a9bb78/docs/BR.md (6153-subscriber-certificates)) and ECC keys shorter than 224 bits are prohibited.
* Although all other crates compile I generally get a `libscript-fe019dd3e0a4e06d.rlib: bad extended name index at 8` error on simpleservo_jniapi, I guess Debian Testing is too new and I just haven't found the right steps so far.
./mach build -d --android
```
  = note: /home/darkspirit/github/servo/android-toolchains/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: /home/darkspirit/github/servo/target/android/armv7-linux-androideabi/debug/deps/libscript-fe019dd3e0a4e06d.rlib: bad extended name index at 8
          clang: error: linker command failed with exit code 1 (use -v to see invocation)
          toolchain: /home/darkspirit/github/servo/android-toolchains/ndk/toolchains/llvm/prebuilt/linux-x86_64/bin
          libs dir: /home/darkspirit/github/servo/android-toolchains/ndk/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a
          sysroot: /home/darkspirit/github/servo/android-toolchains/ndk/platforms/android-21/arch-arm
          targetdir: /home/darkspirit/github/servo/target/android/armv7-linux-androideabi/debug/build/simpleservo_jniapi-26ef18debb5b3630/out/../../..
```

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #25708, fix #25619.
2020-02-14 12:57:22 -05:00
Gregory Terzian
780a1bd6cb add a core resource thread-pool 2020-02-14 10:54:31 +08:00
Simon Sapin
db4f27f361 Use the matches! macro from the standard library 2020-02-12 10:08:31 +01:00
Jan Andre Ikenmeyer
21112a1b84
Configure OpenSSL SECLEVEL=2 2020-02-12 01:40:07 +01:00
Jan Andre Ikenmeyer
21b2479dc2
Add build check for OpenSSL 1.1.1 requirement 2020-02-12 01:39:57 +01:00
Patrick Shaughnessy
41d896c201 file: and about: are now opaque-filtered responses 2020-02-11 10:19:43 -05:00
Patrick Shaughnessy
fc13bd8b2f Cookie header values can be utf8 2020-01-28 12:47:18 -05:00
Patrick Shaughnessy
6d31827464 Cookies are now expired immediately before each lookup 2020-01-24 20:07:08 -05:00
bors-servo
e201b1688b
Auto merge of #25404 - Darkspirit:hsts, r=asajeffrey
Fix HSTS

The headers crate does not [expose](0c42ad8cf5/src/common/strict_transport_security.rs (L42)) HSTS struct fields. At the moment, it's only usable for HSTS header encoding. An update of the headers crate would require a huge update of http, hyper, hyper_serde, net::decoder as well. Therefore I've copied the `typed_get::<StrictTransportSecurity>` decoding feature  for now, but with exposed struct fields. Let's remove this custom struct with the next hyper upgrade. I tried to prevent needless HSTS database lookups when network.enforce_tls.enabled is set.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #14363, fix #20120.

- [x] There are tests for these changes
2020-01-08 13:20:09 -05:00
Jan Andre Ikenmeyer
68ebecb775
Fix HSTS 2020-01-07 16:07:12 +01:00
Simon Sapin
fdcc7653f2 Fix some warnings in future Rust nightlies 2020-01-02 19:22:03 +01:00
Simon Sapin
1ff5433aef Upgrade to rustc 1.42.0-nightly (9b98af84c 2019-12-22) 2019-12-23 14:07:01 +01:00
bors-servo
79408fa36b
Auto merge of #25294 - Darkspirit:h2, r=jdm
Let hyper automatically set the host header if needed

Google's gws web server did not expect to receive an unneeded Host header via HTTP/2, therefore it responded with 400 Bad Request over a working HTTP/2 connection.

https://tools.ietf.org/html/rfc7540#page-55
> Clients that generate HTTP/2 requests directly SHOULD use the ":authority" pseudo-header field instead of the Host header field.

It's hyper's job to take care of this for the HTTP/1 case, therefore we can remove old code.
When calling [Client::builder()](1974c875a1/components/net/connector.rs (L116-L119)) we do not disable hyper's default [set_host](4b6099c7aa/src/client/mod.rs (L1019-L1024)) config option, therefore hyper [automatically adds a Host header for non-HTTP/2 connections](4b6099c7aa/src/client/mod.rs (L289-L292))  based on the [URI](3f663d7ab2/components/net/http_loader.rs (L418-L421)).

r? @jdm

---
<!-- 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 #25286.
2019-12-17 18:16:13 -05:00
Patrick Shaughnessy
67827debd8 Now just one is_cors_safelisted_request_header, with closer spec alignment 2019-12-16 09:07:02 -05:00
Jan Andre Ikenmeyer
19226c5190
Let hyper automatically add a host header for HTTP/1 2019-12-16 14:01:18 +01:00
Josh Matthews
46b155d0e8 Disable H2 ALPN. 2019-12-13 16:13:48 -05:00
Jan Andre Ikenmeyer
b811be764c
Add ALPN and signature algorithms to OpenSSL config 2019-11-30 05:18:00 +01:00
bors-servo
5f1681ad25
Auto merge of #24875 - jdm:wr-no-ipc, r=asajeffrey
Extract IPC out of webrender

Fixes #20172. Fixes #13480.
2019-11-27 20:48:13 -05:00
Josh Matthews
564c16d754 Use non-IPC webrender API over explicit IPC channels. 2019-11-27 20:47:53 -05:00
Patrick Shaughnessy
7363db31db Fix #2909 as far as WPT is concerned, not full data-url class integration 2019-11-26 09:49:30 -05:00
Jan Andre Ikenmeyer
941659bb30
Use HSTS preload list for private HttpState, too. 2019-11-10 20:16:53 +01:00
Shinichi Morimoto
70c62ceee7 Fix check conditions 2019-11-05 11:24:38 +09:00
Shinichi Morimoto
b0a12f6a8a fix #24367 2019-11-05 11:24:38 +09:00
teapotd
c54df2b965 Limit referer header value length to 4096 2019-10-24 20:59:00 +02:00
Anthony Ramine
785a344e32 Update rand to 0.7 (fixes #24448) 2019-10-23 15:34:48 +02:00
bors-servo
bf587f22d7
Auto merge of #24508 - pajamapants3000:21254, r=jdm
Add start_time to resource timing.

<!-- Please describe your changes on the following line: -->
`start_time` property added to `ResourceFetchTiming`, which enables the setting of `start_time` in the `PerformanceEntry` member of `PerformanceResourceTiming`.

Following the specification at https://w3c.github.io/resource-timing/#dfn-starttime, `start_time` is set to the value of `redirect_start` if redirection occurs and the timing allow check passes. Otherwise it has the same value as `fetch_start`.

---
<!-- 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 #21254

<!-- 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. -->
2019-10-22 09:34:07 -04:00
Tommy Lincoln
fcad88cddd Add start_time to resource timing. 2019-10-20 07:28:11 -07:00
Gregory Terzian
2f8932a6a1 continue messageport, transferable, postmessage options 2019-10-19 14:28:18 +08:00