mirror of
https://github.com/servo/servo.git
synced 2025-08-16 19:05:33 +01:00
style: Use AspectRatio directly for RangeOrOperator::evaluate.
Differential Revision: https://phabricator.services.mozilla.com/D3587
This commit is contained in:
parent
07ffc0955f
commit
c9c5e56079
2 changed files with 29 additions and 12 deletions
|
@ -118,11 +118,8 @@ where
|
|||
};
|
||||
|
||||
let size = get_size(device);
|
||||
RangeOrOperator::evaluate(
|
||||
range_or_operator,
|
||||
Some(size.height.0 as u64 * query_value.0 as u64),
|
||||
size.width.0 as u64 * query_value.1 as u64,
|
||||
)
|
||||
let value = AspectRatio(size.width.0 as u32, size.height.0 as u32);
|
||||
RangeOrOperator::evaluate_with_query_value(range_or_operator, query_value, value)
|
||||
}
|
||||
|
||||
/// https://drafts.csswg.org/mediaqueries-4/#aspect-ratio
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue