aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script/layout_interface.rs
diff options
context:
space:
mode:
authorMatt Brubeck <mbrubeck@limpet.net>2014-06-12 14:33:53 -0700
committerMatt Brubeck <mbrubeck@limpet.net>2014-06-20 16:33:57 -0700
commit4fef0d1c1c8f5fea1ff5e3ed7f9a98cec01cd8a8 (patch)
treec81643cf8af779d8d4243c2b25d165a60ae6d4a0 /src/components/script/layout_interface.rs
parentafb6bf48e761d2dcaf307a123fe4a8f2a79b645f (diff)
downloadservo-4fef0d1c1c8f5fea1ff5e3ed7f9a98cec01cd8a8.tar.gz
servo-4fef0d1c1c8f5fea1ff5e3ed7f9a98cec01cd8a8.zip
Separate "desktop" and "mobile" zoom calculations.
This ensures that the layout viewport responds to each type of zoom correctly, and lays the ground for CSS Media Queries and CSS Device Adaption. Until we have proper touch support, mobile-style "pinch" zoom can be simulated by holding Ctrl while scrolling with a mousewheel or trackpad gesture.
Diffstat (limited to 'src/components/script/layout_interface.rs')
-rw-r--r--src/components/script/layout_interface.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/components/script/layout_interface.rs b/src/components/script/layout_interface.rs
index a91309446c7..487fb8f0862 100644
--- a/src/components/script/layout_interface.rs
+++ b/src/components/script/layout_interface.rs
@@ -11,10 +11,10 @@ use dom::node::{Node, LayoutDataRef};
use geom::point::Point2D;
use geom::rect::Rect;
-use geom::size::TypedSize2D;
use libc::c_void;
use script_task::{ScriptChan};
-use servo_util::geometry::{Au, PagePx};
+use servo_msg::constellation_msg::WindowSizeData;
+use servo_util::geometry::Au;
use std::cmp;
use std::comm::{channel, Receiver, Sender};
use style::Stylesheet;
@@ -137,7 +137,7 @@ pub struct Reflow {
/// The channel through which messages can be sent back to the script task.
pub script_chan: ScriptChan,
/// The current window size.
- pub window_size: TypedSize2D<PagePx, f32>,
+ pub window_size: WindowSizeData,
/// The channel that we send a notification to.
pub script_join_chan: Sender<()>,
/// Unique identifier