diff options
author | Oriol Brufau <obrufau@igalia.com> | 2024-03-18 14:52:40 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-18 13:52:40 +0000 |
commit | c07484fcb605a9ab0a3f9fba4cb4ddd24d89cb87 (patch) | |
tree | 3328bfaa0552bee8f6d7833b8e07a06b2b5ebedc /components/script/layout_dom | |
parent | 94c1f2c99229fde82e09ae5d8e06792ea9d90787 (diff) | |
download | servo-c07484fcb605a9ab0a3f9fba4cb4ddd24d89cb87.tar.gz servo-c07484fcb605a9ab0a3f9fba4cb4ddd24d89cb87.zip |
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
Diffstat (limited to 'components/script/layout_dom')
-rw-r--r-- | components/script/layout_dom/element.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/components/script/layout_dom/element.rs b/components/script/layout_dom/element.rs index 40d7f0a8aa3..ab2a2f52c7c 100644 --- a/components/script/layout_dom/element.rs +++ b/components/script/layout_dom/element.rs @@ -15,6 +15,7 @@ use script_layout_interface::wrapper_traits::{ }; use script_layout_interface::{LayoutNodeType, StyleAndOpaqueLayoutData, StyleData}; use selectors::attr::{AttrSelectorOperation, CaseSensitivity, NamespaceConstraint}; +use selectors::bloom::{BloomFilter, BLOOM_HASH_MASK}; use selectors::matching::{ElementSelectorFlags, MatchingContext, VisitedHandlingMode}; use selectors::sink::Push; use servo_arc::{Arc, ArcBorrow}; @@ -22,6 +23,7 @@ use servo_atoms::Atom; use style::animation::AnimationSetKey; use style::applicable_declarations::ApplicableDeclarationBlock; use style::attr::AttrValue; +use style::bloom::each_relevant_element_hash; use style::context::SharedStyleContext; use style::data::ElementData; use style::dom::{DomChildren, LayoutIterator, TDocument, TElement, TNode, TShadowRoot}; @@ -682,6 +684,11 @@ impl<'dom, LayoutDataType: LayoutDataTrait> ::selectors::Element } } } + + fn add_element_unique_hashes(&self, filter: &mut BloomFilter) -> bool { + each_relevant_element_hash(*self, |hash| filter.insert_hash(hash & BLOOM_HASH_MASK)); + true + } } /// A wrapper around elements that ensures layout can only @@ -941,6 +948,13 @@ impl<'dom, LayoutDataType: LayoutDataTrait> ::selectors::Element } } } + + fn add_element_unique_hashes(&self, filter: &mut BloomFilter) -> bool { + each_relevant_element_hash(self.element, |hash| { + filter.insert_hash(hash & BLOOM_HASH_MASK) + }); + true + } } impl<'dom, LayoutDataType: LayoutDataTrait> GetStyleAndOpaqueLayoutData<'dom> |