aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/layout_wrapper.rs
diff options
context:
space:
mode:
authorSimon Sapin <simon.sapin@exyr.org>2017-05-18 00:54:34 +0200
committerSimon Sapin <simon.sapin@exyr.org>2017-05-18 17:13:14 +0200
commitc5e37f3d2cdcf8b53d4b5f5876d2091e5676efed (patch)
treefe2f2914359529bd07a2a1f3237e920961c3b618 /components/script/layout_wrapper.rs
parent9376abdd2c0ca75cdb351f5565964908e1e2446a (diff)
downloadservo-c5e37f3d2cdcf8b53d4b5f5876d2091e5676efed.tar.gz
servo-c5e37f3d2cdcf8b53d4b5f5876d2091e5676efed.zip
Remove unused selectors::Element::each_class
Diffstat (limited to 'components/script/layout_wrapper.rs')
-rw-r--r--components/script/layout_wrapper.rs31
1 files changed, 13 insertions, 18 deletions
diff --git a/components/script/layout_wrapper.rs b/components/script/layout_wrapper.rs
index ac59921d2ea..0e9dffd28ab 100644
--- a/components/script/layout_wrapper.rs
+++ b/components/script/layout_wrapper.rs
@@ -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> {