style: Replace AspectRatio with computed::position::Ratio in media-queries.

Also, we drop the pref, layout.css.aspect-ratio-number.enabled, becacuse
the spec of css-sizing-4 uses Number now.

Differential Revision: https://phabricator.services.mozilla.com/D75233
This commit is contained in:
Boris Chiou 2020-05-20 21:13:35 +00:00 committed by Emilio Cobos Álvarez
parent fc9321bb23
commit 7022f451e1
7 changed files with 50 additions and 54 deletions

View file

@ -383,7 +383,7 @@ impl One for NonNegativeNumber {
#[inline]
fn is_one(&self) -> bool {
self.0.get() == 1.0
self.get() == 1.0
}
}
@ -392,6 +392,12 @@ impl NonNegativeNumber {
pub fn new(val: CSSFloat) -> Self {
NonNegative::<Number>(Number::new(val.max(0.)))
}
/// Returns the numeric value.
#[inline]
pub fn get(&self) -> f32 {
self.0.get()
}
}
/// A Number which is >= 1.0.