mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
style: Refactor some enabledness checks.
There are some common checks that could get some easy-to-use aliases. Differential Revision: https://phabricator.services.mozilla.com/D25117
This commit is contained in:
parent
76c0ae565e
commit
bd77cd64b9
4 changed files with 111 additions and 105 deletions
|
@ -17,7 +17,6 @@ use crate::parser::{Parse, ParserContext};
|
|||
#[cfg(feature = "servo")]
|
||||
use crate::servo::media_queries::MEDIA_FEATURES;
|
||||
use crate::str::{starts_with_ignore_ascii_case, string_as_ascii_lowercase};
|
||||
use crate::stylesheets::Origin;
|
||||
use crate::values::computed::{self, ToComputedValue};
|
||||
use crate::values::specified::{Integer, Length, Number, Resolution};
|
||||
use crate::values::{serialize_atom_identifier, CSSFloat};
|
||||
|
@ -290,7 +289,7 @@ impl MediaFeatureExpression {
|
|||
|
||||
let mut requirements = ParsingRequirements::empty();
|
||||
|
||||
if context.chrome_rules_enabled() || context.stylesheet_origin == Origin::UserAgent {
|
||||
if context.in_ua_or_chrome_sheet() {
|
||||
requirements.insert(ParsingRequirements::CHROME_AND_UA_ONLY);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue