WR multi-document update

This commit is contained in:
Dzmitry Malyshau 2017-07-26 12:28:38 -04:00
parent 8db39f8fde
commit 101c426eb7
14 changed files with 119 additions and 86 deletions

View file

@ -21,10 +21,20 @@ extern crate euclid;
#[cfg(feature = "servo")] #[macro_use] extern crate heapsize_derive;
extern crate selectors;
#[cfg(feature = "servo")] #[macro_use] extern crate serde;
#[cfg(feature = "servo")] extern crate webrender_api;
#[cfg(feature = "servo")] pub use webrender_api::DevicePixel;
use cssparser::{CowRcStr, Token};
use selectors::parser::SelectorParseError;
/// One hardware pixel.
///
/// This unit corresponds to the smallest addressable element of the display hardware.
#[cfg(not(feature = "servo"))]
#[derive(Copy, Clone, Debug)]
pub enum DevicePixel {}
/// Opaque type stored in type-unsafe work queues for parallel layout.
/// Must be transmutable to and from `TNode`.
pub type UnsafeNode = (usize, usize);
@ -59,12 +69,6 @@ impl PinchZoomFactor {
#[derive(Clone, Copy, Debug)]
pub enum CSSPixel {}
/// One hardware pixel.
///
/// This unit corresponds to the smallest addressable element of the display hardware.
#[derive(Copy, Clone, Debug)]
pub enum DevicePixel {}
// In summary, the hierarchy of pixel units and the factors to convert from one to the next:
//
// DevicePixel