mirror of
https://github.com/servo/servo.git
synced 2025-08-09 23:45:35 +01:00
style: Fix nested-pseudo-elements matching author rules better.
This makes *|*::marker do the intended thing in UA sheets, so I think it's better, and it's a bit less special-casey. We may want to re-introduce the changes for pseudo-elements at some point, depending on the WG decision, but this patch makes each_non_document_style_data consistent with the rule collector. The changes of each_non_document_style_data on their own should fix some bugs, but it doesn't because: * This is only hit for pseudos that allow user-action-state pseudo-classes. * The containing shadow check worked for them anyway. * We don't allow any pseudo after ::slotted() or that isn't tree-abiding per the CSS specs (we should maybe enable one of the moz-range stuff to be tree-abiding). So ::placeholder is the only one that right now fits the bill to trigger the bugs this would fix, but it doesn't since I couldn't make ::placeholder match :hover / :active / :focus anyhow (inside or outside a shadow tree). I've left the ProbeMarkerPseudoStyle changes for now since they are technically a bit more consistent than what was there before, but we could revert those if they cause trouble, we could rely on the UA rule matching, but we would need to change that if we allow the ::foo::before and such to match. Differential Revision: https://phabricator.services.mozilla.com/D29542
This commit is contained in:
parent
431b9d00f5
commit
272d9758d7
4 changed files with 26 additions and 9 deletions
|
@ -1405,7 +1405,7 @@ impl<'le> TElement for GeckoElement<'le> {
|
|||
|
||||
#[inline]
|
||||
fn matches_user_and_author_rules(&self) -> bool {
|
||||
!self.rule_hash_target().is_in_native_anonymous_subtree()
|
||||
!self.is_in_native_anonymous_subtree()
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue