diff options
author | eshyong <eric.shyong@gmail.com> | 2014-07-06 23:48:31 -0400 |
---|---|---|
committer | eshyong <eric.shyong@gmail.com> | 2014-07-06 23:49:01 -0400 |
commit | f085655cc6a3f04ff5232e367f6b825e98c1b7de (patch) | |
tree | edbd6405460b8abb30cd6c24a7c94a7a0da2882a /src/components/util/geometry.rs | |
parent | e62637fee2f1c9627468dde81a68df1dd40b6bc9 (diff) | |
download | servo-f085655cc6a3f04ff5232e367f6b825e98c1b7de.tar.gz servo-f085655cc6a3f04ff5232e367f6b825e98c1b7de.zip |
Made Page.window_size and Page.next_subpage_id Traceable, added trait Encodable for WindowSizeData, ViewportPx, PagePx, and DevicePixel
Diffstat (limited to 'src/components/util/geometry.rs')
-rw-r--r-- | src/components/util/geometry.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/components/util/geometry.rs b/src/components/util/geometry.rs index a8c03832058..e0e980c7659 100644 --- a/src/components/util/geometry.rs +++ b/src/components/util/geometry.rs @@ -16,6 +16,7 @@ use std::fmt; /// One hardware pixel. /// /// This unit corresponds to the smallest addressable element of the display hardware. +#[deriving(Encodable)] pub enum DevicePixel {} /// A normalized "pixel" at the default resolution for the display. @@ -42,6 +43,7 @@ pub enum ScreenPx {} /// /// At the default zoom level of 100%, one PagePx is equal to one ScreenPx. However, if the /// document is zoomed in or out then this scale may be larger or smaller. +#[deriving(Encodable)] pub enum ViewportPx {} /// One CSS "px" in the root coordinate system for the content document. @@ -50,6 +52,7 @@ pub enum ViewportPx {} /// This is the mobile-style "pinch zoom" that enlarges content without reflowing it. When the /// viewport zoom is not equal to 1.0, then the layout viewport is no longer the same physical size /// as the viewable area. +#[deriving(Encodable)] pub enum PagePx {} // In summary, the hierarchy of pixel units and the factors to convert from one to the next: |