mirror of
https://github.com/servo/servo.git
synced 2025-08-11 16:35:33 +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
|
@ -62,9 +62,6 @@ pub trait ElementSnapshot: Sized {
|
|||
/// called if `has_attrs()` returns true.
|
||||
fn is_part(&self, name: &Atom) -> bool;
|
||||
|
||||
/// See Element::exported_part.
|
||||
fn exported_part(&self, name: &Atom) -> Option<Atom>;
|
||||
|
||||
/// See Element::imported_part.
|
||||
fn imported_part(&self, name: &Atom) -> Option<Atom>;
|
||||
|
||||
|
@ -371,13 +368,6 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
fn exported_part(&self, name: &Atom) -> Option<Atom> {
|
||||
match self.snapshot() {
|
||||
Some(snapshot) if snapshot.has_attrs() => snapshot.exported_part(name),
|
||||
_ => self.element.exported_part(name),
|
||||
}
|
||||
}
|
||||
|
||||
fn imported_part(&self, name: &Atom) -> Option<Atom> {
|
||||
match self.snapshot() {
|
||||
Some(snapshot) if snapshot.has_attrs() => snapshot.imported_part(name),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue