Commit graph

41280 commits

Author SHA1 Message Date
Anthony Ramine
7f54d14904 Make the rule tree actually threadsafe
RuleTree::gc is now a safe method that any thread can call
at any time, and StrongRuleNode values can all be dropped
whenever their owner want to, on any thread.
2020-04-20 17:39:19 +02:00
Anthony Ramine
1c2de5641c Change Map::get_or_insert_with to Map::entry 2020-04-20 14:17:14 +02:00
bors-servo
306e8ac5f9
Auto merge of #25853 - asajeffrey:surfmanup, r=jdm
Replace glutin by winit + surfman 0.2

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

This PR updates surfman to 0.2, and replaces glutin with winit+surfman.

---
<!-- 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 this should all be invisible

<!-- 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. -->
2020-04-18 21:03:25 -04:00
bors-servo
00ac447966
Auto merge of #26220 - servo:layout-2020-rule-tree-new-on-write, r=emilio
Always upgrade existing weak child references in the rule tree

Just because we didn't find a child when read-locking a node children list
doesn't mean it still won't exist while we wait to upgrade the read lock
into a write lock to create the child.
2020-04-18 14:06:19 -04:00
bors-servo
3a1531f18f
Auto merge of #26214 - mrobinson:animation-eliminate-animation-frame, r=emilio
Eliminate `AnimationFrame`

This intermediate data structure doesn't really buy us anything and is a
bit confusing.

<!-- 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
- [ ] These changes fix #___ (GitHub issue number if applicable)

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because they do not change behavior.

<!-- 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. -->
2020-04-18 10:34:44 -04:00
Martin Robinson
a0b495750e Eliminate AnimationFrame
This intermediate data structure doesn't really buy us anything and is a
bit confusing.
2020-04-18 13:48:52 +02:00
Anthony Ramine
c113fbb640 Always upgrade existing weak child references in the rule tree
Just because we didn't find a child when read-locking a node children list
doesn't mean it still won't exist while we wait to upgrade the read lock
into a write lock to create the child.
2020-04-18 12:11:34 +02:00
bors-servo
c6ec063a31
Auto merge of #26217 - servo:jdm-patch-40, r=asajeffrey
Disable RUST_BACKTRACE in unit tests on macOS.

This works around #26192 which is a new relatively frequent intermittent crash on CI.
2020-04-18 02:59:52 -04:00
bors-servo
7799dccb25
Auto merge of #26218 - emilio:gecko-sync, r=emilio
style: Sync changes from mozilla-central.

See individual commits for details.

This fixes some rebase mistakes from #26201 and such.
2020-04-18 01:31:29 -04:00
Alan Jeffrey
8bb1732258 Update surfman to 0.2 and remove glutin 2020-04-17 23:44:53 -05:00
Emilio Cobos Álvarez
ee8e98bc04 style: Run rustfmt. 2020-04-18 03:48:22 +02:00
Emilio Cobos Álvarez
b80d79863c style: Fix some rebase messups from the rule tree refactoring.
This code was all long gone already from Gecko :)
2020-04-18 03:48:21 +02:00
Emilio Cobos Álvarez
83ea321096 style: Implement parsing / selector-matching for :is() and :where().
This implements the easy / straight-forward parts of the :where / :is
selectors.

The biggest missing piece is to handle properly invalidation when there
are combinators present inside the :where. That's the hard part of this,
actually.

But this is probably worth landing in the interim. This fixes some of
the visitors that were easy to fix.

Differential Revision: https://phabricator.services.mozilla.com/D70788
2020-04-18 03:48:15 +02:00
bors-servo
66f14773c6
Auto merge of #26207 - servo:jdm-patch-36, r=Manishearth
Publish new UWP package

This fixes an issue where the latest UWP package is published at http://download.servo.org/nightly/uwp/servo-latest.0.0.0_Test.zip because the full filename contains "1.0.0.0" and we don't detect file extensions correctly.
2020-04-17 19:30:04 -04:00
Josh Matthews
0e158b1129
Rename taskcluster artifact for UWP. 2020-04-17 19:29:36 -04:00
Josh Matthews
b54b3aca64
Disable RUST_BACKTRACE in unit tests on macOS. 2020-04-17 18:20:35 -04:00
bors-servo
37c53c4ea8
Auto merge of #26201 - servo:layout-2020-fix-rule-tree, r=emilio
Refactor style rule tree, without actually fixing its !Send behaviour yet
2020-04-17 17:24:22 -04:00
bors-servo
c9480c8e07
Auto merge of #23661 - julientregoat:i-21289, r=jdm
Refactor ImageCache::find_image_or_metadata -> ImageCache::{get_image, track_image}

<!-- Please describe your changes on the following line: -->
Updated the `ImageCache` trait to replace `find_image_or_metadata` with two new functions `track_image` and `get_image`, as well as a new enum (`ImageCacheResult`).

As a result, I was able to refactor the functions that previously called `find_image_or_metadata` pretty cleanly. For a list of these functions, please see the commit information.

---
<!-- 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 #21289  (GitHub issue number if applicable)

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because tests already exist for these components. I ran `cargo test` in `net`, `net_traits`, `layout`, and `script` successfully.

<!-- 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/23661)
<!-- Reviewable:end -->
2020-04-17 15:56:30 -04:00
bors-servo
aa37904bbd
Auto merge of #26196 - jdm:stdout-log, r=Manishearth
Dump all UWP logging output to a file

These changes ensure that we keep getting debug output in the VS output window, but we also write each message to a file in the app's local data directory. These changes also extend the C API a bit to support more generic logging facilities, removing some of the Windows-specific nature of the VSLogger. Fixes part of #23813.
2020-04-17 14:45:32 -04:00
Josh Matthews
6a73c5b23c Dump all stdout/stderr/logging output to a file. 2020-04-17 14:44:50 -04:00
bors-servo
71940ff28c
Auto merge of #26200 - mrobinson:animation-iterator, r=emilio
style: Add an iterator for transition properties

This simplifies the code a bit and also will allow us to more easily
make improvements to servo's animation implementation in the future.

<!-- 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
- [ ] These changes fix #___ (GitHub issue number if applicable)

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because they should not change behavior.

<!-- 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. -->
2020-04-17 13:42:46 -04:00
Josh Matthews
d4e85f9a90 Don't continually re-request completed requests that had load errors. 2020-04-17 11:59:00 -04:00
Julien Tregoat
2742fd2bea Refactor ImageCache::find_image_or_metadata API. 2020-04-17 11:58:18 -04:00
Josh Matthews
15751b13fd Only create UWP archive if the app packages are signed. 2020-04-17 11:34:25 -04:00
Josh Matthews
699cf5b29b Remove version number from generated UWP archive. 2020-04-17 11:32:36 -04:00
bors-servo
9dbc6554f0
Auto merge of #26209 - servo-wpt-sync:wpt_update_17-04-2020, r=servo-wpt-sync
Sync WPT with upstream (17-04-2020)

Automated downstream sync of changes from upstream as of 17-04-2020.
[no-wpt-sync]
r? @servo-wpt-sync
2020-04-17 10:31:15 -04:00
Martin Robinson
fad79a724c Add an iterator for transition properties
This simplifies the code a bit and also will allow us to more easily
make improvements to servo's animation implementation in the future.
2020-04-17 15:11:49 +02:00
WPT Sync Bot
21de781e2a Update web-platform-tests to revision 20a217cb8488e4339e0c9610aba99e2654b676c3 2020-04-17 11:03:49 +00:00
Anthony Ramine
a30da7ad8e Introduce a new type UnsafeBox<T> in the rule tree
This lets us rely less on raw pointers, thus better tracking the lifetime
of the rule node values while dropping strong references etc.
2020-04-17 12:41:10 +02:00
Anthony Ramine
bc4e2942bf Make StrongRuleNode::downgrade be unsafe 2020-04-17 12:41:09 +02:00
Anthony Ramine
fb28ce6bbe Make StrongRuleNode::ensure_child take a StrongRuleNode for the root 2020-04-17 12:41:09 +02:00
Anthony Ramine
37c70609f9 Remove WeakRuleNode::clone
MallocSizeOf for RuleTree should not keep around weak references in
case someone runs a GC meanwhile.
2020-04-17 12:41:09 +02:00
Anthony Ramine
e06e164571 Make WeakRuleNode::from_ptr be unsafe 2020-04-17 12:41:09 +02:00
Anthony Ramine
05accaa7bd Make StrongRuleNode::from_ptr be unsafe 2020-04-17 12:41:08 +02:00
Anthony Ramine
e5cb3d2a4c Move the meat of the rule tree to a submodule "core" 2020-04-17 12:41:08 +02:00
Anthony Ramine
1ea6a0cdd4 Move CascadeLevel to its own rule_tree submodule 2020-04-17 11:43:39 +02:00
Anthony Ramine
13db0c1584 Refactor rule tree children
We move the data structure to its own module for better
encapsulation of unsafe code.
2020-04-17 11:43:38 +02:00
bors-servo
3ca86eeba5
Auto merge of #26206 - Manishearth:vcvars, r=jdm
Add VCINSTALLDIR to the 'do not run within vcvarsall' check

Servo is able to run with VSINSTALLDIR set, but not VCINSTALLDIR, since cc-rs takes it to mean vcvarsall has been called.

As far as I can tell servo is able to build with a custom VS install without needing help finding it (aside from perhaps VSINSTALLDIR), since many tools use a non-env var method of finding VS.

r? @jdm
2020-04-16 21:23:23 -04:00
bors-servo
d1f1371509
Auto merge of #26205 - jdm:no-shutdown, r=Manishearth
Don't shutdown the app when it's suspended.

Fixes #26162. Fixes https://github.com/servo/webxr/issues/155.
2020-04-16 18:56:14 -04:00
Manish Goregaokar
015805de65 Add VCINSTALLDIR to the 'do not run within vcvarsall' check 2020-04-16 14:51:34 -07:00
Josh Matthews
0491933fb0
Update UWP package version to 1.1.0.0. 2020-04-16 17:46:10 -04:00
Josh Matthews
03e6787bf9
Find upload package extension correctly. 2020-04-16 17:45:14 -04:00
Josh Matthews
a779db57f4 Don't shutdown the app when it's suspended. 2020-04-16 16:57:47 -04:00
bors-servo
2829945963
Auto merge of #26202 - emilio:gecko-sync, r=emilio
style: Sync changes from mozilla-central.

See individual commits for details.

https://bugzilla.mozilla.org/show_bug.cgi?id=1630676
2020-04-16 16:35:43 -04:00
Emilio Cobos Álvarez
b25865c664 Fix WPT expectations. 2020-04-16 21:25:34 +02:00
Emilio Cobos Álvarez
124f462d09 python: Use updated mako path in package_commands.py. 2020-04-16 21:25:16 +02:00
Emilio Cobos Álvarez
3d1df8dce7 style: Fix two regressions from #26113. 2020-04-16 21:16:02 +02:00
bors-servo
7d3617a0d4
Auto merge of #26198 - Manishearth:vcvarsall-fail, r=jdm
Report error when vcvarsall fails

In trying to get my Windows cross build working on my desktop, I ended up spending a lot of time trying to replicate a failure within servo's build system that ultimately turned out to be vcvarsall silently failing (I was missing a trailing slash in my `VSINSTALLDIR` env var, which vcvarsall does not handle well at all)

We should report an error when this happens.

r? @jdm
2020-04-16 15:05:42 -04:00
Manish Goregaokar
371ba67d55 Report error when vcvarsall fails 2020-04-16 10:01:17 -07:00
Emilio Cobos Álvarez
35f872e2d9 style: appease tidy. 2020-04-16 18:34:36 +02:00