Fix formatting issues

This commit is contained in:
Fernando Jiménez Moreno 2019-02-19 07:53:55 +01:00
parent 067acdfd27
commit 2515966db6
2 changed files with 10 additions and 9 deletions

View file

@ -1228,7 +1228,9 @@ impl LayoutNodeHelpers for LayoutDom<Node> {
#[inline] #[inline]
#[allow(unsafe_code)] #[allow(unsafe_code)]
unsafe fn parent_node_ref(&self) -> Option<LayoutDom<Node>> { unsafe fn parent_node_ref(&self) -> Option<LayoutDom<Node>> {
(*self.unsafe_get()).composed_parent_node.get_inner_as_layout() (*self.unsafe_get())
.composed_parent_node
.get_inner_as_layout()
} }
#[inline] #[inline]

View file

@ -111,21 +111,20 @@ impl ShadowRootMethods for ShadowRoot {
// Return the result of running the retargeting algorithm with context object // Return the result of running the retargeting algorithm with context object
// and the original result as input // and the original result as input
let mut elements = Vec::new(); let mut elements = Vec::new();
for e in self.document_or_shadow_root.elements_from_point( for e in self
x, .document_or_shadow_root
y, .elements_from_point(x, y, None, self.document.has_browsing_context())
None, .iter()
self.document.has_browsing_context(), {
).iter() {
let retargeted_node = self.upcast::<Node>().retarget(e.upcast::<Node>()); let retargeted_node = self.upcast::<Node>().retarget(e.upcast::<Node>());
if let Some(element) = retargeted_node if let Some(element) = retargeted_node
.downcast::<Element>() .downcast::<Element>()
.map(|n| DomRoot::from_ref(n)) { .map(|n| DomRoot::from_ref(n))
{
elements.push(element); elements.push(element);
} }
} }
elements elements
} }
/// https://dom.spec.whatwg.org/#dom-shadowroot-mode /// https://dom.spec.whatwg.org/#dom-shadowroot-mode