Commit graph

368 commits

Author SHA1 Message Date
bors-servo
fbe102fe6c
Auto merge of #29364 - delan:selectors-servo_arc, r=jdm
Release selectors 0.24.0 and servo_arc 0.2.0

This patch extends #29361, bumping selectors to 0.24.0 and servo_arc to 0.2.0.

We’ll need to publish them too, in order to close #29105.

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because there are no functional changes
2023-02-20 16:53:35 +01:00
sagudev
9c2cc05a8e Upgrade remaining components to edition 2018 2023-02-18 09:42:37 +01:00
Delan Azabani
e75cc39238 sync versions of to_shmem + to_shmem_derive with dummy releases 2023-02-16 16:48:12 +08:00
Delan Azabani
6ee10ca762 Release selectors 0.24.0 and servo_arc 0.2.0 2023-02-15 14:07:12 +08:00
Federico Mena Quintero
c78af6a32f selectors/*.rs - Put all the to_shmem attributes behind a "shmem" feature 2023-02-14 13:05:59 -06:00
Federico Mena Quintero
9dae402dc5 selectors/Cargo.toml: Gate the_shmem/to_shmem_derive deps behind a new "shmem" feature
ToShmem is of interest only to Servo, not to the public selectors
crate.
2023-02-14 11:38:36 -06:00
Alex Touchet
967601bade Remove some badges 2023-01-19 19:38:30 -08:00
Lewin Probst
976f5b76bc Updated cssparser dependency to 0.29.
Signed-off-by: Lewin Probst <info@emirror.de>
2021-11-18 16:16:46 +01:00
Michael Howell
c9fa1e9fc1
Add docs that say, somewhere, what non_ts means 2021-10-08 16:35:32 -07:00
Bastien Orivel
20a3a09b54 Bump selectors
Releasing this will help updating dependencies in crates that depend on
selectors.
2021-04-21 18:50:20 +02:00
Emilio Cobos Álvarez
aa4d2b0b0d selectors: Cherry-pick some fixes that got lost. 2021-02-27 05:58:37 +01:00
Emilio Cobos Álvarez
31e8e418ea Miscellaneous build / tidy fixes. 2021-02-26 17:53:55 +01:00
Emilio Cobos Álvarez
484cf5771b style: Avoid some allocations in selector serialization.
The allocations in display_to_css_identifier show up in the profiles of
bug 1675628.

Differential Revision: https://phabricator.services.mozilla.com/D97856
2021-02-26 16:44:05 +01:00
Mihai Alexandru Michis
e9c1d490a9 style: Fix lint error in matching.rs a=lint-fix
CLOSED TREE
2021-02-26 16:44:05 +01:00
Sylvestre Ledru
a95ce79554 style: Fix clippy warnings
Depends on D96634

Differential Revision: https://phabricator.services.mozilla.com/D96636
2021-02-26 16:44:05 +01:00
Emilio Cobos Álvarez
191d5226a3 style: Implement complex :not().
This fixes the failures in bug 1671573 and just works thanks to the
invalidation improvements I did for :is / :where.

Added a couple tests for invalidation which is the tricky bit. 001 is a
very straight-forward test, 002 is the :is test but with :is() replaced
by double-:not().

This also fixes default namespaces inside :is() / :where(), which are
supposed to get ignored, but aren't. Added tests for that and for the
pre-existing :not() behavior which Chrome doesn't quite get right.

Differential Revision: https://phabricator.services.mozilla.com/D94142
2021-02-26 16:44:05 +01:00
Emilio Cobos Álvarez
7e6d70f314 style: Allow :is() and :where() to have better error recovery.
Adjust is-where-parsing.html to work with both the new and old behavior,
and add a test for the new behavior.

Depends on D90049

Differential Revision: https://phabricator.services.mozilla.com/D90050
2021-02-26 16:44:05 +01:00
Mihai Alexandru Michis
b1dbbb2969 Backed out 2 changesets (bug 1664718) for causing wpt and bc failures.
CLOSED TREE

Backed out changeset 62e71d3b6b32 (bug 1664718)
Backed out changeset c8a8791a26ed (bug 1664718)
2021-02-26 16:44:05 +01:00
Emilio Cobos Álvarez
6728aad0c6 style: Fix selectors unit tests.
MANUAL PUSH: Fix BR bustage. CLOSED TREE
2021-02-26 16:44:05 +01:00
Emilio Cobos Álvarez
5980525139 style: Allow :is() and :where() to have better error recovery.
Adjust is-where-parsing.html to work with both the new and old behavior,
and add a test for the new behavior.

Depends on D90049

Differential Revision: https://phabricator.services.mozilla.com/D90050
2021-02-26 16:44:05 +01:00
Emilio Cobos Álvarez
89c2e39dd9 style: Minor cleanup: Use shorthand initialization in selectors.
Differential Revision: https://phabricator.services.mozilla.com/D90049
2021-02-26 16:44:05 +01:00
Masatoshi Kimura
639bada63a style: Replace :-moz-native-anonymous-no-specificity with :where(:-moz-native-anonymous).
Differential Revision: https://phabricator.services.mozilla.com/D88255
2021-02-26 16:44:05 +01:00
Emilio Cobos Álvarez
9ce200a924 style: Implement :-moz-any() as an alias of :is().
This is strictly better and more flexible, but can change specificity so
have a pref in case it causes trouble. I doubt it will though, the
specificity rules of :is() make more sense, and my gut feeling is that
:-moz-any is not very used on the wild.

Make it early-beta-or-earlier for now to minimize risk, once this is on
nightly for a bit we can enable it everywhere.

Differential Revision: https://phabricator.services.mozilla.com/D86696
2021-02-26 16:44:05 +01:00
Camelid
b8b7049aa2 Fix typo 2020-07-01 13:49:28 -07:00
Emilio Cobos Álvarez
762abbaf9f
style: Rustfmt recent changes. 2020-06-04 02:02:50 +02:00
Emilio Cobos Álvarez
4cf9aeeaf7 style: Manually tweak inlining in stateless pseudo selector matching.
This addresses a minor regression in bloom-matching.html. The common
case here is that there's no selector to the right of the
pseudo-element, so keep that path inline, while keeping all other checks
out of line.

Differential Revision: https://phabricator.services.mozilla.com/D76793
2020-06-04 01:50:36 +02:00
Emilio Cobos Álvarez
bd23e05c47 style: Fix a no-longer valid assumption in pseudo-element matching / invalidation code.
After bug 1632647, we can have pseudo-classes inside :not / :is /
:where, which the invalidation and matching code weren't handling.

Add a few tests for this stuff working as expected.

Differential Revision: https://phabricator.services.mozilla.com/D76160
2020-06-04 01:50:36 +02:00
Emilio Cobos Álvarez
a40b2b610a style: Fix a case where we'd allow parsing functional :host incorrectly.
This is a missing check I should've introduced in bug 1632647.

Differential Revision: https://phabricator.services.mozilla.com/D76161
2020-06-04 01:50:36 +02:00
Emilio Cobos Álvarez
a457a2261b style: Fix parsing of :is() and :where() to account for constraints from parent selectors.
Differential Revision: https://phabricator.services.mozilla.com/D75856
2020-06-04 01:50:36 +02:00
Emilio Cobos Álvarez
21d48e00cc style: Collect ancestor hashes from single-length :is and :where selector lists.
We can only collect hashes from single-length selectors, as described in
the comment.

Differential Revision: https://phabricator.services.mozilla.com/D71458
2020-06-04 01:50:36 +02:00
atouchet
77f7fa552d More Cargo.toml updates 2020-05-30 18:18:57 -07: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
Emilio Cobos Álvarez
f76acc84c6 style: Reformat recent changes. 2020-04-16 17:50:17 +02:00
Emilio Cobos Álvarez
846996ae7e style: Make :host::part work in the same shadow tree as the part.
Differential Revision: https://phabricator.services.mozilla.com/D68249
2020-04-16 16:35:07 +02:00
Emilio Cobos Álvarez
0514059618 style: Don't append the default namespace for featureless host selectors.
Per the spec it shouldn't match, and the front-end has been bitten by this
multiple times.

Differential Revision: https://phabricator.services.mozilla.com/D68213
2020-04-16 16:35:07 +02:00
Emilio Cobos Álvarez
635f5fbf1b style: Allow to export a shadow part under multiple names.
Other browsers allow this and the spec doesn't really disallow it, so fix it,
add a test and carry on.

Differential Revision: https://phabricator.services.mozilla.com/D65107
2020-04-16 16:35:07 +02:00
Simon Sapin
db4f27f361 Use the matches! macro from the standard library 2020-02-12 10:08:31 +01:00
Emilio Cobos Álvarez
151fe4a0d0
Bump selectors. 2019-12-18 14:36:47 +01:00
Emilio Cobos Álvarez
ef16c5844f Rustfmt recent changes. 2019-12-16 14:23:56 +01:00
Emilio Cobos Álvarez
ad61cae6b0 style: Update smallvec to 1.0.
Differential Revision: https://phabricator.services.mozilla.com/D56044
2019-12-16 14:23:56 +01:00
Cameron McCormack
6973317a58 style: Correctly style dark scrollbars in tree components.
We need to ensure the rules that override all properties for scrollbar
part elements only apply to those that are NAC (and so will be eligible
for NAC style sharing).  We have some uses of non-NAC <scrollbar>
elements that should continue to inherit properties from their parents.

To avoid any changes in rule matching order that come with changing specificity,
we add a new :-moz-native-anonymous-no-specificity pseudo-class.

While we're here, we note :-moz-native-anonymous-no-specificity (and the
regular :-moz-native-anonymous pseudo-class) as not needing style
sharing cache revalidation, as we never share NAC styles.

Differential Revision: https://phabricator.services.mozilla.com/D56154
2019-12-16 14:23:56 +01:00
Emilio Cobos Álvarez
baa9ac1903 style: Update derive_more.
Differential Revision: https://phabricator.services.mozilla.com/D56043
2019-12-16 14:23:56 +01:00
Emilio Cobos Álvarez
f8e924f86a
style: Don't specify minor version for cssparser. 2019-11-30 20:45:06 +01:00
Emilio Cobos Álvarez
e3009a4de9
style: Implement shadow part forwarding (minus invalidation).
Some of the stuff, in particular inside GeckoBindings stuff should be
refactored to be less ugly and duplicate a bit less code, but the rest of the
code should be landable as is.

Some invalidation changes are already needed because we weren't matching with
the right shadow host during invalidation (which made existing ::part() tests
fail).

Pending invalidation work:

 * Making exportparts work right on the snapshots.
 * Invalidating parts from descendant hosts.

They're not very hard but I need to think how to best implement it:

 * Maybe get rid of ShadowRoot::mParts and just walk DOM descendants in the
   Shadow DOM.

 * Maybe implement a ElementHasExportPartsAttr much like HasPartAttr and use
   that to keep the list of elements.

 * Maybe invalidate :host and ::part() together in here[1]

 * Maybe something else.

Opinions?

[1]: https://searchfox.org/mozilla-central/rev/131338e5017bc0283d86fb73844407b9a2155c98/servo/components/style/invalidation/element/invalidator.rs#561

Differential Revision: https://phabricator.services.mozilla.com/D53730
2019-11-30 20:45:03 +01:00
bors-servo
b0f573b59f
Auto merge of #24877 - atouchet:master, r=jdm
Update some URLs

<!-- 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. -->
2019-11-27 02:27:19 -05:00
Alex Touchet
56922b70d5
Update some URLs 2019-11-26 17:12:49 -08:00
Emilio Cobos Álvarez
5f30ecc9b1 style: Remove some XBL code in the style system.
Differential Revision: https://phabricator.services.mozilla.com/D50554
2019-11-04 13:36:32 +01:00
Emilio Cobos Álvarez
7965ddefa6 style: Support multiple parts in ::part() selectors.
Differential Revision: https://phabricator.services.mozilla.com/D48753
2019-11-04 13:36:32 +01:00
Anthony Ramine
785a344e32 Update rand to 0.7 (fixes #24448) 2019-10-23 15:34:48 +02:00
Emilio Cobos Álvarez
9eaadc6860 style: Shutdown Servo's thread-pool in leak-checking builds, leak the atom table elsewhere.
Differential Revision: https://phabricator.services.mozilla.com/D44217
2019-09-12 22:34:16 +02:00