mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +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(
|
||||
Au(size.width),
|
||||
Au(size.height
|
||||
+ pc.mDynamicToolbarMaxHeight as i32 * pc.mCurAppUnitsPerDevPixel),
|
||||
Au(size.height +
|
||||
pc.mDynamicToolbarMaxHeight as i32 * pc.mCurAppUnitsPerDevPixel),
|
||||
)
|
||||
},
|
||||
ViewportVariant::Dynamic => {
|
||||
self.used_dynamic_viewport_size.store(true, Ordering::Relaxed);
|
||||
self.used_dynamic_viewport_size
|
||||
.store(true, Ordering::Relaxed);
|
||||
let size = &pc.mVisibleArea;
|
||||
// Looks like IntCoordTyped is treated as if it's u32 in Rust.
|
||||
debug_assert!(
|
||||
|
@ -390,7 +391,9 @@ impl Device {
|
|||
);
|
||||
Size2D::new(
|
||||
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