mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Bug 1331213: Implement the resolution override. r=heycam
MozReview-Commit-ID: LFGam2hDoh7 Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
This commit is contained in:
parent
13878d674c
commit
3b36f4c58e
1 changed files with 10 additions and 5 deletions
|
@ -535,11 +535,16 @@ impl Expression {
|
||||||
(one_num * other_den).partial_cmp(&(other_num * one_den)).unwrap()
|
(one_num * other_den).partial_cmp(&(other_num * one_den)).unwrap()
|
||||||
}
|
}
|
||||||
(&Resolution(ref one), &Resolution(ref other)) => {
|
(&Resolution(ref one), &Resolution(ref other)) => {
|
||||||
// FIXME(emilio): The pres context may override the DPPX of the
|
let actual_dpi = unsafe {
|
||||||
// `other` resolution, we need to look at that here, but I'm
|
if (*device.pres_context).mOverrideDPPX > 0.0 {
|
||||||
// skipping that for now (we should check if bindgen can
|
self::Resolution::Dppx((*device.pres_context).mOverrideDPPX)
|
||||||
// generate nsPresContext correctly now).
|
.to_dpi()
|
||||||
one.to_dpi().partial_cmp(&other.to_dpi()).unwrap()
|
} else {
|
||||||
|
other.to_dpi()
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
one.to_dpi().partial_cmp(&actual_dpi).unwrap()
|
||||||
}
|
}
|
||||||
(&Ident(ref one), &Ident(ref other)) => {
|
(&Ident(ref one), &Ident(ref other)) => {
|
||||||
debug_assert!(self.feature.mRangeType != nsMediaFeature_RangeType::eMinMaxAllowed);
|
debug_assert!(self.feature.mRangeType != nsMediaFeature_RangeType::eMinMaxAllowed);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue