mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
style: Make :host::part work in the same shadow tree as the part.
Differential Revision: https://phabricator.services.mozilla.com/D68249
This commit is contained in:
parent
257b96c549
commit
846996ae7e
2 changed files with 112 additions and 74 deletions
|
@ -676,19 +676,22 @@ where
|
|||
None => return false,
|
||||
};
|
||||
|
||||
loop {
|
||||
let outer_host = host.containing_shadow_host();
|
||||
if outer_host.as_ref().map(|h| h.opaque()) == context.shared.current_host {
|
||||
break;
|
||||
let current_host = context.shared.current_host;
|
||||
if current_host != Some(host.opaque()) {
|
||||
loop {
|
||||
let outer_host = host.containing_shadow_host();
|
||||
if outer_host.as_ref().map(|h| h.opaque()) == current_host {
|
||||
break;
|
||||
}
|
||||
let outer_host = match outer_host {
|
||||
Some(h) => h,
|
||||
None => return false,
|
||||
};
|
||||
// TODO(emilio): if worth it, we could early return if
|
||||
// host doesn't have the exportparts attribute.
|
||||
hosts.push(host);
|
||||
host = outer_host;
|
||||
}
|
||||
let outer_host = match outer_host {
|
||||
Some(h) => h,
|
||||
None => return false,
|
||||
};
|
||||
// TODO(emilio): if worth it, we could early return if
|
||||
// host doesn't have the exportparts attribute.
|
||||
hosts.push(host);
|
||||
host = outer_host;
|
||||
}
|
||||
|
||||
// Translate the part into the right scope.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue