style: Implement :defined pseudo-class for custom elements.

Bug: 1331334
Reviewed-by: emilio
This commit is contained in:
Olli Pettay 2018-06-28 14:55:45 +03:00 committed by Emilio Cobos Álvarez
parent 06fa3406de
commit b68e4c2352
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
4 changed files with 7 additions and 1 deletions

View file

@ -187,6 +187,9 @@ impl NonTSPseudoClass {
NonTSPseudoClass::Fullscreen => unsafe {
mozilla::StaticPrefs_sVarCache_full_screen_api_unprefix_enabled
},
NonTSPseudoClass::Defined => unsafe {
structs::nsContentUtils_sIsCustomElementsEnabled
},
// Otherwise, a pseudo-class is enabled in content when it
// doesn't have any enabled flag.
_ => !self.has_any_flag(