aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/layout_dom
diff options
context:
space:
mode:
authorOriol Brufau <obrufau@igalia.com>2023-08-17 03:10:59 +0200
committerMartin Robinson <mrobinson@igalia.com>2023-10-02 14:37:19 +0000
commitf0b7f3aca2f45f6a3879b0ee93ec01bafad4ae1c (patch)
tree97ecf0302c21afba6a004875dc28d86a24d22926 /components/script/layout_dom
parent3d0cf4dbf9cb40bc120be3173ce1b3afcbc9c956 (diff)
downloadservo-f0b7f3aca2f45f6a3879b0ee93ec01bafad4ae1c.tar.gz
servo-f0b7f3aca2f45f6a3879b0ee93ec01bafad4ae1c.zip
Further changes required by Servo
Diffstat (limited to 'components/script/layout_dom')
-rw-r--r--components/script/layout_dom/element.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/components/script/layout_dom/element.rs b/components/script/layout_dom/element.rs
index 94e2676fff5..e4e20b1c1ab 100644
--- a/components/script/layout_dom/element.rs
+++ b/components/script/layout_dom/element.rs
@@ -506,6 +506,12 @@ impl<'dom, LayoutDataType: LayoutDataTrait> ::selectors::Element
None
}
+ fn first_element_child(&self) -> Option<Self> {
+ self.as_node()
+ .dom_children()
+ .find_map(|child| child.as_element())
+ }
+
fn attr_matches(
&self,
ns: &NamespaceConstraint<&style::Namespace>,
@@ -801,6 +807,12 @@ impl<'dom, LayoutDataType: LayoutDataTrait> ::selectors::Element
None
}
+ // Skips non-element nodes
+ fn first_element_child(&self) -> Option<Self> {
+ warn!("ServoThreadSafeLayoutElement::first_element_child called");
+ None
+ }
+
fn is_html_slot_element(&self) -> bool {
self.element.is_html_slot_element()
}