Commit graph

40254 commits

Author SHA1 Message Date
Patrick Shaughnessy
5c00acca98 w3c/performance-timeline#159 2020-01-29 14:59:43 -05:00
Patrick Shaughnessy
6d15c0682d Performance observers better, not perfect 2020-01-27 15:35:39 -05: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
bors-servo
0bd995cdf5
Auto merge of #25561 - pshaughn:formdata-same-file, r=jdm
Make File objects roundtrip through FormData

FormData.append now only creates a new File object if it needs to file-wrap a blob or set a filename, and not when appending an existing File with no filename override. The hardest part here was reading the specification in a way that matched browser behavior.

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

- [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-24 09:48:55 -05:00
marmeladema
43768ff974 Replace utf8 encoded apostrophe by a regular ascii single quote 2020-01-24 13:53:54 +00:00
marmeladema
19cc74f07d Run first test-wpt chunk with python3 in CI 2020-01-24 13:53:54 +00:00
marmeladema
baec4935f6 Update python requirements to run test-wpt with python3 2020-01-24 13:53:54 +00:00
Simon Sapin
923cddf0b2 Update WPT expectations 2020-01-24 14:20:20 +01:00
Simon Sapin
632e731760 Render gradients 2020-01-24 14:20:20 +01:00
Simon Sapin
f39c3ff38b Apply background-clip to background-color 2020-01-24 14:20:20 +01:00
Simon Sapin
ea4882a1c5 Fix combinations of border-radius and background-clip 2020-01-24 14:20:20 +01:00
Simon Sapin
9fedade396 Rename clipping_area to painting_area
https://drafts.csswg.org/css-backgrounds/#background-painting-area
2020-01-24 14:20:20 +01:00
Simon Sapin
c8c198a172 Add a display_list::background module 2020-01-24 14:20:20 +01:00
Simon Sapin
6901bf951a Make layout_2020::display_list a directory-module 2020-01-24 14:20:20 +01:00
Simon Sapin
42bec01a59 Expected results for newly-enabled tests 2020-01-24 14:20:20 +01:00
Simon Sapin
68edef1a67 Layout 2020: enable web-platform-tests/css/css-background 2020-01-24 14:20:20 +01:00
bors-servo
be409233fd
Auto merge of #25574 - mrobinson:use-euclid-for-physical-structs, r=SimonSapin
Use Euclid data types for physical structs in layout_2020

This removes a bit of duplication and allows layout_2020 to benefit from a
much richer set of utilities.

<!-- 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 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-01-24 06:54:34 -05:00
bors-servo
592649ba50
Auto merge of #25583 - servo-wpt-sync:wpt_update_23-01-2020, r=servo-wpt-sync
Sync WPT with upstream (23-01-2020)

Automated downstream sync of changes from upstream as of 23-01-2020.
[no-wpt-sync]
r? @servo-wpt-sync
2020-01-24 05:45:25 -05:00
bors-servo
8b9018cd3e
Auto merge of #25578 - pshaughn:custompicture, r=jdm
Let custom element registry know about picture tag

<!-- Please describe your changes on the following line: -->
This replaces one WPT failure with another, but the previous one failure was preventing multiple cases from running, and now only one of those cases fails (due to #24993).

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

<!-- 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-24 03:57:47 -05:00
bors-servo
425328a64f
Auto merge of #25586 - servo:jdm-patch-35, r=Manishearth
Update windows llvm to 8.0.1.

This makes it possible to build mozjs with llvm's clang-cl and MSVC 2019's header files; otherwise the headers check the clang version and abort compilation because it's 8.0 is too old.
2020-01-24 02:24:43 -05:00
Patrick Shaughnessy
c1a23a85b2 Implement HTMLMenuElement 2020-01-23 18:04:48 -05:00
bors-servo
ae1758fec9
Auto merge of #25490 - teapotd:radio-group-iter, r=Manishearth
Simplify and fix iteration over radio button group

- Code for iterating over radio button group elements has been extracted to `radio_group_iter`
- `in_same_group` now checks if elements are in the same tree
- `radio_group_name` returns `None` if name is empty
- Radio buttons now group together in orphan trees (#25486)

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #25486
- [ ] There are tests for these changes
2020-01-23 16:56:57 -05:00
bors-servo
d0d3aaa449
Auto merge of #25450 - pshaughn:putforwards, r=jdm,Manishearth
Add PutForwards to implemented attributes that lacked it

Added PutForwards to three relLists and one style. The style already had a test; I added tests for relLists, including one relList that we have commented out right now.

---
<!-- 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 advance #9990 to be caught up with the attributes we have so far; many unimplemented attributes will need PutForwards when implemented.

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

<!-- 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-23 12:12:06 -05:00