Reorder imports

This commit is contained in:
Pyfisch 2018-11-06 20:38:02 +01:00
parent 4a947dd719
commit 9e92eb205a
546 changed files with 1968 additions and 1536 deletions

View file

@ -11,10 +11,10 @@ use crate::opaque_node::OpaqueNodeMethods;
use fxhash::FxHashMap;
use ipc_channel::ipc::IpcSender;
use msg::constellation_msg::PipelineId;
use script_traits::{AnimationState, ConstellationControlMsg, LayoutMsg as ConstellationMsg};
use script_traits::UntrustedNodeAddress;
use script_traits::{AnimationState, ConstellationControlMsg, LayoutMsg as ConstellationMsg};
use servo_channel::Receiver;
use style::animation::{Animation, update_style_for_animation};
use style::animation::{update_style_for_animation, Animation};
use style::dom::TElement;
use style::font_metrics::ServoMetricsProvider;
use style::selector_parser::RestyleDamage;

View file

@ -27,18 +27,26 @@
use app_units::{Au, MAX_AU};
use crate::context::LayoutContext;
use crate::display_list::items::DisplayListSection;
use crate::display_list::StackingContextCollectionState;
use crate::display_list::{BlockFlowDisplayListBuilding, BorderPaintingMode};
use crate::display_list::{DisplayListBuildState, StackingContextCollectionFlags};
use crate::display_list::StackingContextCollectionState;
use crate::display_list::items::DisplayListSection;
use crate::floats::{ClearType, FloatKind, Floats, PlacementInfo};
use crate::flow::{BaseFlow, EarlyAbsolutePositionInfo, Flow, FlowClass, ForceNonfloatedFlag, GetBaseFlow};
use crate::flow::{ImmutableFlowUtils, LateAbsolutePositionInfo, OpaqueFlow, FragmentationContext, FlowFlags};
use crate::flow::{
BaseFlow, EarlyAbsolutePositionInfo, Flow, FlowClass, ForceNonfloatedFlag, GetBaseFlow,
};
use crate::flow::{
FlowFlags, FragmentationContext, ImmutableFlowUtils, LateAbsolutePositionInfo, OpaqueFlow,
};
use crate::flow_list::FlowList;
use crate::fragment::{CoordinateSystem, Fragment, FragmentBorderBoxIterator, Overflow, FragmentFlags};
use crate::fragment::{
CoordinateSystem, Fragment, FragmentBorderBoxIterator, FragmentFlags, Overflow,
};
use crate::incremental::RelayoutMode;
use crate::layout_debug;
use crate::model::{AdjoiningMargins, CollapsibleMargins, IntrinsicISizes, MarginCollapseInfo, MaybeAuto};
use crate::model::{
AdjoiningMargins, CollapsibleMargins, IntrinsicISizes, MarginCollapseInfo, MaybeAuto,
};
use crate::sequential;
use crate::traversal::PreorderFlowTraversal;
use euclid::{Point2D, Rect, SideOffsets2D, Size2D};
@ -58,8 +66,8 @@ use style::context::SharedStyleContext;
use style::logical_geometry::{LogicalMargin, LogicalPoint, LogicalRect, LogicalSize, WritingMode};
use style::properties::ComputedValues;
use style::servo::restyle_damage::ServoRestyleDamage;
use style::values::computed::{LengthOrPercentageOrNone, LengthOrPercentage};
use style::values::computed::LengthOrPercentageOrAuto;
use style::values::computed::{LengthOrPercentage, LengthOrPercentageOrNone};
/// Information specific to floated blocks.
#[derive(Clone, Serialize)]

View file

@ -11,21 +11,28 @@
//! maybe it's an absolute or fixed position thing that hasn't found its containing block yet.
//! Construction items bubble up the tree from children to parents until they find their homes.
use crate::ServoArc;
use crate::block::BlockFlow;
use crate::context::{LayoutContext, with_thread_local_font_context};
use crate::data::{LayoutDataFlags, LayoutData};
use crate::context::{with_thread_local_font_context, LayoutContext};
use crate::data::{LayoutData, LayoutDataFlags};
use crate::display_list::items::OpaqueNode;
use crate::flex::FlexFlow;
use crate::floats::FloatKind;
use crate::flow::{AbsoluteDescendants, Flow, FlowClass, GetBaseFlow, ImmutableFlowUtils};
use crate::flow::{FlowFlags, MutableFlowUtils, MutableOwnedFlowUtils};
use crate::flow_ref::FlowRef;
use crate::fragment::{CanvasFragmentInfo, Fragment, FragmentFlags, GeneratedContentInfo, IframeFragmentInfo};
use crate::fragment::{ImageFragmentInfo, InlineAbsoluteFragmentInfo, InlineAbsoluteHypotheticalFragmentInfo};
use crate::fragment::{InlineBlockFragmentInfo, MediaFragmentInfo, SpecificFragmentInfo, SvgFragmentInfo};
use crate::fragment::{TableColumnFragmentInfo, UnscannedTextFragmentInfo, WhitespaceStrippingResult};
use crate::inline::{InlineFlow, InlineFragmentNodeInfo, InlineFragmentNodeFlags};
use crate::fragment::{
CanvasFragmentInfo, Fragment, FragmentFlags, GeneratedContentInfo, IframeFragmentInfo,
};
use crate::fragment::{
ImageFragmentInfo, InlineAbsoluteFragmentInfo, InlineAbsoluteHypotheticalFragmentInfo,
};
use crate::fragment::{
InlineBlockFragmentInfo, MediaFragmentInfo, SpecificFragmentInfo, SvgFragmentInfo,
};
use crate::fragment::{
TableColumnFragmentInfo, UnscannedTextFragmentInfo, WhitespaceStrippingResult,
};
use crate::inline::{InlineFlow, InlineFragmentNodeFlags, InlineFragmentNodeInfo};
use crate::linked_list::prepend_from;
use crate::list_item::{ListItemFlow, ListStyleTypeContent};
use crate::multicol::{MulticolColumnFlow, MulticolFlow};
@ -40,15 +47,18 @@ use crate::table_wrapper::TableWrapperFlow;
use crate::text::TextRunScanner;
use crate::traversal::PostorderNodeMutTraversal;
use crate::wrapper::{LayoutNodeLayoutData, TextContent, ThreadSafeLayoutNodeHelpers};
use script_layout_interface::{LayoutElementType, LayoutNodeType, is_image_data};
use script_layout_interface::wrapper_traits::{PseudoElementType, ThreadSafeLayoutElement, ThreadSafeLayoutNode};
use crate::ServoArc;
use script_layout_interface::wrapper_traits::{
PseudoElementType, ThreadSafeLayoutElement, ThreadSafeLayoutNode,
};
use script_layout_interface::{is_image_data, LayoutElementType, LayoutNodeType};
use servo_config::opts;
use servo_url::ServoUrl;
use std::collections::LinkedList;
use std::marker::PhantomData;
use std::mem;
use std::sync::Arc;
use std::sync::atomic::Ordering;
use std::sync::Arc;
use style::computed_values::caption_side::T as CaptionSide;
use style::computed_values::display::T as Display;
use style::computed_values::empty_cells::T as EmptyCells;

View file

@ -4,7 +4,7 @@
//! Data needed by the layout thread.
use crate::display_list::items::{WebRenderImageInfo, OpaqueNode};
use crate::display_list::items::{OpaqueNode, WebRenderImageInfo};
use crate::opaque_node::OpaqueNodeMethods;
use fnv::FnvHasher;
use gfx::font_cache_thread::FontCacheThread;

View file

@ -13,8 +13,8 @@ use style::computed_values::background_clip::single_value::T as BackgroundClip;
use style::computed_values::background_origin::single_value::T as BackgroundOrigin;
use style::properties::style_structs::Background;
use style::values::computed::{BackgroundSize, LengthOrPercentageOrAuto};
use style::values::generics::NonNegative;
use style::values::generics::background::BackgroundSize as GenericBackgroundSize;
use style::values::generics::NonNegative;
use style::values::specified::background::BackgroundRepeatKeyword;
use webrender_api::BorderRadius;

View file

@ -9,14 +9,14 @@ use crate::display_list::ToLayout;
use euclid::{Rect, SideOffsets2D, Size2D};
use style::computed_values::border_image_outset::T as BorderImageOutset;
use style::properties::style_structs::Border;
use style::values::Either;
use style::values::computed::NumberOrPercentage;
use style::values::computed::{BorderCornerRadius, BorderImageWidth};
use style::values::computed::{BorderImageSideWidth, LengthOrNumber};
use style::values::computed::NumberOrPercentage;
use style::values::generics::border::{BorderImageSideWidth as GenericBorderImageSideWidth};
use style::values::generics::border::BorderImageSideWidth as GenericBorderImageSideWidth;
use style::values::generics::rect::Rect as StyleRect;
use style::values::Either;
use webrender_api::{BorderRadius, BorderSide, BorderStyle, ColorF};
use webrender_api::{LayoutSize, LayoutSideOffsets, NormalBorder};
use webrender_api::{LayoutSideOffsets, LayoutSize, NormalBorder};
/// Computes a border radius size against the containing size.
///

View file

@ -12,31 +12,31 @@ use app_units::{Au, AU_PER_PX};
use canvas_traits::canvas::{CanvasMsg, FromLayoutMsg};
use crate::block::BlockFlow;
use crate::context::LayoutContext;
use crate::display_list::ToLayout;
use crate::display_list::background::{self, get_cyclic};
use crate::display_list::border;
use crate::display_list::gradient;
use crate::display_list::items::{BaseDisplayItem, BLUR_INFLATION_FACTOR, ClipScrollNode};
use crate::display_list::items::{BaseDisplayItem, ClipScrollNode, BLUR_INFLATION_FACTOR};
use crate::display_list::items::{ClipScrollNodeIndex, ClipScrollNodeType, ClippingAndScrolling};
use crate::display_list::items::{ClippingRegion, DisplayItem, DisplayItemMetadata, DisplayList};
use crate::display_list::items::{DisplayListSection, CommonDisplayItem};
use crate::display_list::items::{CommonDisplayItem, DisplayListSection};
use crate::display_list::items::{IframeDisplayItem, OpaqueNode};
use crate::display_list::items::{PopAllTextShadowsDisplayItem, PushTextShadowDisplayItem};
use crate::display_list::items::{StackingContext, StackingContextType, StickyFrameData};
use crate::display_list::items::{TextOrientation, WebRenderImageInfo};
use crate::display_list::ToLayout;
use crate::flex::FlexFlow;
use crate::flow::{BaseFlow, Flow, FlowFlags};
use crate::flow_ref::FlowRef;
use crate::fragment::{CanvasFragmentSource, CoordinateSystem, Fragment, ScannedTextFragmentInfo};
use crate::fragment::SpecificFragmentInfo;
use crate::fragment::{CanvasFragmentSource, CoordinateSystem, Fragment, ScannedTextFragmentInfo};
use crate::inline::{InlineFlow, InlineFragmentNodeFlags};
use crate::list_item::ListItemFlow;
use crate::model::MaybeAuto;
use crate::table_cell::CollapsedBordersForCell;
use euclid::{rect, Point2D, Rect, SideOffsets2D, Size2D, TypedSize2D, Vector2D};
use fnv::FnvHashMap;
use gfx::text::TextRun;
use gfx::text::glyph::ByteIndex;
use gfx::text::TextRun;
use gfx_traits::{combine_id_with_fragment_type, FragmentType, StackingContextId};
use ipc_channel::ipc;
use msg::constellation_msg::{BrowsingContextId, PipelineId};
@ -56,20 +56,20 @@ use style::computed_values::visibility::T as Visibility;
use style::logical_geometry::{LogicalMargin, LogicalPoint, LogicalRect};
use style::properties::{style_structs, ComputedValues};
use style::servo::restyle_damage::ServoRestyleDamage;
use style::values::{Either, RGBA};
use style::values::computed::Gradient;
use style::values::computed::effects::SimpleShadow;
use style::values::computed::image::Image as ComputedImage;
use style::values::computed::Gradient;
use style::values::generics::background::BackgroundSize;
use style::values::generics::image::{GradientKind, Image, PaintWorklet};
use style::values::generics::ui::Cursor;
use style::values::{Either, RGBA};
use style_traits::cursor::CursorKind;
use style_traits::CSSPixel;
use style_traits::ToCss;
use style_traits::cursor::CursorKind;
use webrender_api::{self, BorderDetails, BorderRadius, BorderSide, BoxShadowClipMode, ColorF};
use webrender_api::{ExternalScrollId, FilterOp, GlyphInstance, ImageRendering, LayoutRect};
use webrender_api::{LayoutSize, LayoutTransform, LayoutVector2D, LineStyle, NinePatchBorder};
use webrender_api::{NinePatchBorderSource, NormalBorder, StickyOffsetBounds, ScrollSensitivity};
use webrender_api::{NinePatchBorderSource, NormalBorder, ScrollSensitivity, StickyOffsetBounds};
fn establishes_containing_block_for_absolute(
flags: StackingContextCollectionFlags,

View file

@ -7,10 +7,10 @@ use euclid::{Point2D, Rect, SideOffsets2D, Size2D, Vector2D};
use style::computed_values::image_rendering::T as ImageRendering;
use style::computed_values::mix_blend_mode::T as MixBlendMode;
use style::computed_values::transform_style::T as TransformStyle;
use style::values::RGBA;
use style::values::computed::{BorderStyle, Filter};
use style::values::generics::effects::Filter as GenericFilter;
use style::values::specified::border::BorderImageRepeatKeyword;
use style::values::RGBA;
use webrender_api as wr;
pub trait ToLayout {

View file

@ -8,11 +8,11 @@ use app_units::Au;
use crate::display_list::ToLayout;
use euclid::{Point2D, Size2D, Vector2D};
use style::properties::ComputedValues;
use style::values::computed::{Angle, GradientItem, LengthOrPercentage, Percentage, Position};
use style::values::computed::image::{EndingShape, LineDirection};
use style::values::generics::image::{Circle, Ellipse, ShapeExtent};
use style::values::computed::{Angle, GradientItem, LengthOrPercentage, Percentage, Position};
use style::values::generics::image::EndingShape as GenericEndingShape;
use style::values::generics::image::GradientItem as GenericGradientItem;
use style::values::generics::image::{Circle, Ellipse, ShapeExtent};
use style::values::specified::position::{X, Y};
use webrender_api::{ExtendMode, Gradient, GradientBuilder, GradientStop, RadialGradient};

View file

@ -13,8 +13,8 @@
//! low-level drawing primitives.
use euclid::{SideOffsets2D, TypedRect, Vector2D};
use gfx_traits::{self, StackingContextId};
use gfx_traits::print_tree::PrintTree;
use gfx_traits::{self, StackingContextId};
use msg::constellation_msg::PipelineId;
use net_traits::image::base::Image;
use servo_geometry::MaxRect;

View file

@ -7,10 +7,10 @@
use app_units::{Au, MAX_AU};
use crate::block::{AbsoluteAssignBSizesTraversal, BlockFlow, MarginsMayCollapseFlag};
use crate::context::LayoutContext;
use crate::display_list::{DisplayListBuildState, FlexFlowDisplayListBuilding};
use crate::display_list::StackingContextCollectionState;
use crate::display_list::{DisplayListBuildState, FlexFlowDisplayListBuilding};
use crate::floats::FloatKind;
use crate::flow::{Flow, FlowClass, GetBaseFlow, ImmutableFlowUtils, OpaqueFlow, FlowFlags};
use crate::flow::{Flow, FlowClass, FlowFlags, GetBaseFlow, ImmutableFlowUtils, OpaqueFlow};
use crate::fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
use crate::layout_debug;
use crate::model::{AdjoiningMargins, CollapsibleMargins};
@ -27,8 +27,10 @@ use style::computed_values::justify_content::T as JustifyContent;
use style::logical_geometry::{Direction, LogicalSize};
use style::properties::ComputedValues;
use style::servo::restyle_damage::ServoRestyleDamage;
use style::values::computed::{LengthOrPercentage, LengthOrPercentageOrAuto, LengthOrPercentageOrNone};
use style::values::computed::flex::FlexBasis;
use style::values::computed::{
LengthOrPercentage, LengthOrPercentageOrAuto, LengthOrPercentageOrNone,
};
use style::values::generics::flex::FlexBasis as GenericFlexBasis;
/// The size of an axis. May be a specified size, a min/max

View file

@ -28,8 +28,8 @@
use app_units::Au;
use crate::block::{BlockFlow, FormattingContextType};
use crate::context::LayoutContext;
use crate::display_list::{DisplayListBuildState, StackingContextCollectionState};
use crate::display_list::items::ClippingAndScrolling;
use crate::display_list::{DisplayListBuildState, StackingContextCollectionState};
use crate::flex::FlexFlow;
use crate::floats::{Floats, SpeculatedFloatPlacement};
use crate::flow_list::{FlowList, FlowListIterator, MutFlowListIterator};
@ -46,16 +46,16 @@ use crate::table_colgroup::TableColGroupFlow;
use crate::table_row::TableRowFlow;
use crate::table_rowgroup::TableRowGroupFlow;
use crate::table_wrapper::TableWrapperFlow;
use euclid::{Point2D, Vector2D, Rect, Size2D};
use gfx_traits::StackingContextId;
use euclid::{Point2D, Rect, Size2D, Vector2D};
use gfx_traits::print_tree::PrintTree;
use gfx_traits::StackingContextId;
use serde::ser::{Serialize, SerializeStruct, Serializer};
use servo_geometry::{au_rect_to_f32_rect, f32_rect_to_au_rect, MaxRect};
use std::fmt;
use std::iter::Zip;
use std::slice::IterMut;
use std::sync::Arc;
use std::sync::atomic::Ordering;
use std::sync::Arc;
use style::computed_values::clear::T as Clear;
use style::computed_values::float::T as Float;
use style::computed_values::overflow_x::T as StyleOverflow;

View file

@ -5,8 +5,8 @@
use crate::flow::{Flow, FlowClass};
use crate::flow_ref::FlowRef;
use serde::ser::{Serialize, SerializeSeq, Serializer};
use serde_json::{Map, Value, to_value};
use std::collections::{LinkedList, linked_list};
use serde_json::{to_value, Map, Value};
use std::collections::{linked_list, LinkedList};
use std::ops::Deref;
use std::sync::Arc;

View file

@ -5,24 +5,24 @@
//! The `Fragment` type, which represents the leaves of the layout tree.
use app_units::Au;
use canvas_traits::canvas::{CanvasMsg, CanvasId};
use crate::ServoArc;
use crate::context::{LayoutContext, with_thread_local_font_context};
use canvas_traits::canvas::{CanvasId, CanvasMsg};
use crate::context::{with_thread_local_font_context, LayoutContext};
use crate::display_list::items::{ClipScrollNodeIndex, OpaqueNode, BLUR_INFLATION_FACTOR};
use crate::display_list::ToLayout;
use crate::display_list::items::{BLUR_INFLATION_FACTOR, ClipScrollNodeIndex, OpaqueNode};
use crate::floats::ClearType;
use crate::flow::{GetBaseFlow, ImmutableFlowUtils};
use crate::flow_ref::FlowRef;
use crate::inline::{InlineFragmentNodeFlags, InlineFragmentContext, InlineFragmentNodeInfo};
use crate::inline::{InlineFragmentContext, InlineFragmentNodeFlags, InlineFragmentNodeInfo};
use crate::inline::{InlineMetrics, LineMetrics};
#[cfg(debug_assertions)]
use crate::layout_debug;
use crate::model::{self, IntrinsicISizes, IntrinsicISizesContribution, MaybeAuto, SizeConstraint};
use crate::model::style_length;
use crate::model::{self, IntrinsicISizes, IntrinsicISizesContribution, MaybeAuto, SizeConstraint};
use crate::text;
use crate::text::TextRunScanner;
use crate::wrapper::ThreadSafeLayoutNodeHelpers;
use euclid::{Point2D, Vector2D, Rect, Size2D};
use crate::ServoArc;
use euclid::{Point2D, Rect, Size2D, Vector2D};
use gfx;
use gfx::text::glyph::ByteIndex;
use gfx::text::text_run::{TextRun, TextRunSlice};
@ -32,15 +32,17 @@ use msg::constellation_msg::{BrowsingContextId, PipelineId};
use net_traits::image::base::{Image, ImageMetadata};
use net_traits::image_cache::{ImageOrMetadataAvailable, UsePlaceholder};
use range::*;
use script_layout_interface::wrapper_traits::{
PseudoElementType, ThreadSafeLayoutElement, ThreadSafeLayoutNode,
};
use script_layout_interface::{HTMLCanvasData, HTMLCanvasDataSource, HTMLMediaData, SVGSVGData};
use script_layout_interface::wrapper_traits::{PseudoElementType, ThreadSafeLayoutElement, ThreadSafeLayoutNode};
use serde::ser::{Serialize, SerializeStruct, Serializer};
use servo_url::ServoUrl;
use std::{f32, fmt};
use std::borrow::ToOwned;
use std::cmp::{Ordering, max, min};
use std::cmp::{max, min, Ordering};
use std::collections::LinkedList;
use std::sync::{Arc, Mutex};
use std::{f32, fmt};
use style::computed_values::border_collapse::T as BorderCollapse;
use style::computed_values::box_sizing::T as BoxSizing;
use style::computed_values::clear::T as Clear;
@ -59,8 +61,8 @@ use style::properties::ComputedValues;
use style::selector_parser::RestyleDamage;
use style::servo::restyle_damage::ServoRestyleDamage;
use style::str::char_is_whitespace;
use style::values::computed::{Length, LengthOrPercentage, LengthOrPercentageOrAuto};
use style::values::computed::counters::ContentItem;
use style::values::computed::{Length, LengthOrPercentage, LengthOrPercentageOrAuto};
use style::values::generics::box_::{Perspective, VerticalAlign};
use style::values::generics::transform;
use webrender_api::{self, LayoutTransform};

View file

@ -8,10 +8,12 @@
//! done in parallel and is therefore a sequential pass that runs on as little of the flow tree
//! as possible.
use crate::context::{LayoutContext, with_thread_local_font_context};
use crate::context::{with_thread_local_font_context, LayoutContext};
use crate::display_list::items::OpaqueNode;
use crate::flow::{Flow, FlowFlags, GetBaseFlow, ImmutableFlowUtils};
use crate::fragment::{Fragment, GeneratedContentInfo, SpecificFragmentInfo, UnscannedTextFragmentInfo};
use crate::fragment::{
Fragment, GeneratedContentInfo, SpecificFragmentInfo, UnscannedTextFragmentInfo,
};
use crate::text::TextRunScanner;
use crate::traversal::InorderFlowTraversal;
use script_layout_interface::wrapper_traits::PseudoElementType;

View file

@ -2,7 +2,7 @@
* 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 crate::flow::{FlowFlags, Flow, GetBaseFlow};
use crate::flow::{Flow, FlowFlags, GetBaseFlow};
use style::computed_values::float::T as Float;
use style::selector_parser::RestyleDamage;
use style::servo::restyle_damage::ServoRestyleDamage;

View file

@ -3,32 +3,32 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use app_units::{Au, MIN_AU};
use crate::ServoArc;
use crate::block::AbsoluteAssignBSizesTraversal;
use crate::context::{LayoutContext, LayoutFontContext};
use crate::display_list::{DisplayListBuildState, InlineFlowDisplayListBuilding};
use crate::display_list::StackingContextCollectionState;
use crate::display_list::items::OpaqueNode;
use crate::display_list::StackingContextCollectionState;
use crate::display_list::{DisplayListBuildState, InlineFlowDisplayListBuilding};
use crate::floats::{FloatKind, Floats, PlacementInfo};
use crate::flow::{BaseFlow, Flow, FlowClass, ForceNonfloatedFlag};
use crate::flow::{FlowFlags, EarlyAbsolutePositionInfo, GetBaseFlow, OpaqueFlow};
use crate::flow::{EarlyAbsolutePositionInfo, FlowFlags, GetBaseFlow, OpaqueFlow};
use crate::flow_ref::FlowRef;
use crate::fragment::{CoordinateSystem, Fragment, FragmentBorderBoxIterator, Overflow};
use crate::fragment::FragmentFlags;
use crate::fragment::SpecificFragmentInfo;
use crate::fragment::{CoordinateSystem, Fragment, FragmentBorderBoxIterator, Overflow};
use crate::layout_debug;
use crate::model::IntrinsicISizesContribution;
use crate::text;
use crate::traversal::PreorderFlowTraversal;
use crate::ServoArc;
use euclid::{Point2D, Size2D};
use gfx::font::FontMetrics;
use gfx_traits::print_tree::PrintTree;
use range::{Range, RangeIndex};
use script_layout_interface::wrapper_traits::PseudoElementType;
use std::{fmt, i32, isize, mem};
use std::cmp::max;
use std::collections::VecDeque;
use std::sync::Arc;
use std::{fmt, i32, isize, mem};
use style::computed_values::display::T as Display;
use style::computed_values::overflow_x::T as StyleOverflow;
use style::computed_values::position::T as Position;

View file

@ -13,7 +13,7 @@ use std::cell::RefCell;
use std::fs::File;
use std::io::Write;
#[cfg(debug_assertions)]
use std::sync::atomic::{ATOMIC_USIZE_INIT, AtomicUsize, Ordering};
use std::sync::atomic::{AtomicUsize, Ordering, ATOMIC_USIZE_INIT};
thread_local!(static STATE_KEY: RefCell<Option<State>> = RefCell::new(None));

View file

@ -87,9 +87,9 @@ pub mod traversal;
pub mod wrapper;
// For unit tests:
pub use self::data::LayoutData;
pub use crate::fragment::Fragment;
pub use crate::fragment::SpecificFragmentInfo;
pub use self::data::LayoutData;
// We can't use servo_arc for everything in layout, because the Flow stuff uses
// weak references.

View file

@ -7,13 +7,15 @@
use app_units::Au;
use crate::block::BlockFlow;
use crate::context::{LayoutContext, with_thread_local_font_context};
use crate::display_list::{DisplayListBuildState, ListItemFlowDisplayListBuilding};
use crate::context::{with_thread_local_font_context, LayoutContext};
use crate::display_list::StackingContextCollectionState;
use crate::display_list::{DisplayListBuildState, ListItemFlowDisplayListBuilding};
use crate::floats::FloatKind;
use crate::flow::{Flow, FlowClass, OpaqueFlow};
use crate::fragment::{CoordinateSystem, Fragment, FragmentBorderBoxIterator, GeneratedContentInfo};
use crate::fragment::Overflow;
use crate::fragment::{
CoordinateSystem, Fragment, FragmentBorderBoxIterator, GeneratedContentInfo,
};
use crate::generated_content;
use crate::inline::InlineFlow;
use euclid::Point2D;

View file

@ -11,8 +11,8 @@ use std::cmp::{max, min};
use std::fmt;
use style::logical_geometry::{LogicalMargin, WritingMode};
use style::properties::ComputedValues;
use style::values::computed::{LengthOrPercentageOrAuto, LengthOrPercentage};
use style::values::computed::LengthOrPercentageOrNone;
use style::values::computed::{LengthOrPercentage, LengthOrPercentageOrAuto};
/// A collapsible margin. See CSS 2.1 § 8.3.1.
#[derive(Clone, Copy, Debug)]

View file

@ -5,23 +5,23 @@
//! CSS Multi-column layout http://dev.w3.org/csswg/css-multicol/
use app_units::Au;
use crate::ServoArc;
use crate::block::BlockFlow;
use crate::context::LayoutContext;
use crate::display_list::{DisplayListBuildState, StackingContextCollectionState};
use crate::floats::FloatKind;
use crate::flow::{Flow, FlowClass, OpaqueFlow, FragmentationContext, GetBaseFlow};
use crate::flow::{Flow, FlowClass, FragmentationContext, GetBaseFlow, OpaqueFlow};
use crate::fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
use crate::ServoArc;
use euclid::{Point2D, Vector2D};
use gfx_traits::print_tree::PrintTree;
use std::cmp::{min, max};
use std::cmp::{max, min};
use std::fmt;
use std::sync::Arc;
use style::logical_geometry::LogicalSize;
use style::properties::ComputedValues;
use style::values::Either;
use style::values::computed::{LengthOrPercentageOrAuto, LengthOrPercentageOrNone};
use style::values::generics::column::ColumnCount;
use style::values::Either;
#[allow(unsafe_code)]
unsafe impl crate::flow::HasBaseFlow for MulticolFlow {}

View file

@ -14,7 +14,7 @@ use crate::flow::{Flow, GetBaseFlow};
use crate::flow_ref::FlowRef;
use crate::traversal::{AssignBSizes, AssignISizes, BubbleISizes};
use crate::traversal::{PostorderFlowTraversal, PreorderFlowTraversal};
use profile_traits::time::{self, TimerMetadata, profile};
use profile_traits::time::{self, profile, TimerMetadata};
use rayon;
use servo_config::opts;
use smallvec::SmallVec;

View file

@ -7,27 +7,29 @@
use app_units::Au;
use crate::construct::ConstructionResult;
use crate::context::LayoutContext;
use crate::display_list::IndexableText;
use crate::display_list::items::{DisplayList, OpaqueNode, ScrollOffsetMap};
use crate::display_list::IndexableText;
use crate::flow::{Flow, GetBaseFlow};
use crate::fragment::{Fragment, FragmentBorderBoxIterator, SpecificFragmentInfo};
use crate::inline::InlineFragmentNodeFlags;
use crate::opaque_node::OpaqueNodeMethods;
use crate::sequential;
use crate::wrapper::LayoutNodeLayoutData;
use euclid::{Point2D, Vector2D, Rect, Size2D};
use euclid::{Point2D, Rect, Size2D, Vector2D};
use ipc_channel::ipc::IpcSender;
use msg::constellation_msg::PipelineId;
use script_layout_interface::{LayoutElementType, LayoutNodeType};
use script_layout_interface::StyleData;
use script_layout_interface::rpc::TextIndexResponse;
use script_layout_interface::rpc::{ContentBoxResponse, ContentBoxesResponse, LayoutRPC};
use script_layout_interface::rpc::{NodeGeometryResponse, NodeScrollIdResponse};
use script_layout_interface::rpc::{OffsetParentResponse, ResolvedStyleResponse, StyleResponse};
use script_layout_interface::rpc::TextIndexResponse;
use script_layout_interface::wrapper_traits::{LayoutNode, ThreadSafeLayoutElement, ThreadSafeLayoutNode};
use script_layout_interface::wrapper_traits::{
LayoutNode, ThreadSafeLayoutElement, ThreadSafeLayoutNode,
};
use script_layout_interface::StyleData;
use script_layout_interface::{LayoutElementType, LayoutNodeType};
use script_traits::LayoutMsg as ConstellationMsg;
use script_traits::UntrustedNodeAddress;
use std::cmp::{min, max};
use std::cmp::{max, min};
use std::ops::Deref;
use std::sync::{Arc, Mutex};
use style::computed_values::display::T as Display;
@ -35,8 +37,8 @@ use style::computed_values::position::T as Position;
use style::computed_values::visibility::T as Visibility;
use style::context::{StyleContext, ThreadLocalStyleContext};
use style::dom::TElement;
use style::logical_geometry::{WritingMode, BlockFlowDirection, InlineBaseDirection};
use style::properties::{style_structs, PropertyId, PropertyDeclarationId, LonghandId};
use style::logical_geometry::{BlockFlowDirection, InlineBaseDirection, WritingMode};
use style::properties::{style_structs, LonghandId, PropertyDeclarationId, PropertyId};
use style::selector_parser::PseudoElement;
use style_traits::ToCss;
use webrender_api::ExternalScrollId;

View file

@ -8,8 +8,8 @@ use app_units::Au;
use crate::context::LayoutContext;
use crate::display_list::{DisplayListBuildState, StackingContextCollectionState};
use crate::floats::SpeculatedFloatPlacement;
use crate::flow::{Flow, ImmutableFlowUtils, FlowFlags, GetBaseFlow};
use crate::fragment::{FragmentBorderBoxIterator, CoordinateSystem};
use crate::flow::{Flow, FlowFlags, GetBaseFlow, ImmutableFlowUtils};
use crate::fragment::{CoordinateSystem, FragmentBorderBoxIterator};
use crate::generated_content::ResolveGeneratedContent;
use crate::incremental::RelayoutMode;
use crate::traversal::{AssignBSizes, AssignISizes, BubbleISizes, BuildDisplayList};

View file

@ -9,8 +9,13 @@ use crate::block::{BlockFlow, CandidateBSizeIterator, ISizeAndMarginsComputer};
use crate::block::{ISizeConstraintInput, ISizeConstraintSolution};
use crate::context::LayoutContext;
use crate::display_list::{BlockFlowDisplayListBuilding, BorderPaintingMode};
use crate::display_list::{DisplayListBuildState, StackingContextCollectionFlags, StackingContextCollectionState};
use crate::flow::{BaseFlow, EarlyAbsolutePositionInfo, Flow, FlowClass, ImmutableFlowUtils, GetBaseFlow, OpaqueFlow};
use crate::display_list::{
DisplayListBuildState, StackingContextCollectionFlags, StackingContextCollectionState,
};
use crate::flow::{
BaseFlow, EarlyAbsolutePositionInfo, Flow, FlowClass, GetBaseFlow, ImmutableFlowUtils,
OpaqueFlow,
};
use crate::flow_list::{FlowListIterator, MutFlowListIterator};
use crate::fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
use crate::layout_debug;
@ -25,11 +30,11 @@ use std::{cmp, fmt};
use style::computed_values::{border_collapse, border_spacing, table_layout};
use style::context::SharedStyleContext;
use style::logical_geometry::LogicalSize;
use style::properties::ComputedValues;
use style::properties::style_structs::Background;
use style::properties::ComputedValues;
use style::servo::restyle_damage::ServoRestyleDamage;
use style::values::CSSFloat;
use style::values::computed::LengthOrPercentageOrAuto;
use style::values::CSSFloat;
#[allow(unsafe_code)]
unsafe impl crate::flow::HasBaseFlow for TableFlow {}

View file

@ -9,7 +9,9 @@ use crate::block::{BlockFlow, ISizeAndMarginsComputer};
use crate::context::LayoutContext;
use crate::display_list::{BlockFlowDisplayListBuilding, DisplayListBuildState};
use crate::display_list::{StackingContextCollectionFlags, StackingContextCollectionState};
use crate::flow::{EarlyAbsolutePositionInfo, Flow, FlowClass, ImmutableFlowUtils, GetBaseFlow, OpaqueFlow};
use crate::flow::{
EarlyAbsolutePositionInfo, Flow, FlowClass, GetBaseFlow, ImmutableFlowUtils, OpaqueFlow,
};
use crate::flow_list::MutFlowListIterator;
use crate::fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
use crate::layout_debug;

View file

@ -12,13 +12,17 @@
//! Hereafter this document is referred to as INTRINSIC.
use app_units::Au;
use crate::block::{AbsoluteNonReplaced, BlockFlow, FloatNonReplaced, ISizeAndMarginsComputer, ISizeConstraintInput};
use crate::block::{
AbsoluteNonReplaced, BlockFlow, FloatNonReplaced, ISizeAndMarginsComputer, ISizeConstraintInput,
};
use crate::block::{ISizeConstraintSolution, MarginsMayCollapseFlag};
use crate::context::LayoutContext;
use crate::display_list::{BlockFlowDisplayListBuilding, DisplayListBuildState, StackingContextCollectionFlags};
use crate::display_list::StackingContextCollectionState;
use crate::display_list::{
BlockFlowDisplayListBuilding, DisplayListBuildState, StackingContextCollectionFlags,
};
use crate::floats::FloatKind;
use crate::flow::{Flow, FlowClass, ImmutableFlowUtils, FlowFlags, OpaqueFlow};
use crate::flow::{Flow, FlowClass, FlowFlags, ImmutableFlowUtils, OpaqueFlow};
use crate::fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
use crate::model::MaybeAuto;
use crate::table::{ColumnComputedInlineSize, ColumnIntrinsicInlineSize};
@ -31,8 +35,8 @@ use style::computed_values::{position, table_layout};
use style::context::SharedStyleContext;
use style::logical_geometry::{LogicalRect, LogicalSize};
use style::properties::ComputedValues;
use style::values::CSSFloat;
use style::values::computed::LengthOrPercentageOrAuto;
use style::values::CSSFloat;
#[derive(Clone, Copy, Debug, Serialize)]
pub enum TableLayout {

View file

@ -10,7 +10,7 @@ use crate::fragment::{Fragment, ScannedTextFlags};
use crate::fragment::{ScannedTextFragmentInfo, SpecificFragmentInfo, UnscannedTextFragmentInfo};
use crate::inline::{InlineFragmentNodeFlags, InlineFragments};
use crate::linked_list::split_off_head;
use gfx::font::{FontRef, FontMetrics, RunMetrics, ShapingFlags, ShapingOptions};
use gfx::font::{FontMetrics, FontRef, RunMetrics, ShapingFlags, ShapingOptions};
use gfx::text::glyph::ByteIndex;
use gfx::text::text_run::TextRun;
use gfx::text::util::{self, CompressionMode};
@ -26,11 +26,11 @@ use style::computed_values::text_transform::T as TextTransform;
use style::computed_values::white_space::T as WhiteSpace;
use style::computed_values::word_break::T as WordBreak;
use style::logical_geometry::{LogicalSize, WritingMode};
use style::properties::ComputedValues;
use style::properties::style_structs::Font as FontStyleStruct;
use style::properties::ComputedValues;
use style::values::generics::text::LineHeight;
use unicode_bidi as bidi;
use unicode_script::{Script, get_script};
use unicode_script::{get_script, Script};
use xi_unicode::LineBreakLeafIter;
/// Returns the concatenated text of a list of unscanned text fragments.

View file

@ -7,9 +7,9 @@
use crate::construct::FlowConstructor;
use crate::context::LayoutContext;
use crate::display_list::DisplayListBuildState;
use crate::flow::{FlowFlags, Flow, GetBaseFlow, ImmutableFlowUtils};
use crate::wrapper::{GetRawData, LayoutNodeLayoutData};
use crate::flow::{Flow, FlowFlags, GetBaseFlow, ImmutableFlowUtils};
use crate::wrapper::ThreadSafeLayoutNodeHelpers;
use crate::wrapper::{GetRawData, LayoutNodeLayoutData};
use script_layout_interface::wrapper_traits::{LayoutNode, ThreadSafeLayoutNode};
use servo_config::opts;
use style::context::{SharedStyleContext, StyleContext};
@ -17,8 +17,8 @@ use style::data::ElementData;
use style::dom::{NodeInfo, TElement, TNode};
use style::selector_parser::RestyleDamage;
use style::servo::restyle_damage::ServoRestyleDamage;
use style::traversal::{DomTraversal, recalc_style_at};
use style::traversal::PerLevelTraversalData;
use style::traversal::{recalc_style_at, DomTraversal};
pub struct RecalcStyleAndConstructFlows<'a> {
context: LayoutContext<'a>,

View file

@ -32,8 +32,8 @@
use atomic_refcell::{AtomicRef, AtomicRefMut};
use crate::data::{LayoutData, LayoutDataFlags, StyleAndLayoutData};
use script_layout_interface::wrapper_traits::{ThreadSafeLayoutElement, ThreadSafeLayoutNode};
use script_layout_interface::wrapper_traits::GetLayoutData;
use script_layout_interface::wrapper_traits::{ThreadSafeLayoutElement, ThreadSafeLayoutNode};
use style::dom::{NodeInfo, TNode};
use style::selector_parser::RestyleDamage;
use style::values::computed::counters::ContentItem;