mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Merge Node::shadow_including_inclusive_ancestors into inclusive_ancestors
This commit is contained in:
parent
0ca4792dc6
commit
8eba587547
9 changed files with 95 additions and 59 deletions
|
@ -934,7 +934,7 @@ impl Document {
|
|||
|
||||
let el = node_address.and_then(|address| {
|
||||
let node = unsafe { node::from_untrusted_node_address(js_runtime, address) };
|
||||
node.inclusive_ancestors()
|
||||
node.inclusive_ancestors(ShadowIncluding::No)
|
||||
.filter_map(DomRoot::downcast::<Element>)
|
||||
.next()
|
||||
});
|
||||
|
@ -1118,7 +1118,7 @@ impl Document {
|
|||
|
||||
let maybe_new_target = node_address.and_then(|address| {
|
||||
let node = unsafe { node::from_untrusted_node_address(js_runtime, address) };
|
||||
node.inclusive_ancestors()
|
||||
node.inclusive_ancestors(ShadowIncluding::No)
|
||||
.filter_map(DomRoot::downcast::<Element>)
|
||||
.next()
|
||||
});
|
||||
|
@ -1154,7 +1154,7 @@ impl Document {
|
|||
if !old_target_is_ancestor_of_new_target {
|
||||
for element in old_target
|
||||
.upcast::<Node>()
|
||||
.inclusive_ancestors()
|
||||
.inclusive_ancestors(ShadowIncluding::No)
|
||||
.filter_map(DomRoot::downcast::<Element>)
|
||||
{
|
||||
element.set_hover_state(false);
|
||||
|
@ -1172,7 +1172,7 @@ impl Document {
|
|||
if let Some(ref new_target) = maybe_new_target {
|
||||
for element in new_target
|
||||
.upcast::<Node>()
|
||||
.inclusive_ancestors()
|
||||
.inclusive_ancestors(ShadowIncluding::No)
|
||||
.filter_map(DomRoot::downcast::<Element>)
|
||||
{
|
||||
if element.hover_state() {
|
||||
|
@ -1214,7 +1214,7 @@ impl Document {
|
|||
|
||||
let el = node_address.and_then(|address| {
|
||||
let node = unsafe { node::from_untrusted_node_address(js_runtime, address) };
|
||||
node.inclusive_ancestors()
|
||||
node.inclusive_ancestors(ShadowIncluding::No)
|
||||
.filter_map(DomRoot::downcast::<Element>)
|
||||
.next()
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue