Commit graph

32232 commits

Author SHA1 Message Date
Xidorn Quan
368fb574f8 Have servo report traversal statistics to gecko. 2018-03-15 11:57:52 +11:00
Xidorn Quan
d700fa16a1 Split TraversalStatistics into two parts. 2018-03-15 11:57:48 +11:00
Xidorn Quan
afa377acfd Update bindings. 2018-03-15 11:57:47 +11:00
bors-servo
f7ee1befc5
Auto merge of #20267 - Xanewok:typed-arrays-stack-heap-variants, r=Xanewok
Support JS typed arrays as arguments and in WebIDL unions

<!-- Please describe your changes on the following line: -->
Supersedes #20205.
This brings support to receiving typed arrays as function arguments (those are stack-rooted with CustomAutoRooter) and also being a member of a union (which is basically heap-rooted? similarly to other webidl unions).

This is based on my other PR #20265 (which means it has to pull an external rust-mozjs branch and contains some also slightly unrelated changes here) since it shares `RootedTraceableBox::from_box` here and some other additional changes at rust-mozjs, but it can be easily separated if needed.

I tried adding support to nullable typed arrays but couldn't work around an issue of codegen always sticking a "OrNull" at the end of my type (presumably because of [this](https://github.com/servo/servo/blob/master/components/script/dom/bindings/codegen/parser/WebIDL.py#L2241)?). How would I go about avoiding the suffix with nullable arguments?

If we were to add also support for nullable typed arrays then I think we wouldn't be blocked anymore on this in WebGL 1.0.

r? @jdm

---
<!-- 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
- [ ] 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/20267)
<!-- Reviewable:end -->
2018-03-14 15:43:18 -04:00
Igor Matuszewski
c29fcb80f3 Use helper is_typed_array function 2018-03-14 18:43:27 +01:00
Igor Matuszewski
6beb32e28e Support nullable typed arrays in codegen 2018-03-14 18:43:27 +01:00
Igor Matuszewski
e025bbb079 WIP: Accept typed array arguments in codegen 2018-03-14 18:43:26 +01:00
Igor Matuszewski
a0f2d618ee Use mozjs 2.0 2018-03-14 18:43:26 +01:00
bors-servo
7b326529db
Auto merge of #20224 - emilio:counter-serialization, r=nox
Fix counter() and counters() serialization.

See https://github.com/w3c/csswg-drafts/issues/670 and https://github.com/w3c/web-platform-tests/pull/9862.

<!-- 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/20224)
<!-- Reviewable:end -->
2018-03-14 13:26:00 -04:00
bors-servo
e597cd9e1a
Auto merge of #20265 - Xanewok:fix-js-objects-in-unions, r=jdm
Fix JS object conversion in unions

<!-- Please describe your changes on the following line: -->
Requires safe `Heap::boxed` constructor from https://github.com/servo/rust-mozjs/pull/395 (more info on it is in the PR).

Since unions currently assume that their respective members root themselves and can be stored on heap, I modified the union member object conversion branch to convert to a `RootedTraceableBox<Heap<*mut JSObject>>` (which is the currently generated type for objects in said unions).

I did it only for Unions and not dictionaries, since some dictionaries had bare `*mut JSObject` members - is this a mistake and something that needs further fixing?

Does this need a test, e.g. passing a union with object to a function that returns said object, and comparing the results for equality?

r? @jdm

Generated code with this patch (for `StringOrObject`):
```rust
impl FromJSValConvertible for StringOrObject {
    type Config = ();
    unsafe fn from_jsval(cx: *mut JSContext,
                         value: HandleValue,
                         _option: ())
                         -> Result<ConversionResult<StringOrObject>, ()> {
        if value.get().is_object() {
            match StringOrObject::TryConvertToObject(cx, value) {
                Err(_) => return Err(()),
                Ok(Some(value)) => return Ok(ConversionResult::Success(StringOrObject::Object(value))),
                Ok(None) => (),
            }

        }
        // (...)
    }
}

impl StringOrObject {
    // (...)
    unsafe fn TryConvertToObject(cx: *mut JSContext, value: HandleValue) -> Result<Option<RootedTraceableBox<Heap<*mut JSObject>>>, ()> {
        Ok(Some(RootedTraceableBox::from_box(Heap::boxed(value.get().to_object()))))
    }
}
```

---
<!-- 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 #17011 (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/20265)
<!-- Reviewable:end -->
2018-03-14 12:04:23 -04:00
Emilio Cobos Álvarez
839eda000a
style: Avoid serializing the counter type in counter functions if it's decimal.
See https://github.com/w3c/web-platform-tests/pull/9862 and such.
2018-03-14 16:41:33 +01:00
bors-servo
148beb4ea5
Auto merge of #20243 - emilio:host-selector-on-the-way, r=SimonSapin
style: add infrastructure to match the :host selector.

<!-- 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/20243)
<!-- Reviewable:end -->
2018-03-14 10:38:45 -04:00
Emilio Cobos Álvarez
9fa2618197
style: Add infrastructure to match :host. 2018-03-14 15:10:05 +01:00
Emilio Cobos Álvarez
1654f297ca
style: Tidy a couple things. 2018-03-14 15:10:05 +01:00
bors-servo
daaee046b3
Auto merge of #20294 - glennw:update-wr-blend-brush, r=jdm
Update WR (port blurs and blits to brush_image).

<!-- 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/20294)
<!-- Reviewable:end -->
2018-03-14 08:52:20 -04:00
bors-servo
82932b8fb3
Auto merge of #20293 - servo-wpt-sync:wpt_update_13-03-2018, r=jdm
Sync WPT with upstream (13-03-2018)

Automated downstream sync of changes from upstream as of 13-03-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/20293)
<!-- Reviewable:end -->
2018-03-14 01:36:52 -04:00
Glenn Watson
db6eda8065 Update WR (port blurs and blits to brush_image). 2018-03-14 15:09:21 +10:00
WPT Sync Bot
e90dd8bc6b Update web-platform-tests to revision b202bbb5aa0d235b22bac11fe902eab1094ef9d2 2018-03-13 23:09:11 -04:00
Igor Matuszewski
712812d441 Add WPT test for WebIDL union conversion containing object values 2018-03-13 22:47:37 +01:00
Igor Matuszewski
17ecbaf8ff Support objects in WebIDL unions
Fixes #17011
2018-03-13 22:47:36 +01:00
Igor Matuszewski
725f9cbefa Use mozjs 0.1.14 2018-03-13 22:47:00 +01:00
bors-servo
9a6c96808b
Auto merge of #20290 - kwonoj:build-python-version, r=jdm
build(cmake): detect python binary for specified version

<!-- Please describe your changes on the following line: -->
This PR aims to address #20268, by updating cmake definition to lookup python binary to use. Instead of directly asking `python` binary, this PR uses `${PYTHON_EXECUTABLE}` to lookup desired python binary where applicable.

This PR was locally tested on win32 / mac / arch linux via `mach build --dev`, so far local testing shows no build failure regressions, not sure if this is sufficient test.

---
<!-- 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 #20268 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because _it's build script update_

<!-- 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/20290)
<!-- Reviewable:end -->
2018-03-13 16:29:19 -04:00
OJ Kwon
2ddd105f12
build(cmake): detect python binary for specified version
- closes #20268
2018-03-13 09:25:06 -07:00
bors-servo
84ce43284c
Auto merge of #20287 - servo:webvr, r=jdm
Enable more tests, uselessly

This doesn't really do anything, given the gamepad tests don't even parse correctly.

<!-- 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/20287)
<!-- Reviewable:end -->
2018-03-13 09:52:05 -04:00
Anthony Ramine
ada62bf67d Enable gamepad support when running WebVR and Gamepad tests
There are no additional Gamepad tests that pass because our SpiderMonkey
is two years old and cannot cope with `async` (AFAICT), what a time
to be alive!
2018-03-13 14:02:36 +01:00
Anthony Ramine
052132b0f4 Enable /gamepad/ tests 2018-03-13 14:02:35 +01:00
Anthony Ramine
6d8f4d5337 Remove HTMLIFrameElement.allowvr test
This attribute was unshipped.
2018-03-13 14:02:32 +01:00
bors-servo
d701c11cc7
Auto merge of #20285 - servo-wpt-sync:wpt_update_12-03-2018, r=jdm
Sync WPT with upstream (12-03-2018)

Automated downstream sync of changes from upstream as of 12-03-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/20285)
<!-- Reviewable:end -->
2018-03-13 08:52:31 -04:00
bors-servo
b051e9eb6c
Auto merge of #20288 - Eijebong:libloading, r=emilio
Update libloading to 0.5

<!-- 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/20288)
<!-- Reviewable:end -->
2018-03-13 07:38:06 -04:00
Bastien Orivel
b598c14b75 Update libloading to 0.5 2018-03-13 12:33:49 +01:00
bors-servo
d78478f9bd
Auto merge of #20282 - gootorov:fix-stylemd-links, r=emilio
style: Fix some dead links in style.md

<!-- Please describe your changes on the following line: -->
Part of https://github.com/servo/servo/issues/20126

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [x] These changes do not require tests because: documentation

<!-- 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/20282)
<!-- Reviewable:end -->
2018-03-13 06:36:21 -04:00
bors-servo
7e0f45b1c7
Auto merge of #20204 - Eijebong:bump, r=nox
Rebump toml and error-chain

<!-- 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/20204)
<!-- Reviewable:end -->
2018-03-13 05:36:44 -04:00
Bastien Orivel
fcc64e659d Update error-chain to 0.11 2018-03-13 10:24:15 +01:00
Bastien Orivel
2bd99317fb Update toml to 0.4 2018-03-13 10:24:11 +01:00
WPT Sync Bot
aa8de380cc Update web-platform-tests to revision 28300a0874230d668f0b02cfddfd994f2a735a56 2018-03-12 23:08:35 -04:00
bors-servo
ac71266987
Auto merge of #20283 - gootorov:patch-1, r=jdm
style: Fix a typo in Integer struct docs

<!-- Please describe your changes on the following line: -->
Fix a typo in `Integer` struct documentation.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [ ] These changes fix #__ (github issue number if applicable).
- [x] These changes do not require tests because: documentation

<!-- 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/20283)
<!-- Reviewable:end -->
2018-03-12 20:26:53 -04:00
Igor Gutorov
217c4be2bf style: Fix a typo in Integer struct docs 2018-03-13 02:02:38 +02:00
Igor Gutorov
de0e33a743 style: Fix some dead links in style.md 2018-03-13 01:39:17 +02:00
bors-servo
087cf21d79
Auto merge of #20223 - emilio:share-xbl, r=xidorn,bholley
style: Allow to share style across elements with similar XBL bindings.

Also move the checks so that the tag name checks (presumably cheaper) come earlier.

<!-- 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/20223)
<!-- Reviewable:end -->
2018-03-12 16:48:36 -04:00
Emilio Cobos Álvarez
9364cd21b8
style: Don't share style with an element that has a different proto binding than us.
See the lengthy comment about why... XBL sucks.

MozReview-Commit-ID: 8UgeJAVkj6a
2018-03-12 21:47:47 +01:00
Emilio Cobos Álvarez
c338745b17
style: Allow to share style across elements with similar XBL bindings. 2018-03-12 21:47:46 +01:00
bors-servo
af12284b6a
Auto merge of #20273 - servo:jdm-patch-13, r=nox
Unbreak the docs build.

I added this to avoid the problem with doc builds leaving around large build artifacts while also working around #17243, but it appears to break the doc build entirely. This won't end up executing on servo-linux1 or servo-linux2 because of #17243, but I'm looking into the correct solution for that simultaneously.

<!-- 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/20273)
<!-- Reviewable:end -->
2018-03-12 13:26:55 -04:00
bors-servo
466da7febb
Auto merge of #20276 - glennw:update-wr-opts, r=jdm
Update WR (various small optimizations and driver fixes).

<!-- 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/20276)
<!-- Reviewable:end -->
2018-03-12 11:30:52 -04:00
bors-servo
5feb13ac66
Auto merge of #20277 - servo:test-webvr, r=jdm
Enable /webvr/ 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/20277)
<!-- Reviewable:end -->
2018-03-12 10:32:52 -04:00
Anthony Ramine
9af2082b2d Fix the expectation for wbr-element.html 2018-03-12 15:32:02 +01:00
Anthony Ramine
7a09b2fe40 Properly enable WebVR when running WebVR tests 2018-03-12 15:32:01 +01:00
Anthony Ramine
887367e2e6 Enable /webvr/ tests 2018-03-12 15:32:00 +01:00
Anthony Ramine
8013e7801e Properly pref-gate the VR WebIDL interface 2018-03-12 15:32:00 +01:00
Anthony Ramine
e5ba3dfd43 Fix expectation for parser-sets-attributes-and-children.html
It now always crashes consistently on Linux.
2018-03-12 15:31:59 +01:00
Anthony Ramine
4fe554cb73 Fix expectation for transition_calc_implicit.html.ini (#17417) 2018-03-12 15:31:55 +01:00