Commit graph

20948 commits

Author SHA1 Message Date
sreeise
cac4aa56f7 Added AudioTrack, AudioTrackList, VideoTrack, VideoTrackList, and TrackEvent interfaces 2019-03-03 09:04:50 -05:00
bors-servo
4d8d54fc00
Auto merge of #22933 - pngai:implement-returnValue-attribute, r=jdm
Implement historical returnValue attribute for Event interface

<!-- Please describe your changes on the following line: -->
Implementation of `returnValue` attribute for Event interface.

---
<!-- 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 #22881 (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/22933)
<!-- Reviewable:end -->
2019-03-01 17:33:39 -05:00
bors-servo
27f443fd00
Auto merge of #22934 - Manishearth:update-webidl, r=nox
Update WebIDL.py

I'm working on getting [attributes on types landed in upstream webidl](https://bugzilla.mozilla.org/show_bug.cgi?id=1359269). In preparation for that, I'd like to update WebIDL.py and deal with all the conflicts first so that updating for that bug is easier.

(This PR doesn't need to be reviewed and landed right now, I can just roll it into the PR for implementing attributes on types, but I suspect it would be easier to land this first)

Probably should squash before landing, the steps are separated out for ease of review.

r? @nox @jdm

<!-- 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/22934)
<!-- Reviewable:end -->
2019-03-01 15:44:43 -05:00
Manish Goregaokar
8f5db8a7e1 Update webidl.py from upstream 2019-03-01 16:58:46 +05:30
Niko Pen
0b8deed28a Move RenderNotifier from compositing to servo 2019-02-28 19:53:54 +05:30
Patrick Ngai
fcadff7bad Implement historical returnValue attribute for Event interface 2019-02-28 21:03:03 +08:00
Peter Hall
1e9de470ea Fixed inconsistency in import of gl::Gl
All other uses of `Gl` in this file use the qualified path `gl::Gl`.
2019-02-27 19:27:05 +00:00
Alan Jeffrey
8ddde7eacc Pass the GL context to the VRDisplay when rendering 2019-02-27 08:57:02 -06:00
bors-servo
42ebf46172
Auto merge of #22917 - ksqsf:master, r=KiChjang
Add optional annotations for initEvent method of Event interface

Added `optional` and default values to parameters `bubbles` and `cancelable` of `initEvent` of `Event`.

I tried to update test results, but there seem to be no differences at all.

I checked similar code where `optional` is used, and there seems to be no special handling in Rust. If that is not the case with this issue, please let me know and I'll commit more follow-ups.

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

<!-- Either: -->
- [x] There are tests for these changes OR

<!-- 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/22917)
<!-- Reviewable:end -->
2019-02-27 04:05:57 -05:00
bors-servo
ec7a5f21c8
Auto merge of #22938 - asajeffrey:webvr-future-frame-data, r=paulrouget
Use webvr future_frame_data to avoid blocking the WebGL thread

<!-- Please describe your changes on the following line: -->
This PR fixes a potential deadlock caused by the WebGL thread being blocked on a VR device. Rather than blocking on the VR device, it forwards a future to the script thread, and then then script thread blocks.

---
<!-- 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 do not require tests because it's fixing a potential deadlock

<!-- 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/22938)
<!-- Reviewable:end -->
2019-02-27 02:20:30 -05:00
Alan Jeffrey
c9087013b1 Use webvr future_frame_data to avoid blocking the WebGL thread 2019-02-26 11:07:42 -06:00
_rika
fd2341bc78 Add optional annotations for initEvent method of Event interface 2019-02-26 18:10:43 +08:00
bors-servo
be3ecc5dc1
Auto merge of #22937 - servo:rustup, r=nox
Upgrade to rustc 1.34.0-nightly (097c04cf4 2019-02-24)

<!-- 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/22937)
<!-- Reviewable:end -->
2019-02-26 04:59:56 -05:00
Simon Sapin
4464354e2e Reformat 2019-02-26 08:18:33 +01:00
Alan Jeffrey
d6c064e9a9 Call start_present and stop_present on VRDisplay 2019-02-25 12:53:09 -06:00
Simon Sapin
7bb7c9a1e3 Upgrade to rustc 1.34.0-nightly (097c04cf4 2019-02-24) 2019-02-25 13:35:41 +01:00
bors-servo
a28e15e4ea
Auto merge of #22347 - stevesweetney:master, r=ferjm
Implement HTMLMediaElement muted and defaultMuted attributes

<!-- Please describe your changes on the following line: -->
PR for issue  #22291

---
<!-- 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  #22291 (github issue number if applicable).
- [X] There are tests for these changes OR

<!-- 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/22347)
<!-- Reviewable:end -->
2019-02-25 05:05:09 -05:00
Emilio Cobos Álvarez
3a1539ccde style: Appease tidy. 2019-02-23 21:05:34 -08:00
Emilio Cobos Álvarez
44ae191e72 Fix servo build. 2019-02-23 21:05:34 -08:00
Emilio Cobos Álvarez
f6b6465ec6 style: Remove unnecessary derive. 2019-02-23 21:05:33 -08:00
Emilio Cobos Álvarez
be616c31e8 style: Rustfmt recent changes. 2019-02-23 21:05:32 -08:00
Emilio Cobos Álvarez
71daec59eb style: Use Rust types from transform-origin / perspective-origin.
Differential Revision: https://phabricator.services.mozilla.com/D20382
2019-02-23 21:05:23 -08:00
Emilio Cobos Álvarez
74d7d5bc42 style: Use Rust types for perspective and z-index.
Differential Revision: https://phabricator.services.mozilla.com/D20381
2019-02-23 21:05:17 -08:00
Asfiya
6428ed726d style: Convert NS_STYLE_FLEX_DIRECTION to an enum class in nsStyleConsts.h
Converted the #define variable NS_STYLE_FLEX_DIRECTION to an enum class in nsStyleConsts.h and made changes in other files that access it

Differential Revision: https://phabricator.services.mozilla.com/D20291
2019-02-23 21:05:07 -08:00
scharing
85718c3b5a style: Convert NS_STYLE_MASK_MODE_* to enum class.
Differential Revision: https://phabricator.services.mozilla.com/D20063
2019-02-23 21:05:00 -08:00
Emilio Cobos Álvarez
73d5b82f9f style: Improve #[derive(Parse)].
I want to do this so that I can get rid of Either<>. The reasons for getting rid
of either are multiple:

 * It doesn't generate as nice C++ code using cbindgen.
 * It isn't that nice to use either from Rust.
 * cbindgen has bugs with zero-sized types.

I started using this for ColorOrAuto and a few others, for now.

Differential Revision: https://phabricator.services.mozilla.com/D19844
2019-02-23 21:04:44 -08:00
Emilio Cobos Álvarez
6118e4d993 style: Use Rust types for some misc properties.
-moz-tab-size, border-image-outset and border-image-slice.

This is not a particularly interesting patch, just removes some code. We can
remove way more code when a few related properties are also ported.

Differential Revision: https://phabricator.services.mozilla.com/D19825
2019-02-23 21:04:33 -08:00
Emilio Cobos Álvarez
eefd440656 style: Remove nsFont::featureValueLookup.
It's a global object, it doesn't have to be stored in nsFont. Pass it from the
caller like the user font set and co.

Depends on D20141

Differential Revision: https://phabricator.services.mozilla.com/D20142
2019-02-23 21:04:26 -08:00
Emilio Cobos Álvarez
dcfe30ff18 style: Remove a couple trivial dependencies on nsPresContext.
Differential Revision: https://phabricator.services.mozilla.com/D20141
2019-02-23 21:04:19 -08:00
Emilio Cobos Álvarez
3231714758 style: Include anon boxes in CSSPseudoElementType, to remove ComputedStyle::mPseudoTag.
This is more consistent with what the Rust bits of the style system do, and
removes a pointer from ComputedStyle which is always nice.

This also aligns the Rust bits with the C++ bits re. not treating xul pseudos as
anonymous boxes. See the comment in nsTreeStyleCache.cpp regarding those.

Can't wait for XUL trees to die.

Differential Revision: https://phabricator.services.mozilla.com/D19002
2019-02-23 21:04:03 -08:00
Hiroyuki Ikezoe
22e12a0f52 style: Implement scroll-snap-align parser and serializer.
https://drafts.csswg.org/css-scroll-snap-1/#scroll-snap-align

Differential Revision: https://phabricator.services.mozilla.com/D20205
2019-02-23 21:03:55 -08:00
Hiroyuki Ikezoe
7cbaaf6734 style: Implement scroll-padding parser and serializer.
Differential Revision: https://phabricator.services.mozilla.com/D20103
2019-02-23 21:03:47 -08:00
Hiroyuki Ikezoe
79a5e97c13 style: Implement scroll-margin parser and serializer.
The reason why we use  RelaxedAtomBool is that
ScrollSnapUtils::GetSnapPointForDestination() is called both from the main and
the compositor threads, and the function will have a branch depending on the
pref value.

Differential Revision: https://phabricator.services.mozilla.com/D20101
2019-02-23 21:03:29 -08:00
Jonathan Kingston
d6750de0c3 style: Add support for CSS prefers-color-scheme media feature.
Bug: 1494034
Reviewed-by: emilio
2019-02-23 21:03:07 -08:00
Brian Birtles
71d9fe5d60 style: Don't share styles when an element has animations applied to it.
We already avoid putting styles in the shared style cache for an element that
has animations[1] but if we are doing the initial style of two siblings where
the _second_ has animations applied, there is nothing to stop us from trying to
share with the first (un-animated) element. This patch adds a check to prevent
sharing in that case since sharing style between animated elements is unsound
for the reasons described in [1].

A number of tests including:

  testing/web-platform/tests/web-animations/animation-model/animation-types/visibility.html

will fail without this fix once we remove the style flush from
KeyframeEffect::SetKeyframes later in this patch series.

[1] https://searchfox.org/mozilla-central/rev/6e3cc153566f5f288ae768a2172385b8436d61dd/servo/components/style/sharing/mod.rs#597

Differential Revision: https://phabricator.services.mozilla.com/D18913
2019-02-23 21:02:53 -08:00
Emilio Cobos Álvarez
07cb325402 style: Use rust types for background-size.
Hopefully straight-forward.

Differential Revision: https://phabricator.services.mozilla.com/D19625
2019-02-23 21:02:46 -08:00
Emilio Cobos Álvarez
1e6338e1ee style: Use Rust types for Position.
This one should be much easier to review / much more pleasant to see :-)

Differential Revision: https://phabricator.services.mozilla.com/D19563
2019-02-23 21:02:36 -08:00
Emilio Cobos Álvarez
d4ad12bee4 style: Preserve calc() rounding behavior.
See the comment. I don't really this is ideal, I filed bug 1528114 to
investigate changing that.

Differential Revision: https://phabricator.services.mozilla.com/D19584
2019-02-23 21:02:27 -08:00
Emilio Cobos Álvarez
f7a59bf0ee style: Use Rust sizes for flex-basis, width, height, and their min/max properties.
Really sorry for the size of the patch :(

Only intentional behavior change is in the uses of HasLengthAndPercentage(),
where it's easier to do the right thing. The checks that used to check for
(IsCalcUnit() && CalcHasPercentage()) are wrong since bug 957915.

Differential Revision: https://phabricator.services.mozilla.com/D19553
2019-02-23 21:02:18 -08:00
Manish Goregaokar
c44b63f335 Handle erroring out when there are multiple immersive sessions 2019-02-19 17:50:46 +05:30
Manish Goregaokar
37872b8b9c Add XREnvironmentBlendMode 2019-02-19 16:08:39 +05:30
Steve Sweetney
02d3328d3c Implement HTMLMediaElement muted and defaultMuted attributes 2019-02-18 15:20:00 -05:00
bors-servo
2c63d1296b
Auto merge of #22886 - asajeffrey:webvr-embedder-can-register-vrservices, r=Manishearth
Allow the embedder to register their own VRServices

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

Allow the servo embedder to register their own `VRService`s, not just the default ones.

---
<!-- 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 #22878
- [X] These changes do not require tests because this is all plumbing

<!-- 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/22886)
<!-- Reviewable:end -->
2019-02-14 09:37:27 -05:00
Alan Jeffrey
a062c40567 Allow the embedder to register their own VRServices 2019-02-14 08:36:03 -06:00
bors-servo
093a1ee365
Auto merge of #22872 - Manishearth:mediaup, r=asajeffrey
Update servo-media

Pulls in https://github.com/servo/media/pull/199, doesn't use it yet

<!-- 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/22872)
<!-- Reviewable:end -->
2019-02-13 13:05:11 -05:00
Manish Goregaokar
407d88f97d Update servo-media 2019-02-13 10:04:52 -08:00
bors-servo
92369cca21
Auto merge of #22864 - emilio:gecko-sync, r=emilio
style: Rename MozLength to Size, and MaxLength to MaxSize.

MozLength is not a very descriptive name. If we're going to use it in both Gecko
and Servo we may as well name it something more accurate.

I would've chosen `ContentSize` per CSS2[1][2] if it wasn't a lie in presence
of box-sizing. I don't have better ideas than `Size`, given that.

[1]: https://drafts.csswg.org/css2/visudet.html#propdef-width
[2]: https://drafts.csswg.org/css2/box.html#content-width

Differential Revision: https://phabricator.services.mozilla.com/D19280

<!-- 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/22864)
<!-- Reviewable:end -->
2019-02-11 20:28:35 -05:00
Emilio Cobos Álvarez
c2819365f0 style: Rename MozLength to Size, and MaxLength to MaxSize.
MozLength is not a very descriptive name. If we're going to use it in both Gecko
and Servo we may as well name it something more accurate.

I would've chosen `ContentSize` per CSS2[1][2] if it wasn't a lie in presence
of box-sizing. I don't have better ideas than `Size`, given that.

[1]: https://drafts.csswg.org/css2/visudet.html#propdef-width
[2]: https://drafts.csswg.org/css2/box.html#content-width

Differential Revision: https://phabricator.services.mozilla.com/D19280
2019-02-12 02:28:00 +01:00
bors-servo
3d4a416c6b
Auto merge of #21310 - jdm:canvas-path, r=pcwalton
Improve rendering of transformed 2d paths

This makes http://webglreport.com/ render correctly by porting the [equivalent code](https://searchfox.org/mozilla-central/rev/196560b95f191b48ff7cba7c2ba9237bba6b5b6a/dom/canvas/CanvasRenderingContext2D.h#847-875) from Gecko's 2d canvas implementation that handles paths with transformations. The first commit fixes the rendering issue, and the second commit fixes some new test failures that were exposed by that change.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #21169
- [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/21310)
<!-- Reviewable:end -->
2019-02-11 14:41:19 -05:00
bors-servo
1ec2de258d
Auto merge of #22798 - jdm:webgl-trace, r=nox
Report all messages processed by the webgl thread.

This might be useful for figuring out what a WebGL-based page is doing when it's not behaving correctly.

---
- [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 they are debug-logging changes only.

<!-- 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/22798)
<!-- Reviewable:end -->
2019-02-11 11:39:12 -05:00