Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stylo: Traverse anonymous children when styling #12911

Merged
merged 4 commits into from Aug 26, 2016
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Remove unused children_count method from TNode.

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
commit 1799b0a5dfd0923977cad3f5179d287918d371d3
@@ -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)
}
@@ -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);
@@ -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;
@@ -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)) }
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.