Commit graph

38687 commits

Author SHA1 Message Date
Matt Brubeck
d0913ec528
Remove obsolete logic for LRUCache size
The LRUCache implementation has been replaced, and no longer requires a backing store larger than its capacity.
2019-10-01 09:59:12 -07:00
bors-servo
ad1d003e25
Auto merge of #24324 - paulrouget:glwindow_keyboard, r=asajeffrey
Make it possible to navigate with the keyboard in the webxr glwindow view

The glwindow is not interactive. With this PR we can use the arrow key to look up, down, right and left.

This will make debugging a lot easier.

<!-- 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/24324)
<!-- Reviewable:end -->
2019-10-01 04:59:31 -04:00
Paul Rouget
e65f1c9dbf Make it possible to rotate in webxr glwindow view 2019-10-01 10:58:59 +02:00
bors-servo
1b6715158d
Auto merge of #24325 - servo:smup, r=jdm
Update mozjs

<!-- 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/24325)
<!-- Reviewable:end -->
2019-10-01 00:36:05 -04:00
bors-servo
ed21744688
Auto merge of #24322 - servo:jdm-patch-58, r=nox
Assign bot reviewer for automated sync PRs.

<!-- 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/24322)
<!-- Reviewable:end -->
2019-09-30 23:42:53 -04:00
bors-servo
a6caccfdd6
Auto merge of #24321 - servo-wpt-sync:wpt_update_30-09-2019, r=jdm
Sync WPT with upstream (30-09-2019)

Automated downstream sync of changes from upstream as of 30-09-2019.
[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/24321)
<!-- Reviewable:end -->
2019-09-30 17:00:26 -04:00
bors-servo
ebd59ef4f4
Auto merge of #24319 - servo:webidl-lint, r=jdm
Remove redundant webidl_must_inherit compiler plugin lint

At first I was considering moving it to a procedural macro (source-level information should be sufficient), and started by trying to reproduce the error case by changing `htmldivelement.rs` to use `Element` instead of `HTMLElement` as the first field.

The output was:

```rust
error[E0308]: mismatched types
   --> /home/simon/servo2/target/debug/build/script-4caa244faca7d10f/out/Bindings/HTMLDivElementBinding.rs:665:31
    |
665 |         let _: &HTMLElement = self.as_parent();
    |                               ^^^^^^^^^^^^^^^^ expected struct `dom::htmlelement::HTMLElement`, found struct `dom::element::Element`
    |
    = note: expected type `&dom::htmlelement::HTMLElement`
               found type `&dom::element::Element`
```

This line number is inside a generated method called `__assert_parent_type`. As far as I can tell, any case where this lint would error is already caught by such methods. The lint is therefore redundant and can safely 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/24319)
<!-- Reviewable:end -->
2019-09-30 14:47:18 -04:00
Josh Matthews
45dc27dec5
Remove intermittent failure. 2019-09-30 13:18:59 -04:00
Anthony Ramine
b9a226c0bc Update mozjs 2019-09-30 19:03:27 +02:00
Paul Rouget
42d64d002a euclid update 2019-09-30 17:41:54 +02:00
Josh Matthews
9e575d6357
Assign bot reviewer for automated sync PRs. 2019-09-30 10:09:49 -04:00
WPT Sync Bot
ae931fea9a Update web-platform-tests to revision 4f22c5b19bae217799ce92c9df6dfdf2800c6d81 2019-09-30 13:46:25 +00:00
bors-servo
45b68ecbfc
Auto merge of #24316 - tokarzkj:set-body-is-too-strict, r=jdm
Change setBody to be less strict when getting the immediate child

Step four of the dom document body calls for throwing an exception
if no document element was found. The current setBody implementation
was looking for a document element that is also an html element. It
has been updated to use GetDocumentElement which returns any document
element.

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #24291

<!-- Either: -->
- [X] 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/24316)
<!-- Reviewable:end -->
2019-09-30 09:35:23 -04:00
bors-servo
402db83b2b
Auto merge of #24303 - servo:script-codegen, r=nox
WebIDL codegen: Replace cmake with a single Python script

When [playing around with Cargo’s new timing visualization](https://internals.rust-lang.org/t/exploring-crate-graph-build-times-with-cargo-build-ztimings/10975/21), I was surprised to see the `script` crate’s build script take 76 seconds. I did not expect WebIDL bindings generation to be *that* computationally intensive.

It turns out almost all of this time is overhead. The build script uses CMake to generate bindings for each WebIDL file in parallel, but that causes a lot of work to be repeated 366 times:

* Starting up a Python VM
* Importing (parts of) the Python standard library
* Importing ~16k lines of our Python code
* Recompiling the latter to bytecode, since we used `python -B` to disable writing `.pyc` files
* Deserializing with `cPickle` and recreating in memory the results   of parsing all WebIDL files

----

This commit remove the use of CMake and cPickle for the `script` crate. Instead, all WebIDL bindings generation is done sequentially in a single Python process. This takes 2 to 3 seconds.

<!-- 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/24303)
<!-- Reviewable:end -->
2019-09-30 05:23:19 -04:00
Simon Sapin
d2c299a6c7 Don’t rely on $CARGO_TARGET_DIR in build scripts 2019-09-30 11:20:41 +02:00
Simon Sapin
81b7f046bf Move script_plugins to a single file 2019-09-29 23:20:48 +02:00
Simon Sapin
47c269360c Remove redundant webidl_must_inherit compiler plugin lint
At first I was considering moving it to a procedural macro
(source-level information should be sufficient),
and started by trying to reproduce the error case
by changing `htmldivelement.rs` to use `Element` instead of `HTMLElement`
as the first field.

The output was:

```rust
error[E0308]: mismatched types
   --> /home/simon/servo2/target/debug/build/script-4caa244faca7d10f/out/Bindings/HTMLDivElementBinding.rs:665:31
    |
665 |         let _: &HTMLElement = self.as_parent();
    |                               ^^^^^^^^^^^^^^^^ expected struct `dom::htmlelement::HTMLElement`, found struct `dom::element::Element`
    |
    = note: expected type `&dom::htmlelement::HTMLElement`
               found type `&dom::element::Element`
```

This line number is inside a generated method called `__assert_parent_type`.
As far as I can tell, any case where this lint would error is already caught
by such methods. The lint is therefore redundant and can safely be removed.
2019-09-29 23:11:40 +02:00
Kris Tokarz
6949052094 Remove the Document.body.html.ini file
This file was setting the test as expected to fail. However, after
the changes made in the pull request the test is now expected to
pass
2019-09-29 12:58:55 -04:00
bors-servo
086e06b28b
Auto merge of #24317 - servo-wpt-sync:wpt_update_29-09-2019, r=servo-wpt-sync
Sync WPT with upstream (29-09-2019)

Automated downstream sync of changes from upstream as of 29-09-2019.
[no-wpt-sync]
2019-09-29 10:21:28 -04:00
WPT Sync Bot
be4d54ed1a Update web-platform-tests to revision 370aa82342355b99fff0b45448ac95636ec11861 2019-09-29 14:21:14 +00:00
Kris Tokarz
b567cc76e5 Change setBody to be less strict when getting the immediate child
Step four of the dom document body calls for throwing an exception
if no document element was found. The current setBody implementation
was looking for a document element that is also an html element. It
has been updated to use GetDocumentElement which returns any document
element.
2019-09-29 07:34:36 -04:00
bors-servo
269fb480ea
Auto merge of #24314 - servo-wpt-sync:wpt_update_28-09-2019, r=servo-wpt-sync
Sync WPT with upstream (28-09-2019)

Automated downstream sync of changes from upstream as of 28-09-2019.
[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/24314)
<!-- Reviewable:end -->
2019-09-28 12:41:15 -04:00
WPT Sync Bot
ecc0101a80 Update web-platform-tests to revision 4ab3cef83d73c2b6dd3616e0fe9165b3a6eed808 2019-09-28 13:38:48 +00:00
bors-servo
399c3f3865
Auto merge of #24313 - servo:rustup, r=SimonSapin
Upgrade to rustc 1.40.0-nightly (084beb83e 2019-09-27)

<!-- 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/24313)
<!-- Reviewable:end -->
2019-09-28 08:40:29 -04:00
Simon Sapin
5b935a60a5 Upgrade to rustc 1.40.0-nightly (084beb83e 2019-09-27) 2019-09-28 12:33:33 +02:00
bors-servo
b0b01b86b8
Auto merge of #24309 - servo-wpt-sync:wpt_update_27-09-2019, r=servo-wpt-sync
Sync WPT with upstream (27-09-2019)

Automated downstream sync of changes from upstream as of 27-09-2019.
[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/24309)
<!-- Reviewable:end -->
2019-09-27 23:30:47 -04:00
bors-servo
bb4795bb95
Auto merge of #24298 - jdm:rm-more-test-results, r=SimonSapin
Remove outdated test result files automatically

This builds off the of suggestion from #24292 to add a script that is run every WPT sync to remove any useless WPT test result files. It does not subsume that PR because that one includes some manual removals of subtest results inside ini files that are still meaningful.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [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/24298)
<!-- Reviewable:end -->
2019-09-27 21:23:39 -04:00
bors-servo
25501514bd
Auto merge of #24308 - servo:synful, r=SimonSapin
Update a bunch of stuff to syn 1

This updates a lot of our crates to syn 1. Not all of them, but syn 1 was already in tree so it doesn't matter much either way.

<!-- 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/24308)
<!-- Reviewable:end -->
2019-09-27 19:50:29 -04:00
bors-servo
4ade050ed0
Auto merge of #24304 - servo:unsimd, r=nox
Remove use of packed_simd

This crate takes about 40 seconds to build of a fast desktop, and was used in exactly one place. Additionally, that use was previously accidentally disabled (a553964123) and we only noticed more than a year later when the build broke (d1efad6763).

<!-- 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/24304)
<!-- Reviewable:end -->
2019-09-27 18:08:53 -04:00
bors-servo
75c201f78e
Auto merge of #24143 - gterzian:improve_spec_comp_bc_discarding, r=asajeffrey
Improve spec compliance of discarding BCs

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

Came-up at https://github.com/servo/servo/pull/23637#issuecomment-528254988

---
<!-- 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/24143)
<!-- Reviewable:end -->
2019-09-27 12:37:27 -04:00
Anthony Ramine
bceecddb64 Update html5ever to 0.24 2019-09-27 17:43:37 +02:00
Anthony Ramine
1b57558d16 Remove explicit dependency on serde_derive 2019-09-27 17:43:37 +02:00
WPT Sync Bot
3f940e3f4c Update web-platform-tests to revision 90e1ee27eede63cf117f19c1e55553cc1881aef0 2019-09-27 13:51:36 +00:00
Simon Sapin
5c60023cb8 WebIDL codegen: Replace cmake with a single Python script
When playing around with Cargo’s new timing visualization:
https://internals.rust-lang.org/t/exploring-crate-graph-build-times-with-cargo-build-ztimings/10975/21

… I was surprised to see the `script` crate’s build script take 76 seconds.
I did not expect WebIDL bindings generation to be *that* computationally
intensive.

It turns out almost all of this time is overhead. The build script uses CMake
to generate bindings for each WebIDL file in parallel, but that causes a lot
of work to be repeated 366 times:

* Starting up a Python VM
* Importing (parts of) the Python standard library
* Importing ~16k lines of our Python code
* Recompiling the latter to bytecode, since we used `python -B` to disable
  writing `.pyc` file
* Deserializing with `cPickle` and recreating in memory the results
  of parsing all WebIDL files

----

This commit remove the use of CMake and cPickle for the `script` crate.
Instead, all WebIDL bindings generation is done sequentially
in a single Python process. This takes 2 to 3 seconds.
2019-09-27 13:53:19 +02:00
bors-servo
44ee9159ca
Auto merge of #24306 - servo:rustup, r=nox
Upgrade to rustc 1.40.0-nightly (ddf43867a 2019-09-26)

<!-- 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/24306)
<!-- Reviewable:end -->
2019-09-27 07:37:31 -04:00
Anthony Ramine
99ef7813f2 Bump all in-tree components to syn 1 2019-09-27 13:29:55 +02:00
Simon Sapin
d324a2519f Upgrade to rustc 1.40.0-nightly (ddf43867a 2019-09-26) 2019-09-27 13:10:37 +02:00
Anthony Ramine
2d823d7721 Update a bunch of dependencies to versions using syn 1 2019-09-27 12:08:28 +02:00
Anthony Ramine
423cb124ba Restrict syn features for in-tree components 2019-09-27 11:55:38 +02:00
Simon Sapin
4369b4b060 Remove use of packed_simd
This crate takes about 40 seconds to build of a fast desktop,
and was used in exactly one place. Additionally, that use was previously
accidentally disabled (a553964123)
and we only noticed more than a year later when the build broke
(d1efad6763).
2019-09-27 07:34:24 +02:00
bors-servo
5fd4467cb3
Auto merge of #24275 - iinuwa:bugfix/24274, r=jdm
Add check for empty data on ImageData constructor.

<!-- Please describe your changes on the following line: -->
This commit implements the nonzero check for ImageData::new_with_jsobject() according to the ImageData spec.

---
<!-- 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 #24274 (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/24275)
<!-- Reviewable:end -->
2019-09-26 16:05:00 -04:00
Isaiah Inuwa
7cd6a8c682 Refactor constructor code to align with spec. 2019-09-26 13:23:34 -05:00
bors-servo
9e6c0de73d
Auto merge of #24301 - servo-wpt-sync:wpt_update_26-09-2019, r=jdm
Sync WPT with upstream (26-09-2019)

Automated downstream sync of changes from upstream as of 26-09-2019.
[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/24301)
<!-- Reviewable:end -->
2019-09-26 14:21:05 -04:00
Josh Matthews
613dcfb51c
Remove intermittent failure. 2019-09-26 12:44:41 -04:00
WPT Sync Bot
902c03b511 Update web-platform-tests to revision c9633200e9c3d5524dca096e8c23c8eb4a94e495 2019-09-26 14:12:51 +00:00
bors-servo
31869f3204
Auto merge of #24300 - CYBAI:lt-cleanup, r=jdm
Remove unused checking in GetResponseXML

We've supported [Exposed] so no need to check the global scope type!

---
- [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 it just removes an unused checking. Also, those tests marked as `PASS` in #10573 should still pass.

<!-- 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/24300)
<!-- Reviewable:end -->
2019-09-26 10:01:39 -04:00
CYBAI
7432913b7f Remove unused checking
We've supported [Exposed] so no need to check the global scope type!
2019-09-26 22:53:10 +09:00
bors-servo
049527872e
Auto merge of #24292 - jdm:invalid-test-results, r=SimonSapin
Remove outdated test results

<!-- 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/24292)
<!-- Reviewable:end -->
2019-09-26 01:15:44 -04:00
bors-servo
da624d51bd
Auto merge of #24296 - servo-wpt-sync:wpt_update_25-09-2019, r=servo-wpt-sync
Sync WPT with upstream (25-09-2019)

Automated downstream sync of changes from upstream as of 25-09-2019.
[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/24296)
<!-- Reviewable:end -->
2019-09-25 23:43:53 -04:00
bors-servo
f12f6546a4
Auto merge of #24294 - servo:missing-feature, r=jdm
Fix error message for invalid combination of style crate feature flags

Instead of ``cannot find value `engine` in this scope`` https://github.com/servo/servo/issues/24284

<!-- 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/24294)
<!-- Reviewable:end -->
2019-09-25 21:11:55 -04:00