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:
Emilio Cobos Álvarez 2020-03-09 13:04:21 +00:00
parent 614d3e746f
commit 635f5fbf1b
8 changed files with 46 additions and 46 deletions

View file

@ -1281,6 +1281,14 @@ impl<'le> TElement for GeckoElement<'le> {
snapshot_helpers::each_class_or_part(attr, callback)
}
#[inline]
fn each_exported_part<F>(&self, name: &Atom, callback: F)
where
F: FnMut(&Atom),
{
snapshot_helpers::each_exported_part(self.attrs(), name, callback)
}
fn each_part<F>(&self, callback: F)
where
F: FnMut(&Atom),
@ -2226,11 +2234,6 @@ impl<'le> ::selectors::Element for GeckoElement<'le> {
snapshot_helpers::has_class_or_part(name, CaseSensitivity::CaseSensitive, attr)
}
#[inline]
fn exported_part(&self, name: &Atom) -> Option<Atom> {
snapshot_helpers::exported_part(self.attrs(), name)
}
#[inline]
fn imported_part(&self, name: &Atom) -> Option<Atom> {
snapshot_helpers::imported_part(self.attrs(), name)