Commit graph

46145 commits

Author SHA1 Message Date
Boris Chiou
2a7436481c style: Part 1: Add animation-timeline longhand property in style system
This patch adds the animation-timeline longhand property. For
shorthand, we will do that in the next patch.

This patch includes the aut-generated code in
devtools/shared/css/generated/properties-db.js, by `./mach devtools-css-db`.

Note:
1. we will use this property in Bug 1676791. For now, only make sure
   we parse it and serialize it correctly.
2. The syntax of animation-timeline may be updated, based on the spec
   issue: https://github.com/w3c/csswg-drafts/issues/6674.
   However, it's not a big problem to update it later, so we still can
   prototype this property based on the current version of spec.

Differential Revision: https://phabricator.services.mozilla.com/D126450
2023-05-30 23:26:04 +02:00
Oriol Brufau
7d8a87cd01 Further changes required by Servo 2023-05-30 23:26:03 +02:00
Emilio Cobos Álvarez
b0a356e3b3 style: Order keyframe rules by layer
@counter-style/@font-face/@scroll-timeline need similar fixes, but tests
for those haven't been synced yet so waiting for that before writing
them.

Differential Revision: https://phabricator.services.mozilla.com/D126616
2023-05-30 23:26:03 +02:00
Emilio Cobos Álvarez
6785ffea7b style: Unprefix -moz-fit-content
I'm not aware of any reason we shouldn't do this, as it is interoperable
with other browsers, and it causes compat issues from sites that forget
to use the prefixed version.

Note this removes some #[parse(aliases)]. These only affect devtools
autocomplete behavior, and we avoid autocompleting -moz-prefixed
keywords when possible, so even though it's a slight behavior change,
it's worth it.

Differential Revision: https://phabricator.services.mozilla.com/D126718
2023-05-30 23:26:03 +02:00
Stephen A Pohl
d830ec8562 style: Place window control buttons on the right side on macOS when using an RTL system locale, regardless of the Firefox locale
Differential Revision: https://phabricator.services.mozilla.com/D116921
2023-05-30 23:26:03 +02:00
Emilio Cobos Álvarez
2a42be3cc8 style: Print lock address on assert
Note that the crash reason is sanitized so we're not exposing anything
sensitive.

I think my patch just changed the signature of the stack, as it didn't
change anything related to guards or what not. But without knowing why
is failing or a repro it's hard to know what's going on.

Printing the address at list would give us some indication of what might
be going wrong (perhaps we're using a static lock when we don't expect
one or such?).

Differential Revision: https://phabricator.services.mozilla.com/D125948
2023-05-30 23:26:03 +02:00
Emilio Cobos Álvarez
75acb72256 style: Get rid of nsStackFrame
There are no legacy-stack uses anymore.

Differential Revision: https://phabricator.services.mozilla.com/D126077
2023-05-30 23:26:02 +02:00
Oriol Brufau
4de990e41a Further changes required by Servo 2023-05-30 23:26:02 +02:00
Boris Chiou
9e4535cb00 style: Part 5: Drop the unused effective_xxx_rules
It seems only effective_style_rules() and effective_viewport_rules() are
used. Let's drop the unused ones.

Differential Revision: https://phabricator.services.mozilla.com/D125905
2023-05-30 23:26:02 +02:00
Boris Chiou
b297c10fbf style: Part 3: Add CSSScrollTimelineRule for CSSOM
Implement CSSScrollTimelineRule CSSOM API.
https://drafts.csswg.org/scroll-animations-1/#the-css-scroll-timeline-rule-interface

We rely on the CSSOM API for testing. However, the wpt doesn't match the
current spec and it has some errors. We update the wpt and enable the
preference for testing in the next patch.

Differential Revision: https://phabricator.services.mozilla.com/D125766
2023-05-30 23:26:02 +02:00
Oriol Brufau
2a11460915 Further changes required by Servo 2023-05-30 23:26:02 +02:00
Boris Chiou
bb703e303d style: Part 2: Hook @scroll-timeline rule into style system
We add scroll-timeline rule into the stylesheet rule type, and add a new
perference to protect it: layout.css.scroll-linked-animations.enabled.

We will use this perference for animation-timeline property as well.

Differential Revision: https://phabricator.services.mozilla.com/D125765
2023-05-30 23:26:01 +02:00
Boris Chiou
111c8d616f style: Part 1: Implement @scroll-timeline in style system
Define the data structure for @scroll-timeline rule, the parsing code,
and the serialization.

Differential Revision: https://phabricator.services.mozilla.com/D125764
2023-05-30 23:26:01 +02:00
Emilio Cobos Álvarez
3e251f50fc style: Fix anonymous name handling in presence of stylesheet sharing
We need to compute the anonymous name on the fly while building the
CascadeData, otherwise we may see the same layer rule in two places due
to stylehseet sharing and make them incorrectly share a name.

Differential Revision: https://phabricator.services.mozilla.com/D125175
2023-05-30 23:26:01 +02:00
Emilio Cobos Álvarez
5fe148d5f1 style: Add some parsing and serialization tests for @layer
This uncovers some serialization bugs, and some missing null-checks
given the statement layer doesn't have a rule list.

Differential Revision: https://phabricator.services.mozilla.com/D125176
2023-05-30 23:26:01 +02:00
Oriol Brufau
35bf5f0b09 Further changes required by Servo 2023-05-30 23:26:01 +02:00
Emilio Cobos Álvarez
4522e7f94a style: Add experimental support for "e", "pi", and various trigonometric functions in calc()
I'll add some tests before enabling. Also, WebKit folks (who have
implemented cos() / tan() / sin()) said they will upstream their tests
to WPT, so I'll extend those with the inverse functions before landing
as well.

Differential Revision: https://phabricator.services.mozilla.com/D124990
2023-05-30 23:26:01 +02:00
Oriol Brufau
4f193fbf49 Further changes required by Servo 2023-05-30 23:26:00 +02:00
Emilio Cobos Álvarez
1e5806610b style: Don't consider system-ui valid for user font prioritization
Since the user can't configure it, at least from the UI (we could add UI
for it but it's unclear it'd be worth it).

Differential Revision: https://phabricator.services.mozilla.com/D125182
2023-05-30 23:26:00 +02:00
Emilio Cobos Álvarez
7108be870d style: Add a simple CSSLayerRule implementation
The specifics of how this is going to work are still getting spec'd /
discussed in https://github.com/w3c/csswg-drafts/issues/6576, but this
allows DevTools to work fine and the feature to be complete enough for
Nightly experimentation (with the other in-flight patches).

Otherwise devtools crashes when trying to inspect pages that use them.

Differential Revision: https://phabricator.services.mozilla.com/D124656
2023-05-30 23:26:00 +02:00
Emilio Cobos Álvarez
0cc049946e style: Fix layer statement with nested layer names
When we had:

  @layer A.B;

We were registering "A" and "B", not "A" and "A.B", which was the intention.

Fix is trivial.

Depends on D124620

Differential Revision: https://phabricator.services.mozilla.com/D124621
2023-05-30 23:26:00 +02:00
Oriol Brufau
a6f9a364db Further changes required by Servo 2023-05-30 23:23:17 +02:00
Emilio Cobos Álvarez
92092bf0aa style: Fix out of order child layer registration, and enable the tests
This makes layer order use a fixed set of bits per nesting level, to "reserve"
bits for children before they are registered.

See the comment in LayerOrder for the implementation limits it imposes, and
potential alternatives if these limits are not enough (but I think they should
be).

Enable the tests, as they mostly pass now (commit incoming to fix the remaining
ones).

Differential Revision: https://phabricator.services.mozilla.com/D124620
2023-05-30 23:09:44 +02:00
Oriol Brufau
f351d955ad Further changes required by Servo 2023-05-30 23:09:44 +02:00
Jonathan Kew
d299040d55 style: Fix the serialization order for the text-decoration shorthand to match the canonical order in the spec
Differential Revision: https://phabricator.services.mozilla.com/D124536
2023-05-30 23:09:44 +02:00
Oriol Brufau
f063308e33 Further changes required by Servo 2023-05-30 23:09:43 +02:00
Emilio Cobos Álvarez
6bc198b757 style: Implement @import layer|layer(<name>)
This works modulo the existing nested layer order bug. Will be covered
by WPT /css/css-cascade/layer-import.html once the feature is enabled (I
can probably enable it right away for those tests, but I'd rather fix
the obvious bugs first).

Differential Revision: https://phabricator.services.mozilla.com/D124538
2023-05-30 23:09:43 +02:00
Emilio Cobos Álvarez
3dc3fb9412 style: Plumb layer order through ApplicableDeclarationBlock, and make it have an effect
Same, I want to land this separately to see if it affects
micro-benchmarks. If so, we might want to pack the layer order
_somewhere_ (though in this case I'm not sure where, tbh).

With this, layer rules should have an effect on the page. There are
a few things missing before being able to enable them:

 * Fix nested layer order in some cases (when parent layers are declared
   out of order, see the previous commit mentioning this).
 * Some kind of OM representation, perhaps.
 * Tests of course, which are coming in bug 1728722 and bug 1727276.

But this should be enough to allow playing with them.

Depends on D124337

Differential Revision: https://phabricator.services.mozilla.com/D124338
2023-05-30 23:09:43 +02:00
Oriol Brufau
93fb8861ae Further changes required by Servo 2023-05-30 23:03:46 +02:00
bors-servo
4e1d3a801f
Auto merge of #29814 - Loirooriol:do-not-skip-css-logical, r=mrobinson
Stop skipping css-logical tests in layout-2020

<!-- 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 there is no change in 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. -->
2023-05-30 19:56:21 +02:00
Josh Matthews
b14b4726ac Assert that we're constructing. 2023-05-30 11:47:47 -04:00
Josh Matthews
62e0768635 Update test results. 2023-05-30 11:38:34 -04:00
Josh Matthews
56a8237ef4 Throw type error when calling DOM constructor without new. 2023-05-30 10:32:33 -04:00
Oriol Brufau
c1a9ff033a Stop skipping css-logical tests in layout-2020 2023-05-30 16:26:52 +02:00
Josh Matthews
43f5b4899b Update successful test results. 2023-05-30 08:58:09 -04:00
bors-servo
fc07c21276
Auto merge of #29811 - mrobinson:remove-more-python-2, r=jdm
Remove more Python 2 compatibility code

- os.environ is always `str` in Python 3.
- The only string type is `str` so we can stop using `six.str_types`.
- `iteritems()` isn't necessary because dicts have the `items()` method.

<!-- 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
- [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. -->
2023-05-29 18:15:28 +02:00
Martin Robinson
faa8c0e967
Remove more Python 2 compatibility code
- os.environ is always `str` in Python 3.
- The only string type is `str` so we can stop using `six.str_types`.
- `iteritems()` isn't necessary because dicts have the `items()` method.
2023-05-29 13:56:03 +02:00
bors-servo
cab7694b08
Auto merge of #29807 - sagudev:pyfail, r=mrobinson
Propagate status on `build_like_command_arguments`

As observed in #29805

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

<!-- 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. -->
2023-05-29 13:39:41 +02:00
bors-servo
9a93c21867
Auto merge of #29808 - mrobinson:no-features-for-test-unit, r=atbrakhi
Do not pass features when running `./mach test-unit`

<!-- 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
- [x] There are tests for these changes. They fix running the tests.

<!-- 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. -->
2023-05-29 11:14:06 +02:00
Martin Robinson
4d8c227774
Do not pass features when running ./mach test-unit 2023-05-29 10:09:54 +02:00
sagudev
f2e067099f Propagate status on build_like_command_arguments 2023-05-29 08:12:25 +02:00
Josh Matthews
ce023bea24 Don't root a Realm that's used for one call. 2023-05-29 00:47:31 -04:00
Josh Matthews
0e8ac3fdac Formatting. 2023-05-28 23:54:02 -04:00
Josh Matthews
dbff26bce0 Support arbitrary protos when wrapping DOM objects with constructors. 2023-05-28 23:23:12 -04:00
Josh Matthews
d9600ff50f Support arbitrary protos when wrapping EventTarget objects. 2023-05-28 23:23:12 -04:00
bors-servo
7d50362c72
Auto merge of #29802 - servo:wpt_update_28-05-2023, r=mukilan
Sync WPT with upstream (28-05-2023)

Automated downstream sync of changes from upstream as of 28-05-2023
[no-wpt-sync]
r? @servo-wpt-sync
2023-05-28 10:23:32 +02:00
cybai
4ee789a85c Remove unexpected TIMEOUTs 2023-05-28 16:53:14 +09:00
WPT Sync Bot
e80b99758c Update web-platform-tests to revision b'4c27189ed2db4ddad8e727d4ea9ae8329c3e1672' 2023-05-28 01:35:21 +00:00
bors-servo
d441afd9df
Auto merge of #29800 - mrobinson:only-check-gstreamer-install-for-builds, r=mukilan
Only check the GStreamer installation when building

Instead of always checking whether GStreamer is installed in mach's `build_env`, only do this when actually building. Also, use the instance variable to find features and look for the "media-gstreamer" feature instead of looking for !"media-dummy."

Fixes #29797.

<!-- 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
- [x] These changes fix #29797
- [x] These changes do not require tests because they are changes to the build scripts.

<!-- 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. -->
2023-05-27 15:33:06 +02:00
Martin Robinson
3fcff73f4d Only check the GStreamer installation when building
Instead of always checking whether GStreamer is installed in mach's
`build_env`, only do this when actually building. Also, use the instance
variable to find features and look for the "media-gstreamer" feature
instead of looking for !"media-dummy."

Fixes #29797.
2023-05-27 12:31:06 +02:00