Commit graph

39081 commits

Author SHA1 Message Date
Víctor Manuel Jáquez Leal
115d72771e Clean up gating and order of getting display/glcontext from glutin
This patch simply simplify the OS gating for getting display and gl
context from glutin since it is only used for a linux, mac and not
UWP-based windows.

Also, in linux tries to fetch the wayland display and don't rely
on EGLDisplay because it might bring problems in servo/media.
Nonetheless it is required to compile render-unix in servo-media
with feature 'gl-wayland'
2019-09-30 19:08:37 +02: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
bors-servo
a2755f5689
Auto merge of #24264 - SiddharthaMishra:master, r=Manishearth
Make tidy report when a rand exception is no longer needed

Make test-tidy always check Cargo.lock and make tidy report when a rand exception is not needed
---

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #24152  (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/24264)
<!-- Reviewable:end -->
2019-09-25 16:25:51 -04:00
bors-servo
5518951143
Auto merge of #24283 - servo:rustup, r=jdm
Upgrade to rustc 1.39.0-nightly (66bf391c3 2019-09-23)

<!-- 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/24283)
<!-- Reviewable:end -->
2019-09-25 13:54:00 -04:00
Josh Matthews
c21f599b05 Clean up test results as part of WPT sync. 2019-09-25 12:41:02 -04:00
Josh Matthews
6e7c58784d Delete all unused test results. 2019-09-25 12:39:05 -04:00
Josh Matthews
4a7737ccf6 Add script to find unused WPT results. 2019-09-25 12:38:00 -04:00
Simon Sapin
36e53a39bf 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
2019-09-25 18:29:52 +02:00
Simon Sapin
d69607064b Upgrade to rustc 1.39.0-nightly (66bf391c3 2019-09-23) 2019-09-25 18:04:35 +02:00