Commit graph

7042 commits

Author SHA1 Message Date
bors-servo
1668fbc7c3
Auto merge of #22536 - servo-wpt-sync:wpt_update_22-12-2018, r=jdm
Sync WPT with upstream (22-12-2018)

Automated downstream sync of changes from upstream as of 22-12-2018.
[no-wpt-sync]

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22536)
<!-- Reviewable:end -->
2018-12-23 10:48:19 -05:00
Gregory Terzian
7530faa4ea check for a document being "fully-active" before reflows 2018-12-23 17:39:20 +08:00
Gregory Terzian
eb82e781a3 implement windowproxy "delay-load-event-mode", and partially document "completely-loaded" 2018-12-23 17:39:13 +08:00
bors-servo
31c618895b
Auto merge of #22458 - denismerigoux:master, r=jdm
Fixed bug in textinput::adjust_vertical concerning selection_origin

<!-- Please describe your changes on the following line: -->
The `adjust_vertical` function of the `TextInput` module was forgetting to update the `selection_origin`.

I discovered the bug and figured out how it fix it using formal verification. More precisely, I manually translated the Rust code in a [F*](https://www.fstar-lang.org/) program that was functionally equivalent. Then I used the `assert_ok_selection` as a post-condition on the following functions :

* `select_all`
* `clear_selection`
* `adjust_selection_for_horizontal_change`
* `clear_selection_to_limit`
* `adjust_vertical`
* `perform_horizontal_adjustment`
* `adjust_horizontal`
* `adjust_horizontal_to_line_end`

I managed to prove automatically (using the Z3 backend of F*) that the post-condition held for all the functions except for `adjust_vertical`. I used the error messages from F* to infer the missing code so that the postcondition could hold and manually translated it to this PR diff.

I also added a simple unit test that would fail without this patch, and observed that the assertion failures noted in https://github.com/servo/servo/issues/22457 disappeared with this patch.

This verification work also allows me to say that the code of all the functions is now functionally correct in the sense that they all yield a valid selection in the sense of `asssert_ok_selection`, in all cases.

---
<!-- 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 #22457 (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. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22458)
<!-- Reviewable:end -->
2018-12-23 01:00:12 -05:00
WPT Sync Bot
1cf4070a55 Update web-platform-tests to revision e7517084404fca126c4f89eb69217206689adf17 2018-12-22 22:32:34 -05:00
Denis Merigoux
e1ea8fbd35 Fixed bug in textinput::adjust_vertical concerning selection_origin update
This bug was discovered using the F* formal verification framework.

Style changes (match -> if let)

Replace if let Some(_) by .is_some()
2018-12-22 17:50:24 +01:00
bors-servo
cc0e7fde21
Auto merge of #22100 - Eijebong:once, r=jdm
Implement AddEventListenerOptions: once

Fixes #13242

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22100)
<!-- Reviewable:end -->
2018-12-22 11:35:44 -05:00
Bastien Orivel
50c832762f Implement AddEventListenerOptions: once
Fixes #13242
2018-12-22 17:11:30 +01:00
bors-servo
12d0a0b995
Auto merge of #22420 - cdeler:enable-upstream-bluetooth-tests, r=jdm
Enable upstream bluetooth tests

I enabled bluetooth WPT tests

But I'm still worry that a lot of tests failed (more than 150).  I decreased them by
```
prefs: ["dom.bluetooth.enabled:true"]
```
But it's still a lot of failed tests

Checks
---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #20437 (GitHub issue number if applicable)

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because the changes are tests

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22420)
<!-- Reviewable:end -->
2018-12-22 02:50:20 -05:00
bors-servo
9caf215beb
Auto merge of #22354 - jdm:ddg, r=Manishearth
Fix DuckDuckGo HTML search

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #22090
- [x] There are tests for these changes

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22354)
<!-- Reviewable:end -->
2018-12-21 23:32:12 -05:00
bors-servo
c553c43ba1
Auto merge of #22395 - jdm:initial-iframe-size, r=Manishearth
Initialize iframe viewport immediately

This is probably a significant cause of unstable test results, and it finally bothered me enough to fix it. The solution isn't great for performance (a sync layout query every time a iframe is added to a document), but performance needs to follow correctness.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #14364 and fix #15689 and fix #15688.
- [x] There are tests for these changes

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22395)
<!-- Reviewable:end -->
2018-12-18 08:51:26 -05:00
WPT Sync Bot
d61756ac9d Update web-platform-tests to revision 4984b190341b535c645729b8f99247aace0022fe 2018-12-17 22:27:33 -05:00
Josh Matthews
1c7cfafcc5 Don't alter query string when submitting form by POST. 2018-12-17 11:29:25 -05:00
WPT Sync Bot
883ad9792d Update web-platform-tests to revision 11971ac2161859001b861630338c0e47fee1b59a 2018-12-16 22:27:13 -05:00
cdeler
1b6a36bb96 #20437 tried to fix CI build 2018-12-16 19:11:38 +03:00
cdeler
8f8257456d #20437 moved supports_testdriver from ServoTestharnessExecutor to ServoWebDriverTestharnessExecutor 2018-12-16 19:11:36 +03:00
cdeler
84aca5a9bb #20437 resolved PR issues 2018-12-16 19:11:36 +03:00
cdeler
9d8431185a #20437 added tests results for wpt bluetooth tests 2018-12-16 19:11:35 +03:00
cdeler
3fdc514e00 #20437 enable bluetooth for bt tests 2018-12-16 19:11:35 +03:00
cdeler
2544672a82 #20437 added supports_testdriver to ServoTestharnessExecutor 2018-12-16 19:11:35 +03:00
cdeler
700a38c429 #20437 enabled bluetooth wpt tests in config 2018-12-16 19:11:34 +03:00
Emilio Cobos Álvarez
0d9f4659b8 Update test expectations. 2018-12-16 13:35:23 +01:00
bors-servo
499bfcb1dd
Auto merge of #22467 - servo-wpt-sync:wpt_update_14-12-2018, r=jdm
Sync WPT with upstream (14-12-2018)

Automated downstream sync of changes from upstream as of 14-12-2018.
[no-wpt-sync]

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22467)
<!-- Reviewable:end -->
2018-12-16 00:50:03 -05:00
bors-servo
6731ddd29f
Auto merge of #22447 - servo:jdm-patch-10, r=ferjm
Add another layer of rAF to avoid intermittent failures.

Hopefully fixes #22445.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22447)
<!-- Reviewable:end -->
2018-12-15 13:41:49 -05:00
WPT Sync Bot
b0862d9cc1 Update web-platform-tests to revision ac4274136e9a034628a3a469890c8e37babbc902 2018-12-14 21:54:18 -05:00
Josh Matthews
e11878129d Add another layer of rAF to avoid intermittent failures. 2018-12-14 13:23:20 -05:00
Josh Matthews
34e77f62af Ensure that all new iframes have a correct initial window size. 2018-12-14 13:00:47 -05:00
bors-servo
79f2e786b2
Auto merge of #22441 - servo-wpt-sync:wpt_update_12-12-2018, r=jdm
Sync WPT with upstream (12-12-2018)

Automated downstream sync of changes from upstream as of 12-12-2018.
[no-wpt-sync]

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22441)
<!-- Reviewable:end -->
2018-12-13 22:22:08 -05:00
Josh Matthews
9ff7de6a44
Disable referrer-policy tests for frequent intermittent failures. 2018-12-13 15:44:56 -05:00
WPT Sync Bot
3b6ddd885a Update web-platform-tests to revision 4052654d786236b493d2df3cb80b9d3d1d0a8354 2018-12-12 22:53:27 -05:00
bors-servo
eab848df3e
Auto merge of #22433 - ferjm:player.eos.size, r=ceyusa
Improve implementation of media resource fetch algorithm

I have been observing inconsistent behaviors with my local tests depending of the media asset being played. I figured that we had these issues:

- We were setting the player EOS as soon as we got the first [process_response_eof](1046ae58a1/components/script/dom/htmlmediaelement.rs (L1596)). This is fine only if there is a single request. But that's not the case for multiple range requests or for seeks. Setting the player EOS makes the player appsrc reject any new buffers, and that breaks playback. Figuring out when is the right time to set the player EOS won't be a straight forward task, so my suggested fix for now is to simply not set it for now. It is a cleanup step that it would be nice to have but it is not mandatory.

- We were setting the input size more than once for multiple range requests and with the incorrect value. The fix uses the `content-length` or the `content-range` headers for single and range requests respectively.

- We were moving to the HaveEnoughData state if a fetch request succeded but no data was fetched from the network.

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22433)
<!-- Reviewable:end -->
2018-12-12 18:38:25 -05:00
bors-servo
2e01a23bad
Auto merge of #22432 - servo:encoding, r=SimonSapin
Make the parser decode input from document's encoding

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22432)
<!-- Reviewable:end -->
2018-12-12 15:17:32 -05:00
Fernando Jiménez Moreno
8818898240 Do not move to HaveEnoughData state if no media data is fetched from the network 2018-12-12 18:08:40 +01:00
Lucas Fantacuci
ad3ec61d2f Implementing volume attribute into HTMLMediaElement 2018-12-12 11:50:35 -02:00
Anthony Ramine
a2abfc6301 Make the parser decode input from document's encoding
The document's encoding is only computed from the Content-Type header for now,
with no sniffing at all.
2018-12-12 13:50:27 +01:00
bors-servo
1046ae58a1
Auto merge of #22081 - KiChjang:onmessageerror, r=jdm
Add onmessageerror to WindowEventHandler

<!-- 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: -->
- [ ] `./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. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22081)
<!-- Reviewable:end -->
2018-12-12 02:49:04 -05:00
Keith Yeung
3ee5a63199 Add onmessageerror to WindowEventHandler 2018-12-11 23:48:46 -08:00
Dan Robertson
eb531f6755
update-wpt: TextTrack tests
Update the expectations of TextTrack related tests.
2018-12-11 20:14:04 +00:00
bors-servo
92962de76c
Auto merge of #22411 - jdm:fix-webdriver, r=SimonSapin
Make desktop webdriver WPT harness work

This change allows me to run `./mach test-wpt --product servodriver --no-pause-after-test tests/wpt/mozilla/tests/mozilla/DOMParser.html` successfully again.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #22409
- [x] There are tests for these changes

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22411)
<!-- Reviewable:end -->
2018-12-11 13:03:52 -05:00
Josh Matthews
6ab475b0f4 Make SSL tests work in servodriver. 2018-12-11 12:51:36 -05:00
WPT Sync Bot
a44e48301c Update web-platform-tests to revision 912d5081b62d6e6a2f847935c82722e31cca7a1f 2018-12-10 23:19:57 -05:00
Josh Matthews
832b7963f2 Add headless support to servodriver harness. 2018-12-10 19:06:51 -05:00
bors-servo
eeaca0b26d
Auto merge of #22389 - jdm:anim-complete, r=emilio,ferjm
Cancel animations that affect nodes that do not participate in layout.

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #22378
- [x] There are tests for these changes

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22389)
<!-- Reviewable:end -->
2018-12-10 18:04:49 -05:00
Josh Matthews
ed74b898a5 Cancel animations that affect nodes that do not participate in layout. 2018-12-10 08:59:17 -05:00
WPT Sync Bot
b509d28773 Update web-platform-tests to revision 2d5385793ade85b7268ee86db4535a1baeb508ab 2018-12-09 22:15:04 -05:00
bors-servo
9e4d22e530
Auto merge of #22393 - servo-wpt-sync:wpt_update_08-12-2018, r=jdm
Sync WPT with upstream (08-12-2018)

Automated downstream sync of changes from upstream as of 08-12-2018.
[no-wpt-sync]

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22393)
<!-- Reviewable:end -->
2018-12-09 14:18:22 -05:00
bors-servo
d81798696d
Auto merge of #22272 - georgeroman:kill_test_processes_on_any_error, r=jdm
Kill test processes whenever any error occurs

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

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

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22272)
<!-- Reviewable:end -->
2018-12-09 10:36:13 -05:00
WPT Sync Bot
c5c7a1f47a Update web-platform-tests to revision 5349c6a6327372f856ecbe07d863d468a4236726 2018-12-08 22:18:48 -05:00
WPT Sync Bot
6c2d26eb4b Update web-platform-tests to revision 6087baf4a83e7953112242be9fd6e719797ebdf6 2018-12-07 22:08:08 -05:00
WPT Sync Bot
f9972c83e3 Update web-platform-tests to revision 093a97b6ecc6484c201d704d38b47bef1964d59d 2018-12-05 23:54:15 -05:00