mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Update Stylo to 2023-09-01 (#31609)
* Update Stylo to 2023-09-01 * Fixup for https://phabricator.services.mozilla.com/D184929 * Fixup for https://phabricator.services.mozilla.com/D184526 * Fixup for https://phabricator.services.mozilla.com/D184525 * Fixup for https://phabricator.services.mozilla.com/D185154 * Fixup for https://phabricator.services.mozilla.com/D184685 * Fixup for https://phabricator.services.mozilla.com/D185916 * Fixup for https://phabricator.services.mozilla.com/D185492 * Fixup for https://phabricator.services.mozilla.com/D186626 * Update test expectations
This commit is contained in:
parent
94c1f2c992
commit
c07484fcb6
67 changed files with 235 additions and 491 deletions
|
@ -30,6 +30,7 @@ use net_traits::request::CorsSettings;
|
|||
use net_traits::ReferrerPolicy;
|
||||
use script_layout_interface::message::ReflowGoal;
|
||||
use selectors::attr::{AttrSelectorOperation, CaseSensitivity, NamespaceConstraint};
|
||||
use selectors::bloom::{BloomFilter, BLOOM_HASH_MASK};
|
||||
use selectors::matching::{ElementSelectorFlags, MatchingContext};
|
||||
use selectors::sink::Push;
|
||||
use selectors::Element as SelectorsElement;
|
||||
|
@ -3393,6 +3394,34 @@ impl<'a> SelectorsElement for DomRoot<Element> {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn add_element_unique_hashes(&self, filter: &mut BloomFilter) -> bool {
|
||||
let mut f = |hash| filter.insert_hash(hash & BLOOM_HASH_MASK);
|
||||
|
||||
// We can't use style::bloom::each_relevant_element_hash(*self, f)
|
||||
// since DomRoot<Element> doesn't have the TElement trait.
|
||||
f(Element::local_name(self).get_hash());
|
||||
f(Element::namespace(self).get_hash());
|
||||
|
||||
if let Some(ref id) = *self.id_attribute.borrow() {
|
||||
f(id.get_hash());
|
||||
}
|
||||
|
||||
if let Some(attr) = self.get_attribute(&ns!(), &local_name!("class")) {
|
||||
for class in attr.value().as_tokens() {
|
||||
f(AtomIdent::cast(class).get_hash());
|
||||
}
|
||||
}
|
||||
|
||||
for attr in self.attrs.borrow().iter() {
|
||||
let name = style::values::GenericAtomIdent::cast(attr.local_name());
|
||||
if !style::bloom::is_attr_name_excluded_from_filter(name) {
|
||||
f(name.get_hash());
|
||||
}
|
||||
}
|
||||
|
||||
true
|
||||
}
|
||||
}
|
||||
|
||||
impl Element {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue