Ensure layout/script always have a correct viewport size when a new pipeline is created.

This commit is contained in:
Josh Matthews 2019-11-06 16:13:43 -05:00
parent 2aa5ddf922
commit 91dfa354b1
10 changed files with 41 additions and 56 deletions

View file

@ -3,6 +3,7 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
use crate::browsingcontext::NewBrowsingContextInfo;
use euclid::Size2D;
use msg::constellation_msg::{
BrowsingContextId, HistoryStateId, PipelineId, TopLevelBrowsingContextId,
};
@ -10,6 +11,7 @@ use script_traits::LoadData;
use servo_url::ServoUrl;
use std::cmp::PartialEq;
use std::{fmt, mem};
use style_traits::CSSPixel;
/// Represents the joint session history
/// https://html.spec.whatwg.org/multipage/#joint-session-history
@ -122,6 +124,9 @@ pub struct SessionHistoryChange {
/// Holds data for not-yet constructed browsing contexts that are not
/// easily available when they need to be constructed.
pub new_browsing_context_info: Option<NewBrowsingContextInfo>,
/// The size of the viewport for the browsing context.
pub window_size: Size2D<f32, CSSPixel>,
}
/// Represents a pipeline or discarded pipeline in a history entry.