mirror of
https://github.com/servo/servo.git
synced 2025-07-23 15:23:42 +01:00
style: Remove a few unused functions.
This commit is contained in:
parent
a11d268468
commit
7afe393f23
2 changed files with 0 additions and 17 deletions
|
@ -858,11 +858,6 @@ impl<'ln> ThreadSafeLayoutNode for ServoThreadSafeLayoutNode<'ln> {
|
|||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn type_id_without_excluding_pseudo_elements(&self) -> LayoutNodeType {
|
||||
self.node.type_id()
|
||||
}
|
||||
|
||||
fn parent_style(&self) -> Arc<ComputedValues> {
|
||||
let parent = self.node.parent_node().unwrap().as_element().unwrap();
|
||||
let parent_data = parent.get_data().unwrap().borrow();
|
||||
|
|
|
@ -161,10 +161,6 @@ pub trait ThreadSafeLayoutNode: Clone + Copy + Debug + GetLayoutData + NodeInfo
|
|||
/// Returns `None` if this is a pseudo-element; otherwise, returns `Some`.
|
||||
fn type_id(&self) -> Option<LayoutNodeType>;
|
||||
|
||||
/// Returns the type ID of this node, without discarding pseudo-elements as
|
||||
/// `type_id` does.
|
||||
fn type_id_without_excluding_pseudo_elements(&self) -> LayoutNodeType;
|
||||
|
||||
/// Returns the style for a text node. This is computed on the fly from the
|
||||
/// parent style to avoid traversing text nodes in the style system.
|
||||
///
|
||||
|
@ -175,14 +171,6 @@ pub trait ThreadSafeLayoutNode: Clone + Copy + Debug + GetLayoutData + NodeInfo
|
|||
/// the parent until all the children have been processed.
|
||||
fn parent_style(&self) -> Arc<ComputedValues>;
|
||||
|
||||
#[inline]
|
||||
fn is_element_or_elements_pseudo(&self) -> bool {
|
||||
match self.type_id_without_excluding_pseudo_elements() {
|
||||
LayoutNodeType::Element(..) => true,
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
|
||||
fn get_before_pseudo(&self) -> Option<Self> {
|
||||
self.as_element().and_then(|el| el.get_before_pseudo()).map(|el| el.as_node())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue