mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
style: Fix dynamic viewport size
Differential Revision: https://phabricator.services.mozilla.com/D149275
This commit is contained in:
parent
5de65d9f2c
commit
6a5f012d3b
1 changed files with 7 additions and 4 deletions
|
@ -376,12 +376,13 @@ impl Device {
|
||||||
);
|
);
|
||||||
Size2D::new(
|
Size2D::new(
|
||||||
Au(size.width),
|
Au(size.width),
|
||||||
Au(size.height
|
Au(size.height +
|
||||||
+ pc.mDynamicToolbarMaxHeight as i32 * pc.mCurAppUnitsPerDevPixel),
|
pc.mDynamicToolbarMaxHeight as i32 * pc.mCurAppUnitsPerDevPixel),
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
ViewportVariant::Dynamic => {
|
ViewportVariant::Dynamic => {
|
||||||
self.used_dynamic_viewport_size.store(true, Ordering::Relaxed);
|
self.used_dynamic_viewport_size
|
||||||
|
.store(true, Ordering::Relaxed);
|
||||||
let size = &pc.mVisibleArea;
|
let size = &pc.mVisibleArea;
|
||||||
// Looks like IntCoordTyped is treated as if it's u32 in Rust.
|
// Looks like IntCoordTyped is treated as if it's u32 in Rust.
|
||||||
debug_assert!(
|
debug_assert!(
|
||||||
|
@ -390,7 +391,9 @@ impl Device {
|
||||||
);
|
);
|
||||||
Size2D::new(
|
Size2D::new(
|
||||||
Au(size.width),
|
Au(size.width),
|
||||||
Au(size.height + pc.mDynamicToolbarHeight as i32 * pc.mCurAppUnitsPerDevPixel),
|
Au(size.height +
|
||||||
|
(pc.mDynamicToolbarMaxHeight - pc.mDynamicToolbarHeight) as i32 *
|
||||||
|
pc.mCurAppUnitsPerDevPixel),
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue