aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script/layout_interface.rs
diff options
context:
space:
mode:
authorbors-servo <release+servo@mozilla.com>2014-06-09 18:52:41 -0400
committerbors-servo <release+servo@mozilla.com>2014-06-09 18:52:41 -0400
commitf359bc93376a42a6dfefd0e2759d660d751a35aa (patch)
tree9d7bdcdd70932904d7f2c8c34cc551906ee1baca /src/components/script/layout_interface.rs
parenteee072f5d5163cbe9b8c2e7735c6eca17bc5d3f9 (diff)
parent89327aa5bee97100b858cd33024418bd1d149940 (diff)
downloadservo-f359bc93376a42a6dfefd0e2759d660d751a35aa.tar.gz
servo-f359bc93376a42a6dfefd0e2759d660d751a35aa.zip
auto merge of #2624 : mbrubeck/servo/units, r=pcwalton
This fixes an issue where the CSS viewport was too large on high-DPI displays because it was set to the window size in device pixels, instead of px. This patch ensures that the window size is converted from device pixels to px before being passed to script/layout code. The Window trait now exposes the window size in both device pixels and density-independent screen coordinates, with clearer method names.
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 4b69efea010..a91309446c7 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::Size2D;
+use geom::size::TypedSize2D;
use libc::c_void;
use script_task::{ScriptChan};
-use servo_util::geometry::Au;
+use servo_util::geometry::{Au, PagePx};
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: Size2D<uint>,
+ pub window_size: TypedSize2D<PagePx, f32>,
/// The channel that we send a notification to.
pub script_join_chan: Sender<()>,
/// Unique identifier