style: Use AspectRatio directly for RangeOrOperator::evaluate.

Differential Revision: https://phabricator.services.mozilla.com/D3587
This commit is contained in:
Xidorn Quan 2018-08-17 12:46:02 +00:00 committed by Emilio Cobos Álvarez
parent 07ffc0955f
commit c9c5e56079
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
2 changed files with 29 additions and 12 deletions

View file

@ -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