mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +01:00
Remove unused selectors::Element::each_class
This commit is contained in:
parent
9376abdd2c
commit
c5e37f3d2c
6 changed files with 24 additions and 57 deletions
|
@ -402,6 +402,17 @@ impl<'le> TElement for ServoLayoutElement<'le> {
|
|||
self.get_attr(namespace, attr).map_or(false, |x| x == val)
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
fn each_class<F>(&self, mut callback: F) where F: FnMut(&Atom) {
|
||||
unsafe {
|
||||
if let Some(ref classes) = self.element.get_classes_for_layout() {
|
||||
for class in *classes {
|
||||
callback(class)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn existing_style_for_restyle_damage<'a>(&'a self,
|
||||
current_cv: &'a ComputedValues,
|
||||
|
@ -728,17 +739,6 @@ impl<'le> ::selectors::Element for ServoLayoutElement<'le> {
|
|||
}
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
fn each_class<F>(&self, mut callback: F) where F: FnMut(&Atom) {
|
||||
unsafe {
|
||||
if let Some(ref classes) = self.element.get_classes_for_layout() {
|
||||
for class in *classes {
|
||||
callback(class)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn is_html_element_in_html_document(&self) -> bool {
|
||||
unsafe {
|
||||
self.element.html_element_in_html_document_for_layout()
|
||||
|
@ -1098,8 +1098,8 @@ impl<'le> ThreadSafeLayoutElement for ServoThreadSafeLayoutElement<'le> {
|
|||
/// i.e., local_name, attributes, so they can only be used for **private**
|
||||
/// pseudo-elements (like `::-servo-details-content`).
|
||||
///
|
||||
/// Probably a few more of this functions can be implemented (like `has_class`,
|
||||
/// `each_class`, etc), but they have no use right now.
|
||||
/// Probably a few more of this functions can be implemented (like `has_class`, etc.),
|
||||
/// but they have no use right now.
|
||||
///
|
||||
/// Note that the element implementation is needed only for selector matching,
|
||||
/// not for inheritance (styles are inherited appropiately).
|
||||
|
@ -1207,11 +1207,6 @@ impl<'le> ::selectors::Element for ServoThreadSafeLayoutElement<'le> {
|
|||
warn!("ServoThreadSafeLayoutElement::is_root called");
|
||||
false
|
||||
}
|
||||
|
||||
fn each_class<F>(&self, _callback: F)
|
||||
where F: FnMut(&Atom) {
|
||||
warn!("ServoThreadSafeLayoutElement::each_class called");
|
||||
}
|
||||
}
|
||||
|
||||
impl<'le> PresentationalHintsSynthesizer for ServoThreadSafeLayoutElement<'le> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue