Further changes required by Servo

This commit is contained in:
Oriol Brufau 2023-05-26 22:55:23 +02:00
parent 017036dba8
commit 9822db5d3c
4 changed files with 18 additions and 5 deletions

View file

@ -2,6 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
use crate::dom::attr::AttrHelpersForLayout;
use crate::dom::bindings::inheritance::{
CharacterDataTypeId, DocumentFragmentTypeId, ElementTypeId,
};
@ -264,6 +265,16 @@ impl<'dom, LayoutDataType: LayoutDataTrait> style::dom::TElement
}
}
#[inline(always)]
fn each_attr_name<F>(&self, mut callback: F)
where
F: FnMut(&style::LocalName),
{
for attr in self.element.attrs() {
callback(style::values::GenericAtomIdent::cast(attr.local_name()))
}
}
fn has_dirty_descendants(&self) -> bool {
unsafe {
self.as_node()