style: Don't use attribute selectors for determining if a select is a drop down or a list box.

Instead add a pseudo-class that does the expected size="" attribute parsing.

Removing the Gtk-specific rule setting the text color since it doesn't
seem to have any effect currently.

Differential Revision: https://phabricator.services.mozilla.com/D83448
This commit is contained in:
Cameron McCormack 2020-07-17 09:56:53 +00:00 committed by Emilio Cobos Álvarez
parent a2b016157e
commit 5752e4a3a2
4 changed files with 19 additions and 0 deletions

View file

@ -506,6 +506,12 @@ impl<'a> SelectorVisitor for SelectorDependencyCollector<'a> {
NonTSPseudoClass::MozTableBorderNonzero => local_name!("border"),
#[cfg(feature = "gecko")]
NonTSPseudoClass::MozBrowserFrame => local_name!("mozbrowser"),
#[cfg(feature = "gecko")]
NonTSPseudoClass::MozSelectListBox => {
// This depends on two attributes.
return self.add_attr_dependency(local_name!("multiple")) &&
self.add_attr_dependency(local_name!("size"));
},
NonTSPseudoClass::Lang(..) => local_name!("lang"),
_ => return true,
};