mirror of
https://github.com/servo/servo.git
synced 2025-08-15 10:25:32 +01:00
style: Cleanup selector-matching for nested pseudo-elements, match ::slotted 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
This commit is contained in:
parent
272d9758d7
commit
43444db8a8
9 changed files with 35 additions and 38 deletions
|
@ -734,10 +734,7 @@ impl<'a, 'b: 'a> StyleAdjuster<'a, 'b> {
|
|||
E: TElement,
|
||||
{
|
||||
if cfg!(debug_assertions) {
|
||||
if element
|
||||
.and_then(|e| e.implemented_pseudo_element())
|
||||
.is_some()
|
||||
{
|
||||
if element.map_or(false, |e| e.is_pseudo_element()) {
|
||||
// It'd be nice to assert `self.style.pseudo == Some(&pseudo)`,
|
||||
// but we do resolve ::-moz-list pseudos on ::before / ::after
|
||||
// content, sigh.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue