Commit graph

20614 commits

Author SHA1 Message Date
Simon Sapin
d114376a8c Publish selectors 0.21.0 on crates.io 2018-12-31 01:01:49 +01:00
Bastien Orivel
c3df9b594b Update bindgen to 0.46 2018-12-29 19:30:23 +01:00
George Roman
deb02ab6d7 Implement HTMLMediaElement defaultPlaybackRate and playbackRate attributes 2018-12-26 22:20:51 +02:00
bors-servo
7bc6c8d18f
Auto merge of #22555 - CYBAI:new-urlsearchparams, r=jdm
Construct URLSearchParams from array or object

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #22554, fix #22556 and also fix #22557
- [x] There are tests in `url/urlsearchparams-constructor.any.js` 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/22555)
<!-- Reviewable:end -->
2018-12-26 08:36:00 -05:00
CYBAI
115b73f636 Use IndexMap for WebIDL Record 2018-12-26 18:05:43 +08:00
CYBAI
4ba0ab7bd0 Construct URLSearchParams from array or object 2018-12-26 18:05:42 +08:00
bors-servo
66223ee105
Auto merge of #22121 - gterzian:remove_constellation_block_in_navigation, r=paulrouget
Remove sync constellation -> embedder communication

<!-- 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 #22042 (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/22121)
<!-- Reviewable:end -->
2018-12-26 01:53:20 -05:00
CYBAI
9de8e7adc0 Remove leading question mark when constructing URLSearchParams 2018-12-25 12:23:05 +08:00
CYBAI
66e3d545eb Implement URL's toJSON() 2018-12-24 20:45:43 +08:00
bors-servo
6840c18389
Auto merge of #22540 - CYBAI:update-sw-webidl, r=jdm
Update ServiceWorker webidl

About the `void postMessage`, I found the spec doesn't have `[Throws]`; however, as the implementation for `postMessage` in spec, we should have `[Throws]` for it because it will throw errors. Then, I realized that `[Throws]` is not part of standard webidl. Btw, there's a issue discussing about if `[Throws]` should be standardized or not at heycam/webidl#603.

Also, per the spec, `ServiceWorker` will `includes` `AbstractWorker` instead of `implements` so I filed #22539 for it. We can update it after the issue is fixed.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix part of #19302
- [x] These changes do not require tests because it just updates the webidl and the changes should have no impact to current implementation.

<!-- 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/22540)
<!-- Reviewable:end -->
2018-12-23 15:21:08 -05:00
bors-servo
248d8596d5
Auto merge of #22538 - CYBAI:update-sw-container, r=jdm
Update ServiceWorkerContainer Webidl

Looks like the spec has changed a lot. Maybe it's better to update the implementation for these methods in a separate PR.

Let's just update webidl in this PR?

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix part of  #19302
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because ___

<!-- 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/22538)
<!-- Reviewable:end -->
2018-12-23 12:17:40 -05:00
bors-servo
b5a10e9c96
Auto merge of #22487 - emilio:single-layout-thread-pool, r=jdm
style: Make Servo use a single thread-pool for layout-related tasks per process.

Instead of per-document. This also allows to reuse this thread-pool if needed
for other stuff, like parallel CSS parsing (#22478), and to share more code with
Gecko, which is always nice.

<!-- 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/22487)
<!-- Reviewable:end -->
2018-12-23 09:39:07 -05:00
Emilio Cobos Álvarez
006e71c7de style: Make Servo use a single thread-pool for layout-related tasks per-process.
Instead of per-document. This also allows to reuse this thread-pool if needed
for other stuff, like parallel CSS parsing (#22478), and to share more code with
Gecko, which is always nice.
2018-12-23 13:00:56 +01:00
bors-servo
596b06367f
Auto merge of #22534 - Eijebong:owning_ref, r=KiChjang
Update owning_ref to 0.4

<!-- 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/22534)
<!-- Reviewable:end -->
2018-12-23 06:33:14 -05:00
bors-servo
27bb33cb9e
Auto merge of #22490 - cdeler:fix-22484-issue, r=ferjm
#22484 small cleanup

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because it's a small code cleanup

<!-- 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/22490)
<!-- Reviewable:end -->
2018-12-23 05:24:33 -05:00
Gregory Terzian
cca354b217 set document ready state to complete in step 4 of parser abort 2018-12-23 17:39:20 +08: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
CYBAI
370ee8984f Update ServiceWorker webidl 2018-12-23 15:52:01 +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
CYBAI
2f48f439d8 Update ServiceWorkerContainer Webidl 2018-12-23 13:47:44 +08:00
Gregory Terzian
483bf245df constellation: restructure navigation, remove sync comm 2018-12-23 13:33:30 +08:00
bors-servo
27577955aa
Auto merge of #22456 - dlrobertson:fix_src, r=ferjm
Update src/href attributes to be a USVString

The following IDLs have the src/href attributes typed as a `DOMString`
while in the spec the attribute has been updated to be a `USVString`:

 - [HTMLIFrameElement]
 - [HTMLImageElement]
 - [HTMLInputElement]
 - [HTMLLinkElement]
 - [HTMLMediaElement]
 - [HTMLScriptElement]

Fixes: #22454

[HTMLIFrameElement]: https://html.spec.whatwg.org/multipage/#htmliframeelement
[HTMLImageElement]: https://html.spec.whatwg.org/multipage/#htmlimageelement
[HTMLInputElement]: https://html.spec.whatwg.org/multipage/#htmlinputelement
[HTMLLinkElement]: https://html.spec.whatwg.org/multipage/#htmllinkelement
[HTMLMediaElement]: https://html.spec.whatwg.org/multipage/#htmlmediaelement
[HTMLScriptElement]: https://html.spec.whatwg.org/multipage/#htmlscriptelement

<!-- 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/22456)
<!-- Reviewable:end -->
2018-12-22 23:50:40 -05:00
bors-servo
47eb8fe3db
Auto merge of #22533 - CYBAI:rm-sw-foreign, r=jdm
Remove `foreign` service-workers mode

Bringing in the spec changes from whatwg/fetch#596

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes do not require tests because the corresponding tests should already be removed.

<!-- 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/22533)
<!-- Reviewable:end -->
2018-12-22 22:36:03 -05:00
Bastien Orivel
96816bd107 Update owning_ref to 0.4 2018-12-22 21:02:42 +01:00
CYBAI
3082b577a5 Remove foreign service-workers mode 2018-12-23 01:48:45 +08: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
9cb8844e4b
Auto merge of #22388 - Eijebong:log, r=jdm
Dedupe log

<!-- 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/22388)
<!-- Reviewable:end -->
2018-12-22 09:39:21 -05:00
Bastien Orivel
c194e00914 Disable gaol on aarch64 2018-12-22 12:07:02 +01:00
bors-servo
45e238938f
Auto merge of #22451 - kingdido999:send-idle-message-once, r=jdm
Avoid sending idle message more than once after a reflow is complete

<!-- Please describe your changes on the following line: -->
A boolean variable is introduced to prevent sending SetDocumentState idle message multiple times after a reflow is complete.

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

<!-- Either: -->
- [x] These changes do not require tests because automated test is not possible.

<!-- 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/22451)
<!-- Reviewable:end -->
2018-12-22 05:06:22 -05:00
bors-servo
0fcc9b4ec7
Auto merge of #22243 - Darkspirit:cipherlist_cleanup, r=avadacatavra
Cleanup of default ciphersuite list

* don't offer DHE ciphersuites like Chrome (Firefox is in [progress](https://www.fxsitecompat.com/en-CA/docs/2018/dhe-cipher-suites-are-no-longer-supported-in-webrtc/) of deprecating DHE as well)
* don't offer AES-CBC-SHA2 like Firefox and Chrome
* don't offer AES-GCM for plain RSA like Firefox
* don't offer ECDSA with AES-CBC like Chrome
* don't offer weak DES-CBC3-SHA
* prefer AES256 over AES128 like [Mozilla Modern](https://wiki.mozilla.org/Security/Server_Side_TLS#Modern_compatibility), Safari and Edge

(The last line of cipher suites would be removed in the future when Servo deprecates TLS 1.0/1.1 and switches to Rustls.)

You can compare Firefox and Chrome with https://www.ssllabs.com/ssltest/viewMyClient.html.

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

<!-- 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/22243)
<!-- Reviewable:end -->
2018-12-22 01:07:01 -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
Bastien Orivel
1d0af2dc8d Disable gaol on arm targets 2018-12-20 21:23:19 +01:00
Bastien Orivel
16beb65d49 Disable gaol on android 2018-12-20 20:53:13 +01: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
cdeler
5060ebce8b #22484 Do not borrow HTMLImageElement::same_origin as mutable 2018-12-18 13:16:22 +03:00
bors-servo
a067620789
Auto merge of #22474 - csmoe:unregister, r=gterzian
Unregister components while exiting

r=@gterzian

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

<!-- 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/22474)
<!-- Reviewable:end -->
2018-12-17 21:22:41 -05:00
Josh Matthews
1c7cfafcc5 Don't alter query string when submitting form by POST. 2018-12-17 11:29:25 -05:00
Josh Matthews
27c25116d3 net: Suppress default ports in Origin header. 2018-12-17 11:29:24 -05:00
Dan Robertson
c46508e497
Update src/href attributes to be a USVString
The following IDLs have the src/href attributes typed as a DOMString
while in the spec the attribute has been updated to be a USVString:

 - HTMLIFrameElement
 - HTMLImageElement
 - HTMLInputElement
 - HTMLLinkElement
 - HTMLMediaElement
 - HTMLScriptElement
2018-12-17 15:28:42 +00:00
csmoe
5600a1dca1 unregister components while exiting 2018-12-17 16:37:03 +08:00
Emilio Cobos Álvarez
273705d7fb style: Fix tidy issues. 2018-12-16 13:35:09 +01:00
Olli Pettay
28719f2455 Move FragmentOrElement::mAttrs to Element.
Bug: 1512256
Reviewed-by: ehsan
2018-12-16 13:35:09 +01:00
Emilio Cobos Álvarez
27322abeda style: Minor build fixup after the Servo crossbeam_channel update. 2018-12-16 13:35:08 +01:00
Daniel Holbert
ee6bf98675 style: Include the 'unsafe' keyword in serializations of css-align properties.
Previously we'd omit it since it was merely an explicit way of requesting the
default behavior.  But the spec has changed such that it's not necessarily
equivalent to the default anymore:
https://drafts.csswg.org/css-align/#overflow-values

(Technically the behaviors are probably still equivalent in our implementation,
pending bug 1451380, but we don't have to publicize that via our
serialization.)

Differential Revision: https://phabricator.services.mozilla.com/D14599
2018-12-16 13:35:07 +01:00
Boris Zbarsky
3d78025e10 style: Fix serialization of explicitly case-sensitive attr selectors with a namespace.
Differential Revision: https://phabricator.services.mozilla.com/D14493
2018-12-16 13:35:07 +01:00
Emilio Cobos Álvarez
7f5a9e0f45 style: Handle nested slots correctly in slotted matching and invalidation.
The patch and test should be pretty much self-descriptive.

Differential Revision: https://phabricator.services.mozilla.com/D14063
2018-12-16 13:35:06 +01:00
Boris Zbarsky
a519d9ecc3 style: Add support for 's' flag on attribute selectors.
We could keep using ParsedCaseSensitivity::CaseSensitive as a temporary stand-in
for "case-sensitive or maybe not depending on what HTML says" until we check the
attribute list, but it seems better to make that explicit.

Differential Revision: https://phabricator.services.mozilla.com/D14093
2018-12-16 13:35:05 +01:00