Commit graph

40274 commits

Author SHA1 Message Date
Istvan Miklos
0842e53d8d Remove code duplication from IdentityHub
Outsourced the backend selection to a function.
2020-01-30 12:39:39 +01:00
bors-servo
8e0d037ee8
Auto merge of #25639 - servo-wpt-sync:wpt_update_29-01-2020, r=servo-wpt-sync
Sync WPT with upstream (29-01-2020)

Automated downstream sync of changes from upstream as of 29-01-2020.
[no-wpt-sync]
r? @servo-wpt-sync
2020-01-30 00:48:02 -05:00
bors-servo
b939b3806f
Auto merge of #25634 - pshaughn:cjkcookies, r=jdm
Accept UTF8 cookie header values

<!-- Please describe your changes on the following line: -->
HeaderValue::to_str only works on ASCII; cookies can be utf8 too, so we decode accordingly.

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

- [ ] There are tests for these changes in http_loader; I don't know whether websocket cookies have 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. -->
2020-01-29 20:35:47 -05:00
bors-servo
912a09c476
Auto merge of #25630 - mrobinson:mozilla-css, r=SimonSapin
Enable Mozilla CSS tests for layout_2020 and add expectations

This change allows mach to run the Mozilla CSS tests when running with the ``--layout2020` argument. This is useful because we can mark tests as passing as features are added.

---
<!-- 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 are 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. -->
2020-01-29 20:04:37 -05:00
Martin Robinson
7cf071079d Enable Mozilla CSS tests for layout_2020 and add expectations 2020-01-29 20:27:12 +01:00
bors-servo
b3ac17b82f
Auto merge of #25633 - pshaughn:localnames, r=jdm
Remove unnecessary LocalName::from(constant) calls

Changing calls to LocalName::from with a constant argument to use the interned local name instead doesn't really save a meaningful amount of time (when it's not in a loop or on a critical path), but it's good for codebase consistency.
2020-01-29 10:22:30 -05:00
WPT Sync Bot
d2429e5077 Update web-platform-tests to revision 074719e3660000659cd074b8a59de69bd9b90cd7 2020-01-29 14:38:18 +00:00
bors-servo
7e4d0534c3
Auto merge of #25631 - servo-wpt-sync:wpt_update_28-01-2020, r=servo-wpt-sync
Sync WPT with upstream (28-01-2020)

Automated downstream sync of changes from upstream as of 28-01-2020.
[no-wpt-sync]
r? @servo-wpt-sync
2020-01-29 01:43:40 -05:00
bors-servo
271a30f22f
Auto merge of #25635 - pshaughn:urlmismatcherror, r=jdm
Implement URLMismatchError

Nothing in current specifications actually throws this DOMException type, but the type exists in specs nonetheless, and adding it lets us check off a WPT test.

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

<!-- Either: -->
- [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-01-28 21:16:58 -05:00
Patrick Shaughnessy
15e1bdf1bf Add an unused but part-of-the-spec exception type 2020-01-28 14:22:13 -05:00
Patrick Shaughnessy
fc13bd8b2f Cookie header values can be utf8 2020-01-28 12:47:18 -05:00
Patrick Shaughnessy
0228904f27 Remove unnecessary LocalName::from(constant) calls 2020-01-28 11:47:05 -05:00
bors-servo
388a0f618b
Auto merge of #25625 - pshaughn:errorargs, r=jdm
Make error events only pass the extra error-event arguments to global listeners

Error event handlers were getting lineno, etc. arguments even when they weren't on globals, failing two WPT tests; this fixes that.

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

<!-- Either: -->
- [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-01-28 11:04:08 -05:00
bors-servo
2b3c4eba2d
Auto merge of #25524 - kunalmohan:24287-BlobAPI, r=jdm,gterzian
Implement Blob methods (text/arraybuffer)

<!-- Please describe your changes on the following line: -->
https://github.com/servo/servo/issues/24287#issuecomment-534821458
https://github.com/servo/servo/issues/24287#issuecomment-573744368

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

<!-- Either: -->
- [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-01-28 07:05:04 -05:00
WPT Sync Bot
81d0cdbb2c Update web-platform-tests to revision 55351d32dd26ea3ad42a8f5973e943ba0342c812 2020-01-28 11:11:32 +00:00
Kunal Mohan
9859410193
Implement Blob methods (text/arraybuffer) and async file read method 2020-01-28 14:38:32 +05:30
bors-servo
4e56b8606b
Auto merge of #25626 - servo:jdm-patch-35, r=Manishearth
Add profilemozjs feature to embedding

This makes it possible to obtain better profiling output from the JS engine when building for an embedder like the HoloLens.
2020-01-28 03:13:58 -05:00
Josh Matthews
3adf62dd7b
Add profilemozjs feature to C API crate. 2020-01-28 00:59:07 +00:00
Josh Matthews
f47187bf30
Add profilemozjs feature to simpleservo/api. 2020-01-28 00:58:19 +00:00
bors-servo
1b7223a284
Auto merge of #25622 - pylbrecht:composite.op.clear, r=jdm
Add missing CanvasRenderingContext2D global composition operation "clear"

<!-- 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
- [x] These changes fix part of #25331

<!-- Either: -->
- [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-01-27 19:40:42 -05:00
Patrick Shaughnessy
ee53e10f70 Errors only pass the special bonus arguments to globals 2020-01-27 15:03:28 -05:00
pylbrecht
ae110f2e6c Add missing CompositionStyle::Clear 2020-01-27 19:21:45 +01:00
bors-servo
d0f64d9d56
Auto merge of #25610 - pshaughn:abortfix, r=Manishearth
do less on abort if not done

Abort() was resetting state when it didn't need to, and possibly also not resetting as much of it as it needed to. I'm not sure if this is a completely correct fix but it passes some WPT tests.

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

<!-- Either: -->
- [X] There are tests for these change

<!-- 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-01-27 11:49:02 -05:00
bors-servo
da31405785
Auto merge of #25620 - servo-wpt-sync:wpt_update_27-01-2020, r=servo-wpt-sync
Sync WPT with upstream (27-01-2020)

Automated downstream sync of changes from upstream as of 27-01-2020.
[no-wpt-sync]
r? @servo-wpt-sync
2020-01-27 10:00:57 -05:00
WPT Sync Bot
cfc79b019a Update web-platform-tests to revision 7b828b4901ea5c5d39600f1d6c14dd4a73d1b008 2020-01-27 13:06:22 +00:00
bors-servo
f75b01f07d
Auto merge of #25617 - zhuowei:python3-bootstrap-android, r=jdm
mach: fix `bootstrap-android` on Python 3

When running `python3 ./mach bootstrap-android`, this error occurs:

```
AttributeError: 'HTTPMessage' object has no attribute 'getheader'

  File "/servo/python/servo/bootstrap_commands.py", line 136, in bootstrap_android
    download("sdk", tools.format(system=system))
  File "/servo/python/servo/bootstrap_commands.py", line 117, in download
    download_file(filename, url, archive)
  File "/servo/python/servo/util.py", line 170, in download_file
    download(desc, src, fd)
  File "/servo/python/servo/util.py", line 110, in download
    if resp.info().getheader('Content-Length'):
```

Use the `get()` function instead, which exists in both Python 3 and 2
(where it is a synonym for `getheader()`).

Fixes #25616.
2020-01-27 07:45:58 -05:00
bors-servo
72adff2ed2
Auto merge of #25615 - zhuowei:python3-specify-target, r=jdm
mach: fix error on Python 3 when specifying a target

Previously, when running Mach on Python 3, specifying a target when building
causes this error:

```
TypeError: a bytes-like object is required, not 'str'

  File "/servo/python/servo/build_commands.py", line 241, in build
    self.ensure_bootstrapped(target=target)
  File "/servo/python/servo/command_base.py", line 1023, in ensure_bootstrapped
    ["rustup", "target", "list", "--installed", "--toolchain", toolchain]
```

This change encodes the target using utf-8 before comparing.

Fixes #25614.
2020-01-27 05:03:27 -05:00
Zhuowei Zhang
634a1127c0 mach: fix bootstrap-android on Python 3
When running `python3 ./mach bootstrap-android`, this error occurs:

```
AttributeError: 'HTTPMessage' object has no attribute 'getheader'

  File "/servo/python/servo/bootstrap_commands.py", line 136, in bootstrap_android
    download("sdk", tools.format(system=system))
  File "/servo/python/servo/bootstrap_commands.py", line 117, in download
    download_file(filename, url, archive)
  File "/servo/python/servo/util.py", line 170, in download_file
    download(desc, src, fd)
  File "/servo/python/servo/util.py", line 110, in download
    if resp.info().getheader('Content-Length'):
```

Use the `get()` function instead, which exists in both Python 3 and 2
(where it is a synonym for `getheader()`).

Fixes #25616.
2020-01-26 10:50:35 -05:00
Zhuowei Zhang
aff14a77e7 mach: fix error on Python 3 when specifying a target
Previously, when running Mach on Python 3, specifying a target when building
causes this error:

```
TypeError: a bytes-like object is required, not 'str'

  File "/servo/python/servo/build_commands.py", line 241, in build
    self.ensure_bootstrapped(target=target)
  File "/servo/python/servo/command_base.py", line 1023, in ensure_bootstrapped
    ["rustup", "target", "list", "--installed", "--toolchain", toolchain]
```

This change encodes the target using utf-8 before comparing.

Fixes #25614.
2020-01-26 10:39:22 -05:00
bors-servo
7596a0fc1a
Auto merge of #25612 - servo-wpt-sync:wpt_update_26-01-2020, r=servo-wpt-sync
Sync WPT with upstream (26-01-2020)

Automated downstream sync of changes from upstream as of 26-01-2020.
[no-wpt-sync]
r? @servo-wpt-sync
2020-01-26 09:09:41 -05:00
WPT Sync Bot
0cb6acf9a2 Update web-platform-tests to revision e1edaa3dd1bea4415ee88e042affee32028d7f1d 2020-01-26 11:15:02 +00:00
bors-servo
e3a9063412
Auto merge of #25575 - pshaughn:celoop, r=jdm
Prevent infinite recursion when upgrading custom elements

<!-- Please describe your changes on the following line: -->
The spec and tests were out of sync when I implemented #25410 and I mentioned I'd have an extra detail to attend to if whatwg/html#5126 landed; it did, and I did, and a couple test cases 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 two WPT test cases, see test metadata in commit

<!-- Either: -->
- [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-01-26 06:07:08 -05:00
bors-servo
0bd2661492
Auto merge of #25603 - pylbrecht:raqote, r=jdm
Update CanvasRenderingContext2D fillStyle and strokeStyle only when required

So far fill and stroke style updates have been sent to the canvas paint
thread by `SetFillStyle()` and `SetStrokeStyle()`. This resulted in
fill/stroke style updates not being considered by the canvas paint
thread between the latest call of `SetFillStyle()`/`SetStrokeStyle()` and
the drawing operation (e.g. fill or stroke).

This issue is solved by making `SetFillStyle()` and `SetStrokeStyle()`
update the local canvas state and propagating the state to the canvas
paint thread along with the drawing operations that require it.

<!-- 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
- [x] These changes fix part of #25331

<!-- Either: -->
- [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-01-25 22:06:47 -05:00
bors-servo
694bb408cc
Auto merge of #25599 - pshaughn:patch-2, r=jdm
Enable cookies tests

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

The first run of this will spit out a lot of new test failure metadata, of course.
2020-01-25 20:15:06 -05:00
Patrick Shaughnessy
52d8336d7f do less on abort if not done 2020-01-25 19:12:19 -05:00
bors-servo
2d02f2b587
Auto merge of #25377 - marmeladema:issue-23607/test-wpt, r=jdm
Run eventsource wpt tests with Python3

I deliberately changed the CI to run the WPT tests using Python3 to see if it works.
Even if we don't want to change the CI right now, the first commit with only the python requirements update can be merged.

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

<!-- 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-01-25 18:03:56 -05:00
wpt-pr-bot
c48934a24f macos: wpt: install pip & virtualenv for Python3 2020-01-25 21:07:58 +00:00
pylbrecht
5a773bf55a Send fill/stroke style along with drawing message 2020-01-25 21:29:36 +01:00
pylbrecht
ebdf4693ab Update fill and stroke style only when required
So far fill and stroke style updates have been sent to the canvas paint
thread by `SetFillStyle()` and `SetStrokeStyle()`. This resulted in
fill/stroke style updates not being considered by the canvas paint
thread between the latest call of `SetFillStyle()`/`SetStrokeStyle()` and
the drawing operation (e.g. fill or stroke).

This issue is solved by making `SetFillStyle()` and `SetStrokeStyle()`
update the local canvas state and propagating the state to the canvas
paint thread right before any drawing operation that requires it.
2020-01-25 21:29:24 +01:00
pshaughn
8320d40f92 Enable cookies tests 2020-01-25 14:53:22 -05:00
bors-servo
937efba0cd
Auto merge of #25576 - pshaughn:menuelement, r=jdm
Implement HTMLMenuElement

<!-- Please describe your changes on the following line: -->
Per spec, "The menu element is simply a semantic alternative to ul to express an unordered list of commands (a "toolbar")." We already have the CSS for it in user-agent.css, and this gives us the interface object.

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

<!-- Either: -->
- [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-01-25 11:15:32 -05:00
bors-servo
f3e6351e47
Auto merge of #25598 - pshaughn:cookieexpire, r=jdm
Expire cookies on lookup

<!-- Please describe your changes on the following line: -->
Cookies were rarely, if ever, expiring; this caused tests that used max-age=0 as a cookie deletion method to have cookies they shouldn't have had.

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

<!-- Either: -->
- [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-01-25 08:48:27 -05:00
bors-servo
53879945a9
Auto merge of #25515 - pshaughn:checkpoints, r=jdm
Add microtask checkpoints to script elements and custom elements

Servo had a microtask checkpoint at the end of running a script, but there was also supposed to be one at the end of HTML-parsing a script element before Javascript-parsing the script itself, and there were supposed to be checkpoints immediately after the call to a custom element constructor. This adds those, passing all cases of one WPT test file.

---
<!-- 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 #25016 except for the remaining not-really-about-microtasks case #25514

<!-- Either: -->
- [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-01-25 07:30:48 -05:00
bors-servo
31eafadcb3
Auto merge of #25594 - servo:gradient, r=mrobinson
Background follow ups

* Fix `background-clip` + `border-radius`
* Fix `background-clip` + `background-color`
* Render linear and radial gradients
* Enable `css/css-background/` in WPT
2020-01-25 05:34:38 -05:00
Simon Sapin
37ccefbe19 Adress review comments 2020-01-25 07:37:28 +01:00
Patrick Shaughnessy
6d31827464 Cookies are now expired immediately before each lookup 2020-01-24 20:07:08 -05:00
bors-servo
12693b51f5
Auto merge of #25597 - kunalmohan:25581-Compartment, r=jdm
Rename compartment to realm

<!-- Please describe your changes on the following line: -->
Rename compartment-related terminology to use realms instead.

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

<!-- 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-01-24 17:10:21 -05:00
bors-servo
60238afa6c
Auto merge of #25592 - pshaughn:spirvcross_rebase, r=Manishearth
change branch of spirv_cross

Hopefully fixes #25991
2020-01-24 15:51:51 -05:00
Kunal Mohan
5a3e1b8e69
rename compartment to realm 2020-01-24 20:52:36 +05:30
Patrick Shaughnessy
1979e67f70 change branch of spirv_cross 2020-01-24 09:49:47 -05:00