From 70a2179cd2e1491f14f0a024178681a2b229cc04 Mon Sep 17 00:00:00 2001 From: Thomas Gummerer Date: Sun, 10 Jan 2016 16:20:37 +0100 Subject: Move LayerType enum to gfx_trait The LayerType enum is only used in gfx_traits and layout, so it shouldn't be defined in msg. Move the definition to gfx_traits instead. Fixes #9220 --- components/gfx_traits/lib.rs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'components/gfx_traits') diff --git a/components/gfx_traits/lib.rs b/components/gfx_traits/lib.rs index 513969c9529..c3afad23f90 100644 --- a/components/gfx_traits/lib.rs +++ b/components/gfx_traits/lib.rs @@ -22,7 +22,6 @@ pub use paint_listener::PaintListener; use azure::azure_hl::Color; use euclid::matrix::Matrix4; use euclid::rect::Rect; -use msg::compositor_msg::LayerType; use msg::constellation_msg::{Failure, PipelineId}; use std::fmt::{self, Debug, Formatter}; @@ -38,6 +37,18 @@ pub enum LayerKind { HasTransform, } +#[derive(Clone, PartialEq, Eq, Copy, Hash, Deserialize, Serialize, HeapSizeOf)] +pub enum LayerType { + /// A layer for the fragment body itself. + FragmentBody, + /// An extra layer created for a DOM fragments with overflow:scroll. + OverflowScroll, + /// A layer created to contain ::before pseudo-element content. + BeforePseudoContent, + /// A layer created to contain ::after pseudo-element content. + AfterPseudoContent, +} + /// The scrolling policy of a layer. #[derive(Clone, PartialEq, Eq, Copy, Deserialize, Serialize, Debug, HeapSizeOf)] pub enum ScrollPolicy { -- cgit v1.2.3