Skip to content

Commit

Permalink
Remove unused children_count method from TNode.
Browse files Browse the repository at this point in the history
The semantics of this method with respect to anonymous children are unclear.
Thankfully it's unused, so we can remove it.
  • Loading branch information
bholley committed Aug 26, 2016
1 parent b56297f commit 1799b0a
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 13 deletions.
4 changes: 0 additions & 4 deletions components/script/layout_wrapper.rs
Expand Up @@ -170,10 +170,6 @@ impl<'ln> TNode for ServoLayoutNode<'ln> {
self.opaque().0
}

fn children_count(&self) -> u32 {
unsafe { self.node.children_count() }
}

fn as_element(&self) -> Option<ServoLayoutElement<'ln>> {
as_element(self.node)
}
Expand Down
2 changes: 0 additions & 2 deletions components/style/dom.rs
Expand Up @@ -100,8 +100,6 @@ pub trait TNode : Sized + Copy + Clone {

fn as_document(&self) -> Option<Self::ConcreteDocument>;

fn children_count(&self) -> u32;

fn has_changed(&self) -> bool;

unsafe fn set_changed(&self, value: bool);
Expand Down
7 changes: 0 additions & 7 deletions ports/geckolib/wrapper.rs
Expand Up @@ -5,7 +5,6 @@
#![allow(unsafe_code)]

use gecko_bindings::bindings;
use gecko_bindings::bindings::Gecko_ChildrenCount;
use gecko_bindings::bindings::Gecko_ClassOrClassList;
use gecko_bindings::bindings::Gecko_GetNodeData;
use gecko_bindings::bindings::Gecko_GetStyleContext;
Expand Down Expand Up @@ -187,12 +186,6 @@ impl<'ln> TNode for GeckoNode<'ln> {
unimplemented!()
}

fn children_count(&self) -> u32 {
unsafe {
Gecko_ChildrenCount(self.node)
}
}

fn as_element(&self) -> Option<GeckoElement<'ln>> {
if self.is_element() {
unsafe { Some(GeckoElement::from_raw(self.node as *mut RawGeckoElement)) }
Expand Down

0 comments on commit 1799b0a

Please sign in to comment.