mirror of
https://github.com/servo/servo.git
synced 2025-08-11 00:15:32 +01:00
WR multi-document update
This commit is contained in:
parent
8db39f8fde
commit
101c426eb7
14 changed files with 119 additions and 86 deletions
|
@ -10,7 +10,7 @@ name = "style_traits"
|
|||
path = "lib.rs"
|
||||
|
||||
[features]
|
||||
servo = ["heapsize", "heapsize_derive", "serde", "cssparser/heapsize", "cssparser/serde"]
|
||||
servo = ["heapsize", "heapsize_derive", "serde", "cssparser/heapsize", "cssparser/serde", "webrender_api"]
|
||||
gecko = []
|
||||
|
||||
[dependencies]
|
||||
|
@ -22,3 +22,4 @@ heapsize = {version = "0.4", optional = true}
|
|||
heapsize_derive = {version = "0.1", optional = true}
|
||||
selectors = { path = "../selectors" }
|
||||
serde = {version = "1.0", optional = true}
|
||||
webrender_api = {git = "https://github.com/servo/webrender", optional = true}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue