mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
style: Factor dynamic toolbar max height into layout metrics.
Now * nsPresContext::mVisibleArea is excluding the toolbar max height so that ICB is now static regardless of the dynamic toolbar transition * nsPresContext::mSizeForViewportUnits is introduced to resolve viewport units which is including the toolbar max height That means that with the dynamic toolbar max height; mVisibleArea < mSizeForViewportUnits See https://github.com/bokand/URLBarSizing for more detail backgrounds of this change. Depends on D50417 Differential Revision: https://phabricator.services.mozilla.com/D50418
This commit is contained in:
parent
ff1a9dbb2e
commit
7fec79ffcf
1 changed files with 7 additions and 1 deletions
|
@ -237,7 +237,13 @@ impl Device {
|
|||
/// used for viewport unit resolution.
|
||||
pub fn au_viewport_size_for_viewport_unit_resolution(&self) -> Size2D<Au> {
|
||||
self.used_viewport_size.store(true, Ordering::Relaxed);
|
||||
self.au_viewport_size()
|
||||
|
||||
let pc = match self.pres_context() {
|
||||
Some(pc) => pc,
|
||||
None => return Size2D::new(Au(0), Au(0)),
|
||||
};
|
||||
let size = &pc.mSizeForViewportUnits;
|
||||
Size2D::new(Au(size.width), Au(size.height))
|
||||
}
|
||||
|
||||
/// Returns whether we ever looked up the viewport size of the Device.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue