Minor tweaks: rename composed_parent_node_ref, remove or update outdated comments...

This commit is contained in:
Fernando Jiménez Moreno 2019-03-07 13:10:04 +01:00
parent 0313e38074
commit bdd2f32c0f
6 changed files with 33 additions and 46 deletions

View file

@ -1175,7 +1175,7 @@ pub unsafe fn from_untrusted_node_address(
pub trait LayoutNodeHelpers {
unsafe fn type_id_for_layout(&self) -> NodeTypeId;
unsafe fn parent_node_ref(&self) -> Option<LayoutDom<Node>>;
unsafe fn composed_parent_node_ref(&self) -> Option<LayoutDom<Node>>;
unsafe fn first_child_ref(&self) -> Option<LayoutDom<Node>>;
unsafe fn last_child_ref(&self) -> Option<LayoutDom<Node>>;
unsafe fn prev_sibling_ref(&self) -> Option<LayoutDom<Node>>;
@ -1222,7 +1222,7 @@ impl LayoutNodeHelpers for LayoutDom<Node> {
#[inline]
#[allow(unsafe_code)]
unsafe fn parent_node_ref(&self) -> Option<LayoutDom<Node>> {
unsafe fn composed_parent_node_ref(&self) -> Option<LayoutDom<Node>> {
let parent = (*self.unsafe_get()).parent_node.get_inner_as_layout();
if let Some(ref parent) = parent {
if let Some(shadow_root) = parent.downcast::<ShadowRoot>() {