diff options
Diffstat (limited to 'components/script/layout_wrapper.rs')
-rw-r--r-- | components/script/layout_wrapper.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/components/script/layout_wrapper.rs b/components/script/layout_wrapper.rs index 7c7c9cc3505..a916ee73512 100644 --- a/components/script/layout_wrapper.rs +++ b/components/script/layout_wrapper.rs @@ -392,6 +392,11 @@ impl<'le> TElement for ServoLayoutElement<'le> { } #[inline] + fn attr_equals(&self, namespace: &Namespace, attr: &Atom, val: &Atom) -> bool { + self.get_attr(namespace, attr).map_or(false, |x| x == val) + } + + #[inline] fn get_attr(&self, namespace: &Namespace, name: &Atom) -> Option<&str> { unsafe { (*self.element.unsafe_get()).get_attr_val_for_layout(namespace, name) |