Skip to content

Commit

Permalink
Remove dependency on webrender_api
Browse files Browse the repository at this point in the history
Signed-off-by: Nico Burns <[email protected]>
  • Loading branch information
nicoburns committed Nov 23, 2024
1 parent 639802f commit f5ec2e0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
3 changes: 1 addition & 2 deletions style_traits/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ name = "style_traits"
path = "lib.rs"

[features]
servo = ["servo_atoms", "cssparser/serde", "webrender_api", "url", "euclid/serde"]
servo = ["servo_atoms", "cssparser/serde", "url", "euclid/serde"]
gecko = []

[dependencies]
Expand All @@ -30,4 +30,3 @@ thin-vec = "0.2"
to_shmem = { path = "../to_shmem" }
to_shmem_derive = { path = "../to_shmem_derive" }
url = { version = "2.5", optional = true }
webrender_api = { git = "https://github.com/servo/webrender", branch = "0.65", optional = true }
6 changes: 0 additions & 6 deletions style_traits/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,7 @@ extern crate to_shmem;
#[macro_use]
extern crate to_shmem_derive;
#[cfg(feature = "servo")]
extern crate webrender_api;
#[cfg(feature = "servo")]
extern crate url;
#[cfg(feature = "servo")]
pub use webrender_api::units::DevicePixel;

use cssparser::{CowRcStr, Token};
use selectors::parser::SelectorParseErrorKind;
Expand All @@ -47,12 +43,10 @@ use servo_atoms::Atom;
/// One hardware pixel.
///
/// This unit corresponds to the smallest addressable element of the display hardware.
#[cfg(not(feature = "servo"))]
#[derive(Clone, Copy, Debug)]
pub enum DevicePixel {}

/// Represents a mobile style pinch zoom factor.
/// TODO(gw): Once WR supports pinch zoom, use a type directly from webrender_api.
#[derive(Clone, Copy, Debug, PartialEq)]
#[cfg_attr(feature = "servo", derive(Deserialize, Serialize, MallocSizeOf))]
pub struct PinchZoomFactor(f32);
Expand Down

0 comments on commit f5ec2e0

Please sign in to comment.