mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
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
This commit is contained in:
parent
08d1c2a4d3
commit
70a2179cd2
4 changed files with 14 additions and 17 deletions
|
@ -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 {
|
||||
|
|
|
@ -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};
|
||||
|
|
|
@ -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_task::UsePlaceholder;
|
||||
|
|
|
@ -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,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue