| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
This is a missing check I should've introduced in bug 1632647.
Differential Revision: https://phabricator.services.mozilla.com/D76161
|
|
|
|
|
|
| |
parent selectors.
Differential Revision: https://phabricator.services.mozilla.com/D75856
|
|
|
|
|
|
|
| |
We can only collect hashes from single-length selectors, as described in
the comment.
Differential Revision: https://phabricator.services.mozilla.com/D71458
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Differential Revision: https://phabricator.services.mozilla.com/D48753
|
| |
|
|
|
|
|
|
|
| |
Unlike for :host() or ::slotted(), or regular rules, we don't need a whole
SelectorMap<>, so gotta make the code a bit more generic.
Differential Revision: https://phabricator.services.mozilla.com/D32646
|
|
|
|
|
|
|
|
| |
This grows the selector struct, but only in 32-bit, since in 64-bit we take
space from the alignment padding that we're paying due to having the size of the
slice as a word.
Differential Revision: https://phabricator.services.mozilla.com/D32645
|
|
|
|
|
|
|
|
|
|
|
| |
correctly when there's no selector before it, and add tests.
D29542 fixed the bogus checks that was making nested pseudo-elements match
author rules. This adds tests and ends up being just a cleanup, though as it
turns out we it also fixes an issue with ::slotted() matched from
Element.matches.
Differential Revision: https://phabricator.services.mozilla.com/D27529
|
| |
|
|
|
|
|
|
| |
Disabled for now of course. This should be pretty uncontroversial I'd think.
Differential Revision: https://phabricator.services.mozilla.com/D28060
|
|
|
|
|
|
|
|
| |
I'm going to unconditionally generate the PseudoElement combinator, and this
causes issues since we'll put the raw `::pseudo` selectors in the host bucket,
which is obviously wrong.
Differential Revision: https://phabricator.services.mozilla.com/D27528
|
|
|
|
|
|
| |
Now that they're not exposed to the web we can remove this special case.
Differential Revision: https://phabricator.services.mozilla.com/D28071
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
::slotted() is already weird in the sense that it supports a pseudo-element
afterwards (so ::slotted(*)::before is valid for example).
::part() is weirder because you are supposed to allow stuff like
::part(foo):hover, ::part(foo):hover::before, etc.
In order to avoid making the already-complex parse_compound_selector more
complex, shuffle stuff so that we pass the progress of our current compound
selector around, and is the parsing code for each selector which decides whether
it's ok to parse at the given point.
Differential Revision: https://phabricator.services.mozilla.com/D27158
|
| |
|
|
|
|
| |
Differential Revision: https://phabricator.services.mozilla.com/D17197
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
namespace.
Differential Revision: https://phabricator.services.mozilla.com/D14493
|
|
|
|
|
|
|
|
| |
We could keep using ParsedCaseSensitivity::CaseSensitive as a temporary stand-in
for "case-sensitive or maybe not depending on what HTML says" until we check the
attribute list, but it seems better to make that explicit.
Differential Revision: https://phabricator.services.mozilla.com/D14093
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
See https://github.com/w3c/csswg-drafts/issues/3150 for the issue that would
expand this to all pseudos.
Differential Revision: https://phabricator.services.mozilla.com/D9994
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This implements the selector(<complex-selector>) syntax for @supports.
See https://github.com/w3c/csswg-drafts/issues/3207 for explainer and
discussion.
Probably would should wait for that to be sorted out to land this, or maybe we
should put it behind a pref to get the code landed and change our
implementation if the discussion there leads to a change.
Differential Revision: https://phabricator.services.mozilla.com/D8864
|
| |
|
|
|
|
|
|
|
| |
This saves about 37 KiB of memory across the UA style sheets.
Bug: 1475197
Reviewed-by: emilio
|
|
|
|
|
|
| |
Bug: 1471063
Reviewed-by: xidorn
MozReview-Commit-ID: 959U7yd5W9j
|
|
|
|
|
|
| |
Bug: 1471063
Reviewed-by: xidorn
MozReview-Commit-ID: GPlUAx7YXVb
|
|
|
|
|
|
| |
Bug: 1416282
Reviewed-by: xidorn
MozReview-Commit-ID: GTnFyZnXR84
|
|
|
|
|
|
|
|
| |
Imported WebKit's test as a WPT.
Bug: 1465291
Reviewed-by: xidorn
MozReview-Commit-ID: 19ZThuoqKLW
|
|
|
|
|
|
|
|
|
|
| |
This was generated with:
./mach cargo fmt --package selectors &&
./mach cargo fmt --package servo_arc &&
./mach cargo fmt --package style
Using rustfmt 0.4.1-nightly (a4462d1 2018-03-26)
|
| |
|
|
|
|
|
|
|
|
|
| |
We could invalidate in a slightly more fine-grained way, but I don't think it's
worth the churn vs. keeping the special-cases minimal.
Bug: 1452640
Reviewed-by: xidorn
MozReview-Commit-ID: 5DkQrgwg9GW
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Kinda tricky because :host only matches rules on the shadow root where the rules
come from. So we need to be careful during invalidation and style sharing.
I didn't use the non_ts_pseudo_class_list bits because as soon as we implement
the :host(..) bits we're going to need to special-case it anyway.
The general schema is the following:
* Rightmost featureless :host selectors are handled inserting them in the
host_rules hashmap. Note that we only insert featureless stuff there. We
could insert all of them and just filter during matching, but that's slightly
annoying.
* The other selectors, like non-featureless :host or what not, are added to the
normal cascade data. This is harmless, since the shadow host rules are never
matched against the host, so we know they'll just never match, and avoids
adding more special-cases.
* Featureless :host selectors to the left of a combinator are handled during
matching, in the special-case of next_element_for_combinator in selectors.
This prevents this from being more invasive, and keeps the usual fast path
slim, but it's a bit hard to match the spec and the implementation.
We could keep a copy of the SelectorIter instead in the matching context to
make the handling of featureless-ness explicit in match_non_ts_pseudo_class,
but we'd still need the special-case anyway, so I'm not fond of it.
* We take advantage of one thing that makes this sound. As you may have
noticed, if you had `root` element which is a ShadowRoot, and you matched
something like `div:host` against it, using a MatchingContext with
current_host == root, we'd incorrectly report a match. But this is impossible
due to the following constraints:
* Shadow root rules aren't matched against the host during styling (except
these featureless selectors).
* DOM APIs' current_host needs to be the _containing_ host, not the element
itself if you're a Shadow host.
Bug: 992245
Reviewed-by: xidorn
MozReview-Commit-ID: KayYNfTXb5h
|
| |
|
|
|
|
| |
These warn with the next Nightly.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|