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:
Patrick Walton 2015-11-02 14:00:52 -08:00
parent 1e3010e4cd
commit 3ae5f04bd1
4 changed files with 50 additions and 37 deletions

View file

@ -82,8 +82,8 @@ pub struct SharedLayoutContext {
/// A channel for the image cache to send responses to.
pub image_cache_sender: ImageCacheChan,
/// The current screen size.
pub screen_size: Size2D<Au>,
/// The current viewport size.
pub viewport_size: Size2D<Au>,
/// Screen sized changed?
pub screen_size_changed: bool,