diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/components/layout/block.rs (renamed from src/components/main/layout/block.rs) | 24 | ||||
-rw-r--r-- | src/components/layout/construct.rs (renamed from src/components/main/layout/construct.rs) | 50 | ||||
-rw-r--r-- | src/components/layout/context.rs (renamed from src/components/main/layout/context.rs) | 0 | ||||
-rw-r--r-- | src/components/layout/css/matching.rs (renamed from src/components/main/css/matching.rs) | 10 | ||||
-rw-r--r-- | src/components/layout/css/node_style.rs (renamed from src/components/main/css/node_style.rs) | 4 | ||||
-rw-r--r-- | src/components/layout/css/node_util.rs (renamed from src/components/main/css/node_util.rs) | 8 | ||||
-rw-r--r-- | src/components/layout/css/select.rs (renamed from src/components/main/css/select.rs) | 0 | ||||
-rw-r--r-- | src/components/layout/css/user-agent.css (renamed from src/components/main/css/user-agent.css) | 0 | ||||
-rw-r--r-- | src/components/layout/extra.rs (renamed from src/components/main/layout/extra.rs) | 4 | ||||
-rw-r--r-- | src/components/layout/floats.rs (renamed from src/components/main/layout/floats.rs) | 0 | ||||
-rw-r--r-- | src/components/layout/flow.rs (renamed from src/components/main/layout/flow.rs) | 36 | ||||
-rw-r--r-- | src/components/layout/flow_list.rs (renamed from src/components/main/layout/flow_list.rs) | 4 | ||||
-rw-r--r-- | src/components/layout/flow_ref.rs (renamed from src/components/main/layout/flow_ref.rs) | 4 | ||||
-rw-r--r-- | src/components/layout/fragment.rs (renamed from src/components/main/layout/fragment.rs) | 22 | ||||
-rw-r--r-- | src/components/layout/incremental.rs (renamed from src/components/main/layout/incremental.rs) | 0 | ||||
-rw-r--r-- | src/components/layout/inline.rs (renamed from src/components/main/layout/inline.rs) | 18 | ||||
-rw-r--r-- | src/components/layout/layout.rs | 68 | ||||
-rw-r--r-- | src/components/layout/layout_task.rs (renamed from src/components/main/layout/layout_task.rs) | 22 | ||||
-rw-r--r-- | src/components/layout/model.rs (renamed from src/components/main/layout/model.rs) | 2 | ||||
-rw-r--r-- | src/components/layout/parallel.rs (renamed from src/components/main/layout/parallel.rs) | 22 | ||||
-rw-r--r-- | src/components/layout/table.rs (renamed from src/components/main/layout/table.rs) | 18 | ||||
-rw-r--r-- | src/components/layout/table_caption.rs (renamed from src/components/main/layout/table_caption.rs) | 10 | ||||
-rw-r--r-- | src/components/layout/table_cell.rs (renamed from src/components/main/layout/table_cell.rs) | 14 | ||||
-rw-r--r-- | src/components/layout/table_colgroup.rs (renamed from src/components/main/layout/table_colgroup.rs) | 10 | ||||
-rw-r--r-- | src/components/layout/table_row.rs (renamed from src/components/main/layout/table_row.rs) | 20 | ||||
-rw-r--r-- | src/components/layout/table_rowgroup.rs (renamed from src/components/main/layout/table_rowgroup.rs) | 18 | ||||
-rw-r--r-- | src/components/layout/table_wrapper.rs (renamed from src/components/main/layout/table_wrapper.rs) | 18 | ||||
-rw-r--r-- | src/components/layout/text.rs (renamed from src/components/main/layout/text.rs) | 4 | ||||
-rw-r--r-- | src/components/layout/util.rs (renamed from src/components/main/layout/util.rs) | 8 | ||||
-rw-r--r-- | src/components/layout/wrapper.rs (renamed from src/components/main/layout/wrapper.rs) | 2 | ||||
-rw-r--r-- | src/components/main/servo.rs | 36 |
31 files changed, 245 insertions, 211 deletions
diff --git a/src/components/main/layout/block.rs b/src/components/layout/block.rs index 0d033934f4f..5e0b4a23670 100644 --- a/src/components/main/layout/block.rs +++ b/src/components/layout/block.rs @@ -14,18 +14,18 @@ #![deny(unsafe_block)] -use layout::construct::FlowConstructor; -use layout::context::LayoutContext; -use layout::floats::{ClearBoth, ClearLeft, ClearRight, FloatKind, Floats, PlacementInfo}; -use layout::flow::{BaseFlow, BlockFlowClass, FlowClass, Flow, ImmutableFlowUtils}; -use layout::flow::{MutableFlowUtils, PreorderFlowTraversal, PostorderFlowTraversal, mut_base}; -use layout::flow; -use layout::fragment::{Fragment, ImageFragment, ScannedTextFragment}; -use layout::model::{Auto, IntrinsicWidths, MarginCollapseInfo, MarginsCollapse}; -use layout::model::{MarginsCollapseThrough, MaybeAuto, NoCollapsibleMargins, Specified, specified}; -use layout::model::{specified_or_none}; -use layout::model; -use layout::wrapper::ThreadSafeLayoutNode; +use construct::FlowConstructor; +use context::LayoutContext; +use floats::{ClearBoth, ClearLeft, ClearRight, FloatKind, Floats, PlacementInfo}; +use flow::{BaseFlow, BlockFlowClass, FlowClass, Flow, ImmutableFlowUtils}; +use flow::{MutableFlowUtils, PreorderFlowTraversal, PostorderFlowTraversal, mut_base}; +use flow; +use fragment::{Fragment, ImageFragment, ScannedTextFragment}; +use model::{Auto, IntrinsicWidths, MarginCollapseInfo, MarginsCollapse}; +use model::{MarginsCollapseThrough, MaybeAuto, NoCollapsibleMargins, Specified, specified}; +use model::{specified_or_none}; +use model; +use wrapper::ThreadSafeLayoutNode; use style::ComputedValues; use style::computed_values::{clear, position}; diff --git a/src/components/main/layout/construct.rs b/src/components/layout/construct.rs index 5f999eb2663..ffce4986baa 100644 --- a/src/components/main/layout/construct.rs +++ b/src/components/layout/construct.rs @@ -20,31 +20,31 @@ #![deny(unsafe_block)] use css::node_style::StyledNode; -use layout::block::BlockFlow; -use layout::context::LayoutContext; -use layout::floats::FloatKind; -use layout::flow::{Flow, ImmutableFlowUtils, MutableOwnedFlowUtils}; -use layout::flow::{Descendants, AbsDescendants}; -use layout::flow; -use layout::flow_ref::FlowRef; -use layout::fragment::{Fragment, GenericFragment, IframeFragment, IframeFragmentInfo}; -use layout::fragment::{ImageFragment, ImageFragmentInfo, SpecificFragmentInfo, TableFragment}; -use layout::fragment::{TableCellFragment, TableColumnFragment, TableColumnFragmentInfo}; -use layout::fragment::{TableRowFragment, TableWrapperFragment, UnscannedTextFragment}; -use layout::fragment::{UnscannedTextFragmentInfo}; -use layout::inline::{FragmentIndex, InlineFragments, InlineFlow}; -use layout::parallel; -use layout::table_wrapper::TableWrapperFlow; -use layout::table::TableFlow; -use layout::table_caption::TableCaptionFlow; -use layout::table_colgroup::TableColGroupFlow; -use layout::table_rowgroup::TableRowGroupFlow; -use layout::table_row::TableRowFlow; -use layout::table_cell::TableCellFlow; -use layout::text::TextRunScanner; -use layout::util::{LayoutDataAccess, OpaqueNodeMethods}; -use layout::wrapper::{PostorderNodeMutTraversal, TLayoutNode, ThreadSafeLayoutNode}; -use layout::wrapper::{Before, BeforeBlock, After, AfterBlock, Normal}; +use block::BlockFlow; +use context::LayoutContext; +use floats::FloatKind; +use flow::{Flow, ImmutableFlowUtils, MutableOwnedFlowUtils}; +use flow::{Descendants, AbsDescendants}; +use flow; +use flow_ref::FlowRef; +use fragment::{Fragment, GenericFragment, IframeFragment, IframeFragmentInfo}; +use fragment::{ImageFragment, ImageFragmentInfo, SpecificFragmentInfo, TableFragment}; +use fragment::{TableCellFragment, TableColumnFragment, TableColumnFragmentInfo}; +use fragment::{TableRowFragment, TableWrapperFragment, UnscannedTextFragment}; +use fragment::{UnscannedTextFragmentInfo}; +use inline::{FragmentIndex, InlineFragments, InlineFlow}; +use parallel; +use table_wrapper::TableWrapperFlow; +use table::TableFlow; +use table_caption::TableCaptionFlow; +use table_colgroup::TableColGroupFlow; +use table_rowgroup::TableRowGroupFlow; +use table_row::TableRowFlow; +use table_cell::TableCellFlow; +use text::TextRunScanner; +use util::{LayoutDataAccess, OpaqueNodeMethods}; +use wrapper::{PostorderNodeMutTraversal, TLayoutNode, ThreadSafeLayoutNode}; +use wrapper::{Before, BeforeBlock, After, AfterBlock, Normal}; use gfx::display_list::OpaqueNode; use gfx::font_context::FontContext; diff --git a/src/components/main/layout/context.rs b/src/components/layout/context.rs index 4163de71c6c..4163de71c6c 100644 --- a/src/components/main/layout/context.rs +++ b/src/components/layout/context.rs diff --git a/src/components/main/css/matching.rs b/src/components/layout/css/matching.rs index 94dacb79cbd..514a4767dc8 100644 --- a/src/components/main/css/matching.rs +++ b/src/components/layout/css/matching.rs @@ -5,11 +5,11 @@ // High-level interface to CSS selector matching. use css::node_style::StyledNode; -use layout::construct::FlowConstructor; -use layout::context::LayoutContext; -use layout::extra::LayoutAuxMethods; -use layout::util::{LayoutDataAccess, LayoutDataWrapper}; -use layout::wrapper::{LayoutElement, LayoutNode, PostorderNodeMutTraversal, ThreadSafeLayoutNode}; +use construct::FlowConstructor; +use context::LayoutContext; +use extra::LayoutAuxMethods; +use util::{LayoutDataAccess, LayoutDataWrapper}; +use wrapper::{LayoutElement, LayoutNode, PostorderNodeMutTraversal, ThreadSafeLayoutNode}; use gfx::font_context::FontContext; use servo_util::cache::{Cache, LRUCache, SimpleHashCache}; diff --git a/src/components/main/css/node_style.rs b/src/components/layout/css/node_style.rs index 2acbf67dcd2..e201b0050aa 100644 --- a/src/components/main/css/node_style.rs +++ b/src/components/layout/css/node_style.rs @@ -5,8 +5,8 @@ // Style retrieval from DOM elements. use css::node_util::NodeUtil; -use layout::incremental::RestyleDamage; -use layout::wrapper::ThreadSafeLayoutNode; +use incremental::RestyleDamage; +use wrapper::ThreadSafeLayoutNode; use style::ComputedValues; use sync::Arc; diff --git a/src/components/main/css/node_util.rs b/src/components/layout/css/node_util.rs index 4fd5fa5d1b2..150995428ea 100644 --- a/src/components/main/css/node_util.rs +++ b/src/components/layout/css/node_util.rs @@ -2,10 +2,10 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -use layout::incremental::RestyleDamage; -use layout::util::LayoutDataAccess; -use layout::wrapper::{TLayoutNode, ThreadSafeLayoutNode}; -use layout::wrapper::{After, AfterBlock, Before, BeforeBlock, Normal}; +use incremental::RestyleDamage; +use util::LayoutDataAccess; +use wrapper::{TLayoutNode, ThreadSafeLayoutNode}; +use wrapper::{After, AfterBlock, Before, BeforeBlock, Normal}; use std::mem; use style::ComputedValues; use sync::Arc; diff --git a/src/components/main/css/select.rs b/src/components/layout/css/select.rs index 9465a6ba290..9465a6ba290 100644 --- a/src/components/main/css/select.rs +++ b/src/components/layout/css/select.rs diff --git a/src/components/main/css/user-agent.css b/src/components/layout/css/user-agent.css index d73560abe0e..d73560abe0e 100644 --- a/src/components/main/css/user-agent.css +++ b/src/components/layout/css/user-agent.css diff --git a/src/components/main/layout/extra.rs b/src/components/layout/extra.rs index b6e57ad252f..7b731185272 100644 --- a/src/components/main/layout/extra.rs +++ b/src/components/layout/extra.rs @@ -4,8 +4,8 @@ //! Code for managing the layout data in the DOM. -use layout::util::{PrivateLayoutData, LayoutDataAccess, LayoutDataWrapper}; -use layout::wrapper::LayoutNode; +use util::{PrivateLayoutData, LayoutDataAccess, LayoutDataWrapper}; +use wrapper::LayoutNode; use script::dom::node::SharedLayoutData; use script::layout_interface::LayoutChan; diff --git a/src/components/main/layout/floats.rs b/src/components/layout/floats.rs index 15aae932b63..15aae932b63 100644 --- a/src/components/main/layout/floats.rs +++ b/src/components/layout/floats.rs diff --git a/src/components/main/layout/flow.rs b/src/components/layout/flow.rs index 20c8d2db965..71924bf13b0 100644 --- a/src/components/main/layout/flow.rs +++ b/src/components/layout/flow.rs @@ -26,24 +26,24 @@ /// similar methods. use css::node_style::StyledNode; -use layout::block::BlockFlow; -use layout::context::LayoutContext; -use layout::floats::Floats; -use layout::flow_list::{FlowList, Link, FlowListIterator, MutFlowListIterator}; -use layout::flow_ref::FlowRef; -use layout::fragment::{Fragment, TableRowFragment, TableCellFragment}; -use layout::incremental::RestyleDamage; -use layout::inline::InlineFlow; -use layout::model::{CollapsibleMargins, IntrinsicWidths, MarginCollapseInfo}; -use layout::parallel::FlowParallelInfo; -use layout::table_wrapper::TableWrapperFlow; -use layout::table::TableFlow; -use layout::table_colgroup::TableColGroupFlow; -use layout::table_rowgroup::TableRowGroupFlow; -use layout::table_row::TableRowFlow; -use layout::table_caption::TableCaptionFlow; -use layout::table_cell::TableCellFlow; -use layout::wrapper::ThreadSafeLayoutNode; +use block::BlockFlow; +use context::LayoutContext; +use floats::Floats; +use flow_list::{FlowList, Link, FlowListIterator, MutFlowListIterator}; +use flow_ref::FlowRef; +use fragment::{Fragment, TableRowFragment, TableCellFragment}; +use incremental::RestyleDamage; +use inline::InlineFlow; +use model::{CollapsibleMargins, IntrinsicWidths, MarginCollapseInfo}; +use parallel::FlowParallelInfo; +use table_wrapper::TableWrapperFlow; +use table::TableFlow; +use table_colgroup::TableColGroupFlow; +use table_rowgroup::TableRowGroupFlow; +use table_row::TableRowFlow; +use table_caption::TableCaptionFlow; +use table_cell::TableCellFlow; +use wrapper::ThreadSafeLayoutNode; use collections::dlist::DList; use geom::point::Point2D; diff --git a/src/components/main/layout/flow_list.rs b/src/components/layout/flow_list.rs index 3d1cccbdce1..e136c29282f 100644 --- a/src/components/main/layout/flow_list.rs +++ b/src/components/layout/flow_list.rs @@ -5,8 +5,8 @@ //! A variant of `DList` specialized to store `Flow`s without an extra //! indirection. -use layout::flow::{Flow, base, mut_base}; -use layout::flow_ref::FlowRef; +use flow::{Flow, base, mut_base}; +use flow_ref::FlowRef; use std::mem; use std::ptr; diff --git a/src/components/main/layout/flow_ref.rs b/src/components/layout/flow_ref.rs index 3ad20a9b6f0..f17de19c809 100644 --- a/src/components/main/layout/flow_ref.rs +++ b/src/components/layout/flow_ref.rs @@ -6,8 +6,8 @@ /// /// Eventually, with dynamically sized types in Rust, much of this code will be superfluous. -use layout::flow::Flow; -use layout::flow; +use flow::Flow; +use flow; use std::mem; use std::ptr; diff --git a/src/components/main/layout/fragment.rs b/src/components/layout/fragment.rs index 3ee3f7586c9..3fea9cb9afa 100644 --- a/src/components/main/layout/fragment.rs +++ b/src/components/layout/fragment.rs @@ -7,17 +7,17 @@ #![deny(unsafe_block)] use css::node_style::StyledNode; -use layout::construct::FlowConstructor; -use layout::context::LayoutContext; -use layout::floats::{ClearBoth, ClearLeft, ClearRight, ClearType}; -use layout::flow::Flow; -use layout::flow; -use layout::inline::{InlineFragmentContext, InlineMetrics}; -use layout::model::{Auto, IntrinsicWidths, MaybeAuto, Specified, specified}; -use layout::model; -use layout::text; -use layout::util::{OpaqueNodeMethods, ToGfxColor}; -use layout::wrapper::{TLayoutNode, ThreadSafeLayoutNode}; +use construct::FlowConstructor; +use context::LayoutContext; +use floats::{ClearBoth, ClearLeft, ClearRight, ClearType}; +use flow::Flow; +use flow; +use inline::{InlineFragmentContext, InlineMetrics}; +use model::{Auto, IntrinsicWidths, MaybeAuto, Specified, specified}; +use model; +use text; +use util::{OpaqueNodeMethods, ToGfxColor}; +use wrapper::{TLayoutNode, ThreadSafeLayoutNode}; use geom::{Point2D, Rect, Size2D, SideOffsets2D}; use geom::approxeq::ApproxEq; diff --git a/src/components/main/layout/incremental.rs b/src/components/layout/incremental.rs index 710e3979e0b..710e3979e0b 100644 --- a/src/components/main/layout/incremental.rs +++ b/src/components/layout/incremental.rs diff --git a/src/components/main/layout/inline.rs b/src/components/layout/inline.rs index e3080340c59..350eb52d1ce 100644 --- a/src/components/main/layout/inline.rs +++ b/src/components/layout/inline.rs @@ -5,15 +5,15 @@ #![deny(unsafe_block)] use css::node_style::StyledNode; -use layout::context::LayoutContext; -use layout::floats::{FloatLeft, Floats, PlacementInfo}; -use layout::flow::{BaseFlow, FlowClass, Flow, InlineFlowClass}; -use layout::flow; -use layout::fragment::{Fragment, ScannedTextFragment, ScannedTextFragmentInfo, SplitInfo}; -use layout::model::IntrinsicWidths; -use layout::model; -use layout::text; -use layout::wrapper::ThreadSafeLayoutNode; +use context::LayoutContext; +use floats::{FloatLeft, Floats, PlacementInfo}; +use flow::{BaseFlow, FlowClass, Flow, InlineFlowClass}; +use flow; +use fragment::{Fragment, ScannedTextFragment, ScannedTextFragmentInfo, SplitInfo}; +use model::IntrinsicWidths; +use model; +use text; +use wrapper::ThreadSafeLayoutNode; use collections::{Deque, RingBuf}; use geom::{Point2D, Rect, SideOffsets2D, Size2D}; diff --git a/src/components/layout/layout.rs b/src/components/layout/layout.rs new file mode 100644 index 00000000000..d864ec9d848 --- /dev/null +++ b/src/components/layout/layout.rs @@ -0,0 +1,68 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#![crate_id = "github.com/mozilla/servo#layout:0.1"] +#![crate_type = "lib"] +#![crate_type = "dylib"] +#![crate_type = "rlib"] + +#![comment = "The Servo Parallel Browser Project"] +#![license = "MPL"] + +#![feature(globs, macro_rules, phase, thread_local)] + +#[phase(plugin, link)] +extern crate log; + +extern crate debug; + +extern crate geom; +extern crate gfx; +extern crate script; +extern crate style; +#[phase(plugin)] +extern crate servo_macros = "macros"; +extern crate servo_net = "net"; +extern crate servo_msg = "msg"; +#[phase(plugin, link)] +extern crate servo_util = "util"; + +extern crate collections; +extern crate green; +extern crate libc; +extern crate sync; +extern crate url; + +pub mod block; +pub mod construct; +pub mod context; +pub mod floats; +pub mod flow; +pub mod flow_list; +pub mod flow_ref; +pub mod fragment; +pub mod layout_task; +pub mod inline; +pub mod model; +pub mod parallel; +pub mod table_wrapper; +pub mod table; +pub mod table_caption; +pub mod table_colgroup; +pub mod table_rowgroup; +pub mod table_row; +pub mod table_cell; +pub mod text; +pub mod util; +pub mod incremental; +pub mod wrapper; +pub mod extra; + +pub mod css { + mod node_util; + + pub mod select; + pub mod matching; + pub mod node_style; +} diff --git a/src/components/main/layout/layout_task.rs b/src/components/layout/layout_task.rs index cb86cf92020..f7fd408fd6e 100644 --- a/src/components/main/layout/layout_task.rs +++ b/src/components/layout/layout_task.rs @@ -9,17 +9,17 @@ use css::matching::{ApplicableDeclarations, ApplicableDeclarationsCache, MatchMe use css::matching::{StyleSharingCandidateCache}; use css::select::new_stylist; use css::node_style::StyledNode; -use layout::construct::{FlowConstructionResult, NoConstructionResult}; -use layout::context::LayoutContext; -use layout::flow::{Flow, ImmutableFlowUtils, MutableFlowUtils, MutableOwnedFlowUtils}; -use layout::flow::{PreorderFlowTraversal, PostorderFlowTraversal}; -use layout::flow; -use layout::flow_ref::FlowRef; -use layout::incremental::RestyleDamage; -use layout::parallel::UnsafeFlow; -use layout::parallel; -use layout::util::{LayoutDataAccess, LayoutDataWrapper, OpaqueNodeMethods, ToGfxColor}; -use layout::wrapper::{LayoutNode, TLayoutNode, ThreadSafeLayoutNode}; +use construct::{FlowConstructionResult, NoConstructionResult}; +use context::LayoutContext; +use flow::{Flow, ImmutableFlowUtils, MutableFlowUtils, MutableOwnedFlowUtils}; +use flow::{PreorderFlowTraversal, PostorderFlowTraversal}; +use flow; +use flow_ref::FlowRef; +use incremental::RestyleDamage; +use parallel::UnsafeFlow; +use parallel; +use util::{LayoutDataAccess, LayoutDataWrapper, OpaqueNodeMethods, ToGfxColor}; +use wrapper::{LayoutNode, TLayoutNode, ThreadSafeLayoutNode}; use collections::dlist::DList; use geom::point::Point2D; diff --git a/src/components/main/layout/model.rs b/src/components/layout/model.rs index 855dda384ec..dc147b77c8b 100644 --- a/src/components/main/layout/model.rs +++ b/src/components/layout/model.rs @@ -6,7 +6,7 @@ #![deny(unsafe_block)] -use layout::fragment::Fragment; +use fragment::Fragment; use computed = style::computed_values; use geom::SideOffsets2D; diff --git a/src/components/main/layout/parallel.rs b/src/components/layout/parallel.rs index 9d46370f024..e99d948d63d 100644 --- a/src/components/main/layout/parallel.rs +++ b/src/components/layout/parallel.rs @@ -7,17 +7,17 @@ //! This code is highly unsafe. Keep this file small and easy to audit. use css::matching::{ApplicableDeclarations, CannotShare, MatchMethods, StyleWasShared}; -use layout::construct::FlowConstructor; -use layout::context::LayoutContext; -use layout::extra::LayoutAuxMethods; -use layout::flow::{Flow, MutableFlowUtils, PreorderFlowTraversal, PostorderFlowTraversal}; -use layout::flow; -use layout::flow_ref::FlowRef; -use layout::layout_task::{AssignHeightsAndStoreOverflowTraversal, AssignWidthsTraversal}; -use layout::layout_task::{BubbleWidthsTraversal}; -use layout::util::{LayoutDataAccess, LayoutDataWrapper, OpaqueNodeMethods}; -use layout::wrapper::{layout_node_to_unsafe_layout_node, layout_node_from_unsafe_layout_node, LayoutNode, PostorderNodeMutTraversal}; -use layout::wrapper::{ThreadSafeLayoutNode, UnsafeLayoutNode}; +use construct::FlowConstructor; +use context::LayoutContext; +use extra::LayoutAuxMethods; +use flow::{Flow, MutableFlowUtils, PreorderFlowTraversal, PostorderFlowTraversal}; +use flow; +use flow_ref::FlowRef; +use layout_task::{AssignHeightsAndStoreOverflowTraversal, AssignWidthsTraversal}; +use layout_task::{BubbleWidthsTraversal}; +use util::{LayoutDataAccess, LayoutDataWrapper, OpaqueNodeMethods}; +use wrapper::{layout_node_to_unsafe_layout_node, layout_node_from_unsafe_layout_node, LayoutNode, PostorderNodeMutTraversal}; +use wrapper::{ThreadSafeLayoutNode, UnsafeLayoutNode}; use gfx::display_list::OpaqueNode; use servo_util::time::{TimeProfilerChan, profile}; diff --git a/src/components/main/layout/table.rs b/src/components/layout/table.rs index 88dc99562c2..e9ac3cb412c 100644 --- a/src/components/main/layout/table.rs +++ b/src/components/layout/table.rs @@ -6,15 +6,15 @@ #![deny(unsafe_block)] -use layout::block::{BlockFlow, MarginsMayNotCollapse, WidthAndMarginsComputer}; -use layout::block::{WidthConstraintInput, WidthConstraintSolution}; -use layout::construct::FlowConstructor; -use layout::context::LayoutContext; -use layout::floats::FloatKind; -use layout::flow::{TableFlowClass, FlowClass, Flow, ImmutableFlowUtils}; -use layout::fragment::Fragment; -use layout::table_wrapper::{TableLayout, FixedLayout, AutoLayout}; -use layout::wrapper::ThreadSafeLayoutNode; +use block::{BlockFlow, MarginsMayNotCollapse, WidthAndMarginsComputer}; +use block::{WidthConstraintInput, WidthConstraintSolution}; +use construct::FlowConstructor; +use context::LayoutContext; +use floats::FloatKind; +use flow::{TableFlowClass, FlowClass, Flow, ImmutableFlowUtils}; +use fragment::Fragment; +use table_wrapper::{TableLayout, FixedLayout, AutoLayout}; +use wrapper::ThreadSafeLayoutNode; use servo_util::geometry::Au; use servo_util::geometry; diff --git a/src/components/main/layout/table_caption.rs b/src/components/layout/table_caption.rs index 658da63e603..63fbf672681 100644 --- a/src/components/main/layout/table_caption.rs +++ b/src/components/layout/table_caption.rs @@ -6,11 +6,11 @@ #![deny(unsafe_block)] -use layout::block::BlockFlow; -use layout::construct::FlowConstructor; -use layout::context::LayoutContext; -use layout::flow::{TableCaptionFlowClass, FlowClass, Flow}; -use layout::wrapper::ThreadSafeLayoutNode; +use block::BlockFlow; +use construct::FlowConstructor; +use context::LayoutContext; +use flow::{TableCaptionFlowClass, FlowClass, Flow}; +use wrapper::ThreadSafeLayoutNode; use std::fmt; diff --git a/src/components/main/layout/table_cell.rs b/src/components/layout/table_cell.rs index 43847539781..1538bab5df5 100644 --- a/src/components/main/layout/table_cell.rs +++ b/src/components/layout/table_cell.rs @@ -6,13 +6,13 @@ #![deny(unsafe_block)] -use layout::block::{BlockFlow, MarginsMayNotCollapse, WidthAndMarginsComputer}; -use layout::context::LayoutContext; -use layout::flow::{TableCellFlowClass, FlowClass, Flow}; -use layout::fragment::Fragment; -use layout::model::{MaybeAuto}; -use layout::table::InternalTable; -use layout::wrapper::ThreadSafeLayoutNode; +use block::{BlockFlow, MarginsMayNotCollapse, WidthAndMarginsComputer}; +use context::LayoutContext; +use flow::{TableCellFlowClass, FlowClass, Flow}; +use fragment::Fragment; +use model::{MaybeAuto}; +use table::InternalTable; +use wrapper::ThreadSafeLayoutNode; use servo_util::geometry::Au; use std::fmt; diff --git a/src/components/main/layout/table_colgroup.rs b/src/components/layout/table_colgroup.rs index 6c3c0189ebe..212629303c9 100644 --- a/src/components/main/layout/table_colgroup.rs +++ b/src/components/layout/table_colgroup.rs @@ -6,11 +6,11 @@ #![deny(unsafe_block)] -use layout::context::LayoutContext; -use layout::flow::{BaseFlow, TableColGroupFlowClass, FlowClass, Flow}; -use layout::fragment::{Fragment, TableColumnFragment}; -use layout::model::{MaybeAuto}; -use layout::wrapper::ThreadSafeLayoutNode; +use context::LayoutContext; +use flow::{BaseFlow, TableColGroupFlowClass, FlowClass, Flow}; +use fragment::{Fragment, TableColumnFragment}; +use model::{MaybeAuto}; +use wrapper::ThreadSafeLayoutNode; use servo_util::geometry::Au; use std::fmt; diff --git a/src/components/main/layout/table_row.rs b/src/components/layout/table_row.rs index 065d43dc291..d4935c1c0ed 100644 --- a/src/components/main/layout/table_row.rs +++ b/src/components/layout/table_row.rs @@ -6,16 +6,16 @@ #![deny(unsafe_block)] -use layout::block::BlockFlow; -use layout::block::WidthAndMarginsComputer; -use layout::construct::FlowConstructor; -use layout::context::LayoutContext; -use layout::flow::{TableRowFlowClass, FlowClass, Flow, ImmutableFlowUtils}; -use layout::flow; -use layout::fragment::Fragment; -use layout::table::InternalTable; -use layout::model::{MaybeAuto, Specified, Auto}; -use layout::wrapper::ThreadSafeLayoutNode; +use block::BlockFlow; +use block::WidthAndMarginsComputer; +use construct::FlowConstructor; +use context::LayoutContext; +use flow::{TableRowFlowClass, FlowClass, Flow, ImmutableFlowUtils}; +use flow; +use fragment::Fragment; +use table::InternalTable; +use model::{MaybeAuto, Specified, Auto}; +use wrapper::ThreadSafeLayoutNode; use servo_util::geometry::Au; use servo_util::geometry; diff --git a/src/components/main/layout/table_rowgroup.rs b/src/components/layout/table_rowgroup.rs index c669dc79b6e..e36f58bf482 100644 --- a/src/components/main/layout/table_rowgroup.rs +++ b/src/components/layout/table_rowgroup.rs @@ -6,15 +6,15 @@ #![deny(unsafe_block)] -use layout::block::BlockFlow; -use layout::block::WidthAndMarginsComputer; -use layout::construct::FlowConstructor; -use layout::context::LayoutContext; -use layout::flow::{TableRowGroupFlowClass, FlowClass, Flow, ImmutableFlowUtils}; -use layout::flow; -use layout::fragment::Fragment; -use layout::table::{InternalTable, TableFlow}; -use layout::wrapper::ThreadSafeLayoutNode; +use block::BlockFlow; +use block::WidthAndMarginsComputer; +use construct::FlowConstructor; +use context::LayoutContext; +use flow::{TableRowGroupFlowClass, FlowClass, Flow, ImmutableFlowUtils}; +use flow; +use fragment::Fragment; +use table::{InternalTable, TableFlow}; +use wrapper::ThreadSafeLayoutNode; use servo_util::geometry::Au; use servo_util::geometry; diff --git a/src/components/main/layout/table_wrapper.rs b/src/components/layout/table_wrapper.rs index 6f8cc8fcc57..7c04847faf1 100644 --- a/src/components/main/layout/table_wrapper.rs +++ b/src/components/layout/table_wrapper.rs @@ -6,15 +6,15 @@ #![deny(unsafe_block)] -use layout::block::{BlockFlow, MarginsMayNotCollapse, WidthAndMarginsComputer}; -use layout::block::{WidthConstraintInput, WidthConstraintSolution}; -use layout::construct::FlowConstructor; -use layout::context::LayoutContext; -use layout::floats::FloatKind; -use layout::flow::{TableWrapperFlowClass, FlowClass, Flow, ImmutableFlowUtils}; -use layout::fragment::Fragment; -use layout::model::{Specified, Auto, specified}; -use layout::wrapper::ThreadSafeLayoutNode; +use block::{BlockFlow, MarginsMayNotCollapse, WidthAndMarginsComputer}; +use block::{WidthConstraintInput, WidthConstraintSolution}; +use construct::FlowConstructor; +use context::LayoutContext; +use floats::FloatKind; +use flow::{TableWrapperFlowClass, FlowClass, Flow, ImmutableFlowUtils}; +use fragment::Fragment; +use model::{Specified, Auto, specified}; +use wrapper::ThreadSafeLayoutNode; use servo_util::geometry::Au; use servo_util::geometry; diff --git a/src/components/main/layout/text.rs b/src/components/layout/text.rs index 54fef44714f..4f354c96703 100644 --- a/src/components/main/layout/text.rs +++ b/src/components/layout/text.rs @@ -6,8 +6,8 @@ #![deny(unsafe_block)] -use layout::flow::Flow; -use layout::fragment::{Fragment, ScannedTextFragment, ScannedTextFragmentInfo, UnscannedTextFragment}; +use flow::Flow; +use fragment::{Fragment, ScannedTextFragment, ScannedTextFragmentInfo, UnscannedTextFragment}; use gfx::font::{FontMetrics, FontStyle}; use gfx::font_context::FontContext; diff --git a/src/components/main/layout/util.rs b/src/components/layout/util.rs index 486cb204804..4f05a18f5ce 100644 --- a/src/components/main/layout/util.rs +++ b/src/components/layout/util.rs @@ -2,10 +2,10 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -use layout::construct::{ConstructionResult, NoConstructionResult}; -use layout::incremental::RestyleDamage; -use layout::parallel::DomParallelInfo; -use layout::wrapper::{LayoutNode, TLayoutNode, ThreadSafeLayoutNode}; +use construct::{ConstructionResult, NoConstructionResult}; +use incremental::RestyleDamage; +use parallel::DomParallelInfo; +use wrapper::{LayoutNode, TLayoutNode, ThreadSafeLayoutNode}; use gfx::display_list::OpaqueNode; use gfx; diff --git a/src/components/main/layout/wrapper.rs b/src/components/layout/wrapper.rs index 71b6b2b6d6b..4fd202c9b1f 100644 --- a/src/components/main/layout/wrapper.rs +++ b/src/components/layout/wrapper.rs @@ -34,7 +34,7 @@ //! `html_element_in_html_document_for_layout()`. use css::node_style::StyledNode; -use layout::util::LayoutDataWrapper; +use util::LayoutDataWrapper; use script::dom::bindings::codegen::InheritTypes::{HTMLIFrameElementDerived}; use script::dom::bindings::codegen::InheritTypes::{HTMLImageElementDerived, TextDerived}; diff --git a/src/components/main/servo.rs b/src/components/main/servo.rs index c32060852b2..96cd12224c8 100644 --- a/src/components/main/servo.rs +++ b/src/components/main/servo.rs @@ -23,6 +23,7 @@ extern crate glfw; extern crate glut; extern crate js; extern crate layers; +extern crate layout; extern crate opengles; extern crate png; extern crate rustuv; @@ -87,44 +88,9 @@ use url::Url; #[path="compositing/compositor_task.rs"] pub mod compositing; -pub mod css { - mod node_util; - - pub mod select; - pub mod matching; - pub mod node_style; -} - pub mod constellation; pub mod pipeline; -pub mod layout { - pub mod block; - pub mod construct; - pub mod context; - pub mod floats; - pub mod flow; - pub mod flow_list; - pub mod flow_ref; - pub mod fragment; - pub mod layout_task; - pub mod inline; - pub mod model; - pub mod parallel; - pub mod table_wrapper; - pub mod table; - pub mod table_caption; - pub mod table_colgroup; - pub mod table_rowgroup; - pub mod table_row; - pub mod table_cell; - pub mod text; - pub mod util; - pub mod incremental; - pub mod wrapper; - pub mod extra; -} - pub mod windowing; #[path="platform/mod.rs"] |