From b424de2092b818c9ed76679ffcd6ecfa621e62ef Mon Sep 17 00:00:00 2001 From: Dan Fox Date: Tue, 3 Mar 2015 17:49:10 +0000 Subject: [PATCH 1/6] Extract OpaqueNodeMethods to own file --- components/layout/construct.rs | 3 +- components/layout/display_list_builder.rs | 3 +- components/layout/fragment.rs | 2 +- components/layout/layout_task.rs | 3 +- components/layout/lib.rs | 1 + components/layout/opaque_node.rs | 63 +++++++++++++++++++++++ components/layout/util.rs | 60 ++------------------- components/layout/wrapper.rs | 3 +- 8 files changed, 76 insertions(+), 62 deletions(-) create mode 100644 components/layout/opaque_node.rs diff --git a/components/layout/construct.rs b/components/layout/construct.rs index b2ea8090ea6..5b691cef5cc 100644 --- a/components/layout/construct.rs +++ b/components/layout/construct.rs @@ -41,7 +41,8 @@ use table_rowgroup::TableRowGroupFlow; use table_row::TableRowFlow; use table_cell::TableCellFlow; use text::TextRunScanner; -use util::{HAS_NEWLY_CONSTRUCTED_FLOW, LayoutDataAccess, OpaqueNodeMethods, LayoutDataWrapper}; +use util::{HAS_NEWLY_CONSTRUCTED_FLOW, LayoutDataAccess, LayoutDataWrapper}; +use opaque_node::OpaqueNodeMethods; use wrapper::{PostorderNodeMutTraversal, PseudoElementType, TLayoutNode, ThreadSafeLayoutNode}; use gfx::display_list::OpaqueNode; diff --git a/components/layout/display_list_builder.rs b/components/layout/display_list_builder.rs index 039dbc9c376..7c56c574581 100644 --- a/components/layout/display_list_builder.rs +++ b/components/layout/display_list_builder.rs @@ -19,7 +19,8 @@ use fragment::{ScannedTextFragmentInfo, SpecificFragmentInfo}; use inline::InlineFlow; use list_item::ListItemFlow; use model; -use util::{OpaqueNodeMethods, ToGfxColor}; +use util::ToGfxColor; +use opaque_node::OpaqueNodeMethods; use geom::{Point2D, Rect, Size2D, SideOffsets2D}; use gfx::color; diff --git a/components/layout/fragment.rs b/components/layout/fragment.rs index 26a91139b31..ed6e3920f88 100644 --- a/components/layout/fragment.rs +++ b/components/layout/fragment.rs @@ -20,7 +20,7 @@ use layout_debug; use model::{IntrinsicISizes, IntrinsicISizesContribution, MaybeAuto, specified}; use model; use text; -use util::OpaqueNodeMethods; +use opaque_node::OpaqueNodeMethods; use wrapper::{TLayoutNode, ThreadSafeLayoutNode}; use geom::num::Zero; diff --git a/components/layout/layout_task.rs b/components/layout/layout_task.rs index ca321f23526..6e7886cbecb 100644 --- a/components/layout/layout_task.rs +++ b/components/layout/layout_task.rs @@ -17,7 +17,8 @@ use incremental::{LayoutDamageComputation, REFLOW, REFLOW_ENTIRE_DOCUMENT, REPAI use layout_debug; use parallel::{self, UnsafeFlow}; use sequential; -use util::{LayoutDataAccess, LayoutDataWrapper, OpaqueNodeMethods, ToGfxColor}; +use util::{LayoutDataAccess, LayoutDataWrapper, ToGfxColor}; +use opaque_node::OpaqueNodeMethods; use wrapper::{LayoutNode, TLayoutNode, ThreadSafeLayoutNode}; use encoding::EncodingRef; diff --git a/components/layout/lib.rs b/components/layout/lib.rs index 837945eff81..e34704b5039 100644 --- a/components/layout/lib.rs +++ b/components/layout/lib.rs @@ -70,6 +70,7 @@ pub mod layout_task; pub mod inline; pub mod list_item; pub mod model; +pub mod opaque_node; pub mod parallel; pub mod sequential; pub mod table_wrapper; diff --git a/components/layout/opaque_node.rs b/components/layout/opaque_node.rs new file mode 100644 index 00000000000..e40538251de --- /dev/null +++ b/components/layout/opaque_node.rs @@ -0,0 +1,63 @@ +/* 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/. */ + +#![allow(unsafe_blocks)] + +use gfx::display_list::OpaqueNode; +use libc::{c_void, uintptr_t}; +use script::dom::bindings::js::LayoutJS; +use script::dom::node::Node; +use script::layout_interface::{TrustedNodeAddress}; +use script_traits::UntrustedNodeAddress; +use wrapper::{LayoutNode, TLayoutNode, ThreadSafeLayoutNode}; + +pub trait OpaqueNodeMethods { + /// Converts a DOM node (layout view) to an `OpaqueNode`. + fn from_layout_node(node: &LayoutNode) -> Self; + + /// Converts a thread-safe DOM node (layout view) to an `OpaqueNode`. + fn from_thread_safe_layout_node(node: &ThreadSafeLayoutNode) -> Self; + + /// Converts a DOM node (script view) to an `OpaqueNode`. + fn from_script_node(node: TrustedNodeAddress) -> Self; + + /// Converts a DOM node to an `OpaqueNode'. + fn from_jsmanaged(node: &LayoutJS) -> Self; + + /// Converts this node to an `UntrustedNodeAddress`. An `UntrustedNodeAddress` is just the type + /// of node that script expects to receive in a hit test. + fn to_untrusted_node_address(&self) -> UntrustedNodeAddress; +} + +impl OpaqueNodeMethods for OpaqueNode { + fn from_layout_node(node: &LayoutNode) -> OpaqueNode { + unsafe { + OpaqueNodeMethods::from_jsmanaged(node.get_jsmanaged()) + } + } + + fn from_thread_safe_layout_node(node: &ThreadSafeLayoutNode) -> OpaqueNode { + unsafe { + OpaqueNodeMethods::from_jsmanaged(node.get_jsmanaged()) + } + } + + fn from_script_node(node: TrustedNodeAddress) -> OpaqueNode { + unsafe { + OpaqueNodeMethods::from_jsmanaged(&LayoutJS::from_trusted_node_address(node)) + } + } + + fn from_jsmanaged(node: &LayoutJS) -> OpaqueNode { + unsafe { + let ptr: uintptr_t = node.get_jsobject() as uintptr_t; + OpaqueNode(ptr) + } + } + + fn to_untrusted_node_address(&self) -> UntrustedNodeAddress { + let OpaqueNode(addr) = *self; + UntrustedNodeAddress(addr as *const c_void) + } +} diff --git a/components/layout/util.rs b/components/layout/util.rs index 8d4d72e7466..85c0e1a60d9 100644 --- a/components/layout/util.rs +++ b/components/layout/util.rs @@ -7,16 +7,12 @@ use construct::ConstructionResult; use incremental::RestyleDamage; use parallel::DomParallelInfo; -use wrapper::{LayoutNode, TLayoutNode, ThreadSafeLayoutNode}; +use wrapper::{LayoutNode, TLayoutNode}; use azure::azure_hl::Color; -use gfx::display_list::OpaqueNode; use gfx; -use libc::{c_void, uintptr_t}; -use script::dom::bindings::js::LayoutJS; -use script::dom::node::{Node, SharedLayoutData}; -use script::layout_interface::{LayoutChan, TrustedNodeAddress}; -use script_traits::UntrustedNodeAddress; +use script::dom::node::SharedLayoutData; +use script::layout_interface::LayoutChan; use std::mem; use std::cell::{Ref, RefMut}; use style::properties::ComputedValues; @@ -123,56 +119,6 @@ impl<'ln> LayoutDataAccess for LayoutNode<'ln> { } } -pub trait OpaqueNodeMethods { - /// Converts a DOM node (layout view) to an `OpaqueNode`. - fn from_layout_node(node: &LayoutNode) -> Self; - - /// Converts a thread-safe DOM node (layout view) to an `OpaqueNode`. - fn from_thread_safe_layout_node(node: &ThreadSafeLayoutNode) -> Self; - - /// Converts a DOM node (script view) to an `OpaqueNode`. - fn from_script_node(node: TrustedNodeAddress) -> Self; - - /// Converts a DOM node to an `OpaqueNode'. - fn from_jsmanaged(node: &LayoutJS) -> Self; - - /// Converts this node to an `UntrustedNodeAddress`. An `UntrustedNodeAddress` is just the type - /// of node that script expects to receive in a hit test. - fn to_untrusted_node_address(&self) -> UntrustedNodeAddress; -} - -impl OpaqueNodeMethods for OpaqueNode { - fn from_layout_node(node: &LayoutNode) -> OpaqueNode { - unsafe { - OpaqueNodeMethods::from_jsmanaged(node.get_jsmanaged()) - } - } - - fn from_thread_safe_layout_node(node: &ThreadSafeLayoutNode) -> OpaqueNode { - unsafe { - OpaqueNodeMethods::from_jsmanaged(node.get_jsmanaged()) - } - } - - fn from_script_node(node: TrustedNodeAddress) -> OpaqueNode { - unsafe { - OpaqueNodeMethods::from_jsmanaged(&LayoutJS::from_trusted_node_address(node)) - } - } - - fn from_jsmanaged(node: &LayoutJS) -> OpaqueNode { - unsafe { - let ptr: uintptr_t = node.get_jsobject() as uintptr_t; - OpaqueNode(ptr) - } - } - - fn to_untrusted_node_address(&self) -> UntrustedNodeAddress { - let OpaqueNode(addr) = *self; - UntrustedNodeAddress(addr as *const c_void) - } -} - /// Allows a CSS color to be converted into a graphics color. pub trait ToGfxColor { /// Converts a CSS color to a graphics color. diff --git a/components/layout/wrapper.rs b/components/layout/wrapper.rs index 54f341d1d09..87216585d04 100644 --- a/components/layout/wrapper.rs +++ b/components/layout/wrapper.rs @@ -36,8 +36,9 @@ use canvas::canvas_paint_task::CanvasMsg; use context::SharedLayoutContext; use css::node_style::StyledNode; use incremental::RestyleDamage; -use util::{LayoutDataAccess, LayoutDataFlags, LayoutDataWrapper, OpaqueNodeMethods}; +use util::{LayoutDataAccess, LayoutDataFlags, LayoutDataWrapper}; use util::{PrivateLayoutData}; +use opaque_node::OpaqueNodeMethods; use cssparser::RGBA; use gfx::display_list::OpaqueNode; From 564d12435af1a3a7324e5cdf0c0ead6ee705ed30 Mon Sep 17 00:00:00 2001 From: Dan Fox Date: Tue, 3 Mar 2015 17:59:44 +0000 Subject: [PATCH 2/6] Move ToGfxColor to display_list_builder.rs --- components/layout/display_list_builder.rs | 13 ++++++++++++- components/layout/layout_task.rs | 3 ++- components/layout/util.rs | 15 --------------- 3 files changed, 14 insertions(+), 17 deletions(-) diff --git a/components/layout/display_list_builder.rs b/components/layout/display_list_builder.rs index 7c56c574581..10585964543 100644 --- a/components/layout/display_list_builder.rs +++ b/components/layout/display_list_builder.rs @@ -10,6 +10,7 @@ #![deny(unsafe_blocks)] +use azure::azure_hl::Color; use block::BlockFlow; use canvas::canvas_paint_task::CanvasMsg::SendPixelContents; use context::LayoutContext; @@ -19,7 +20,6 @@ use fragment::{ScannedTextFragmentInfo, SpecificFragmentInfo}; use inline::InlineFlow; use list_item::ListItemFlow; use model; -use util::ToGfxColor; use opaque_node::OpaqueNodeMethods; use geom::{Point2D, Rect, Size2D, SideOffsets2D}; @@ -1482,3 +1482,14 @@ fn shadow_bounds(content_rect: &Rect, blur_radius: Au, spread_radius: Au) -> content_rect.inflate(inflation, inflation) } +/// Allows a CSS color to be converted into a graphics color. +pub trait ToGfxColor { + /// Converts a CSS color to a graphics color. + fn to_gfx_color(&self) -> Color; +} + +impl ToGfxColor for RGBA { + fn to_gfx_color(&self) -> Color { + color::rgba(self.red, self.green, self.blue, self.alpha) + } +} diff --git a/components/layout/layout_task.rs b/components/layout/layout_task.rs index 6e7886cbecb..72a2948bfe2 100644 --- a/components/layout/layout_task.rs +++ b/components/layout/layout_task.rs @@ -10,6 +10,7 @@ use css::node_style::StyledNode; use construct::ConstructionResult; use context::{SharedLayoutContext, SharedLayoutContextWrapper}; +use display_list_builder::ToGfxColor; use flow::{self, Flow, ImmutableFlowUtils, MutableFlowUtils, MutableOwnedFlowUtils}; use flow_ref::FlowRef; use fragment::{Fragment, FragmentBorderBoxIterator}; @@ -17,7 +18,7 @@ use incremental::{LayoutDamageComputation, REFLOW, REFLOW_ENTIRE_DOCUMENT, REPAI use layout_debug; use parallel::{self, UnsafeFlow}; use sequential; -use util::{LayoutDataAccess, LayoutDataWrapper, ToGfxColor}; +use util::{LayoutDataAccess, LayoutDataWrapper}; use opaque_node::OpaqueNodeMethods; use wrapper::{LayoutNode, TLayoutNode, ThreadSafeLayoutNode}; diff --git a/components/layout/util.rs b/components/layout/util.rs index 85c0e1a60d9..d8a2c3f38b9 100644 --- a/components/layout/util.rs +++ b/components/layout/util.rs @@ -9,14 +9,11 @@ use incremental::RestyleDamage; use parallel::DomParallelInfo; use wrapper::{LayoutNode, TLayoutNode}; -use azure::azure_hl::Color; -use gfx; use script::dom::node::SharedLayoutData; use script::layout_interface::LayoutChan; use std::mem; use std::cell::{Ref, RefMut}; use style::properties::ComputedValues; -use style; use std::sync::Arc; /// Data that layout associates with a node. @@ -118,15 +115,3 @@ impl<'ln> LayoutDataAccess for LayoutNode<'ln> { } } } - -/// Allows a CSS color to be converted into a graphics color. -pub trait ToGfxColor { - /// Converts a CSS color to a graphics color. - fn to_gfx_color(&self) -> Color; -} - -impl ToGfxColor for style::values::RGBA { - fn to_gfx_color(&self) -> Color { - gfx::color::rgba(self.red, self.green, self.blue, self.alpha) - } -} From dd0df4e9c57bef2c2e1ceb7dc15c67e3a31ac10d Mon Sep 17 00:00:00 2001 From: Dan Fox Date: Tue, 3 Mar 2015 18:12:06 +0000 Subject: [PATCH 3/6] Rename util.rs -> layout_data.rs --- components/layout/construct.rs | 2 +- components/layout/css/matching.rs | 2 +- components/layout/{util.rs => layout_data.rs} | 0 components/layout/layout_task.rs | 2 +- components/layout/lib.rs | 2 +- components/layout/parallel.rs | 4 ++-- components/layout/wrapper.rs | 4 ++-- 7 files changed, 8 insertions(+), 8 deletions(-) rename components/layout/{util.rs => layout_data.rs} (100%) diff --git a/components/layout/construct.rs b/components/layout/construct.rs index 5b691cef5cc..af8d151e101 100644 --- a/components/layout/construct.rs +++ b/components/layout/construct.rs @@ -41,7 +41,7 @@ use table_rowgroup::TableRowGroupFlow; use table_row::TableRowFlow; use table_cell::TableCellFlow; use text::TextRunScanner; -use util::{HAS_NEWLY_CONSTRUCTED_FLOW, LayoutDataAccess, LayoutDataWrapper}; +use layout_data::{HAS_NEWLY_CONSTRUCTED_FLOW, LayoutDataAccess, LayoutDataWrapper}; use opaque_node::OpaqueNodeMethods; use wrapper::{PostorderNodeMutTraversal, PseudoElementType, TLayoutNode, ThreadSafeLayoutNode}; diff --git a/components/layout/css/matching.rs b/components/layout/css/matching.rs index cc6147cce46..0b48c15b042 100644 --- a/components/layout/css/matching.rs +++ b/components/layout/css/matching.rs @@ -8,7 +8,7 @@ use css::node_style::StyledNode; use incremental::{self, RestyleDamage}; -use util::{LayoutDataAccess, LayoutDataWrapper}; +use layout_data::{LayoutDataAccess, LayoutDataWrapper}; use wrapper::{LayoutElement, LayoutNode, TLayoutNode}; use script::dom::node::NodeTypeId; diff --git a/components/layout/util.rs b/components/layout/layout_data.rs similarity index 100% rename from components/layout/util.rs rename to components/layout/layout_data.rs diff --git a/components/layout/layout_task.rs b/components/layout/layout_task.rs index 72a2948bfe2..c36e5a455ef 100644 --- a/components/layout/layout_task.rs +++ b/components/layout/layout_task.rs @@ -18,7 +18,7 @@ use incremental::{LayoutDamageComputation, REFLOW, REFLOW_ENTIRE_DOCUMENT, REPAI use layout_debug; use parallel::{self, UnsafeFlow}; use sequential; -use util::{LayoutDataAccess, LayoutDataWrapper}; +use layout_data::{LayoutDataAccess, LayoutDataWrapper}; use opaque_node::OpaqueNodeMethods; use wrapper::{LayoutNode, TLayoutNode, ThreadSafeLayoutNode}; diff --git a/components/layout/lib.rs b/components/layout/lib.rs index e34704b5039..626cd6cfe74 100644 --- a/components/layout/lib.rs +++ b/components/layout/lib.rs @@ -68,6 +68,7 @@ pub mod flow_ref; pub mod fragment; pub mod layout_task; pub mod inline; +pub mod layout_data; pub mod list_item; pub mod model; pub mod opaque_node; @@ -82,7 +83,6 @@ pub mod table_row; pub mod table_cell; pub mod text; pub mod traversal; -pub mod util; pub mod incremental; pub mod wrapper; diff --git a/components/layout/parallel.rs b/components/layout/parallel.rs index acc6b6fff9d..7a62bdcd661 100644 --- a/components/layout/parallel.rs +++ b/components/layout/parallel.rs @@ -12,10 +12,10 @@ use context::{LayoutContext, SharedLayoutContextWrapper, SharedLayoutContext}; use flow::{Flow, MutableFlowUtils, PreorderFlowTraversal, PostorderFlowTraversal}; use flow; use flow_ref::FlowRef; -use traversal::{RecalcStyleForNode, ConstructFlows}; +use layout_data::{LayoutDataAccess, LayoutDataWrapper}; use traversal::{BubbleISizes, AssignISizes, AssignBSizesAndStoreOverflow}; use traversal::{ComputeAbsolutePositions, BuildDisplayList}; -use util::{LayoutDataAccess, LayoutDataWrapper}; +use traversal::{RecalcStyleForNode, ConstructFlows}; use wrapper::{layout_node_to_unsafe_layout_node, layout_node_from_unsafe_layout_node, LayoutNode}; use wrapper::{PostorderNodeMutTraversal, UnsafeLayoutNode}; use wrapper::{PreorderDomTraversal, PostorderDomTraversal}; diff --git a/components/layout/wrapper.rs b/components/layout/wrapper.rs index 87216585d04..2c3aba244f0 100644 --- a/components/layout/wrapper.rs +++ b/components/layout/wrapper.rs @@ -36,8 +36,8 @@ use canvas::canvas_paint_task::CanvasMsg; use context::SharedLayoutContext; use css::node_style::StyledNode; use incremental::RestyleDamage; -use util::{LayoutDataAccess, LayoutDataFlags, LayoutDataWrapper}; -use util::{PrivateLayoutData}; +use layout_data::{LayoutDataAccess, LayoutDataFlags, LayoutDataWrapper}; +use layout_data::{PrivateLayoutData}; use opaque_node::OpaqueNodeMethods; use cssparser::RGBA; From 3f9032c1a19211f94ea20ce06eb29098486d1796 Mon Sep 17 00:00:00 2001 From: Dan Fox Date: Tue, 3 Mar 2015 18:16:50 +0000 Subject: [PATCH 4/6] Re-alphabetise imports --- components/layout/construct.rs | 22 +++++++++++----------- components/layout/layout_task.rs | 6 +++--- components/layout/wrapper.rs | 3 +-- 3 files changed, 15 insertions(+), 16 deletions(-) diff --git a/components/layout/construct.rs b/components/layout/construct.rs index af8d151e101..dc128e216fd 100644 --- a/components/layout/construct.rs +++ b/components/layout/construct.rs @@ -13,36 +13,36 @@ #![deny(unsafe_blocks)] -use css::node_style::StyledNode; use block::BlockFlow; use context::LayoutContext; +use css::node_style::StyledNode; use floats::FloatKind; -use flow::{Flow, ImmutableFlowUtils, MutableOwnedFlowUtils}; use flow::{Descendants, AbsDescendants}; +use flow::{Flow, ImmutableFlowUtils, MutableOwnedFlowUtils}; use flow::{IS_ABSOLUTELY_POSITIONED}; use flow; use flow_ref::FlowRef; -use fragment::{Fragment, IframeFragmentInfo}; -use fragment::ImageFragmentInfo; use fragment::CanvasFragmentInfo; +use fragment::ImageFragmentInfo; use fragment::InlineAbsoluteHypotheticalFragmentInfo; -use fragment::{InlineBlockFragmentInfo, SpecificFragmentInfo}; use fragment::TableColumnFragmentInfo; use fragment::UnscannedTextFragmentInfo; +use fragment::{Fragment, IframeFragmentInfo}; +use fragment::{InlineBlockFragmentInfo, SpecificFragmentInfo}; use incremental::{RECONSTRUCT_FLOW, RestyleDamage}; use inline::InlineFlow; +use layout_data::{HAS_NEWLY_CONSTRUCTED_FLOW, LayoutDataAccess, LayoutDataWrapper}; use list_item::{self, ListItemFlow}; +use opaque_node::OpaqueNodeMethods; 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 table_colgroup::TableColGroupFlow; +use table_row::TableRowFlow; +use table_rowgroup::TableRowGroupFlow; +use table_wrapper::TableWrapperFlow; use text::TextRunScanner; -use layout_data::{HAS_NEWLY_CONSTRUCTED_FLOW, LayoutDataAccess, LayoutDataWrapper}; -use opaque_node::OpaqueNodeMethods; use wrapper::{PostorderNodeMutTraversal, PseudoElementType, TLayoutNode, ThreadSafeLayoutNode}; use gfx::display_list::OpaqueNode; diff --git a/components/layout/layout_task.rs b/components/layout/layout_task.rs index c36e5a455ef..d700028465c 100644 --- a/components/layout/layout_task.rs +++ b/components/layout/layout_task.rs @@ -7,19 +7,19 @@ #![allow(unsafe_blocks)] -use css::node_style::StyledNode; use construct::ConstructionResult; use context::{SharedLayoutContext, SharedLayoutContextWrapper}; +use css::node_style::StyledNode; use display_list_builder::ToGfxColor; use flow::{self, Flow, ImmutableFlowUtils, MutableFlowUtils, MutableOwnedFlowUtils}; use flow_ref::FlowRef; use fragment::{Fragment, FragmentBorderBoxIterator}; use incremental::{LayoutDamageComputation, REFLOW, REFLOW_ENTIRE_DOCUMENT, REPAINT}; +use layout_data::{LayoutDataAccess, LayoutDataWrapper}; use layout_debug; +use opaque_node::OpaqueNodeMethods; use parallel::{self, UnsafeFlow}; use sequential; -use layout_data::{LayoutDataAccess, LayoutDataWrapper}; -use opaque_node::OpaqueNodeMethods; use wrapper::{LayoutNode, TLayoutNode, ThreadSafeLayoutNode}; use encoding::EncodingRef; diff --git a/components/layout/wrapper.rs b/components/layout/wrapper.rs index 2c3aba244f0..bfedc76e229 100644 --- a/components/layout/wrapper.rs +++ b/components/layout/wrapper.rs @@ -36,8 +36,7 @@ use canvas::canvas_paint_task::CanvasMsg; use context::SharedLayoutContext; use css::node_style::StyledNode; use incremental::RestyleDamage; -use layout_data::{LayoutDataAccess, LayoutDataFlags, LayoutDataWrapper}; -use layout_data::{PrivateLayoutData}; +use layout_data::{LayoutDataAccess, LayoutDataFlags, LayoutDataWrapper, PrivateLayoutData}; use opaque_node::OpaqueNodeMethods; use cssparser::RGBA; From 3441b2c329176fbb3e63b564c6eaef40862be38a Mon Sep 17 00:00:00 2001 From: Dan Fox Date: Tue, 3 Mar 2015 19:59:38 +0000 Subject: [PATCH 5/6] layout/layout_data.rs -> layout/data.rs --- components/layout/construct.rs | 2 +- components/layout/css/matching.rs | 2 +- components/layout/{layout_data.rs => data.rs} | 0 components/layout/layout_task.rs | 2 +- components/layout/lib.rs | 2 +- components/layout/parallel.rs | 2 +- components/layout/wrapper.rs | 2 +- 7 files changed, 6 insertions(+), 6 deletions(-) rename components/layout/{layout_data.rs => data.rs} (100%) diff --git a/components/layout/construct.rs b/components/layout/construct.rs index dc128e216fd..7b6f4c63ebe 100644 --- a/components/layout/construct.rs +++ b/components/layout/construct.rs @@ -31,7 +31,7 @@ use fragment::{Fragment, IframeFragmentInfo}; use fragment::{InlineBlockFragmentInfo, SpecificFragmentInfo}; use incremental::{RECONSTRUCT_FLOW, RestyleDamage}; use inline::InlineFlow; -use layout_data::{HAS_NEWLY_CONSTRUCTED_FLOW, LayoutDataAccess, LayoutDataWrapper}; +use data::{HAS_NEWLY_CONSTRUCTED_FLOW, LayoutDataAccess, LayoutDataWrapper}; use list_item::{self, ListItemFlow}; use opaque_node::OpaqueNodeMethods; use parallel; diff --git a/components/layout/css/matching.rs b/components/layout/css/matching.rs index 0b48c15b042..bec5a442387 100644 --- a/components/layout/css/matching.rs +++ b/components/layout/css/matching.rs @@ -8,7 +8,7 @@ use css::node_style::StyledNode; use incremental::{self, RestyleDamage}; -use layout_data::{LayoutDataAccess, LayoutDataWrapper}; +use data::{LayoutDataAccess, LayoutDataWrapper}; use wrapper::{LayoutElement, LayoutNode, TLayoutNode}; use script::dom::node::NodeTypeId; diff --git a/components/layout/layout_data.rs b/components/layout/data.rs similarity index 100% rename from components/layout/layout_data.rs rename to components/layout/data.rs diff --git a/components/layout/layout_task.rs b/components/layout/layout_task.rs index d700028465c..046d79b1805 100644 --- a/components/layout/layout_task.rs +++ b/components/layout/layout_task.rs @@ -15,7 +15,7 @@ use flow::{self, Flow, ImmutableFlowUtils, MutableFlowUtils, MutableOwnedFlowUti use flow_ref::FlowRef; use fragment::{Fragment, FragmentBorderBoxIterator}; use incremental::{LayoutDamageComputation, REFLOW, REFLOW_ENTIRE_DOCUMENT, REPAINT}; -use layout_data::{LayoutDataAccess, LayoutDataWrapper}; +use data::{LayoutDataAccess, LayoutDataWrapper}; use layout_debug; use opaque_node::OpaqueNodeMethods; use parallel::{self, UnsafeFlow}; diff --git a/components/layout/lib.rs b/components/layout/lib.rs index 626cd6cfe74..eb6bbff2ca3 100644 --- a/components/layout/lib.rs +++ b/components/layout/lib.rs @@ -60,6 +60,7 @@ pub mod layout_debug; pub mod block; pub mod construct; pub mod context; +pub mod data; pub mod display_list_builder; pub mod floats; pub mod flow; @@ -68,7 +69,6 @@ pub mod flow_ref; pub mod fragment; pub mod layout_task; pub mod inline; -pub mod layout_data; pub mod list_item; pub mod model; pub mod opaque_node; diff --git a/components/layout/parallel.rs b/components/layout/parallel.rs index 7a62bdcd661..015ed2d08d5 100644 --- a/components/layout/parallel.rs +++ b/components/layout/parallel.rs @@ -12,7 +12,7 @@ use context::{LayoutContext, SharedLayoutContextWrapper, SharedLayoutContext}; use flow::{Flow, MutableFlowUtils, PreorderFlowTraversal, PostorderFlowTraversal}; use flow; use flow_ref::FlowRef; -use layout_data::{LayoutDataAccess, LayoutDataWrapper}; +use data::{LayoutDataAccess, LayoutDataWrapper}; use traversal::{BubbleISizes, AssignISizes, AssignBSizesAndStoreOverflow}; use traversal::{ComputeAbsolutePositions, BuildDisplayList}; use traversal::{RecalcStyleForNode, ConstructFlows}; diff --git a/components/layout/wrapper.rs b/components/layout/wrapper.rs index bfedc76e229..2a2e00ac9ef 100644 --- a/components/layout/wrapper.rs +++ b/components/layout/wrapper.rs @@ -36,7 +36,7 @@ use canvas::canvas_paint_task::CanvasMsg; use context::SharedLayoutContext; use css::node_style::StyledNode; use incremental::RestyleDamage; -use layout_data::{LayoutDataAccess, LayoutDataFlags, LayoutDataWrapper, PrivateLayoutData}; +use data::{LayoutDataAccess, LayoutDataFlags, LayoutDataWrapper, PrivateLayoutData}; use opaque_node::OpaqueNodeMethods; use cssparser::RGBA; From 559ff68b31eabdf1025fba2fcc386b504256a0b2 Mon Sep 17 00:00:00 2001 From: Dan Fox Date: Thu, 5 Mar 2015 17:42:05 +0000 Subject: [PATCH 6/6] Get rid of servo_util --- components/layout/block.rs | 6 +++--- components/layout/construct.rs | 2 +- components/layout/context.rs | 2 +- components/layout/css/matching.rs | 6 +++--- components/layout/display_list_builder.rs | 8 ++++---- components/layout/floats.rs | 8 ++++---- components/layout/flow.rs | 4 ++-- components/layout/fragment.rs | 10 +++++----- components/layout/inline.rs | 8 ++++---- components/layout/layout_task.rs | 20 ++++++++++---------- components/layout/lib.rs | 2 +- components/layout/list_item.rs | 6 +++--- components/layout/model.rs | 4 ++-- components/layout/parallel.rs | 6 +++--- components/layout/sequential.rs | 4 ++-- components/layout/table.rs | 4 ++-- components/layout/table_caption.rs | 4 ++-- components/layout/table_cell.rs | 4 ++-- components/layout/table_colgroup.rs | 2 +- components/layout/table_row.rs | 4 ++-- components/layout/table_rowgroup.rs | 4 ++-- components/layout/table_wrapper.rs | 2 +- components/layout/text.rs | 10 +++++----- components/layout/traversal.rs | 4 ++-- components/layout/wrapper.rs | 2 +- 25 files changed, 68 insertions(+), 68 deletions(-) diff --git a/components/layout/block.rs b/components/layout/block.rs index fadba8af411..81edba159b7 100644 --- a/components/layout/block.rs +++ b/components/layout/block.rs @@ -53,9 +53,9 @@ use gfx::display_list::{ClippingRegion, DisplayList}; use rustc_serialize::{Encoder, Encodable}; use msg::compositor_msg::LayerId; use msg::constellation_msg::ConstellationChan; -use servo_util::geometry::{Au, MAX_AU}; -use servo_util::logical_geometry::{LogicalPoint, LogicalRect, LogicalSize}; -use servo_util::opts; +use util::geometry::{Au, MAX_AU}; +use util::logical_geometry::{LogicalPoint, LogicalRect, LogicalSize}; +use util::opts; use std::cmp::{max, min}; use std::fmt; use style::computed_values::{overflow_x, overflow_y, position, box_sizing, display, float}; diff --git a/components/layout/construct.rs b/components/layout/construct.rs index b263c438149..b8dd5a8415e 100644 --- a/components/layout/construct.rs +++ b/components/layout/construct.rs @@ -50,7 +50,7 @@ use script::dom::element::ElementTypeId; use script::dom::htmlelement::HTMLElementTypeId; use script::dom::htmlobjectelement::is_image_data; use script::dom::node::NodeTypeId; -use servo_util::opts; +use util::opts; use std::borrow::ToOwned; use std::collections::DList; use std::mem; diff --git a/components/layout/context.rs b/components/layout/context.rs index edf5c5177b2..00d9f2139b1 100644 --- a/components/layout/context.rs +++ b/components/layout/context.rs @@ -16,7 +16,7 @@ use script::layout_interface::LayoutChan; use script_traits::UntrustedNodeAddress; use msg::constellation_msg::ConstellationChan; use net::local_image_cache::LocalImageCache; -use servo_util::geometry::Au; +use util::geometry::Au; use std::boxed; use std::cell::Cell; use std::ptr; diff --git a/components/layout/css/matching.rs b/components/layout/css/matching.rs index bec5a442387..8e2002ca06f 100644 --- a/components/layout/css/matching.rs +++ b/components/layout/css/matching.rs @@ -13,9 +13,9 @@ use wrapper::{LayoutElement, LayoutNode, TLayoutNode}; use script::dom::node::NodeTypeId; use selectors::bloom::BloomFilter; -use servo_util::cache::{LRUCache, SimpleHashCache}; -use servo_util::smallvec::{SmallVec, SmallVec16}; -use servo_util::arc_ptr_eq; +use util::cache::{LRUCache, SimpleHashCache}; +use util::smallvec::{SmallVec, SmallVec16}; +use util::arc_ptr_eq; use std::borrow::ToOwned; use std::mem; use std::hash::{Hash, Hasher, Writer}; diff --git a/components/layout/display_list_builder.rs b/components/layout/display_list_builder.rs index b4fb0001a80..c9e82e7eb8e 100644 --- a/components/layout/display_list_builder.rs +++ b/components/layout/display_list_builder.rs @@ -37,10 +37,10 @@ use msg::compositor_msg::ScrollPolicy; use msg::constellation_msg::Msg as ConstellationMsg; use msg::constellation_msg::ConstellationChan; use net::image::holder::ImageHolder; -use servo_util::cursor::Cursor; -use servo_util::geometry::{self, Au, ZERO_POINT, to_px, to_frac_px}; -use servo_util::logical_geometry::{LogicalPoint, LogicalRect, LogicalSize}; -use servo_util::opts; +use util::cursor::Cursor; +use util::geometry::{self, Au, ZERO_POINT, to_px, to_frac_px}; +use util::logical_geometry::{LogicalPoint, LogicalRect, LogicalSize}; +use util::opts; use std::cmp; use std::default::Default; use std::iter::repeat; diff --git a/components/layout/floats.rs b/components/layout/floats.rs index 7fb155800f9..9c83322c1c7 100644 --- a/components/layout/floats.rs +++ b/components/layout/floats.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 servo_util::geometry::Au; -use servo_util::logical_geometry::WritingMode; -use servo_util::logical_geometry::{LogicalPoint, LogicalRect, LogicalSize}; -use servo_util::persistent_list::PersistentList; +use util::geometry::Au; +use util::logical_geometry::WritingMode; +use util::logical_geometry::{LogicalPoint, LogicalRect, LogicalSize}; +use util::persistent_list::PersistentList; use std::cmp::{max, min}; use std::i32; use std::fmt; diff --git a/components/layout/flow.rs b/components/layout/flow.rs index ec618e03847..90cdc8a8030 100644 --- a/components/layout/flow.rs +++ b/components/layout/flow.rs @@ -51,8 +51,8 @@ use gfx::display_list::ClippingRegion; use rustc_serialize::{Encoder, Encodable}; use msg::constellation_msg::ConstellationChan; use msg::compositor_msg::LayerId; -use servo_util::geometry::{Au, ZERO_RECT}; -use servo_util::logical_geometry::{LogicalRect, LogicalSize, WritingMode}; +use util::geometry::{Au, ZERO_RECT}; +use util::logical_geometry::{LogicalRect, LogicalSize, WritingMode}; use std::mem; use std::fmt; use std::iter::Zip; diff --git a/components/layout/fragment.rs b/components/layout/fragment.rs index 205e7324d12..4d66a76b582 100644 --- a/components/layout/fragment.rs +++ b/components/layout/fragment.rs @@ -33,11 +33,11 @@ use rustc_serialize::{Encodable, Encoder}; use msg::constellation_msg::{ConstellationChan, Msg, PipelineId, SubpageId}; use net::image::holder::ImageHolder; use net::local_image_cache::LocalImageCache; -use servo_util::geometry::{self, Au, ZERO_POINT}; -use servo_util::logical_geometry::{LogicalRect, LogicalSize, LogicalMargin}; -use servo_util::range::*; -use servo_util::smallvec::SmallVec; -use servo_util::str::is_whitespace; +use util::geometry::{self, Au, ZERO_POINT}; +use util::logical_geometry::{LogicalRect, LogicalSize, LogicalMargin}; +use util::range::*; +use util::smallvec::SmallVec; +use util::str::is_whitespace; use std::borrow::ToOwned; use std::cmp::{max, min}; use std::collections::DList; diff --git a/components/layout/inline.rs b/components/layout/inline.rs index 0a4b575c3c4..a1bc2af0ae2 100644 --- a/components/layout/inline.rs +++ b/components/layout/inline.rs @@ -24,10 +24,10 @@ use geom::{Point2D, Rect}; use gfx::font::FontMetrics; use gfx::font_context::FontContext; use gfx::text::glyph::CharIndex; -use servo_util::arc_ptr_eq; -use servo_util::geometry::{Au, ZERO_RECT}; -use servo_util::logical_geometry::{LogicalRect, LogicalSize, WritingMode}; -use servo_util::range::{Range, RangeIndex}; +use util::arc_ptr_eq; +use util::geometry::{Au, ZERO_RECT}; +use util::logical_geometry::{LogicalRect, LogicalSize, WritingMode}; +use util::range::{Range, RangeIndex}; use std::cmp::max; use std::fmt; use std::mem; diff --git a/components/layout/layout_task.rs b/components/layout/layout_task.rs index e55805486b3..793bc083723 100644 --- a/components/layout/layout_task.rs +++ b/components/layout/layout_task.rs @@ -53,16 +53,16 @@ use msg::constellation_msg::{ConstellationChan, Failure, PipelineExitType, Pipel use net::image_cache_task::{ImageCacheTask, ImageResponseMsg}; use net::local_image_cache::{ImageResponder, LocalImageCache}; use net::resource_task::{ResourceTask, load_bytes_iter}; -use servo_util::cursor::Cursor; -use servo_util::geometry::Au; -use servo_util::logical_geometry::LogicalPoint; -use servo_util::opts; -use servo_util::smallvec::{SmallVec, SmallVec1, VecLike}; -use servo_util::task::spawn_named_with_send_on_failure; -use servo_util::task_state; -use servo_util::time::{TimeProfilerCategory, ProfilerMetadata, TimeProfilerChan}; -use servo_util::time::{TimerMetadataFrameType, TimerMetadataReflowType, profile}; -use servo_util::workqueue::WorkQueue; +use util::cursor::Cursor; +use util::geometry::Au; +use util::logical_geometry::LogicalPoint; +use util::opts; +use util::smallvec::{SmallVec, SmallVec1, VecLike}; +use util::task::spawn_named_with_send_on_failure; +use util::task_state; +use util::time::{TimeProfilerCategory, ProfilerMetadata, TimeProfilerChan}; +use util::time::{TimerMetadataFrameType, TimerMetadataReflowType, profile}; +use util::workqueue::WorkQueue; use std::borrow::ToOwned; use std::cell::Cell; use std::ops::{Deref, DerefMut}; diff --git a/components/layout/lib.rs b/components/layout/lib.rs index eb6bbff2ca3..6eb177f6f94 100644 --- a/components/layout/lib.rs +++ b/components/layout/lib.rs @@ -43,7 +43,7 @@ extern crate net; extern crate msg; extern crate selectors; #[macro_use] -extern crate "util" as servo_util; +extern crate util; #[no_link] #[macro_use] #[plugin] extern crate string_cache_macros; diff --git a/components/layout/list_item.rs b/components/layout/list_item.rs index eedb2d3b6b6..84c713af944 100644 --- a/components/layout/list_item.rs +++ b/components/layout/list_item.rs @@ -18,9 +18,9 @@ use wrapper::ThreadSafeLayoutNode; use geom::{Point2D, Rect}; use gfx::display_list::DisplayList; -use servo_util::geometry::Au; -use servo_util::logical_geometry::LogicalRect; -use servo_util::opts; +use util::geometry::Au; +use util::logical_geometry::LogicalRect; +use util::opts; use style::properties::ComputedValues; use style::computed_values::list_style_type; use std::sync::Arc; diff --git a/components/layout/model.rs b/components/layout/model.rs index d62a8390351..4f617629f42 100644 --- a/components/layout/model.rs +++ b/components/layout/model.rs @@ -11,8 +11,8 @@ use fragment::Fragment; use geom::SideOffsets2D; use style::values::computed::{LengthOrPercentageOrAuto, LengthOrPercentageOrNone, LengthOrPercentage}; use style::properties::ComputedValues; -use servo_util::geometry::Au; -use servo_util::logical_geometry::LogicalMargin; +use util::geometry::Au; +use util::logical_geometry::LogicalMargin; use std::cmp::{max, min}; use std::fmt; diff --git a/components/layout/parallel.rs b/components/layout/parallel.rs index 015ed2d08d5..ee2ca416cd1 100644 --- a/components/layout/parallel.rs +++ b/components/layout/parallel.rs @@ -20,9 +20,9 @@ use wrapper::{layout_node_to_unsafe_layout_node, layout_node_from_unsafe_layout_ use wrapper::{PostorderNodeMutTraversal, UnsafeLayoutNode}; use wrapper::{PreorderDomTraversal, PostorderDomTraversal}; -use servo_util::opts; -use servo_util::time::{TimeProfilerCategory, ProfilerMetadata, TimeProfilerChan, profile}; -use servo_util::workqueue::{WorkQueue, WorkUnit, WorkerProxy}; +use util::opts; +use util::time::{TimeProfilerCategory, ProfilerMetadata, TimeProfilerChan, profile}; +use util::workqueue::{WorkQueue, WorkUnit, WorkerProxy}; use std::mem; use std::ptr; use std::sync::atomic::{AtomicInt, Ordering}; diff --git a/components/layout/sequential.rs b/components/layout/sequential.rs index ff2bd948c51..7007fdfa427 100644 --- a/components/layout/sequential.rs +++ b/components/layout/sequential.rs @@ -17,8 +17,8 @@ use wrapper::{PostorderNodeMutTraversal}; use wrapper::{PreorderDomTraversal, PostorderDomTraversal}; use geom::point::Point2D; -use servo_util::geometry::{Au, ZERO_POINT}; -use servo_util::opts; +use util::geometry::{Au, ZERO_POINT}; +use util::opts; pub fn traverse_dom_preorder(root: LayoutNode, shared_layout_context: &SharedLayoutContext) { diff --git a/components/layout/table.rs b/components/layout/table.rs index 270143a21da..9679938b2e7 100644 --- a/components/layout/table.rs +++ b/components/layout/table.rs @@ -21,8 +21,8 @@ use table_wrapper::TableLayout; use wrapper::ThreadSafeLayoutNode; use geom::{Point2D, Rect}; -use servo_util::geometry::Au; -use servo_util::logical_geometry::LogicalRect; +use util::geometry::Au; +use util::logical_geometry::LogicalRect; use std::cmp::max; use std::fmt; use style::properties::ComputedValues; diff --git a/components/layout/table_caption.rs b/components/layout/table_caption.rs index 43eaacf9384..ceb6bf7e3aa 100644 --- a/components/layout/table_caption.rs +++ b/components/layout/table_caption.rs @@ -14,8 +14,8 @@ use fragment::FragmentBorderBoxIterator; use wrapper::ThreadSafeLayoutNode; use geom::{Point2D, Rect}; -use servo_util::geometry::Au; -use servo_util::logical_geometry::LogicalRect; +use util::geometry::Au; +use util::logical_geometry::LogicalRect; use std::fmt; use style::properties::ComputedValues; use std::sync::Arc; diff --git a/components/layout/table_cell.rs b/components/layout/table_cell.rs index 670dcf7b344..f018e72c2c3 100644 --- a/components/layout/table_cell.rs +++ b/components/layout/table_cell.rs @@ -16,8 +16,8 @@ use table::InternalTable; use wrapper::ThreadSafeLayoutNode; use geom::{Point2D, Rect}; -use servo_util::geometry::Au; -use servo_util::logical_geometry::LogicalRect; +use util::geometry::Au; +use util::logical_geometry::LogicalRect; use std::fmt; use style::properties::ComputedValues; use style::legacy::UnsignedIntegerAttribute; diff --git a/components/layout/table_colgroup.rs b/components/layout/table_colgroup.rs index 6d19a0c5778..f0ad4cff9ca 100644 --- a/components/layout/table_colgroup.rs +++ b/components/layout/table_colgroup.rs @@ -14,7 +14,7 @@ use layout_debug; use wrapper::ThreadSafeLayoutNode; use geom::{Point2D, Rect}; -use servo_util::geometry::{Au, ZERO_RECT}; +use util::geometry::{Au, ZERO_RECT}; use std::cmp::max; use std::fmt; use style::values::computed::LengthOrPercentageOrAuto; diff --git a/components/layout/table_row.rs b/components/layout/table_row.rs index d712d7e4945..3f07e401afb 100644 --- a/components/layout/table_row.rs +++ b/components/layout/table_row.rs @@ -19,8 +19,8 @@ use model::MaybeAuto; use wrapper::ThreadSafeLayoutNode; use geom::{Point2D, Rect}; -use servo_util::geometry::Au; -use servo_util::logical_geometry::LogicalRect; +use util::geometry::Au; +use util::logical_geometry::LogicalRect; use std::cmp::max; use std::fmt; use style::properties::ComputedValues; diff --git a/components/layout/table_rowgroup.rs b/components/layout/table_rowgroup.rs index 9728fde36a8..1596e1bfab0 100644 --- a/components/layout/table_rowgroup.rs +++ b/components/layout/table_rowgroup.rs @@ -16,8 +16,8 @@ use table::{ColumnComputedInlineSize, ColumnIntrinsicInlineSize, InternalTable}; use wrapper::ThreadSafeLayoutNode; use geom::{Point2D, Rect}; -use servo_util::geometry::Au; -use servo_util::logical_geometry::LogicalRect; +use util::geometry::Au; +use util::logical_geometry::LogicalRect; use std::fmt; use style::properties::ComputedValues; use std::sync::Arc; diff --git a/components/layout/table_wrapper.rs b/components/layout/table_wrapper.rs index e849150bede..0d2b6267806 100644 --- a/components/layout/table_wrapper.rs +++ b/components/layout/table_wrapper.rs @@ -24,7 +24,7 @@ use table::{ColumnComputedInlineSize, ColumnIntrinsicInlineSize}; use wrapper::ThreadSafeLayoutNode; use geom::{Point2D, Rect}; -use servo_util::geometry::Au; +use util::geometry::Au; use std::cmp::{max, min}; use std::fmt; use std::ops::Add; diff --git a/components/layout/text.rs b/components/layout/text.rs index 697b2301738..4c5a2a6436d 100644 --- a/components/layout/text.rs +++ b/components/layout/text.rs @@ -15,11 +15,11 @@ use gfx::font_context::FontContext; use gfx::text::glyph::CharIndex; use gfx::text::text_run::TextRun; use gfx::text::util::{self, CompressionMode}; -use servo_util::dlist; -use servo_util::geometry::Au; -use servo_util::logical_geometry::{LogicalSize, WritingMode}; -use servo_util::range::Range; -use servo_util::smallvec::{SmallVec, SmallVec1}; +use util::dlist; +use util::geometry::Au; +use util::logical_geometry::{LogicalSize, WritingMode}; +use util::range::Range; +use util::smallvec::{SmallVec, SmallVec1}; use std::collections::DList; use std::mem; use style::computed_values::{line_height, text_orientation, text_rendering, text_transform}; diff --git a/components/layout/traversal.rs b/components/layout/traversal.rs index 2211cf2fcce..ceb7bf78679 100644 --- a/components/layout/traversal.rs +++ b/components/layout/traversal.rs @@ -19,8 +19,8 @@ use wrapper::{PostorderNodeMutTraversal, ThreadSafeLayoutNode, UnsafeLayoutNode} use wrapper::{PreorderDomTraversal, PostorderDomTraversal}; use selectors::bloom::BloomFilter; -use servo_util::opts; -use servo_util::tid::tid; +use util::opts; +use util::tid::tid; use style::node::TNode; use std::cell::RefCell; diff --git a/components/layout/wrapper.rs b/components/layout/wrapper.rs index 2a2e00ac9ef..74b3d20ca1c 100644 --- a/components/layout/wrapper.rs +++ b/components/layout/wrapper.rs @@ -60,7 +60,7 @@ use script::dom::node::{HAS_CHANGED, IS_DIRTY, HAS_DIRTY_SIBLINGS, HAS_DIRTY_DES use script::dom::text::Text; use script::layout_interface::LayoutChan; use msg::constellation_msg::{PipelineId, SubpageId}; -use servo_util::str::{LengthOrPercentageOrAuto, is_whitespace}; +use util::str::{LengthOrPercentageOrAuto, is_whitespace}; use std::borrow::ToOwned; use std::cell::{Ref, RefMut}; use std::marker::ContravariantLifetime;