mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
style: Store ::slotted rules separately on the cascade data, since they may cross the shadow boundary.
MozReview-Commit-ID: EY9nK3169vv
This commit is contained in:
parent
b26f3280d2
commit
5115cbd1c0
4 changed files with 161 additions and 51 deletions
|
@ -445,14 +445,22 @@ pub fn namespace_empty_string<Impl: SelectorImpl>() -> Impl::NamespaceUrl {
|
|||
pub struct Selector<Impl: SelectorImpl>(ThinArc<SpecificityAndFlags, Component<Impl>>);
|
||||
|
||||
impl<Impl: SelectorImpl> Selector<Impl> {
|
||||
#[inline]
|
||||
pub fn specificity(&self) -> u32 {
|
||||
self.0.header.header.specificity()
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn has_pseudo_element(&self) -> bool {
|
||||
self.0.header.header.has_pseudo_element()
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn is_slotted(&self) -> bool {
|
||||
self.0.header.header.is_slotted()
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn pseudo_element(&self) -> Option<&Impl::PseudoElement> {
|
||||
if !self.has_pseudo_element() {
|
||||
return None
|
||||
|
@ -1219,7 +1227,7 @@ where
|
|||
builder.push_combinator(combinator);
|
||||
}
|
||||
|
||||
Ok(Selector(builder.build(has_pseudo_element)))
|
||||
Ok(Selector(builder.build(has_pseudo_element, slotted)))
|
||||
}
|
||||
|
||||
impl<Impl: SelectorImpl> Selector<Impl> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue