mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Further changes required by Servo
This commit is contained in:
parent
3d0cf4dbf9
commit
f0b7f3aca2
3 changed files with 19 additions and 3 deletions
|
@ -695,9 +695,9 @@ where
|
|||
Component::Slotted(ref selector) | Component::Host(Some(ref selector)) => {
|
||||
selector.size_of(ops)
|
||||
},
|
||||
Component::Is(ref list) |
|
||||
Component::Where(ref list) |
|
||||
Component::Has(ref list) => list.size_of(ops),
|
||||
Component::Is(ref list) | Component::Where(ref list) | Component::Has(ref list) => {
|
||||
list.size_of(ops)
|
||||
},
|
||||
Component::PseudoElement(ref pseudo) => (*pseudo).size_of(ops),
|
||||
Component::Combinator(..) |
|
||||
Component::ExplicitAnyNamespace |
|
||||
|
|
|
@ -3178,6 +3178,10 @@ impl<'a> SelectorsElement for DomRoot<Element> {
|
|||
.next()
|
||||
}
|
||||
|
||||
fn first_element_child(&self) -> Option<DomRoot<Element>> {
|
||||
self.GetFirstElementChild()
|
||||
}
|
||||
|
||||
fn attr_matches(
|
||||
&self,
|
||||
ns: &NamespaceConstraint<&style::Namespace>,
|
||||
|
|
|
@ -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()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue