mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Upgrade to rustc ba2f13ef0 2015-02-04
This commit is contained in:
parent
bc6882bdef
commit
d5dd1d658e
136 changed files with 1091 additions and 878 deletions
|
@ -31,7 +31,7 @@ use rustc_serialize::{Encoder, Encodable};
|
|||
///
|
||||
/// The ratio between ScreenPx and DevicePixel for a given display be found by calling
|
||||
/// `servo::windowing::WindowMethods::hidpi_factor`.
|
||||
#[derive(Show, Copy)]
|
||||
#[derive(Debug, Copy)]
|
||||
pub enum ScreenPx {}
|
||||
|
||||
/// One CSS "px" in the coordinate system of the "initial viewport":
|
||||
|
@ -43,7 +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.
|
||||
#[derive(RustcEncodable, Show, Copy)]
|
||||
#[derive(RustcEncodable, Debug, Copy)]
|
||||
pub enum ViewportPx {}
|
||||
|
||||
/// One CSS "px" in the root coordinate system for the content document.
|
||||
|
@ -52,7 +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.
|
||||
#[derive(RustcEncodable, Show, Copy)]
|
||||
#[derive(RustcEncodable, Debug, Copy)]
|
||||
pub enum PagePx {}
|
||||
|
||||
// In summary, the hierarchy of pixel units and the factors to convert from one to the next:
|
||||
|
@ -120,7 +120,7 @@ impl Encodable for Au {
|
|||
}
|
||||
}
|
||||
|
||||
impl fmt::Show for Au {
|
||||
impl fmt::Debug for Au {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(f, "{}px", to_frac_px(*self))
|
||||
}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue