Commit graph

25052 commits

Author SHA1 Message Date
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
366aa78e55 Run webvr thread when webxr is enabled 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
a89d2c6410 Support creating and messaging mock display 2019-05-30 19:04:08 -07:00
Manish Goregaokar
c689866d35 Add XR.test() 2019-05-30 13:29:05 -07:00
Manish Goregaokar
422faddedf Update rust-webvr 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
est31
bb6052ca8e Some further removals 2019-05-30 20:27:19 +02: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
bors-servo
28a12579e2
Auto merge of #23478 - Eijebong:fontconfig, r=Manishearth
Update servo-fontconfig 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/23478)
<!-- Reviewable:end -->
2019-05-29 19:21:13 -04:00
Bastien Orivel
3ba0b6fcc0 Update servo-fontconfig to 0.4 2019-05-29 22:51:30 +02:00
est31
3efc5e59bc Remove unused code from gfx and layout crates 2019-05-29 21:51:28 +02: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
Emilio Cobos Álvarez
70635e7815 layout: Fix servo build. 2019-05-29 16:14:35 +02:00
Emilio Cobos Álvarez
4671ef5243 style: Fix servo build. 2019-05-29 16:14:34 +02:00
Emilio Cobos Álvarez
cd2ac08eb9 atoms: Add some static atoms in code that is shared with gecko. 2019-05-29 16:14:33 +02:00
Emilio Cobos Álvarez
1994dbb1c8 style: Revert a change that ended up not being needed and busts the servo build. 2019-05-29 16:14:32 +02:00
Emilio Cobos Álvarez
e3e826d4fb style: Appease tidy. 2019-05-29 16:14:31 +02:00
Emilio Cobos Álvarez
81f40a57e4 style: Reformat recent style system changes. 2019-05-29 16:14:30 +02:00
Emilio Cobos Álvarez
87ec2cefc5 style: Tweak whitespace in Cargo.toml to match surrounding code and Gecko. 2019-05-29 16:14:30 +02:00
Martin Stransky
90d20f27b3 [Linux/Gtk] Get and use Gtk theme text color for active/pressed button,
- Follow Gtk and get theme button text color directly from "button" CSS node instead of "button label"
- Provide new -moz-gtk-buttonactivetext color for active/pressed button text color
- Replace ButtonText color with -moz-gtk-buttonactivetext when it's appropriate

Differential Revision: https://phabricator.services.mozilla.com/D30566
2019-05-29 16:14:29 +02:00
violet
e66e612452 style: Use cbindgen for text-overflow.
Differential Revision: https://phabricator.services.mozilla.com/D32285
2019-05-29 16:14:28 +02:00
Boris Chiou
73b0b7c477 style: Implement offset-rotate.
This includes style system and layout update. I add 3 extra reftests
because the original tests use ray() function as the offset-path, but we
don't support it. It'd be better to add tests using a different type of
offset-path.

The spec issue about the serialization:
https://github.com/w3c/fxtf-drafts/issues/340

Differential Revision: https://phabricator.services.mozilla.com/D32212
2019-05-29 16:14:27 +02:00
Emilio Cobos Álvarez
43444db8a8 style: Cleanup selector-matching for nested pseudo-elements, match ::slotted correctly when there's no selector before it, and add tests.
D29542 fixed the bogus checks that was making nested pseudo-elements match
author rules. This adds tests and ends up being just a cleanup, though as it
turns out we it also fixes an issue with ::slotted() matched from
Element.matches.

Differential Revision: https://phabricator.services.mozilla.com/D27529
2019-05-29 16:14:26 +02:00
Emilio Cobos Álvarez
272d9758d7 style: Fix nested-pseudo-elements matching author rules better.
This makes *|*::marker do the intended thing in UA sheets, so I think it's
better, and it's a bit less special-casey.

We may want to re-introduce the changes for pseudo-elements at some point,
depending on the WG decision, but this patch makes each_non_document_style_data
consistent with the rule collector.

The changes of each_non_document_style_data on their own should fix some bugs,
but it doesn't because:

 * This is only hit for pseudos that allow user-action-state pseudo-classes.
 * The containing shadow check worked for them anyway.
 * We don't allow any pseudo after ::slotted() or that isn't tree-abiding per
   the CSS specs (we should maybe enable one of the moz-range stuff to be
   tree-abiding).

So ::placeholder is the only one that right now fits the bill to trigger the
bugs this would fix, but it doesn't since I couldn't make ::placeholder match
:hover / :active / :focus anyhow (inside or outside a shadow tree).

I've left the ProbeMarkerPseudoStyle changes for now since they are technically
a bit more consistent than what was there before, but we could revert those if
they cause trouble, we could rely on the UA rule matching, but we would need to
change that if we allow the ::foo::before and such to match.

Differential Revision: https://phabricator.services.mozilla.com/D29542
2019-05-29 16:14:26 +02:00
Emilio Cobos Álvarez
431b9d00f5 style: Remove eStyleImageType_URL.
It was introduced in bug 1352096 to reduce complexity with Stylo (apparently).

Right now it doesn't look like it reduces any complexity, and it's a bit
annoying with some of the patches that I'm writing at the moment.

So unless there's any objection I think it should go away.

Differential Revision: https://phabricator.services.mozilla.com/D31708
2019-05-29 16:14:25 +02:00
Emilio Cobos Álvarez
8bf0f82ddc style: Remove old CSS scroll snap implementation.
This will save us some time from figuring out what's the best thing to do in
bug 1552587, so that other patches I have in flight (mainly bug 1552708) can
land, since we cannot add a single byte to nsStyleDisplay right now otherwise.

The code removed here is well isolated and not that complicated, so it seems to
me that should be easy to bring back should we have an emergency (and I commit
to doing that while preserving the nsStyleDisplay size limit if we need to :)).

Differential Revision: https://phabricator.services.mozilla.com/D32026
2019-05-29 16:14:24 +02:00
Emilio Cobos Álvarez
44926adde7 style: Use cbindgen for border-image-width.
Differential Revision: https://phabricator.services.mozilla.com/D32032
2019-05-29 16:14:23 +02:00
violet
af8e8e6a34 style: Do not report error for unknown property if its known moz prefixed version is specified.
Suppose that `prop` is a property that we haven't supported yet, while its `-moz-prop`
version is already supported.

If an author specifies in a declaration block this property in its standard form
as well as multiple verdor specific forms, as long as `-moz-prop` is specified, we
shouldn't report error for unknown property `prop`. Because that's just noise.

Differential Revision: https://phabricator.services.mozilla.com/D31998
2019-05-29 16:14:23 +02:00
violet
bd1481039f style: Add SVG geometry property support in CSS.
This patch adds SVG geometry properties to CSS, it doesn't deal with
how SVG handles them.

Differential Revision: https://phabricator.services.mozilla.com/D29937
2019-05-29 16:14:22 +02:00
violet
d552969ca1 style: Support AllowQuirks::Always option in helpers.mako.rs
Differential Revision: https://phabricator.services.mozilla.com/D29936
2019-05-29 16:14:21 +02:00
Boris Chiou
f8a2172d42 style: Make offset-distance animatable.
Use ComputedValue to animate offset-distance.

Differential Revision: https://phabricator.services.mozilla.com/D30584
2019-05-29 16:14:20 +02:00
Boris Chiou
c50829bf6e style: Implement offset-distance.
Define the offset-distance property in style system.

Differential Revision: https://phabricator.services.mozilla.com/D30582
2019-05-29 16:14:20 +02:00
Boris Chiou
d80a5d9196 style: Unpack StyleMotion and use cbindgen for OffsetPath.
Unpack StyleMotion and move its members into nsStyleDisplay, use
cbindgen to generate StyleOffsetPath.

Differential Revision: https://phabricator.services.mozilla.com/D31164
2019-05-29 16:14:19 +02:00
Jonathan Kew
8ee516b681 style: Add parsing of the loose|normal|strict values of the CSS line-break property.
Differential Revision: https://phabricator.services.mozilla.com/D30785
2019-05-29 16:14:18 +02:00
Jonathan Kew
0dc70cf7f2 style: Implement the CSS line-break property, with values "auto | anywhere".
Note that the "loose | normal | strict" values are not yet parsed/implemented.

Differential Revision: https://phabricator.services.mozilla.com/D29817
2019-05-29 16:14:18 +02:00
Emilio Cobos Álvarez
67909022a0 style: Unprefix user-select.
The CSSWG decided that our behavior regarding inheritance is what we want,
see [1].

[1]: https://github.com/w3c/csswg-drafts/issues/3344

Differential Revision: https://phabricator.services.mozilla.com/D11585
2019-05-29 16:14:17 +02:00
Brian Birtles
7cf2e38bb7 style: Use update() to update declarations from Servo_DeclarationBlock_SetPropertyToAnimationValue.
This method is used when updating the SMIL override style and from Web
Animations' Animation.commitStyles method. By using update we accurately return
false when no change is made to a declaration block.

For SMIL this simply acts as an optimization, meaning we can avoid updating the
SMIL override style ub some cases.

For Animation.commitStyles, however, this allows us to avoid generating
a mutation record. Normally making a redundant change to an attribute *does*
generate a mutation record but the style attribute is different. All browsers
avoid generating a mutation record for a redundant change to inline style.
This is specified in the behavior for setProperty[1] which does not update the
style attribute if updated is false.

[1] https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-setproperty

Differential Revision: https://phabricator.services.mozilla.com/D30871
2019-05-29 16:14:16 +02:00
Brian Birtles
eba393cc82 Implement Animation.commitStyles.
Differential Revision: https://phabricator.services.mozilla.com/D30327
2019-05-29 16:14:16 +02:00
violet
86524c3765 style: Accept empty argument for some filters.
Filters blur(), invert(), etc. can omit argument.

Computed/specified style serialization is a little tricky w.r.t the shortest
serialization principle. Ideally we should serialize `invert(1)` to `invert()`,
but that will be a breaking change, so we always serialize them with an
argument.

Note, Blink/WetKit treat specified (but not computed) style serialization
differently when the specified one is originally without argument. Our
current behavior is the same as pre-Chromium Edge.

Differential Revision: https://phabricator.services.mozilla.com/D31720
2019-05-29 16:14:15 +02:00
Emilio Cobos Álvarez
8c8ef22e6b style: Remove some more individual-transform dead code.
Differential Revision: https://phabricator.services.mozilla.com/D31705
2019-05-29 16:14:15 +02:00