Skip to content

Commit

Permalink
style: Fix servo build.
Browse files Browse the repository at this point in the history
  • Loading branch information
emilio committed Nov 30, 2019
1 parent 85da1dd commit 226c980
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 0 deletions.
22 changes: 22 additions & 0 deletions components/layout_thread/dom_wrapper.rs
Expand Up @@ -514,6 +514,10 @@ impl<'le> TElement for ServoLayoutElement<'le> {
false
}

fn exports_any_part(&self) -> bool {
false
}

fn style_attribute(&self) -> Option<ArcBorrow<StyleLocked<PropertyDeclarationBlock>>> {
unsafe {
(*self.element.style_attribute())
Expand Down Expand Up @@ -999,6 +1003,14 @@ impl<'le> ::selectors::Element for ServoLayoutElement<'le> {
false
}

fn exported_part(&self, _: &Atom) -> Option<Atom> {
None
}

fn imported_part(&self, _: &Atom) -> Option<Atom> {
None
}

#[inline]
fn has_class(&self, name: &Atom, case_sensitivity: CaseSensitivity) -> bool {
unsafe { self.element.has_class_for_layout(name, case_sensitivity) }
Expand Down Expand Up @@ -1533,6 +1545,16 @@ impl<'le> ::selectors::Element for ServoThreadSafeLayoutElement<'le> {
false
}

fn exported_part(&self, _: &Atom) -> Option<Atom> {
debug!("ServoThreadSafeLayoutElement::exported_part called");
None
}

fn imported_part(&self, _: &Atom) -> Option<Atom> {
debug!("ServoThreadSafeLayoutElement::imported_part called");
None
}

fn has_class(&self, _name: &Atom, _case_sensitivity: CaseSensitivity) -> bool {
debug!("ServoThreadSafeLayoutElement::has_class called");
false
Expand Down
22 changes: 22 additions & 0 deletions components/layout_thread_2020/dom_wrapper.rs
Expand Up @@ -521,6 +521,10 @@ impl<'le> TElement for ServoLayoutElement<'le> {
false
}

fn exports_any_part(&self) -> bool {
false
}

fn style_attribute(&self) -> Option<ArcBorrow<StyleLocked<PropertyDeclarationBlock>>> {
unsafe {
(*self.element.style_attribute())
Expand Down Expand Up @@ -1006,6 +1010,14 @@ impl<'le> ::selectors::Element for ServoLayoutElement<'le> {
false
}

fn exported_part(&self, _: &Atom) -> Option<Atom> {
None
}

fn imported_part(&self, _: &Atom) -> Option<Atom> {
None
}

#[inline]
fn has_class(&self, name: &Atom, case_sensitivity: CaseSensitivity) -> bool {
unsafe { self.element.has_class_for_layout(name, case_sensitivity) }
Expand Down Expand Up @@ -1540,6 +1552,16 @@ impl<'le> ::selectors::Element for ServoThreadSafeLayoutElement<'le> {
false
}

fn exported_part(&self, _: &Atom) -> Option<Atom> {
debug!("ServoThreadSafeLayoutElement::exported_part called");
None
}

fn imported_part(&self, _: &Atom) -> Option<Atom> {
debug!("ServoThreadSafeLayoutElement::imported_part called");
None
}

fn has_class(&self, _name: &Atom, _case_sensitivity: CaseSensitivity) -> bool {
debug!("ServoThreadSafeLayoutElement::has_class called");
false
Expand Down
8 changes: 8 additions & 0 deletions components/script/dom/element.rs
Expand Up @@ -3073,6 +3073,14 @@ impl<'a> SelectorsElement for DomRoot<Element> {
false
}

fn exported_part(&self, _: &Atom) -> Option<Atom> {
None
}

fn imported_part(&self, _: &Atom) -> Option<Atom> {
None
}

fn has_class(&self, name: &Atom, case_sensitivity: CaseSensitivity) -> bool {
Element::has_class(&**self, name, case_sensitivity)
}
Expand Down
8 changes: 8 additions & 0 deletions components/style/servo/selector_parser.rs
Expand Up @@ -700,6 +700,14 @@ impl ElementSnapshot for ServoElementSnapshot {
false
}

fn exported_part(&self, _: &Atom) -> Option<Atom> {
None
}

fn imported_part(&self, _: &Atom) -> Option<Atom> {
None
}

fn has_class(&self, name: &Atom, case_sensitivity: CaseSensitivity) -> bool {
self.get_attr(&ns!(), &local_name!("class"))
.map_or(false, |v| {
Expand Down

0 comments on commit 226c980

Please sign in to comment.