Commit graph

38442 commits

Author SHA1 Message Date
Boris Chiou
29f6db4d16
style: Support multiple track sizes for grid-auto-{columns|rows}.
Support `<track-size>+` on the implicit track sizing properties,
grid-auto-columns and grid-auto-rows.

Differential Revision: https://phabricator.services.mozilla.com/D38408
2019-08-15 17:00:25 +02:00
Emilio Cobos Álvarez
69191d8b8c
style: Don't write manual glue code for the order property.
The default code works just as well.

Differential Revision: https://phabricator.services.mozilla.com/D40698
2019-08-15 17:00:18 +02:00
Emilio Cobos Álvarez
3c346c35d2
style: Fix Rust unit tests. 2019-08-15 17:00:03 +02:00
Emilio Cobos Álvarez
708ce04896
Bug 1519958 - Improve stack size of grid templates and re-enable style struct size assertions disabled in the previous patch. r=boris
This re-enables the assertion which was disabled on the previous patch by doing
a bit of boxing around.

Differential Revision: https://phabricator.services.mozilla.com/D36599
2019-08-15 16:58:52 +02:00
Emilio Cobos Álvarez
3e39998068
style: Refactor grid types to preserve repeat() at computed value time and use cbindgen.
I'm _really_ sorry for the size of the patch. I tried to do this in two steps
but it was a lot of work and pretty ugly.

This patch makes us use cbindgen for grid-template-{rows,columns}, in order to:

 * Make us preserve repeat() at computed-value time. This is per spec since
   interpolation needs to know about repeat(). Except for subgrid, which did the
   repeat expansion at parse-time and was a bit more annoying (plus it doesn't
   really animate yet so we don't need it to comply with the spec).

 * Tweaks the WPT tests for interpolation to adopt the resolution at:
   https://github.com/w3c/csswg-drafts/issues/3503.

Trade-off here, as this patch stands, is that this change makes us use less
long-living memory, since we expand repeat() during layout, but at the cost of a
bit of CPU time during layout (conditional on the property applying though,
which wasn't the case before). It should be very easy to store a cached version
of the template, should this be too hot (I expect it isn't), or to change the
representation in other ways to optimize grid layout code if it's worth it.

Another trade-off: I've used SmallPointerArray to handle line-name merging,
pointing to the individual arrays in the style data, rather than actually
heap-allocating the merged lists. This would also be pretty easy to change
should we measure and see that it's not worth it.

This patch also opens the gate to potentially improving memory usage in some
other ways, by reference-counting line-name lists for example, though I don't
have data that suggests it is worth it.

In general, this patch makes much easier to tweak the internal representation of
the grid style data structures. Overall, I think it's a win, the amount of magic
going on in that mako code was a bit huge; it took a bit to wrap my head around
it.

This patch comments out the style struct size assertions. They will be
uncommented in a follow-up patch which contains some improvements for this type,
which are worth getting reviewed separately.

Also, this patch doesn't remove as much code as I would've hoped for because of
I tried not to change most of the dom/grid code for inspector, but I think a
fair bit of the nsGridContainerFrame.cpp code that collects information for it
can be simplified / de-copy-pasted to some extent. But that was a pre-existing
problem and this patch is already quite massive.

Differential Revision: https://phabricator.services.mozilla.com/D36598
2019-08-15 16:58:44 +02:00
Emilio Cobos Álvarez
0e8b1853a7
style: Expand and simplify a macro that's not very useful.
Skip whitespace upfront rather than on each individual branch. The only
difference in behavior is that we would've consumed some extra whitespace in the
error case, but I don't think that matters at all.

We were consuming some extra whitespace as well after the close path command for
example, which wasn't parsing anything.

Differential Revision: https://phabricator.services.mozilla.com/D40539
2019-08-15 16:58:37 +02:00
Emilio Cobos Álvarez
2c17050819
style: Deindent a bit SVG path parsing code.
None cannot be returned, since we just called peek() and it returned something.

Differential Revision: https://phabricator.services.mozilla.com/D40538
2019-08-15 16:58:31 +02:00
Emilio Cobos Álvarez
3ec38e252f
style: Remove the GetCSNeedsLayoutFlush flag, as it is unneeded now.
Differential Revision: https://phabricator.services.mozilla.com/D40300
2019-08-15 16:58:14 +02:00
Boris Chiou
c6cdaaf1cf
style: Make offset-anchor animatable.
Per the spec issue, https://github.com/w3c/csswg-drafts/issues/3482,
we update the wpt to keep the percentage in `calc()` for `offset-anchor`.

Differential Revision: https://phabricator.services.mozilla.com/D39552
2019-08-15 16:58:08 +02:00
Boris Chiou
33690b9eaf
style: Support offset-anchor.
Differential Revision: https://phabricator.services.mozilla.com/D39432
2019-08-15 16:58:02 +02:00
Emilio Cobos Álvarez
e04273a4d9
style: Move the overrides to a separate struct in nsPresContext.
Just so that we can keep track of these together.

Differential Revision: https://phabricator.services.mozilla.com/D40247
2019-08-15 16:57:56 +02:00
Emilio Cobos Álvarez
07b8666029
style: Simplify emulated medium setup in nsPresContext.
Differential Revision: https://phabricator.services.mozilla.com/D40246
2019-08-15 16:57:50 +02:00
Emilio Cobos Álvarez
032347f4ff
style: Fix cursor prefixed aliases to do the right thing.
This was an oversight in bug 1520154. We kept the -moz- version in the specified
value but not the computed value.

That's a very peculiar way of making aliases work. This makes them work
consistently as many other aliases instead.

Also, add an assert that would've caught this much much earlier.

Differential Revision: https://phabricator.services.mozilla.com/D40063
2019-08-15 16:57:41 +02:00
bors-servo
91469aa472
Auto merge of #23967 - gterzian:fix_double_transplant, r=asajeffrey
Remove redundant windowproxy transplanting

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

---
<!-- 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/23967)
<!-- Reviewable:end -->
2019-08-14 16:13:16 -04:00
Gregory Terzian
9acf3f6d4d windowproxy: prevent unnecessary calls to set_window 2019-08-14 22:02:44 +02:00
bors-servo
c47575535c
Auto merge of #23963 - asajeffrey:magicleap-grainier, r=Manishearth
Reduce magicleap servo screen resolution

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

Reduce the magicleap resolution from 720p to 480p. (Videos at 720p seem to lag.)

---
<!-- 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 we don't test native UI

<!-- 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/23963)
<!-- Reviewable:end -->
2019-08-14 10:54:19 -04:00
Mátyás Mustoha
72b273a746 Fix build error when using the 'webgl_backtrace' feature 2019-08-14 11:30:55 +02:00
bors-servo
d7433c9a65
Auto merge of #23853 - ferjm:media.update, r=ceyusa
Fix HTMLMediaElement seek race condition

- [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)

This depends on https://github.com/servo/media/pull/289 and it's blocked by the servo-media update issue mentioned [here](https://github.com/servo/servo/pull/23842#issuecomment-515007529)

<!-- 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/23853)
<!-- Reviewable:end -->
2019-08-14 02:03:52 -04:00
bors-servo
3aa55904d1
Auto merge of #23956 - nox:trim-layout, r=Manishearth
Remove more stuff from layout_2020

<!-- 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/23956)
<!-- Reviewable:end -->
2019-08-13 20:38:38 -04:00
Alan Jeffrey
b4565dd3e2 Reduce magicleap servo screen resolution 2019-08-13 13:50:50 -05:00
WPT Sync Bot
93a31731d9 Update web-platform-tests to revision 9f01716569ae5dfd79675ea55718e48017d077a8 2019-08-13 17:10:08 +00:00
Thomas Delacour
6027dd148a ISSUE-21803: implement ConstantSourceNode audionode 2019-08-13 10:13:05 -04:00
Fernando Jiménez Moreno
0865809e03 Clarify instructions for installing GStreamer dependencies on Windows 2019-08-13 13:45:11 +02:00
Anthony Ramine
053e361e2f Remove more stuff from layout_2020 2019-08-13 13:45:05 +02:00
Bastien Orivel
f7411db717 Update toml to 0.5 and cbindgen to 0.9 2019-08-13 13:26:13 +02:00
Bastien Orivel
62e46cf87c Force the std feature for log
While trying to build this crate with the gecko feature rust complained
about us using `log::set_boxed_logger` because it requires the std feature
which was not explicitly set in that crate.
2019-08-13 13:24:35 +02:00
Fernando Jiménez Moreno
1fbb3b39b0 Temporarily ignore duplicated url and deps crates 2019-08-13 09:43:06 +02:00
bors-servo
9b24798390
Auto merge of #23945 - Manishearth:hl-xr-immersive, r=asajeffrey
Immersive WebXR on Hololens

This PR adds support to the OpenXR backend (https://github.com/servo/webxr/pull/37) for Hololens. We support _entering_ immersive mode, but currently do nothing in immersive mode (https://github.com/servo/webxr/issues/38, applying https://github.com/servo/webxr/tree/d3d11-draw should render some red).

This should be ready to land as-is aside from its dependency on https://github.com/servo/servo/pull/23922. It can be tested on https://manishearth.github.io/webgl-to-webxr/webxr-ar.html (make sure to click through the alerts).

This is based on https://github.com/servo/servo/pull/23922 .

This builds off of @paulrouget's work.

r? @jdm @paulrouget

<!-- 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/23945)
<!-- Reviewable:end -->
2019-08-13 00:38:57 -04:00
Manish Goregaokar
c879ce078d Use packaged OpenXR 2019-08-12 19:28:48 -07:00
Manish Goregaokar
acfe1ee0dd Add support for OpenXR hololens backend 2019-08-12 19:28:48 -07:00
Alan Jeffrey
db4edaee87 Make the magicleap servo2d app 16x9 rather than square 2019-08-12 17:15:35 -05:00
Alan Jeffrey
4709a3061d Use the built-in laser pointer for magicleap 2019-08-12 11:26:46 -05:00
Fernando Jiménez Moreno
9ad66b6866 Update servo-media 2019-08-12 16:16:30 +02:00
Fernando Jiménez Moreno
322062bb3f Fix HTMLMediaElement seek race condition 2019-08-12 15:45:13 +02:00
bors-servo
9b4b02275e
Auto merge of #23949 - servo-wpt-sync:wpt_update_11-08-2019, r=servo-wpt-sync
Sync WPT with upstream (11-08-2019)

Automated downstream sync of changes from upstream as of 11-08-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/23949)
<!-- Reviewable:end -->
2019-08-11 17:50:27 -04:00
bors-servo
4b4414099a
Auto merge of #23950 - Eijebong:dupes-are-bad-for-you, r=jdm
Update rand to 0.6

I changed the isaac random to always be the 32 bits one because the 64
bits version doesn't work with ReseedingRng as it requires the
generator's output to be u32 for some reasons.

The other main change is that the reseed method doesn't exist anymore
and now rand recreates a new generator when it needs to reseed so I had
to add a new method for when we don't want a generator to be reseeded.

Closes #23558

<!-- 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/23950)
<!-- Reviewable:end -->
2019-08-11 15:40:54 -04:00
Bastien Orivel
c693ef7025 Update rand to 0.6
I changed the isaac random to always be the 32 bits one because the 64
bits version doesn't work with ReseedingRng as it requires the
generator's output to be u32 for some reasons.

The other main change is that the reseed method doesn't exist anymore
and now rand recreates a new generator when it needs to reseed so I had
to add a new method for when we don't want a generator to be reseeded.

Closes #23558
2019-08-11 20:50:22 +02:00
WPT Sync Bot
add1a306e5 Update web-platform-tests to revision 2f08203a98291809cf67839232d45e68752dcb25 2019-08-11 14:55:16 +00:00
bors-servo
07627c72cf
Auto merge of #23938 - Eijebong:clear-image-path, r=jdm
Move the clear-100x50.png image to the right directory

Also removes an unused duplicate of that file.

All the references to that file are made through
`/images/clear-100x50.png`. Since it didn't exist until now, the tests
were showing an empty expected result which confused me a bit while
debugging canvas issues.

<!-- 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/23938)
<!-- Reviewable:end -->
2019-08-11 08:45:26 -04:00
Bastien Orivel
1bf9df9354 Move the clear-100x50.png image to the right directory
Also removes an unused duplicate of that file.

All the references to that file are made through
`/images/clear-100x50.png`. Since it didn't exist until now, the tests
were showing an empty expected result which confused me a bit while
debugging canvas issues.
2019-08-11 14:38:27 +02:00
bors-servo
59f9a3d370
Auto merge of #23946 - servo-wpt-sync:wpt_update_10-08-2019, r=servo-wpt-sync
Sync WPT with upstream (10-08-2019)

Automated downstream sync of changes from upstream as of 10-08-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/23946)
<!-- Reviewable:end -->
2019-08-10 17:04:28 -04:00
George Roman
75efb09147 Initial actions support in WebDriver 2019-08-10 23:18:03 +03:00
bors-servo
2af31be4ec
Auto merge of #23944 - Manishearth:hl-scroll, r=jdm
Fix scrolling on hololens

This got inverted in https://github.com/servo/servo/pull/23900 by accident, mostly because the old code had two ordering mistakes that cancel each other out.

r? @jdm @paulrouget

<!-- 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/23944)
<!-- Reviewable:end -->
2019-08-10 14:21:07 -04:00
bors-servo
b01a4d0e29
Auto merge of #23940 - servo:fix-layout-2020, r=emilio
Always send epochs to webrender in layout 2020

<!-- 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/23940)
<!-- Reviewable:end -->
2019-08-10 12:03:34 -04:00
WPT Sync Bot
a45a4f8e2b Update web-platform-tests to revision ebeb032b23de5abb7f9fd7fffcf471eaa6e2c154 2019-08-10 14:35:44 +00:00
bors-servo
79b456d84e
Auto merge of #23725 - georgeroman:support_returning_arrays_from_execute_script, r=jdm
Support for returning array-like types from the Execute(Async)Script wd command

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

---
<!-- 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

<!-- 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/23725)
<!-- Reviewable:end -->
2019-08-10 10:28:07 -04:00
Anthony Ramine
6876245858 Always send epochs to webrender in layout 2020 2019-08-10 13:18:10 +02:00
George Roman
58f80f4ff3 Add support for returning array-like types from the Execute(Async)Script wd command 2019-08-10 12:39:10 +03:00
bors-servo
b3c0ed295f
Auto merge of #23922 - angelortiz1007:redir, r=jdm
Redirect stdout/stderr on windows

Added function redirect_stdout_stderr() to support stdout & stderr to be redirected to OutputDebugStringA().

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `23734` 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 #23734 (GitHub issue number if applicable)

<!-- Either: -->
- [X] There are tests for these changes OR
Functionality was verified by adding logic in unsafe fn init().  By building and running ServoApp, If  redirect_stdout_stderr() failed, a warn!() message would be sent to the "output" window of VS2007 with the GetLastError() value.   If the function redirect_stdout_stderr() succeeded, the println!("Capi/lib.rs: init() function called redirect_stdout_stderr() successfully.\n") output would be seen in the "output" window of VS2007.

- [ ] 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/23922)
<!-- Reviewable:end -->
2019-08-09 23:35:11 -04:00
bors-servo
18c500ecc8
Auto merge of #23942 - asajeffrey:magicleap-lreup, r=jdm
Updated Servo2D to LRE v0.22.0

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

Updated the Servo landscape app to Lumnin Runtime Editor v 0.22.0.

This is a bit of a mess, because it contains auto-generated files, hand-edited files, and best of all, files which are both.

---
<!-- 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 we don't have a way to test on magicleap

<!-- 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/23942)
<!-- Reviewable:end -->
2019-08-09 20:43:07 -04:00