mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Fix formatting issues
This commit is contained in:
parent
067acdfd27
commit
2515966db6
2 changed files with 10 additions and 9 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue