diff options
author | Ms2ger <Ms2ger@gmail.com> | 2016-07-07 11:55:53 +0200 |
---|---|---|
committer | Ms2ger <Ms2ger@gmail.com> | 2016-07-11 12:14:27 +0200 |
commit | cbfe77cee109ad427607a7580350eda40ffac545 (patch) | |
tree | b4e058869ea062f561dc97171998cfbd4f645471 /components/util/geometry.rs | |
parent | 42e90f7db9d5ee7c6176e35e600cd27fe9c6748c (diff) | |
download | servo-cbfe77cee109ad427607a7580350eda40ffac545.tar.gz servo-cbfe77cee109ad427607a7580350eda40ffac545.zip |
Move some unit type definitions to style_traits.
Diffstat (limited to 'components/util/geometry.rs')
-rw-r--r-- | components/util/geometry.rs | 30 |
1 files changed, 1 insertions, 29 deletions
diff --git a/components/util/geometry.rs b/components/util/geometry.rs index d750131f151..95b6194a14e 100644 --- a/components/util/geometry.rs +++ b/components/util/geometry.rs @@ -26,35 +26,7 @@ use std::i32; #[derive(Clone, Copy, Debug)] pub enum ScreenPx {} -/// One CSS "px" in the coordinate system of the "initial viewport": -/// http://www.w3.org/TR/css-device-adapt/#initial-viewport -/// -/// ViewportPx is equal to ScreenPx times a "page zoom" factor controlled by the user. This is -/// the desktop-style "full page" zoom that enlarges content but then reflows the layout viewport -/// so it still exactly fits the visible area. -/// -/// 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. -#[derive(Clone, Copy, Debug)] -pub enum ViewportPx {} - -/// One CSS "px" in the root coordinate system for the content document. -/// -/// PagePx is equal to ViewportPx multiplied by a "viewport zoom" factor controlled by the user. -/// 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. -#[derive(Clone, Copy, Debug)] -pub enum PagePx {} - -known_heap_size!(0, ScreenPx, ViewportPx, PagePx); - -// In summary, the hierarchy of pixel units and the factors to convert from one to the next: -// -// DevicePixel -// / hidpi_ratio => ScreenPx -// / desktop_zoom => ViewportPx -// / pinch_zoom => PagePx +known_heap_size!(0, ScreenPx); // An Au is an "App Unit" and represents 1/60th of a CSS pixel. It was // originally proposed in 2002 as a standard unit of measure in Gecko. |