mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
style: Support :-moz-autofill and :-moz-autofill-preview in Gecko.
This commit is contained in:
parent
d1f2cdfb3d
commit
bc685fde68
3 changed files with 9 additions and 1 deletions
|
@ -115,5 +115,9 @@ bitflags! {
|
|||
const IN_HANDLER_VULNERABLE_NO_UPDATE_STATE = 1 << 42,
|
||||
/// https://drafts.csswg.org/selectors-4/#the-focus-within-pseudo
|
||||
const IN_FOCUS_WITHIN_STATE = 1 << 43,
|
||||
/// Non-standard & undocumented.
|
||||
const IN_AUTOFILL_STATE = 1 << 50,
|
||||
/// Non-standard & undocumented.
|
||||
const IN_AUTOFILL_PREVIEW_STATE = 1 << 51,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -73,6 +73,8 @@ macro_rules! apply_non_ts_list {
|
|||
("-moz-broken", MozBroken, mozBroken, IN_BROKEN_STATE, _),
|
||||
("-moz-loading", MozLoading, mozLoading, IN_LOADING_STATE, _),
|
||||
("-moz-suppressed", MozSuppressed, mozSuppressed, IN_SUPPRESSED_STATE, PSEUDO_CLASS_INTERNAL),
|
||||
("-moz-autofill", MozAutofill, mozAutofill, IN_AUTOFILL_STATE, PSEUDO_CLASS_INTERNAL),
|
||||
("-moz-autofill-preview", MozAutofillPreview, mozAutofillPreview, IN_AUTOFILL_PREVIEW_STATE, PSEUDO_CLASS_INTERNAL),
|
||||
|
||||
("-moz-handler-clicktoplay", MozHandlerClickToPlay, mozHandlerClickToPlay, IN_HANDLER_CLICK_TO_PLAY_STATE, PSEUDO_CLASS_INTERNAL),
|
||||
("-moz-handler-vulnerable-updatable", MozHandlerVulnerableUpdatable, mozHandlerVulnerableUpdatable, IN_HANDLER_VULNERABLE_UPDATABLE_STATE, PSEUDO_CLASS_INTERNAL),
|
||||
|
|
|
@ -1148,7 +1148,9 @@ impl<'le> ::selectors::Element for GeckoElement<'le> {
|
|||
NonTSPseudoClass::MozUIInvalid |
|
||||
NonTSPseudoClass::MozMeterOptimum |
|
||||
NonTSPseudoClass::MozMeterSubOptimum |
|
||||
NonTSPseudoClass::MozMeterSubSubOptimum => {
|
||||
NonTSPseudoClass::MozMeterSubSubOptimum |
|
||||
NonTSPseudoClass::MozAutofill |
|
||||
NonTSPseudoClass::MozAutofillPreview => {
|
||||
// NB: It's important to use `intersect` instead of `contains`
|
||||
// here, to handle `:any-link` correctly.
|
||||
self.get_state().intersects(pseudo_class.state_flag())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue