mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Move WindowSizeData to script_traits.
This commit is contained in:
parent
54bb138ddc
commit
b8fe9e9637
14 changed files with 40 additions and 44 deletions
|
@ -17,13 +17,11 @@ heapsize = "0.3.0"
|
|||
heapsize_plugin = "0.1.2"
|
||||
hyper = {version = "0.9.9", features = ["serde-serialization"]}
|
||||
ipc-channel = {git = "https://github.com/servo/ipc-channel"}
|
||||
layers = {git = "https://github.com/servo/rust-layers", features = ["plugins"]}
|
||||
plugins = {path = "../plugins"}
|
||||
rustc-serialize = "0.3.4"
|
||||
serde = "0.7.11"
|
||||
serde_macros = "0.7.11"
|
||||
url = {version = "1.0.0", features = ["heap_size", "serde"]}
|
||||
util = {path = "../util", features = ["servo"]}
|
||||
|
||||
[dependencies.webrender_traits]
|
||||
git = "https://github.com/servo/webrender_traits"
|
||||
|
|
|
@ -5,33 +5,16 @@
|
|||
//! The high-level interface from script to constellation. Using this abstract interface helps
|
||||
//! reduce coupling between these two components.
|
||||
|
||||
use euclid::scale_factor::ScaleFactor;
|
||||
use euclid::size::TypedSize2D;
|
||||
use hyper::header::Headers;
|
||||
use hyper::method::Method;
|
||||
use ipc_channel::ipc::IpcSharedMemory;
|
||||
use layers::geometry::DevicePixel;
|
||||
use std::cell::Cell;
|
||||
use std::fmt;
|
||||
use url::Url;
|
||||
use util::geometry::{PagePx, ViewportPx};
|
||||
use webrender_traits;
|
||||
|
||||
pub type PanicMsg = (Option<PipelineId>, String, String);
|
||||
|
||||
#[derive(Copy, Clone, Deserialize, Serialize, HeapSizeOf)]
|
||||
pub struct WindowSizeData {
|
||||
/// The size of the initial layout viewport, before parsing an
|
||||
/// http://www.w3.org/TR/css-device-adapt/#initial-viewport
|
||||
pub initial_viewport: TypedSize2D<ViewportPx, f32>,
|
||||
|
||||
/// The "viewing area" in page px. See `PagePx` documentation for details.
|
||||
pub visible_viewport: TypedSize2D<PagePx, f32>,
|
||||
|
||||
/// The resolution of the window in dppx, not including any "pinch zoom" factor.
|
||||
pub device_pixel_ratio: ScaleFactor<ViewportPx, DevicePixel, f32>,
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Eq, PartialEq, Serialize, Copy, Clone, HeapSizeOf)]
|
||||
pub enum WindowSizeType {
|
||||
Initial,
|
||||
|
|
|
@ -15,11 +15,9 @@ extern crate euclid;
|
|||
extern crate heapsize;
|
||||
extern crate hyper;
|
||||
extern crate ipc_channel;
|
||||
extern crate layers;
|
||||
extern crate rustc_serialize;
|
||||
extern crate serde;
|
||||
extern crate url;
|
||||
extern crate util;
|
||||
extern crate webrender_traits;
|
||||
|
||||
pub mod constellation_msg;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue