diff options
author | Emilio Cobos Álvarez <emilio@crisal.io> | 2018-01-26 14:13:14 +0100 |
---|---|---|
committer | Emilio Cobos Álvarez <emilio@crisal.io> | 2018-02-05 13:05:26 +0100 |
commit | b76bbdf5019b247a308ecf72fc98524879a49b30 (patch) | |
tree | ef55acaea45cdb758cdae2de257524486daa3f3b /components/style/gecko/pseudo_element.rs | |
parent | f2df3052d904c2a3e6f1a78185ab82653263bffd (diff) | |
download | servo-b76bbdf5019b247a308ecf72fc98524879a49b30.tar.gz servo-b76bbdf5019b247a308ecf72fc98524879a49b30.zip |
style: Make input[type=number] pseudo-elements accessible to chrome.
Bug: 1433389
Reviewed-by: jwatt
MozReview-Commit-ID: 2ycajPYd3CV
Diffstat (limited to 'components/style/gecko/pseudo_element.rs')
-rw-r--r-- | components/style/gecko/pseudo_element.rs | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/components/style/gecko/pseudo_element.rs b/components/style/gecko/pseudo_element.rs index ab38bdff798..a9960609aca 100644 --- a/components/style/gecko/pseudo_element.rs +++ b/components/style/gecko/pseudo_element.rs @@ -124,16 +124,26 @@ impl PseudoElement { !self.is_eager() && !self.is_precomputed() } - /// Whether this pseudo-element is web-exposed. - pub fn exposed_in_non_ua_sheets(&self) -> bool { - (self.flags() & structs::CSS_PSEUDO_ELEMENT_UA_SHEET_ONLY) == 0 - } - /// Whether this pseudo-element supports user action selectors. pub fn supports_user_action_state(&self) -> bool { (self.flags() & structs::CSS_PSEUDO_ELEMENT_SUPPORTS_USER_ACTION_STATE) != 0 } + /// Whether this pseudo-element is enabled for all content. + pub fn enabled_in_content(&self) -> bool { + (self.flags() & structs::CSS_PSEUDO_ELEMENT_ENABLED_IN_UA_SHEETS_AND_CHROME) == 0 + } + + /// Whether this pseudo is enabled explicitly in UA sheets. + pub fn enabled_in_ua_sheets(&self) -> bool { + (self.flags() & structs::CSS_PSEUDO_ELEMENT_ENABLED_IN_UA_SHEETS) != 0 + } + + /// Whether this pseudo is enabled explicitly in chrome sheets. + pub fn enabled_in_chrome(&self) -> bool { + (self.flags() & structs::CSS_PSEUDO_ELEMENT_ENABLED_IN_CHROME) != 0 + } + /// Whether this pseudo-element skips flex/grid container display-based /// fixup. #[inline] |