Revert "Backport several style changes from Gecko (5) (#30099)" (#30104)

This reverts commit 8e15389cae.
This commit is contained in:
Oriol Brufau 2023-08-16 08:24:42 +02:00 committed by GitHub
parent 8e15389cae
commit d6ae8dc112
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
152 changed files with 4622 additions and 5862 deletions

View file

@ -111,7 +111,6 @@ 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;
@ -3219,11 +3218,15 @@ impl<'a> SelectorsElement for DomRoot<Element> {
Element::namespace(self) == Element::namespace(other)
}
fn match_non_ts_pseudo_class(
fn match_non_ts_pseudo_class<F>(
&self,
pseudo_class: &NonTSPseudoClass,
_: &mut MatchingContext<Self::Impl>,
) -> bool {
_: &mut F,
) -> bool
where
F: FnMut(&Self, ElementSelectorFlags),
{
match *pseudo_class {
// https://github.com/servo/servo/issues/8718
NonTSPseudoClass::Link | NonTSPseudoClass::AnyLink => self.is_link(),
@ -3304,15 +3307,6 @@ 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 {