style: Handle nested slots correctly in slotted matching and invalidation.

The patch and test should be pretty much self-descriptive.

Differential Revision: https://phabricator.services.mozilla.com/D14063
This commit is contained in:
Emilio Cobos Álvarez 2018-12-13 02:17:53 +00:00
parent a519d9ecc3
commit 7f5a9e0f45
3 changed files with 45 additions and 17 deletions

View file

@ -11,9 +11,8 @@ use crate::parser::SelectorImpl;
use std::fmt::Debug;
use std::ptr::NonNull;
/// Opaque representation of an Element, for identity comparisons. We use
/// NonZeroPtrMut to get the NonZero optimization.
#[derive(Clone, Debug, Eq, Hash, PartialEq)]
/// Opaque representation of an Element, for identity comparisons.
#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)]
pub struct OpaqueElement(NonNull<()>);
unsafe impl Send for OpaqueElement {}