aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/layout_task.rs
diff options
context:
space:
mode:
authorTill Schneidereit <till@tillschneidereit.net>2015-10-05 17:18:17 +0200
committerTill Schneidereit <till@tillschneidereit.net>2015-11-07 16:19:13 +0100
commitf1b6c7cc99d0804daa52753d02368927176b6c05 (patch)
tree80710cdea6ed3abce35ade23a8fc781ae0ab45fa /components/layout/layout_task.rs
parentf173504ded726ddecf7a92f1864ba6e9662d9eae (diff)
downloadservo-f1b6c7cc99d0804daa52753d02368927176b6c05.tar.gz
servo-f1b6c7cc99d0804daa52753d02368927176b6c05.zip
Let Stylist compute and store viewport constraints when setting the device
Diffstat (limited to 'components/layout/layout_task.rs')
-rw-r--r--components/layout/layout_task.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/layout/layout_task.rs b/components/layout/layout_task.rs
index cb3fe04eb57..46f889de0a3 100644
--- a/components/layout/layout_task.rs
+++ b/components/layout/layout_task.rs
@@ -1077,7 +1077,7 @@ impl LayoutTask {
flow_ref::deref_mut(layout_root));
let root_size = {
let root_flow = flow::base(&**layout_root);
- if rw_data.stylist.constrain_viewport().is_some() {
+ if rw_data.stylist.get_viewport_constraints().is_some() {
root_flow.position.size.to_physical(root_flow.writing_mode)
} else {
root_flow.overflow.size
@@ -1164,7 +1164,7 @@ impl LayoutTask {
let device = Device::new(MediaType::Screen, initial_viewport);
rw_data.stylist.set_device(device);
- let constraints = rw_data.stylist.constrain_viewport();
+ let constraints = rw_data.stylist.get_viewport_constraints();
rw_data.viewport_size = match constraints {
Some(ref constraints) => {
debug!("Viewport constraints: {:?}", constraints);