Removed util.

This commit is contained in:
Alan Jeffrey 2016-12-14 10:37:58 -06:00
parent 01b6ad55bd
commit 9be4fd56ce
133 changed files with 396 additions and 352 deletions

View file

@ -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"

View file

@ -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();

View file

@ -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.

View file

@ -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,

View file

@ -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 {

View file

@ -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]

View file

@ -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;

View file

@ -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;

View file

@ -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> {