mirror of
https://github.com/servo/servo.git
synced 2025-07-31 19:20:22 +01:00
layout: Store viewport and screen size separately.
Fixes a bug whereby all nodes would get unconditionally reflowed on every layout event if the page set a viewport.
This commit is contained in:
parent
1e3010e4cd
commit
3ae5f04bd1
4 changed files with 50 additions and 37 deletions
|
@ -463,7 +463,7 @@ impl<'ln> PrivateMatchMethods for LayoutNode<'ln> {
|
|||
None => None,
|
||||
Some(ref style) => Some(&**style),
|
||||
};
|
||||
let (the_style, is_cacheable) = cascade(layout_context.screen_size,
|
||||
let (the_style, is_cacheable) = cascade(layout_context.viewport_size,
|
||||
applicable_declarations,
|
||||
shareable,
|
||||
Some(&***parent_style),
|
||||
|
@ -472,7 +472,7 @@ impl<'ln> PrivateMatchMethods for LayoutNode<'ln> {
|
|||
this_style = the_style
|
||||
}
|
||||
None => {
|
||||
let (the_style, is_cacheable) = cascade(layout_context.screen_size,
|
||||
let (the_style, is_cacheable) = cascade(layout_context.viewport_size,
|
||||
applicable_declarations,
|
||||
shareable,
|
||||
None,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue