Commit graph

8771 commits

Author SHA1 Message Date
bors-servo
55058b2875
Auto merge of #25710 - pylbrecht:pattern.incomplete, r=jdm
Make CanvasRenderingContext2D.createPattern() return null for incomplete images

<!-- Please describe your changes on the following line: -->
`createPattern()` should return `null` if the passed `image` argument is not usable.

References:
- https://html.spec.whatwg.org/multipage/canvas.html#dom-context-2d-createpattern
- https://html.spec.whatwg.org/multipage/canvas.html#check-the-usability-of-the-image-argument
---
<!-- 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-02-11 08:11:40 -05:00
Martin Robinson
fa7839270d Add layout_2020 support for NodeGeometryQuery and ContentBoxQuery 2020-02-11 14:02:19 +01:00
Martin Robinson
b10a24e81e Unskip CSSOM and Mozilla WPT tests for layout_2020 2020-02-11 14:00:44 +01:00
bors-servo
f3dbe7d388
Auto merge of #25715 - mrobinson:position-fixed, r=SimonSapin
Improve position:fixed support in layout_2020

<!-- 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: -->
- [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-11 06:21:39 -05:00
Martin Robinson
63aae0178f Improve position:fixed support in layout_2020
This makes it so that position:fixed elements do not scroll with the
rest of the contents, but does not tackle the rest of the issues with
their positioning.
2020-02-11 10:42:35 +01:00
bors-servo
3725273870
Auto merge of #25719 - pshaughn:controlbeforeform, r=jdm
Make HTMLFormControlsCollection rooted at the form's root, not rooted at the form itself

<!-- Please describe your changes on the following line: -->
We'd been misreading the first line of https://html.spec.whatwg.org/#dom-form-elements. The collection needs to be rooted higher than the form itself, so it can contain form controls elsewhere in the document with a form= content attribute. It is, as far as I can tell, unspecified whether "rooted at the form's root" is meant to live-update to a new root if the form is moved to another tree, and I'm assuming it doesn't have to.

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

<!-- 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-02-11 00:27:17 -05:00
bors-servo
8e65787737
Auto merge of #25675 - pylbrecht:draw.image, r=jdm
Add usability checks to CanvasRenderingContext2D.drawImage()

<!-- Please describe your changes on the following line: -->
These changes add the usability checks performed on an image to be drawn to the canvas.

References:
- https://html.spec.whatwg.org/multipage/canvas.html#drawing-images
- https://html.spec.whatwg.org/multipage/canvas.html#check-the-usability-of-the-image-argument

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and repla(e `___` 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-02-10 22:59:37 -05:00
bors-servo
7b540945cd
Auto merge of #25695 - pshaughn:eventsource, r=nox
Let EventSource fail fast on bad schemes

<!-- Please describe your changes on the following line: -->
EventSource went into an infinite reconnect loop in some cases where tests wanted it to go into a hard error state; this addresses the cases where that happens because the url isn't even http(s) and will thus definitely never result in an event stream.

https://github.com/web-platform-tests/wpt/issues/4311 suggests the tests might just be too picky here; the spec does use the word "may" on relevant 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 #25692

<!-- 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-02-10 20:01:01 -05:00
Patrick Shaughnessy
0eeb075ecd rooted at the form's root, not rooted at the form 2020-02-10 14:35:48 -05:00
bors-servo
c0ee7594c2
Auto merge of #25659 - pshaughn:timingresolution, r=jdm,nox
Expose DOMHighResTimeStamps at lower res

As explained in https://www.w3.org/TR/hr-time-2/#clock-resolution and tested in a few WPT tests, we're not supposed to show Javascript the full resolution of OS timestamps. This fixes that on all the DOMHighResTimeStamp interfaces that weren't already limiting themselves to integer milliseconds.

The specific choice of how to coarsen the resolution is extremely bikesheddable; I commented the reasoning for my arbitrary choice but I admit it's arbitrary.

A couple tests of timing resolution still fail, but because they're seeing undefined and NaN values due to unimplemented attributes (#25658).

---
<!-- 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 #25656 fix #25296 fix #21276

<!-- 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-02-10 13:50:42 -05:00
Patrick Shaughnessy
7ef644c1f7 Fail fast on bad schemes 2020-02-10 12:40:43 -05:00
bors-servo
5bcd0d8dd0
Auto merge of #25698 - pshaughn:rejectiontests, r=jdm
Fix timeout vs. task-queue race conditions in promise rejection tests

<!-- Please describe your changes on the following line: -->
These two tests were assuming that timeouts and promise rejection events would have a temporal relationship not actually guaranteed by spec, leading to test timeouts if the DOM manipulation task queue was running slower than anticipated.

fix #22207, fix #22295

Of course, the upstream WPT results need looking at to be sure this hasn't done something weird to another browser.
2020-02-10 10:43:34 -05:00
pylbrecht
70b2d31822 Set 2d.pattern.image.broken.html expectation to FAIL 2020-02-10 14:26:17 +01:00
pylbrecht
481ef46167 Make create_pattern() return None for incomplete images 2020-02-10 14:23:38 +01:00
Paul Rouget
51f15a055e Embedder Prompt API 2020-02-10 06:51:18 +01:00
Patrick Shaughnessy
7684afb8b1 Fix timeout vs. dom manipulation queue race conditions 2020-02-05 20:12:15 -05:00
pylbrecht
423b86e439 Add canvas usability checks to drawImage() 2020-02-03 22:49:46 +01:00
pylbrecht
ed0973fb1c Add image usability checks to drawImage() 2020-02-03 20:46:03 +01:00
Patrick Shaughnessy
8e65782efb Expose DOMHighResTimeStamps at lower res 2020-02-03 09:54:39 -05:00
bors-servo
c4785e3256
Auto merge of #25645 - mrobinson:scrollable-overflow-v2, r=SimonSapin
Add support for overflow:scroll and overflow:hidden to layout_2020

This adds clipping and interactive scrolling support, but scrolling from
script is still not functional.

<!-- 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: -->
- [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-01 10:45:22 -05:00
bors-servo
e71dc9977c
Auto merge of #25651 - medimatrix:xhr-progress-timeout, r=jdm
Do not include request progress/total values on XHR timeout

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

Do not include request progress/total values on XHR timeout as [the specification]( https://xhr.spec.whatwg.org/#request-error-steps) states that upload events when errors occur should always pass 0 for both values.

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

<!-- 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-01 04:59:58 -05:00
bors-servo
0f4066a38a
Auto merge of #25670 - jdm:crashtest-kill, r=jdm
Kill off hanging crashtests.

The reason that complex-glsl-does-not-crash.html kept leaving zombie processes is the following:
* WPT introduced the notion of crash tests (ie. tests that verify that they do not crash)
* if a timeout expires while running a crash test and the test has not finished running, it is reported as a failure and potential hang
* there is no code that causes a hanging test to stop running
* any test filename that ends in `-crash` is automatically treated as a crashtest
2020-01-31 23:34:23 -05:00
Josh Matthews
44a2953e84 Kill off hanging crashtests. 2020-02-01 01:28:51 +01:00
Médi-Rémi Hashim
b3ca098f64 Remove ini files for passing tests 2020-01-31 17:17:12 +00:00
Martin Robinson
7a5a320d74 Add support for overflow:scroll and overflow:hidden to layout_2020
This adds clipping and interactive scrolling support, but scrolling from
script is still not functional.
2020-01-31 17:30:29 +01:00
bors-servo
688d076889
Auto merge of #25663 - servo-wpt-sync:wpt_update_31-01-2020, r=jdm
Sync WPT with upstream (31-01-2020)

Automated downstream sync of changes from upstream as of 31-01-2020.
[no-wpt-sync]
r? @servo-wpt-sync
2020-01-31 11:24:29 -05:00
Josh Matthews
8a058619b4
Add missing ini file. 2020-01-31 14:53:06 +01:00
Josh Matthews
9c8926953a
Remove intermittent failure. 2020-01-31 14:40:33 +01:00
WPT Sync Bot
e6a0d5b0bd Update web-platform-tests to revision cdd3b613e1e108d805ae9441e9827777f1d7072c 2020-01-31 11:30:04 +00:00
bors-servo
393b6768f0
Auto merge of #25636 - pshaughn:submitevent, r=jdm
Implement SubmitEvent

<!-- Please describe your changes on the following line: -->
FormSubmitter was already being passed into submit, so there wasn't much work to do here other than making the new event interface itself.

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

<!-- 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-31 06:14:47 -05:00
bors-servo
7ac4f9eec6
Auto merge of #25654 - pshaughn:domtokennull, r=jdm
fix DOMTokenList

I fixed the bug described in 25128, and also the other cases in the same test (order of elements after replace).

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

<!-- 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-31 04:08:55 -05:00
bors-servo
4edd1590f4
Auto merge of #25627 - pshaughn:definedpseudo, r=emilio,jdm
Implement :defined CSS selector

<!-- Please describe your changes on the following line: -->
ElementState::IN_DEFINED_STATE already existed but wasn't hooked up to anything; now it is set appropriately, and CSS is aware of it. The main test for this selector needed the window named getter for no important reason, so I made a one-line test change to avoid that. Remaining failures in the test are all about SVG elements.

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

<!-- 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-01-31 01:48:35 -05:00
Patrick Shaughnessy
004c059518 fix DOMTokenList 2020-01-30 22:25:25 -05:00
bors-servo
b2f466d9e4
Auto merge of #25653 - pshaughn:removeonclick, r=jdm
Make nulling out an inline event handler remove it from the list order

Setting a content attribute or IDL attribute to null now removes event handlers like it's supposed to; the removeAttribute case seems to be something deeper which this change doesn't fix.

---
<!-- 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 #25196, but not the related #25652

<!-- 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-30 21:48:34 -05:00
Patrick Shaughnessy
9cc218d0b0 SubmitEvent and test changes 2020-01-30 17:37:33 -05:00
Patrick Shaughnessy
2874c62d35 Fix some of the remove-event-handler problems 2020-01-30 14:27:30 -05:00
Médi-Rémi Hashim
bb6f31a017 Update expected test results 2020-01-30 18:20:51 +00:00
Patrick Shaughnessy
065c61edbb let integrity_metadata survive IPC sending 2020-01-30 10:34:29 -05:00
Patrick Shaughnessy
8ca4db2cd6 :defined works 2020-01-30 10:09:51 -05:00
Patrick Shaughnessy
f043a3eee2 Error and resize get special getter/setters for reflection 2020-01-30 10:00:16 -05: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
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
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