mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Auto merge of #19454 - emilio:has-class-is-stupid, r=upsuper
style: Add a missing fast-path in GeckoElement::each_class. This shows up when inserting elements in the bloom filter. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19454) <!-- Reviewable:end -->
This commit is contained in:
commit
45bbbac9d9
2 changed files with 23 additions and 13 deletions
|
@ -1113,6 +1113,10 @@ impl<'le> TElement for GeckoElement<'le> {
|
|||
where
|
||||
F: FnMut(&Atom),
|
||||
{
|
||||
if !self.may_have_class() {
|
||||
return;
|
||||
}
|
||||
|
||||
snapshot_helpers::each_class(self.0, callback, Gecko_ClassOrClassList)
|
||||
}
|
||||
|
||||
|
@ -2129,10 +2133,12 @@ impl<'le> ::selectors::Element for GeckoElement<'le> {
|
|||
return false;
|
||||
}
|
||||
|
||||
snapshot_helpers::has_class(self.0,
|
||||
name,
|
||||
case_sensitivity,
|
||||
Gecko_ClassOrClassList)
|
||||
snapshot_helpers::has_class(
|
||||
self.0,
|
||||
name,
|
||||
case_sensitivity,
|
||||
Gecko_ClassOrClassList,
|
||||
)
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue