diff options
author | Matt Brubeck <mbrubeck@limpet.net> | 2014-06-06 12:45:14 -0700 |
---|---|---|
committer | Matt Brubeck <mbrubeck@limpet.net> | 2014-06-09 15:46:51 -0700 |
commit | 89327aa5bee97100b858cd33024418bd1d149940 (patch) | |
tree | 6b99e64f3a0db75689a31e6c288221a27b0b1be8 /src/components/main/pipeline.rs | |
parent | e98b03f581912c5bd5175138a3d8dd45fc70a226 (diff) | |
download | servo-89327aa5bee97100b858cd33024418bd1d149940.tar.gz servo-89327aa5bee97100b858cd33024418bd1d149940.zip |
Outside of compositor, store window size in CSS px
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/main/pipeline.rs')
-rw-r--r-- | src/components/main/pipeline.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/components/main/pipeline.rs b/src/components/main/pipeline.rs index b3f18b01d8d..04902ff0a10 100644 --- a/src/components/main/pipeline.rs +++ b/src/components/main/pipeline.rs @@ -5,7 +5,7 @@ use compositing::CompositorChan; use layout::layout_task::LayoutTask; -use geom::size::Size2D; +use geom::size::TypedSize2D; use gfx::render_task::{PaintPermissionGranted, PaintPermissionRevoked}; use gfx::render_task::{RenderChan, RenderTask}; use script::layout_interface::LayoutChan; @@ -15,6 +15,7 @@ use script::script_task; use servo_msg::constellation_msg::{ConstellationChan, Failure, PipelineId, SubpageId}; use servo_net::image_cache_task::ImageCacheTask; use servo_net::resource_task::ResourceTask; +use servo_util::geometry::PagePx; use servo_util::opts::Opts; use servo_util::time::ProfilerChan; use std::rc::Rc; @@ -112,7 +113,7 @@ impl Pipeline { image_cache_task: ImageCacheTask, resource_task: ResourceTask, profiler_chan: ProfilerChan, - window_size: Size2D<uint>, + window_size: TypedSize2D<PagePx, f32>, opts: Opts, url: Url) -> Pipeline { |