mirror of
https://github.com/servo/servo.git
synced 2025-08-28 08:38:20 +01:00
style: Allow to export a shadow part under multiple names.
Other browsers allow this and the spec doesn't really disallow it, so fix it, add a test and carry on. Differential Revision: https://phabricator.services.mozilla.com/D65107
This commit is contained in:
parent
614d3e746f
commit
635f5fbf1b
8 changed files with 46 additions and 46 deletions
|
@ -393,14 +393,13 @@ where
|
|||
None => break, // Nowhere to export to.
|
||||
};
|
||||
|
||||
parts.retain(|part| {
|
||||
let exported_part = match inner_shadow_host.exported_part(part) {
|
||||
Some(part) => part,
|
||||
None => return false,
|
||||
};
|
||||
std::mem::replace(part, exported_part);
|
||||
true
|
||||
});
|
||||
let mut new_parts = SmallVec::new();
|
||||
for part in &parts {
|
||||
inner_shadow_host.each_exported_part(part, |exported_part| {
|
||||
new_parts.push(exported_part.clone());
|
||||
});
|
||||
}
|
||||
parts = new_parts;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue