Commit graph

7350 commits

Author SHA1 Message Date
bors-servo
fe8aad7227
Auto merge of #23503 - emilio:gecko-sync, r=emilio
style: sync changes from mozilla-central

See each individual commit for details. This also cherry-picks #23463 with a few fixes that were needed in Gecko-only code.

<!-- 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/23503)
<!-- Reviewable:end -->
2019-06-04 08:30:39 -04:00
bors-servo
faf3a183f3
Auto merge of #23499 - est31:unused_code_removal_3, r=jdm
Remove unused code (3/N)

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

Third PR in a series of PRs to remove unused/dead code from servo, powered by an (upcoming) tool of mine. Please take a look and tell me if you want to keep something.

* First PR: #23477
* Second PR: #23498

---
<!-- 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 only remove dead code

<!-- 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/23499)
<!-- Reviewable:end -->
2019-06-04 02:27:29 -04:00
Evgeniy Reizner
6f1df517e0 style: Do not use borrowed types in the selectors::Element trait.
Closes #22972
Closes #23463
2019-06-04 01:04:03 -04:00
Emilio Cobos Álvarez
2e5078e9c5 layout: Fix servo build. 2019-06-04 01:04:02 -04:00
bors-servo
7f7eead3d8
Auto merge of #23372 - sreeise:xhr_resource_url, r=jdm
Change XHRContext and resource timing information to use request URL

<!-- Please describe your changes on the following line: -->
Change resource timing information to return the URL used to create the XHR and store the URL in XHRContext.

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

<!-- 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/23372)
<!-- Reviewable:end -->
2019-06-02 22:48:25 -04:00
bors-servo
03f223663f
Auto merge of #23459 - Eijebong:compartments, r=jdm
Add an inCompartments config option for bindings

Fixes #23257

<!-- 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/23459)
<!-- Reviewable:end -->
2019-06-02 14:41:20 -04:00
est31
8b6ed3d182 Remove unused code from script* crates 2019-06-02 07:12:26 +02:00
csmoe
05bef140bf Implement worker origin member of WorkerLocation 2019-06-02 10:20:03 +08:00
bors-servo
7c8a4ecead
Auto merge of #23485 - Manishearth:xrtest, r=asajeffrey
Basic XR Testing support

This adds support for the XRTest and FakeXRDeviceController APIs from https://github.com/immersive-web/webxr-test-api, and plugs them into the `mock` backend of rust-webvr.

Tested with [a modified webxr test page](https://github.com/immersive-web/webxr-test-api)

r? @jdm @asajeffrey

<!-- 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/23485)
<!-- Reviewable:end -->
2019-05-30 22:04:22 -04:00
Manish Goregaokar
c2d4900c16 Add 'spec' links 2019-05-30 19:04:08 -07:00
Manish Goregaokar
d044a792f1 Normalize rotations 2019-05-30 19:04:08 -07:00
Manish Goregaokar
97df39fce1 Add FakeXRDeviceController.setViewerOrigin() 2019-05-30 19:04:08 -07:00
Manish Goregaokar
4b930b9e30 Add FakeXRDeviceController.setViews() 2019-05-30 19:04:08 -07:00
Manish Goregaokar
e95b24bfa6 Add XRTest.simulateDeviceConnection() 2019-05-30 19:04:08 -07:00
Manish Goregaokar
c689866d35 Add XR.test() 2019-05-30 13:29:05 -07:00
Manish Goregaokar
9a31f6fe7a Add blank FakeXRDeviceController interface 2019-05-30 12:53:47 -07:00
Manish Goregaokar
1c07b0f416 Add blank XRTest interface 2019-05-30 12:53:47 -07:00
bors-servo
69eacfa8c8
Auto merge of #23472 - ffwff:master, r=cybai
Add value sanitization for input[type=email]

<!-- Please describe your changes on the following line: -->
Add value sanitization for input[type=email] as per the [HTML specification](https://html.spec.whatwg.org/multipage/input.html#e-mail-state-(type=email)).

---
<!-- 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 #21810 (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/23472)
<!-- Reviewable:end -->
2019-05-30 09:04:50 -04:00
Víctor Manuel Jáquez Leal
02dfee7b47 Pass frame renderer to player only if video element
Otherwise it will only render audio but no video frames.
2019-05-30 09:51:49 +02:00
bors-servo
0a9a222356
Auto merge of #23476 - ferjm:multi.streams, r=ceyusa
Allow simultaneous playback of audio and video for getUserMedia

- [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/23476)
<!-- Reviewable:end -->
2019-05-29 21:28:18 -04:00
ffwff
3508140929 Add value sanitization algorithm for input[type="email"]
Handle "Multiple" attribute for email value sanitization

Fix code formatting

Tests for email value sanitization should pass

Make failing wpt tests pass

Change new_value => sanitized
2019-05-29 23:07:17 +07:00
Fernando Jiménez Moreno
dfbf7e37ab Allow simultaneous playback of audio and video for getUserMedia 2019-05-29 16:17:36 +02:00
Emilio Cobos Álvarez
66056bd4d5 script: Fix Servo build. 2019-05-29 16:14:36 +02:00
bors-servo
8dc7a25893
Auto merge of #23381 - maharsh312:master, r=jdm
Canvas Components for OffscreenCanvas

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

<!-- 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/23381)
<!-- Reviewable:end -->
2019-05-28 23:13:23 -04:00
Alex Johnson
1c35c44c35 Fixes #23408
Switched from using thread for websocket requests to ipc_channel::router::ROUTER

Signed-off-by: Alex Johnson <hello@alex-johnson.net>
2019-05-26 09:46:48 -07:00
Bastien Orivel
b7e10a8224 Make tidy happy 2019-05-25 23:23:42 +02:00
Bastien Orivel
292d468cd1 Use the newly added inCompartments option everywhere it can be 2019-05-25 17:28:07 +02:00
Bastien Orivel
0b29caa554 Add support for attributes to the inCompartments binding parameter 2019-05-25 14:43:44 +02:00
Bastien Orivel
7dbff6efb7 Add an inCompartments config for bindings 2019-05-24 23:02:38 +02:00
sreeise
e1692789f8 Change XHRContext and resource timing information to use request URL instead of XHR's global URL r?@jdm 2019-05-24 15:11:09 -04:00
bors-servo
f24f517965
Auto merge of #23272 - tdelacour:ISSUE-20455, r=SimonSapin
ISSUE-20455: introduce stronger types for textinput indexing

<!-- Please describe your changes on the following line: -->
Added two new types:
- ByteOffset
- UTF16CodeUnitOffset

I've replaced any instance of `usize` that would be better represented by one or the other of these. I also updated any downstream code, including the unit tests for `textinput.rs`. Along the way, I tried to add or edit comments to better reflect my understanding of this file - happy to revisit if I have misrepresented anything.

I did not end up finding any places where types were very obviously being mixed, as the issue description suggested I should do... LMK if I should re-audit the file for that (might need a bit of guidance)!

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

<!-- 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/23272)
<!-- Reviewable:end -->
2019-05-23 12:01:29 -04:00
Maharsh
85c20db495 Extract canvas operations for reuse by OffscreenCanvas. 2019-05-22 10:24:54 -04:00
bors-servo
377ade0aed
Auto merge of #23188 - jackxbritton:issue-22287, r=KiChjang,ferjm
Implement HTMLMediaElement.crossorigin attribute logic.

<!-- 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 #22287
- [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/23188)
<!-- Reviewable:end -->
2019-05-22 07:52:26 -04:00
Jack Britton
ade697b782 Implement HTMLMediaElement.crossorigin attribute logic. 2019-05-22 12:23:51 +02:00
bors-servo
1cbb04c647
Auto merge of #23282 - josephhutch:OscillatorNodeType, r=ferjm
Implemented type attribute for OscillatorNode interface

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

Please see https://github.com/servo/media/pull/242 for implementation of the new oscillator node message.

---
<!-- 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/23282)
<!-- Reviewable:end -->
2019-05-22 05:09:43 -04:00
bors-servo
123f58592c
Auto merge of #23226 - mmatyas:webgl_compressed_textures, r=jdm
Add initial support for WebGL compressed textures

This patch is an initial implementation of WebGL compressed texture support, it contains

- functions for registering and querying compressed texture extensions
- initial implementation of `CompressedTexImage2D` and `CompressedTexSubImage2D` and their parameter validation
- implementation of S3TC (DXT1, DXT3, DXT5) and ETC1 extensions as examples

What's still missing:

- some of the parameter validation steps are missing
- the pixel comparison tests fail for more complex cases (I'm probably missing something trivial at the GL calls)

Related: #10209 and #20594

cc @jdm @zakorgy

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] Related issues: #10209, #20594
- [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/23226)
<!-- Reviewable:end -->
2019-05-21 17:10:24 -04:00
Mátyás Mustoha
7f0b820d4e Add initial support for WebGL compressed textures 2019-05-21 16:56:40 -04:00
bors-servo
cde3ecf640
Auto merge of #23427 - Eijebong:outdated5ever, r=jdm
Update xml5ever and html5ever

<!-- 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/23427)
<!-- Reviewable:end -->
2019-05-21 15:11:27 -04:00
Maria Sable
969d61a17f Implemented type attribute for OscillatorNode interface 2019-05-21 17:20:03 +02:00
bors-servo
255d54086b
Auto merge of #23410 - tigercosmos:proxywindow-spec-update, r=KiChjang
spec update: window.name deals with lack of browsing context

<!-- Please describe your changes on the following line: -->
new [spec](https://html.spec.whatwg.org/multipage/window-object.html#dom-name):

The name attribute's getter must run these steps:

1. If this Window object's browsing context is null, then return the empty string.
2. Return this Window object's browsing context's name.

The name attribute's setter must run these steps:

1.  If this Window object's browsing context is null, then return.
2. Set this Window object's browsing context's name to the given value.

What is `null` here? According to [spec](https://html.spec.whatwg.org/multipage/browsers.html#concept-document-bc)
>  A Document's browsing context is the browsing context whose session history contains the Document, if any such browsing context exists and has not been discarded, and null otherwise.

---
<!-- 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] passed ` tests/wpt/web-platform-tests/html/browsers/the-window-object/name-attribute.window.js`
- [X] These changes fix #22915

<!-- 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/23410)
<!-- Reviewable:end -->
2019-05-20 13:47:33 -04:00
Bastien Orivel
00ac887862 Update xml5ever and html5ever 2019-05-19 22:14:28 +02:00
tigercosmos
e80fdede4c window.name deals with lack of browsing context 2019-05-19 03:23:42 +08:00
bors-servo
208d6cb99e
Auto merge of #23323 - nehalem501:master, r=jdm
Implement connectStart in PerformanceResourceTiming

<!-- Please describe your changes on the following line: -->
- Added connectStart where needed (```ResourceFetchTiming```, ```ResourceAttribute```) in ```components/net_traits/lib.rs ```
- Before calling ```client.request``` in ```obtain_response```, we now add the ```connectStart``` attribute (```components/net/http_loader.rs```)
- Updated tests to reflect those changes

---
<!-- 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 #21261 (at least partially)

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

<!-- 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/23323)
<!-- Reviewable:end -->
2019-05-17 18:10:09 -04:00
Thomas Delacour
14c8bbb49d
ISSUE-20455: introduce stronger types for textinput indexing 2019-05-16 15:33:24 -04:00
George Roman
be3cb00c77 Implement MouseEvent buttons attribute 2019-05-16 10:59:20 +03:00
bors-servo
425686984d
Auto merge of #23351 - CYBAI:fix-modes, r=nox
Fix modes for fetching classic worker script and introduce parser metadata for request

While reading [the spec](https://html.spec.whatwg.org/multipage/#fetch-a-classic-worker-script) for `fetch a classic worker script`, I found the `mode` and `credential-mode` are opposite to the spec. So, the first commit will fix it.

Also, I found there's a `parser metadata` for `request` so I tried to introduce it in this PR as well.

For WPT, I found there's a `/workers/constructors/Worker/same-origin.html` which was disabled in  #3180. We pass most of the tests now.

---
- [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)
- [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/23351)
<!-- Reviewable:end -->
2019-05-16 00:19:40 -04:00
bors-servo
3f30720bba
Auto merge of #23363 - Darkspirit:https, r=jdm
More https

* Disabled unused legacy TLS.
It will be disabled for Nightly 72 or 73 in 5-7 months and ride the [trains](https://wiki.mozilla.org/Release_Management/Calendar).
https://blog.mozilla.org/security/2018/10/15/removing-old-versions-of-tls/
* Updated MPL license in a few files.
It would be nice if a new version of https://pypi.org/project/servo_tidy/ could be released to update WebRender as well.
* Switched servo-deps.s3.amazonaws.com back to https.
This was recently regressed by 10585be25c and fc28073dfb.
* Made https the default protocol for address bar on desktop.
Press Ctrl+L on the Glutin port and enter `example.com`:
Servo previously assumed you meant `http://example.com/`, now it is `https://example.com/`.

---

- [x] `./mach build --release` 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/23363)
<!-- Reviewable:end -->
2019-05-14 08:21:17 -04:00
bors-servo
fdafc833ae
Auto merge of #23135 - maharsh312:master, r=jdm
Create CanvasRect for OffscreenCanvas

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

Created CanvasRect fot OffscreenCanvas and Updated Testcases

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

<!-- 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/23135)
<!-- Reviewable:end -->
2019-05-13 16:19:57 -04:00
Maharsh
cbff66928f removed comments 2019-05-13 14:17:12 -04:00
Maharsh
854ba8d514 Borrow Layout Change 2019-05-13 12:04:17 -04:00