mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
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:
parent
fc9321bb23
commit
7022f451e1
7 changed files with 50 additions and 54 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue