mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Further changes required by Servo
This commit is contained in:
parent
4878422c93
commit
b05552369f
3 changed files with 35 additions and 25 deletions
|
@ -111,6 +111,7 @@ use std::cell::Cell;
|
|||
use std::default::Default;
|
||||
use std::fmt;
|
||||
use std::mem;
|
||||
use std::ops::Deref;
|
||||
use std::rc::Rc;
|
||||
use std::str::FromStr;
|
||||
use style::applicable_declarations::ApplicableDeclarationBlock;
|
||||
|
@ -3218,15 +3219,11 @@ impl<'a> SelectorsElement for DomRoot<Element> {
|
|||
Element::namespace(self) == Element::namespace(other)
|
||||
}
|
||||
|
||||
fn match_non_ts_pseudo_class<F>(
|
||||
fn match_non_ts_pseudo_class(
|
||||
&self,
|
||||
pseudo_class: &NonTSPseudoClass,
|
||||
_: &mut MatchingContext<Self::Impl>,
|
||||
_: &mut F,
|
||||
) -> bool
|
||||
where
|
||||
F: FnMut(&Self, ElementSelectorFlags),
|
||||
{
|
||||
) -> bool {
|
||||
match *pseudo_class {
|
||||
// https://github.com/servo/servo/issues/8718
|
||||
NonTSPseudoClass::Link | NonTSPseudoClass::AnyLink => self.is_link(),
|
||||
|
@ -3307,6 +3304,15 @@ impl<'a> SelectorsElement for DomRoot<Element> {
|
|||
fn is_html_slot_element(&self) -> bool {
|
||||
self.is_html_element() && self.local_name() == &local_name!("slot")
|
||||
}
|
||||
|
||||
fn set_selector_flags(&self, flags: ElementSelectorFlags) {
|
||||
#[allow(unsafe_code)]
|
||||
unsafe {
|
||||
Dom::from_ref(self.deref())
|
||||
.to_layout()
|
||||
.insert_selector_flags(flags);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Element {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue