aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--components/gfx_traits/lib.rs13
-rw-r--r--components/layout/flow.rs3
-rw-r--r--components/layout/fragment.rs3
-rw-r--r--components/msg/compositor_msg.rs12
4 files changed, 14 insertions, 17 deletions
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 {
diff --git a/components/layout/flow.rs b/components/layout/flow.rs
index 4534061f3de..bfb0c407d95 100644
--- a/components/layout/flow.rs
+++ b/components/layout/flow.rs
@@ -34,11 +34,10 @@ use flow_list::{FlowList, FlowListIterator, MutFlowListIterator};
use flow_ref::{self, FlowRef, WeakFlowRef};
use fragment::{Fragment, FragmentBorderBoxIterator, SpecificFragmentInfo};
use gfx::display_list::{ClippingRegion, DisplayList};
-use gfx_traits::LayerId;
+use gfx_traits::{LayerId, LayerType};
use incremental::{RECONSTRUCT_FLOW, REFLOW, REFLOW_OUT_OF_FLOW, RestyleDamage};
use inline::InlineFlow;
use model::{CollapsibleMargins, IntrinsicISizes, MarginCollapseInfo};
-use msg::compositor_msg::LayerType;
use multicol::MulticolFlow;
use parallel::FlowParallelInfo;
use rustc_serialize::{Encodable, Encoder};
diff --git a/components/layout/fragment.rs b/components/layout/fragment.rs
index 24feec526b1..004e8ce0543 100644
--- a/components/layout/fragment.rs
+++ b/components/layout/fragment.rs
@@ -17,14 +17,13 @@ use gfx;
use gfx::display_list::{BLUR_INFLATION_FACTOR, OpaqueNode};
use gfx::text::glyph::CharIndex;
use gfx::text::text_run::{TextRun, TextRunSlice};
-use gfx_traits::LayerId;
+use gfx_traits::{LayerId, LayerType};
use incremental::{RECONSTRUCT_FLOW, RestyleDamage};
use inline::{FIRST_FRAGMENT_OF_ELEMENT, InlineFragmentContext, InlineFragmentNodeInfo};
use inline::{InlineMetrics, LAST_FRAGMENT_OF_ELEMENT};
use ipc_channel::ipc::IpcSender;
use layout_debug;
use model::{self, IntrinsicISizes, IntrinsicISizesContribution, MaybeAuto, specified};
-use msg::compositor_msg::LayerType;
use msg::constellation_msg::PipelineId;
use net_traits::image::base::Image;
use net_traits::image_cache_thread::UsePlaceholder;
diff --git a/components/msg/compositor_msg.rs b/components/msg/compositor_msg.rs
index f0edf15db70..9dee0c927d1 100644
--- a/components/msg/compositor_msg.rs
+++ b/components/msg/compositor_msg.rs
@@ -22,15 +22,3 @@ impl FrameTreeId {
*u += 1;
}
}
-
-#[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,
-}