mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
style: Don't use lazy_static for media feature parsing.
This used to be needed when destructors in statics were not allowed, but we can get rid of it nowadays. Differential Revision: https://phabricator.services.mozilla.com/D78109
This commit is contained in:
parent
332aec212c
commit
69c7077b3d
1 changed files with 219 additions and 221 deletions
|
@ -538,13 +538,12 @@ macro_rules! system_metric_feature {
|
||||||
}};
|
}};
|
||||||
}
|
}
|
||||||
|
|
||||||
lazy_static! {
|
/// Adding new media features requires (1) adding the new feature to this
|
||||||
/// Adding new media features requires (1) adding the new feature to this
|
/// array, with appropriate entries (and potentially any new code needed
|
||||||
/// array, with appropriate entries (and potentially any new code needed
|
/// to support new types in these entries and (2) ensuring that either
|
||||||
/// to support new types in these entries and (2) ensuring that either
|
/// nsPresContext::MediaFeatureValuesChanged is called when the value that
|
||||||
/// nsPresContext::MediaFeatureValuesChanged is called when the value that
|
/// would be returned by the evaluator function could change.
|
||||||
/// would be returned by the evaluator function could change.
|
pub static MEDIA_FEATURES: [MediaFeatureDescription; 53] = [
|
||||||
pub static ref MEDIA_FEATURES: [MediaFeatureDescription; 53] = [
|
|
||||||
feature!(
|
feature!(
|
||||||
atom!("width"),
|
atom!("width"),
|
||||||
AllowsRanges::Yes,
|
AllowsRanges::Yes,
|
||||||
|
@ -758,5 +757,4 @@ lazy_static! {
|
||||||
Evaluator::BoolInteger(eval_moz_touch_enabled),
|
Evaluator::BoolInteger(eval_moz_touch_enabled),
|
||||||
ParsingRequirements::empty(),
|
ParsingRequirements::empty(),
|
||||||
),
|
),
|
||||||
];
|
];
|
||||||
}
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue