aboutsummaryrefslogtreecommitdiffstats
path: root/components/gfx_traits
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2016-01-10 21:18:45 +0530
committerbors-servo <lbergstrom+bors@mozilla.com>2016-01-10 21:18:45 +0530
commitd3889b4be43eb4d637f2d1ac5d021603653601eb (patch)
tree8a9df9aff9c185786d0acfa59ff581bc4b4fe10c /components/gfx_traits
parent6d49681c7996735243e033223dd123e52ccd06b9 (diff)
parent70a2179cd2e1491f14f0a024178681a2b229cc04 (diff)
downloadservo-d3889b4be43eb4d637f2d1ac5d021603653601eb.tar.gz
servo-d3889b4be43eb4d637f2d1ac5d021603653601eb.zip
Auto merge of #9236 - tgummerer:fix-9220, r=Wafflespeanut
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 <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9236) <!-- Reviewable:end -->
Diffstat (limited to 'components/gfx_traits')
-rw-r--r--components/gfx_traits/lib.rs13
1 files changed, 12 insertions, 1 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 {