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

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