diff options
Diffstat (limited to 'components/layout')
-rw-r--r-- | components/layout/Cargo.toml | 2 | ||||
-rw-r--r-- | components/layout/block.rs | 3 | ||||
-rw-r--r-- | components/layout/construct.rs | 2 | ||||
-rw-r--r-- | components/layout/context.rs | 2 | ||||
-rw-r--r-- | components/layout/display_list_builder.rs | 2 | ||||
-rw-r--r-- | components/layout/lib.rs | 2 | ||||
-rw-r--r-- | components/layout/parallel.rs | 2 | ||||
-rw-r--r-- | components/layout/sequential.rs | 2 | ||||
-rw-r--r-- | components/layout/traversal.rs | 2 |
9 files changed, 9 insertions, 10 deletions
diff --git a/components/layout/Cargo.toml b/components/layout/Cargo.toml index 6443c4a6aa3..9196f559afa 100644 --- a/components/layout/Cargo.toml +++ b/components/layout/Cargo.toml @@ -39,13 +39,13 @@ serde = "0.8" serde_derive = "0.8" serde_json = "0.8" servo_atoms = {path = "../atoms"} +servo_config = {path = "../config"} servo_url = {path = "../url"} smallvec = "0.1" style = {path = "../style"} style_traits = {path = "../style_traits"} unicode-bidi = "0.2" unicode-script = {version = "0.1", features = ["harfbuzz"]} -util = {path = "../util"} [dependencies.webrender_traits] git = "https://github.com/servo/webrender" diff --git a/components/layout/block.rs b/components/layout/block.rs index 6db30de9bec..9d38627b80f 100644 --- a/components/layout/block.rs +++ b/components/layout/block.rs @@ -61,7 +61,6 @@ use style::properties::ServoComputedValues; use style::servo::restyle_damage::{BUBBLE_ISIZES, REFLOW, REFLOW_OUT_OF_FLOW, REPOSITION}; use style::values::computed::{LengthOrPercentageOrNone, LengthOrPercentage}; use style::values::computed::LengthOrPercentageOrAuto; -use util::clamp; /// Information specific to floated blocks. #[derive(Clone, Serialize)] @@ -1534,7 +1533,7 @@ impl BlockFlow { size + self.fragment.border_padding.inline_start_end(), } } else { - clamp(min_inline_size, available_inline_size, max_inline_size) + max(min_inline_size, min(available_inline_size, max_inline_size)) }; self.base.position.size.inline = inline_size + self.fragment.margin.inline_start_end(); diff --git a/components/layout/construct.rs b/components/layout/construct.rs index b25923d19c2..394b5d91fcf 100644 --- a/components/layout/construct.rs +++ b/components/layout/construct.rs @@ -38,6 +38,7 @@ use multicol::{MulticolColumnFlow, MulticolFlow}; use parallel; use script_layout_interface::{LayoutElementType, LayoutNodeType, is_image_data}; use script_layout_interface::wrapper_traits::{PseudoElementType, ThreadSafeLayoutElement, ThreadSafeLayoutNode}; +use servo_config::opts; use servo_url::ServoUrl; use std::borrow::ToOwned; use std::collections::LinkedList; @@ -64,7 +65,6 @@ use table_rowgroup::TableRowGroupFlow; use table_wrapper::TableWrapperFlow; use text::TextRunScanner; use traversal::PostorderNodeMutTraversal; -use util::opts; use wrapper::{LayoutNodeLayoutData, TextContent, ThreadSafeLayoutNodeHelpers}; /// The results of flow construction for a DOM node. diff --git a/components/layout/context.rs b/components/layout/context.rs index b8d7c8680df..23ec3e41d88 100644 --- a/components/layout/context.rs +++ b/components/layout/context.rs @@ -17,6 +17,7 @@ use net_traits::image::base::Image; use net_traits::image_cache_thread::{ImageCacheChan, ImageCacheThread, ImageResponse, ImageState}; use net_traits::image_cache_thread::{ImageOrMetadataAvailable, UsePlaceholder}; use parking_lot::RwLock; +use servo_config::opts; use servo_url::ServoUrl; use std::borrow::Borrow; use std::cell::{RefCell, RefMut}; @@ -25,7 +26,6 @@ use std::hash::BuildHasherDefault; use std::rc::Rc; use std::sync::{Arc, Mutex}; use style::context::{LocalStyleContext, StyleContext, SharedStyleContext}; -use util::opts; struct LocalLayoutContext { style_context: LocalStyleContext, diff --git a/components/layout/display_list_builder.rs b/components/layout/display_list_builder.rs index 60b1ecedc19..f2534729e5f 100644 --- a/components/layout/display_list_builder.rs +++ b/components/layout/display_list_builder.rs @@ -35,6 +35,7 @@ use model::{self, MaybeAuto, ToGfxMatrix}; use net_traits::image::base::PixelFormat; use net_traits::image_cache_thread::UsePlaceholder; use range::Range; +use servo_config::opts; use servo_url::ServoUrl; use std::{cmp, f32}; use std::collections::HashMap; @@ -57,7 +58,6 @@ use style::values::computed::{Gradient, GradientKind, LengthOrPercentage, Length use style::values::specified::{AngleOrCorner, HorizontalDirection, VerticalDirection}; use style_traits::cursor::Cursor; use table_cell::CollapsedBordersForCell; -use util::opts; use webrender_traits::{ColorF, GradientStop}; trait RgbColor { diff --git a/components/layout/lib.rs b/components/layout/lib.rs index a74bea33431..b2aaa006a2a 100644 --- a/components/layout/lib.rs +++ b/components/layout/lib.rs @@ -49,13 +49,13 @@ extern crate serde; extern crate serde_derive; extern crate serde_json; #[macro_use] extern crate servo_atoms; +extern crate servo_config; extern crate servo_url; extern crate smallvec; extern crate style; extern crate style_traits; extern crate unicode_bidi; extern crate unicode_script; -extern crate util; extern crate webrender_traits; #[macro_use] diff --git a/components/layout/parallel.rs b/components/layout/parallel.rs index 03aaa512d3e..6422ab674a9 100644 --- a/components/layout/parallel.rs +++ b/components/layout/parallel.rs @@ -13,13 +13,13 @@ use flow::{self, Flow, MutableFlowUtils, PostorderFlowTraversal, PreorderFlowTra use flow_ref::FlowRef; use profile_traits::time::{self, TimerMetadata, profile}; use rayon; +use servo_config::opts; use std::mem; use std::sync::atomic::{AtomicIsize, Ordering}; use style::dom::UnsafeNode; use style::parallel::CHUNK_SIZE; use traversal::{AssignISizes, BubbleISizes}; use traversal::AssignBSizes; -use util::opts; pub use style::parallel::traverse_dom; diff --git a/components/layout/sequential.rs b/components/layout/sequential.rs index 71626243206..b4d31269629 100644 --- a/components/layout/sequential.rs +++ b/components/layout/sequential.rs @@ -15,10 +15,10 @@ use flow::IS_ABSOLUTELY_POSITIONED; use fragment::FragmentBorderBoxIterator; use generated_content::ResolveGeneratedContent; use gfx_traits::ScrollRootId; +use servo_config::opts; use style::context::StyleContext; use style::servo::restyle_damage::{REFLOW, STORE_OVERFLOW}; use traversal::{AssignBSizes, AssignISizes, BubbleISizes, BuildDisplayList}; -use util::opts; pub use style::sequential::traverse_dom; diff --git a/components/layout/traversal.rs b/components/layout/traversal.rs index 04ea73056aa..bda40df574f 100644 --- a/components/layout/traversal.rs +++ b/components/layout/traversal.rs @@ -11,6 +11,7 @@ use flow::{self, PreorderFlowTraversal}; use flow::{CAN_BE_FRAGMENTED, Flow, ImmutableFlowUtils, PostorderFlowTraversal}; use gfx::display_list::OpaqueNode; use script_layout_interface::wrapper_traits::{LayoutNode, ThreadSafeLayoutNode}; +use servo_config::opts; use std::mem; use style::atomic_refcell::AtomicRefCell; use style::context::{LocalStyleContext, SharedStyleContext, StyleContext}; @@ -20,7 +21,6 @@ use style::selector_parser::RestyleDamage; use style::servo::restyle_damage::{BUBBLE_ISIZES, REFLOW, REFLOW_OUT_OF_FLOW, REPAINT}; use style::traversal::{DomTraversalContext, recalc_style_at, remove_from_bloom_filter}; use style::traversal::PerLevelTraversalData; -use util::opts; use wrapper::{GetRawData, LayoutNodeHelpers, LayoutNodeLayoutData}; pub struct RecalcStyleAndConstructFlows<'lc> { |