diff options
author | Oriol Brufau <obrufau@igalia.com> | 2023-05-26 22:55:23 +0200 |
---|---|---|
committer | Oriol Brufau <obrufau@igalia.com> | 2023-05-27 05:59:01 +0200 |
commit | 9822db5d3cc680087042316184a937e0741cc9f8 (patch) | |
tree | c469b866f497592b8fd9849b072e9623d25bcefb /components/script/layout_dom | |
parent | 017036dba854d35b1db6dbd2fdf04c8e53f9a3e8 (diff) | |
download | servo-9822db5d3cc680087042316184a937e0741cc9f8.tar.gz servo-9822db5d3cc680087042316184a937e0741cc9f8.zip |
Further changes required by Servo
Diffstat (limited to 'components/script/layout_dom')
-rw-r--r-- | components/script/layout_dom/element.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/components/script/layout_dom/element.rs b/components/script/layout_dom/element.rs index adbeba7e39d..ebd54df0c31 100644 --- a/components/script/layout_dom/element.rs +++ b/components/script/layout_dom/element.rs @@ -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() |