mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Further changes required by Servo
This commit is contained in:
parent
017036dba8
commit
9822db5d3c
4 changed files with 18 additions and 5 deletions
|
@ -8,6 +8,7 @@
|
|||
#![deny(missing_docs)]
|
||||
|
||||
use crate::dom::{SendElement, TElement};
|
||||
use crate::LocalName;
|
||||
use atomic_refcell::{AtomicRefCell, AtomicRefMut};
|
||||
use owning_ref::OwningHandle;
|
||||
use selectors::bloom::BloomFilter;
|
||||
|
@ -107,9 +108,8 @@ impl<E: TElement> PushedElement<E> {
|
|||
/// We do this for attributes that are very common but not commonly used in
|
||||
/// selectors.
|
||||
#[inline]
|
||||
#[cfg(feature = "gecko")]
|
||||
pub fn is_attr_name_excluded_from_filter(atom: &crate::Atom) -> bool {
|
||||
*atom == atom!("class") || *atom == atom!("id") || *atom == atom!("style")
|
||||
pub fn is_attr_name_excluded_from_filter(name: &LocalName) -> bool {
|
||||
return *name == local_name!("class") || *name == local_name!("id") || *name == local_name!("style")
|
||||
}
|
||||
|
||||
fn each_relevant_element_hash<E, F>(element: E, mut f: F)
|
||||
|
|
|
@ -520,10 +520,9 @@ pub trait TElement:
|
|||
}
|
||||
|
||||
/// Internal iterator for the attribute names of this element.
|
||||
#[cfg(feature = "gecko")]
|
||||
fn each_attr_name<F>(&self, callback: F)
|
||||
where
|
||||
F: FnMut(&AtomIdent);
|
||||
F: FnMut(&LocalName);
|
||||
|
||||
/// Internal iterator for the part names that this element exports for a
|
||||
/// given part name.
|
||||
|
|
|
@ -137,7 +137,10 @@ impl<T: 'static> SelectorMap<T> {
|
|||
local_name_hash: HashMap::default(),
|
||||
namespace_hash: HashMap::default(),
|
||||
other: SmallVec::new(),
|
||||
#[cfg(feature = "gecko")]
|
||||
bucket_attributes: static_prefs::pref!("layout.css.bucket-attribute-names.enabled"),
|
||||
#[cfg(feature = "servo")]
|
||||
bucket_attributes: false,
|
||||
count: 0,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue