mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
cargo fix --edition
This commit is contained in:
parent
86f148fb97
commit
45f7199eee
503 changed files with 5038 additions and 5037 deletions
|
@ -4,13 +4,13 @@
|
|||
|
||||
//! CSS transitions and animations.
|
||||
|
||||
use context::LayoutContext;
|
||||
use display_list::items::OpaqueNode;
|
||||
use flow::{Flow, GetBaseFlow};
|
||||
use crate::context::LayoutContext;
|
||||
use crate::display_list::items::OpaqueNode;
|
||||
use crate::flow::{Flow, GetBaseFlow};
|
||||
use fxhash::FxHashMap;
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use opaque_node::OpaqueNodeMethods;
|
||||
use crate::opaque_node::OpaqueNodeMethods;
|
||||
use script_traits::{AnimationState, ConstellationControlMsg, LayoutMsg as ConstellationMsg};
|
||||
use script_traits::UntrustedNodeAddress;
|
||||
use servo_channel::Receiver;
|
||||
|
|
|
@ -26,22 +26,22 @@
|
|||
//! http://dev.w3.org/csswg/css-sizing/
|
||||
|
||||
use app_units::{Au, MAX_AU};
|
||||
use context::LayoutContext;
|
||||
use display_list::{BlockFlowDisplayListBuilding, BorderPaintingMode};
|
||||
use display_list::{DisplayListBuildState, StackingContextCollectionFlags};
|
||||
use display_list::StackingContextCollectionState;
|
||||
use display_list::items::DisplayListSection;
|
||||
use crate::context::LayoutContext;
|
||||
use crate::display_list::{BlockFlowDisplayListBuilding, BorderPaintingMode};
|
||||
use crate::display_list::{DisplayListBuildState, StackingContextCollectionFlags};
|
||||
use crate::display_list::StackingContextCollectionState;
|
||||
use crate::display_list::items::DisplayListSection;
|
||||
use euclid::{Point2D, Rect, SideOffsets2D, Size2D};
|
||||
use floats::{ClearType, FloatKind, Floats, PlacementInfo};
|
||||
use flow::{BaseFlow, EarlyAbsolutePositionInfo, Flow, FlowClass, ForceNonfloatedFlag, GetBaseFlow};
|
||||
use flow::{ImmutableFlowUtils, LateAbsolutePositionInfo, OpaqueFlow, FragmentationContext, FlowFlags};
|
||||
use flow_list::FlowList;
|
||||
use fragment::{CoordinateSystem, Fragment, FragmentBorderBoxIterator, Overflow, FragmentFlags};
|
||||
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_list::FlowList;
|
||||
use crate::fragment::{CoordinateSystem, Fragment, FragmentBorderBoxIterator, Overflow, FragmentFlags};
|
||||
use gfx_traits::print_tree::PrintTree;
|
||||
use incremental::RelayoutMode;
|
||||
use layout_debug;
|
||||
use model::{AdjoiningMargins, CollapsibleMargins, IntrinsicISizes, MarginCollapseInfo, MaybeAuto};
|
||||
use sequential;
|
||||
use crate::incremental::RelayoutMode;
|
||||
use crate::layout_debug;
|
||||
use crate::model::{AdjoiningMargins, CollapsibleMargins, IntrinsicISizes, MarginCollapseInfo, MaybeAuto};
|
||||
use crate::sequential;
|
||||
use serde::{Serialize, Serializer};
|
||||
use servo_geometry::MaxRect;
|
||||
use std::cmp::{max, min};
|
||||
|
@ -59,7 +59,7 @@ use style::properties::ComputedValues;
|
|||
use style::servo::restyle_damage::ServoRestyleDamage;
|
||||
use style::values::computed::{LengthOrPercentageOrNone, LengthOrPercentage};
|
||||
use style::values::computed::LengthOrPercentageOrAuto;
|
||||
use traversal::PreorderFlowTraversal;
|
||||
use crate::traversal::PreorderFlowTraversal;
|
||||
|
||||
/// Information specific to floated blocks.
|
||||
#[derive(Clone, Serialize)]
|
||||
|
@ -591,7 +591,7 @@ pub enum FormattingContextType {
|
|||
}
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
unsafe impl ::flow::HasBaseFlow for BlockFlow {}
|
||||
unsafe impl crate::flow::HasBaseFlow for BlockFlow {}
|
||||
|
||||
// A block formatting context.
|
||||
#[derive(Serialize)]
|
||||
|
@ -2585,7 +2585,7 @@ impl Flow for BlockFlow {
|
|||
self.build_display_list_for_block(state, BorderPaintingMode::Separate);
|
||||
}
|
||||
|
||||
fn repair_style(&mut self, new_style: &::ServoArc<ComputedValues>) {
|
||||
fn repair_style(&mut self, new_style: &crate::ServoArc<ComputedValues>) {
|
||||
self.fragment.repair_style(new_style)
|
||||
}
|
||||
|
||||
|
|
|
@ -11,25 +11,25 @@
|
|||
//! 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 ServoArc;
|
||||
use block::BlockFlow;
|
||||
use context::{LayoutContext, with_thread_local_font_context};
|
||||
use data::{LayoutDataFlags, LayoutData};
|
||||
use display_list::items::OpaqueNode;
|
||||
use flex::FlexFlow;
|
||||
use floats::FloatKind;
|
||||
use flow::{AbsoluteDescendants, Flow, FlowClass, GetBaseFlow, ImmutableFlowUtils};
|
||||
use flow::{FlowFlags, MutableFlowUtils, MutableOwnedFlowUtils};
|
||||
use flow_ref::FlowRef;
|
||||
use fragment::{CanvasFragmentInfo, Fragment, FragmentFlags, GeneratedContentInfo, IframeFragmentInfo};
|
||||
use fragment::{ImageFragmentInfo, InlineAbsoluteFragmentInfo, InlineAbsoluteHypotheticalFragmentInfo};
|
||||
use fragment::{InlineBlockFragmentInfo, MediaFragmentInfo, SpecificFragmentInfo, SvgFragmentInfo};
|
||||
use fragment::{TableColumnFragmentInfo, UnscannedTextFragmentInfo, WhitespaceStrippingResult};
|
||||
use inline::{InlineFlow, InlineFragmentNodeInfo, InlineFragmentNodeFlags};
|
||||
use linked_list::prepend_from;
|
||||
use list_item::{ListItemFlow, ListStyleTypeContent};
|
||||
use multicol::{MulticolColumnFlow, MulticolFlow};
|
||||
use parallel;
|
||||
use crate::ServoArc;
|
||||
use crate::block::BlockFlow;
|
||||
use crate::context::{LayoutContext, with_thread_local_font_context};
|
||||
use crate::data::{LayoutDataFlags, LayoutData};
|
||||
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::linked_list::prepend_from;
|
||||
use crate::list_item::{ListItemFlow, ListStyleTypeContent};
|
||||
use crate::multicol::{MulticolColumnFlow, MulticolFlow};
|
||||
use crate::parallel;
|
||||
use script_layout_interface::{LayoutElementType, LayoutNodeType, is_image_data};
|
||||
use script_layout_interface::wrapper_traits::{PseudoElementType, ThreadSafeLayoutElement, ThreadSafeLayoutNode};
|
||||
use servo_config::opts;
|
||||
|
@ -53,16 +53,16 @@ use style::selector_parser::{PseudoElement, RestyleDamage};
|
|||
use style::servo::restyle_damage::ServoRestyleDamage;
|
||||
use style::values::generics::counters::ContentItem;
|
||||
use style::values::generics::url::UrlOrNone as ImageUrlOrNone;
|
||||
use table::TableFlow;
|
||||
use table_caption::TableCaptionFlow;
|
||||
use table_cell::TableCellFlow;
|
||||
use table_colgroup::TableColGroupFlow;
|
||||
use table_row::TableRowFlow;
|
||||
use table_rowgroup::TableRowGroupFlow;
|
||||
use table_wrapper::TableWrapperFlow;
|
||||
use text::TextRunScanner;
|
||||
use traversal::PostorderNodeMutTraversal;
|
||||
use wrapper::{LayoutNodeLayoutData, TextContent, ThreadSafeLayoutNodeHelpers};
|
||||
use crate::table::TableFlow;
|
||||
use crate::table_caption::TableCaptionFlow;
|
||||
use crate::table_cell::TableCellFlow;
|
||||
use crate::table_colgroup::TableColGroupFlow;
|
||||
use crate::table_row::TableRowFlow;
|
||||
use crate::table_rowgroup::TableRowGroupFlow;
|
||||
use crate::table_wrapper::TableWrapperFlow;
|
||||
use crate::text::TextRunScanner;
|
||||
use crate::traversal::PostorderNodeMutTraversal;
|
||||
use crate::wrapper::{LayoutNodeLayoutData, TextContent, ThreadSafeLayoutNodeHelpers};
|
||||
|
||||
/// The results of flow construction for a DOM node.
|
||||
#[derive(Clone)]
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
//! Data needed by the layout thread.
|
||||
|
||||
use display_list::items::{WebRenderImageInfo, OpaqueNode};
|
||||
use crate::display_list::items::{WebRenderImageInfo, OpaqueNode};
|
||||
use fnv::FnvHasher;
|
||||
use gfx::font_cache_thread::FontCacheThread;
|
||||
use gfx::font_context::FontContext;
|
||||
|
@ -12,7 +12,7 @@ use malloc_size_of::{MallocSizeOf, MallocSizeOfOps};
|
|||
use msg::constellation_msg::PipelineId;
|
||||
use net_traits::image_cache::{CanRequestImages, ImageCache, ImageState};
|
||||
use net_traits::image_cache::{ImageOrMetadataAvailable, UsePlaceholder};
|
||||
use opaque_node::OpaqueNodeMethods;
|
||||
use crate::opaque_node::OpaqueNodeMethods;
|
||||
use parking_lot::RwLock;
|
||||
use script_layout_interface::{PendingImage, PendingImageState};
|
||||
use script_traits::Painter;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use atomic_refcell::AtomicRefCell;
|
||||
use construct::ConstructionResult;
|
||||
use crate::construct::ConstructionResult;
|
||||
use script_layout_interface::StyleData;
|
||||
|
||||
#[repr(C)]
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
// FIXME(rust-lang/rust#26264): Remove GenericBackgroundSize.
|
||||
|
||||
use app_units::Au;
|
||||
use display_list::border;
|
||||
use crate::display_list::border;
|
||||
use euclid::{Point2D, Rect, SideOffsets2D, Size2D};
|
||||
use model::MaybeAuto;
|
||||
use crate::model::MaybeAuto;
|
||||
use style::computed_values::background_attachment::single_value::T as BackgroundAttachment;
|
||||
use style::computed_values::background_clip::single_value::T as BackgroundClip;
|
||||
use style::computed_values::background_origin::single_value::T as BackgroundOrigin;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
// FIXME(rust-lang/rust#26264): Remove GenericBorderImageSideWidth.
|
||||
|
||||
use app_units::Au;
|
||||
use display_list::ToLayout;
|
||||
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;
|
||||
|
|
|
@ -9,35 +9,35 @@
|
|||
//! paint.
|
||||
|
||||
use app_units::{Au, AU_PER_PX};
|
||||
use block::BlockFlow;
|
||||
use crate::block::BlockFlow;
|
||||
use canvas_traits::canvas::{CanvasMsg, FromLayoutMsg};
|
||||
use context::LayoutContext;
|
||||
use display_list::ToLayout;
|
||||
use display_list::background::{self, get_cyclic};
|
||||
use display_list::border;
|
||||
use display_list::gradient;
|
||||
use display_list::items::{BaseDisplayItem, BLUR_INFLATION_FACTOR, ClipScrollNode};
|
||||
use display_list::items::{ClipScrollNodeIndex, ClipScrollNodeType, ClippingAndScrolling};
|
||||
use display_list::items::{ClippingRegion, DisplayItem, DisplayItemMetadata, DisplayList};
|
||||
use display_list::items::{DisplayListSection, CommonDisplayItem};
|
||||
use display_list::items::{IframeDisplayItem, OpaqueNode};
|
||||
use display_list::items::{PopAllTextShadowsDisplayItem, PushTextShadowDisplayItem};
|
||||
use display_list::items::{StackingContext, StackingContextType, StickyFrameData};
|
||||
use display_list::items::{TextOrientation, WebRenderImageInfo};
|
||||
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::{ClipScrollNodeIndex, ClipScrollNodeType, ClippingAndScrolling};
|
||||
use crate::display_list::items::{ClippingRegion, DisplayItem, DisplayItemMetadata, DisplayList};
|
||||
use crate::display_list::items::{DisplayListSection, CommonDisplayItem};
|
||||
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 euclid::{rect, Point2D, Rect, SideOffsets2D, Size2D, TypedSize2D, Vector2D};
|
||||
use flex::FlexFlow;
|
||||
use flow::{BaseFlow, Flow, FlowFlags};
|
||||
use flow_ref::FlowRef;
|
||||
use crate::flex::FlexFlow;
|
||||
use crate::flow::{BaseFlow, Flow, FlowFlags};
|
||||
use crate::flow_ref::FlowRef;
|
||||
use fnv::FnvHashMap;
|
||||
use fragment::{CanvasFragmentSource, CoordinateSystem, Fragment, ScannedTextFragmentInfo};
|
||||
use fragment::SpecificFragmentInfo;
|
||||
use crate::fragment::{CanvasFragmentSource, CoordinateSystem, Fragment, ScannedTextFragmentInfo};
|
||||
use crate::fragment::SpecificFragmentInfo;
|
||||
use gfx::text::TextRun;
|
||||
use gfx::text::glyph::ByteIndex;
|
||||
use gfx_traits::{combine_id_with_fragment_type, FragmentType, StackingContextId};
|
||||
use inline::{InlineFlow, InlineFragmentNodeFlags};
|
||||
use crate::inline::{InlineFlow, InlineFragmentNodeFlags};
|
||||
use ipc_channel::ipc;
|
||||
use list_item::ListItemFlow;
|
||||
use model::MaybeAuto;
|
||||
use crate::list_item::ListItemFlow;
|
||||
use crate::model::MaybeAuto;
|
||||
use msg::constellation_msg::{BrowsingContextId, PipelineId};
|
||||
use net_traits::image_cache::UsePlaceholder;
|
||||
use range::Range;
|
||||
|
@ -65,7 +65,7 @@ use style::values::generics::ui::Cursor;
|
|||
use style_traits::CSSPixel;
|
||||
use style_traits::ToCss;
|
||||
use style_traits::cursor::CursorKind;
|
||||
use table_cell::CollapsedBordersForCell;
|
||||
use crate::table_cell::CollapsedBordersForCell;
|
||||
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};
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
// FIXME(rust-lang/rust#26264): Remove GenericEndingShape and GenericGradientItem.
|
||||
|
||||
use app_units::Au;
|
||||
use display_list::ToLayout;
|
||||
use crate::display_list::ToLayout;
|
||||
use euclid::{Point2D, Size2D, Vector2D};
|
||||
use style::properties::ComputedValues;
|
||||
use style::values::computed::{Angle, GradientItem, LengthOrPercentage, Percentage, Position};
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
// This might be achieved by sharing types between WR and Servo display lists, or
|
||||
// completely converting layout to directly generate WebRender display lists, for example.
|
||||
|
||||
use display_list::items::{ClipScrollNode, ClipScrollNodeIndex, ClipScrollNodeType};
|
||||
use display_list::items::{DisplayItem, DisplayList, StackingContextType};
|
||||
use crate::display_list::items::{ClipScrollNode, ClipScrollNodeIndex, ClipScrollNodeType};
|
||||
use crate::display_list::items::{DisplayItem, DisplayList, StackingContextType};
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use webrender_api::{self, ClipAndScrollInfo, ClipId, DisplayListBuilder, RasterSpace};
|
||||
use webrender_api::{LayoutPoint, SpecificDisplayItem};
|
||||
|
|
|
@ -5,17 +5,17 @@
|
|||
//! Layout for elements with a CSS `display` property of `flex`.
|
||||
|
||||
use app_units::{Au, MAX_AU};
|
||||
use block::{AbsoluteAssignBSizesTraversal, BlockFlow, MarginsMayCollapseFlag};
|
||||
use context::LayoutContext;
|
||||
use display_list::{DisplayListBuildState, FlexFlowDisplayListBuilding};
|
||||
use display_list::StackingContextCollectionState;
|
||||
use crate::block::{AbsoluteAssignBSizesTraversal, BlockFlow, MarginsMayCollapseFlag};
|
||||
use crate::context::LayoutContext;
|
||||
use crate::display_list::{DisplayListBuildState, FlexFlowDisplayListBuilding};
|
||||
use crate::display_list::StackingContextCollectionState;
|
||||
use euclid::Point2D;
|
||||
use floats::FloatKind;
|
||||
use flow::{Flow, FlowClass, GetBaseFlow, ImmutableFlowUtils, OpaqueFlow, FlowFlags};
|
||||
use fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
|
||||
use layout_debug;
|
||||
use model::{AdjoiningMargins, CollapsibleMargins};
|
||||
use model::{IntrinsicISizes, MaybeAuto, SizeConstraint};
|
||||
use crate::floats::FloatKind;
|
||||
use crate::flow::{Flow, FlowClass, GetBaseFlow, ImmutableFlowUtils, OpaqueFlow, FlowFlags};
|
||||
use crate::fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
|
||||
use crate::layout_debug;
|
||||
use crate::model::{AdjoiningMargins, CollapsibleMargins};
|
||||
use crate::model::{IntrinsicISizes, MaybeAuto, SizeConstraint};
|
||||
use std::cmp::{max, min};
|
||||
use std::ops::Range;
|
||||
use style::computed_values::align_content::T as AlignContent;
|
||||
|
@ -29,7 +29,7 @@ use style::servo::restyle_damage::ServoRestyleDamage;
|
|||
use style::values::computed::{LengthOrPercentage, LengthOrPercentageOrAuto, LengthOrPercentageOrNone};
|
||||
use style::values::computed::flex::FlexBasis;
|
||||
use style::values::generics::flex::FlexBasis as GenericFlexBasis;
|
||||
use traversal::PreorderFlowTraversal;
|
||||
use crate::traversal::PreorderFlowTraversal;
|
||||
|
||||
/// The size of an axis. May be a specified size, a min/max
|
||||
/// constraint, or an unlimited size
|
||||
|
@ -348,7 +348,7 @@ impl FlexLine {
|
|||
}
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
unsafe impl ::flow::HasBaseFlow for FlexFlow {}
|
||||
unsafe impl crate::flow::HasBaseFlow for FlexFlow {}
|
||||
|
||||
/// A block with the CSS `display` property equal to `flex`.
|
||||
#[derive(Debug, Serialize)]
|
||||
|
@ -1099,7 +1099,7 @@ impl Flow for FlexFlow {
|
|||
self.block_flow.collect_stacking_contexts(state);
|
||||
}
|
||||
|
||||
fn repair_style(&mut self, new_style: &::ServoArc<ComputedValues>) {
|
||||
fn repair_style(&mut self, new_style: &crate::ServoArc<ComputedValues>) {
|
||||
self.block_flow.repair_style(new_style)
|
||||
}
|
||||
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use app_units::{Au, MAX_AU};
|
||||
use block::FormattingContextType;
|
||||
use flow::{Flow, FlowFlags, GetBaseFlow, ImmutableFlowUtils};
|
||||
use persistent_list::PersistentList;
|
||||
use crate::block::FormattingContextType;
|
||||
use crate::flow::{Flow, FlowFlags, GetBaseFlow, ImmutableFlowUtils};
|
||||
use crate::persistent_list::PersistentList;
|
||||
use std::cmp::{max, min};
|
||||
use std::fmt;
|
||||
use style::computed_values::float::T as StyleFloat;
|
||||
|
|
|
@ -26,22 +26,22 @@
|
|||
//! similar methods.
|
||||
|
||||
use app_units::Au;
|
||||
use block::{BlockFlow, FormattingContextType};
|
||||
use context::LayoutContext;
|
||||
use display_list::{DisplayListBuildState, StackingContextCollectionState};
|
||||
use display_list::items::ClippingAndScrolling;
|
||||
use crate::block::{BlockFlow, FormattingContextType};
|
||||
use crate::context::LayoutContext;
|
||||
use crate::display_list::{DisplayListBuildState, StackingContextCollectionState};
|
||||
use crate::display_list::items::ClippingAndScrolling;
|
||||
use euclid::{Point2D, Vector2D, Rect, Size2D};
|
||||
use flex::FlexFlow;
|
||||
use floats::{Floats, SpeculatedFloatPlacement};
|
||||
use flow_list::{FlowList, FlowListIterator, MutFlowListIterator};
|
||||
use flow_ref::{FlowRef, WeakFlowRef};
|
||||
use fragment::{CoordinateSystem, Fragment, FragmentBorderBoxIterator, Overflow};
|
||||
use crate::flex::FlexFlow;
|
||||
use crate::floats::{Floats, SpeculatedFloatPlacement};
|
||||
use crate::flow_list::{FlowList, FlowListIterator, MutFlowListIterator};
|
||||
use crate::flow_ref::{FlowRef, WeakFlowRef};
|
||||
use crate::fragment::{CoordinateSystem, Fragment, FragmentBorderBoxIterator, Overflow};
|
||||
use gfx_traits::StackingContextId;
|
||||
use gfx_traits::print_tree::PrintTree;
|
||||
use inline::InlineFlow;
|
||||
use model::{CollapsibleMargins, IntrinsicISizes, MarginCollapseInfo};
|
||||
use multicol::MulticolFlow;
|
||||
use parallel::FlowParallelInfo;
|
||||
use crate::inline::InlineFlow;
|
||||
use crate::model::{CollapsibleMargins, IntrinsicISizes, MarginCollapseInfo};
|
||||
use crate::multicol::MulticolFlow;
|
||||
use crate::parallel::FlowParallelInfo;
|
||||
use serde::ser::{Serialize, SerializeStruct, Serializer};
|
||||
use servo_geometry::{au_rect_to_f32_rect, f32_rect_to_au_rect, MaxRect};
|
||||
use std::fmt;
|
||||
|
@ -60,13 +60,13 @@ use style::properties::ComputedValues;
|
|||
use style::selector_parser::RestyleDamage;
|
||||
use style::servo::restyle_damage::ServoRestyleDamage;
|
||||
use style::values::computed::LengthOrPercentageOrAuto;
|
||||
use table::TableFlow;
|
||||
use table_caption::TableCaptionFlow;
|
||||
use table_cell::TableCellFlow;
|
||||
use table_colgroup::TableColGroupFlow;
|
||||
use table_row::TableRowFlow;
|
||||
use table_rowgroup::TableRowGroupFlow;
|
||||
use table_wrapper::TableWrapperFlow;
|
||||
use crate::table::TableFlow;
|
||||
use crate::table_caption::TableCaptionFlow;
|
||||
use crate::table_cell::TableCellFlow;
|
||||
use crate::table_colgroup::TableColGroupFlow;
|
||||
use crate::table_row::TableRowFlow;
|
||||
use crate::table_rowgroup::TableRowGroupFlow;
|
||||
use crate::table_wrapper::TableWrapperFlow;
|
||||
use webrender_api::LayoutTransform;
|
||||
|
||||
/// This marker trait indicates that a type is a struct with `#[repr(C)]` whose first field
|
||||
|
@ -502,7 +502,7 @@ pub trait Flow: HasBaseFlow + fmt::Debug + Sync + Send + 'static {
|
|||
|
||||
/// Attempts to perform incremental fixup of this flow by replacing its fragment's style with
|
||||
/// the new style. This can only succeed if the flow has exactly one fragment.
|
||||
fn repair_style(&mut self, new_style: &::ServoArc<ComputedValues>);
|
||||
fn repair_style(&mut self, new_style: &crate::ServoArc<ComputedValues>);
|
||||
|
||||
/// Print any extra children (such as fragments) contained in this Flow
|
||||
/// for debugging purposes. Any items inserted into the tree will become
|
||||
|
@ -578,7 +578,7 @@ pub trait ImmutableFlowUtils {
|
|||
pub trait MutableFlowUtils {
|
||||
/// Calls `repair_style` and `bubble_inline_sizes`. You should use this method instead of
|
||||
/// calling them individually, since there is no reason not to perform both operations.
|
||||
fn repair_style_and_bubble_inline_sizes(self, style: &::ServoArc<ComputedValues>);
|
||||
fn repair_style_and_bubble_inline_sizes(self, style: &crate::ServoArc<ComputedValues>);
|
||||
}
|
||||
|
||||
pub trait MutableOwnedFlowUtils {
|
||||
|
@ -1422,7 +1422,7 @@ impl<'a> ImmutableFlowUtils for &'a Flow {
|
|||
impl<'a> MutableFlowUtils for &'a mut Flow {
|
||||
/// Calls `repair_style` and `bubble_inline_sizes`. You should use this method instead of
|
||||
/// calling them individually, since there is no reason not to perform both operations.
|
||||
fn repair_style_and_bubble_inline_sizes(self, style: &::ServoArc<ComputedValues>) {
|
||||
fn repair_style_and_bubble_inline_sizes(self, style: &crate::ServoArc<ComputedValues>) {
|
||||
self.repair_style(style);
|
||||
self.mut_base().update_flags_if_needed(style);
|
||||
self.bubble_inline_sizes();
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
* 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 flow::{Flow, FlowClass};
|
||||
use flow_ref::FlowRef;
|
||||
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};
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
//! be superfluous. This design is largely duplicating logic of Arc<T> and
|
||||
//! Weak<T>; please see comments there for details.
|
||||
|
||||
use flow::Flow;
|
||||
use crate::flow::Flow;
|
||||
use std::ops::Deref;
|
||||
use std::sync::{Arc, Weak};
|
||||
|
||||
|
|
|
@ -4,27 +4,27 @@
|
|||
|
||||
//! The `Fragment` type, which represents the leaves of the layout tree.
|
||||
|
||||
use ServoArc;
|
||||
use crate::ServoArc;
|
||||
use app_units::Au;
|
||||
use canvas_traits::canvas::{CanvasMsg, CanvasId};
|
||||
use context::{LayoutContext, with_thread_local_font_context};
|
||||
use display_list::ToLayout;
|
||||
use display_list::items::{BLUR_INFLATION_FACTOR, ClipScrollNodeIndex, OpaqueNode};
|
||||
use crate::context::{LayoutContext, with_thread_local_font_context};
|
||||
use crate::display_list::ToLayout;
|
||||
use crate::display_list::items::{BLUR_INFLATION_FACTOR, ClipScrollNodeIndex, OpaqueNode};
|
||||
use euclid::{Point2D, Vector2D, Rect, Size2D};
|
||||
use floats::ClearType;
|
||||
use flow::{GetBaseFlow, ImmutableFlowUtils};
|
||||
use flow_ref::FlowRef;
|
||||
use crate::floats::ClearType;
|
||||
use crate::flow::{GetBaseFlow, ImmutableFlowUtils};
|
||||
use crate::flow_ref::FlowRef;
|
||||
use gfx;
|
||||
use gfx::text::glyph::ByteIndex;
|
||||
use gfx::text::text_run::{TextRun, TextRunSlice};
|
||||
use gfx_traits::StackingContextId;
|
||||
use inline::{InlineFragmentNodeFlags, InlineFragmentContext, InlineFragmentNodeInfo};
|
||||
use inline::{InlineMetrics, LineMetrics};
|
||||
use crate::inline::{InlineFragmentNodeFlags, InlineFragmentContext, InlineFragmentNodeInfo};
|
||||
use crate::inline::{InlineMetrics, LineMetrics};
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
#[cfg(debug_assertions)]
|
||||
use layout_debug;
|
||||
use model::{self, IntrinsicISizes, IntrinsicISizesContribution, MaybeAuto, SizeConstraint};
|
||||
use model::style_length;
|
||||
use crate::layout_debug;
|
||||
use crate::model::{self, IntrinsicISizes, IntrinsicISizesContribution, MaybeAuto, SizeConstraint};
|
||||
use crate::model::style_length;
|
||||
use msg::constellation_msg::{BrowsingContextId, PipelineId};
|
||||
use net_traits::image::base::{Image, ImageMetadata};
|
||||
use net_traits::image_cache::{ImageOrMetadataAvailable, UsePlaceholder};
|
||||
|
@ -60,10 +60,10 @@ use style::values::computed::{Length, LengthOrPercentage, LengthOrPercentageOrAu
|
|||
use style::values::computed::counters::ContentItem;
|
||||
use style::values::generics::box_::{Perspective, VerticalAlign};
|
||||
use style::values::generics::transform;
|
||||
use text;
|
||||
use text::TextRunScanner;
|
||||
use crate::text;
|
||||
use crate::text::TextRunScanner;
|
||||
use webrender_api::{self, LayoutTransform};
|
||||
use wrapper::ThreadSafeLayoutNodeHelpers;
|
||||
use crate::wrapper::ThreadSafeLayoutNodeHelpers;
|
||||
|
||||
// From gfxFontConstants.h in Firefox.
|
||||
static FONT_SUBSCRIPT_OFFSET_RATIO: f32 = 0.20;
|
||||
|
|
|
@ -8,10 +8,10 @@
|
|||
//! done in parallel and is therefore a sequential pass that runs on as little of the flow tree
|
||||
//! as possible.
|
||||
|
||||
use context::{LayoutContext, with_thread_local_font_context};
|
||||
use display_list::items::OpaqueNode;
|
||||
use flow::{Flow, FlowFlags, GetBaseFlow, ImmutableFlowUtils};
|
||||
use fragment::{Fragment, GeneratedContentInfo, SpecificFragmentInfo, UnscannedTextFragmentInfo};
|
||||
use crate::context::{LayoutContext, with_thread_local_font_context};
|
||||
use crate::display_list::items::OpaqueNode;
|
||||
use crate::flow::{Flow, FlowFlags, GetBaseFlow, ImmutableFlowUtils};
|
||||
use crate::fragment::{Fragment, GeneratedContentInfo, SpecificFragmentInfo, UnscannedTextFragmentInfo};
|
||||
use script_layout_interface::wrapper_traits::PseudoElementType;
|
||||
use smallvec::SmallVec;
|
||||
use std::collections::{HashMap, LinkedList};
|
||||
|
@ -21,8 +21,8 @@ use style::properties::ComputedValues;
|
|||
use style::selector_parser::RestyleDamage;
|
||||
use style::servo::restyle_damage::ServoRestyleDamage;
|
||||
use style::values::generics::counters::ContentItem;
|
||||
use text::TextRunScanner;
|
||||
use traversal::InorderFlowTraversal;
|
||||
use crate::text::TextRunScanner;
|
||||
use crate::traversal::InorderFlowTraversal;
|
||||
|
||||
// Decimal styles per CSS-COUNTER-STYLES § 6.1:
|
||||
static DECIMAL: [char; 10] = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'];
|
||||
|
@ -428,7 +428,7 @@ impl Counter {
|
|||
layout_context: &LayoutContext,
|
||||
node: OpaqueNode,
|
||||
pseudo: PseudoElementType,
|
||||
style: ::ServoArc<ComputedValues>,
|
||||
style: crate::ServoArc<ComputedValues>,
|
||||
list_style_type: ListStyleType,
|
||||
mode: RenderingMode,
|
||||
) -> Option<SpecificFragmentInfo> {
|
||||
|
@ -492,7 +492,7 @@ fn render_text(
|
|||
layout_context: &LayoutContext,
|
||||
node: OpaqueNode,
|
||||
pseudo: PseudoElementType,
|
||||
style: ::ServoArc<ComputedValues>,
|
||||
style: crate::ServoArc<ComputedValues>,
|
||||
string: String,
|
||||
) -> Option<SpecificFragmentInfo> {
|
||||
let mut fragments = LinkedList::new();
|
||||
|
|
|
@ -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 flow::{FlowFlags, Flow, GetBaseFlow};
|
||||
use crate::flow::{FlowFlags, Flow, GetBaseFlow};
|
||||
use style::computed_values::float::T as Float;
|
||||
use style::selector_parser::RestyleDamage;
|
||||
use style::servo::restyle_damage::ServoRestyleDamage;
|
||||
|
|
|
@ -2,25 +2,25 @@
|
|||
* 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 ServoArc;
|
||||
use crate::ServoArc;
|
||||
use app_units::{Au, MIN_AU};
|
||||
use block::AbsoluteAssignBSizesTraversal;
|
||||
use context::{LayoutContext, LayoutFontContext};
|
||||
use display_list::{DisplayListBuildState, InlineFlowDisplayListBuilding};
|
||||
use display_list::StackingContextCollectionState;
|
||||
use display_list::items::OpaqueNode;
|
||||
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 euclid::{Point2D, Size2D};
|
||||
use floats::{FloatKind, Floats, PlacementInfo};
|
||||
use flow::{BaseFlow, Flow, FlowClass, ForceNonfloatedFlag};
|
||||
use flow::{FlowFlags, EarlyAbsolutePositionInfo, GetBaseFlow, OpaqueFlow};
|
||||
use flow_ref::FlowRef;
|
||||
use fragment::{CoordinateSystem, Fragment, FragmentBorderBoxIterator, Overflow};
|
||||
use fragment::FragmentFlags;
|
||||
use fragment::SpecificFragmentInfo;
|
||||
use crate::floats::{FloatKind, Floats, PlacementInfo};
|
||||
use crate::flow::{BaseFlow, Flow, FlowClass, ForceNonfloatedFlag};
|
||||
use crate::flow::{FlowFlags, EarlyAbsolutePositionInfo, GetBaseFlow, OpaqueFlow};
|
||||
use crate::flow_ref::FlowRef;
|
||||
use crate::fragment::{CoordinateSystem, Fragment, FragmentBorderBoxIterator, Overflow};
|
||||
use crate::fragment::FragmentFlags;
|
||||
use crate::fragment::SpecificFragmentInfo;
|
||||
use gfx::font::FontMetrics;
|
||||
use gfx_traits::print_tree::PrintTree;
|
||||
use layout_debug;
|
||||
use model::IntrinsicISizesContribution;
|
||||
use crate::layout_debug;
|
||||
use crate::model::IntrinsicISizesContribution;
|
||||
use range::{Range, RangeIndex};
|
||||
use script_layout_interface::wrapper_traits::PseudoElementType;
|
||||
use std::{fmt, i32, isize, mem};
|
||||
|
@ -39,8 +39,8 @@ use style::servo::restyle_damage::ServoRestyleDamage;
|
|||
use style::values::computed::box_::VerticalAlign;
|
||||
use style::values::generics::box_::VerticalAlign as GenericVerticalAlign;
|
||||
use style::values::specified::text::TextOverflowSide;
|
||||
use text;
|
||||
use traversal::PreorderFlowTraversal;
|
||||
use crate::text;
|
||||
use crate::traversal::PreorderFlowTraversal;
|
||||
use unicode_bidi as bidi;
|
||||
|
||||
/// `Line`s are represented as offsets into the child list, rather than
|
||||
|
@ -943,7 +943,7 @@ impl InlineFragments {
|
|||
}
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
unsafe impl ::flow::HasBaseFlow for InlineFlow {}
|
||||
unsafe impl crate::flow::HasBaseFlow for InlineFlow {}
|
||||
|
||||
/// Flows for inline layout.
|
||||
#[derive(Serialize)]
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
//! Supports writing a trace file created during each layout scope
|
||||
//! that can be viewed by an external tool to make layout debugging easier.
|
||||
|
||||
use flow::GetBaseFlow;
|
||||
use flow_ref::FlowRef;
|
||||
use crate::flow::GetBaseFlow;
|
||||
use crate::flow_ref::FlowRef;
|
||||
use serde_json::{to_string, to_value, Value};
|
||||
use std::borrow::ToOwned;
|
||||
use std::cell::RefCell;
|
||||
|
|
|
@ -87,8 +87,8 @@ pub mod traversal;
|
|||
pub mod wrapper;
|
||||
|
||||
// For unit tests:
|
||||
pub use fragment::Fragment;
|
||||
pub use fragment::SpecificFragmentInfo;
|
||||
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
|
||||
|
|
|
@ -6,17 +6,17 @@
|
|||
//! block and an extra inline fragment for the marker.
|
||||
|
||||
use app_units::Au;
|
||||
use block::BlockFlow;
|
||||
use context::{LayoutContext, with_thread_local_font_context};
|
||||
use display_list::{DisplayListBuildState, ListItemFlowDisplayListBuilding};
|
||||
use display_list::StackingContextCollectionState;
|
||||
use crate::block::BlockFlow;
|
||||
use crate::context::{LayoutContext, with_thread_local_font_context};
|
||||
use crate::display_list::{DisplayListBuildState, ListItemFlowDisplayListBuilding};
|
||||
use crate::display_list::StackingContextCollectionState;
|
||||
use euclid::Point2D;
|
||||
use floats::FloatKind;
|
||||
use flow::{Flow, FlowClass, OpaqueFlow};
|
||||
use fragment::{CoordinateSystem, Fragment, FragmentBorderBoxIterator, GeneratedContentInfo};
|
||||
use fragment::Overflow;
|
||||
use generated_content;
|
||||
use inline::InlineFlow;
|
||||
use crate::floats::FloatKind;
|
||||
use crate::flow::{Flow, FlowClass, OpaqueFlow};
|
||||
use crate::fragment::{CoordinateSystem, Fragment, FragmentBorderBoxIterator, GeneratedContentInfo};
|
||||
use crate::fragment::Overflow;
|
||||
use crate::generated_content;
|
||||
use crate::inline::InlineFlow;
|
||||
use style::computed_values::list_style_type::T as ListStyleType;
|
||||
use style::computed_values::position::T as Position;
|
||||
use style::logical_geometry::LogicalSize;
|
||||
|
@ -24,7 +24,7 @@ use style::properties::ComputedValues;
|
|||
use style::servo::restyle_damage::ServoRestyleDamage;
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
unsafe impl ::flow::HasBaseFlow for ListItemFlow {}
|
||||
unsafe impl crate::flow::HasBaseFlow for ListItemFlow {}
|
||||
|
||||
/// A block with the CSS `display` property equal to `list-item`.
|
||||
#[derive(Debug)]
|
||||
|
@ -194,7 +194,7 @@ impl Flow for ListItemFlow {
|
|||
self.block_flow.collect_stacking_contexts(state);
|
||||
}
|
||||
|
||||
fn repair_style(&mut self, new_style: &::ServoArc<ComputedValues>) {
|
||||
fn repair_style(&mut self, new_style: &crate::ServoArc<ComputedValues>) {
|
||||
self.block_flow.repair_style(new_style)
|
||||
}
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
use app_units::Au;
|
||||
use euclid::SideOffsets2D;
|
||||
use fragment::Fragment;
|
||||
use crate::fragment::Fragment;
|
||||
use std::cmp::{max, min};
|
||||
use std::fmt;
|
||||
use style::logical_geometry::{LogicalMargin, WritingMode};
|
||||
|
|
|
@ -4,15 +4,15 @@
|
|||
|
||||
//! CSS Multi-column layout http://dev.w3.org/csswg/css-multicol/
|
||||
|
||||
use ServoArc;
|
||||
use crate::ServoArc;
|
||||
use app_units::Au;
|
||||
use block::BlockFlow;
|
||||
use context::LayoutContext;
|
||||
use display_list::{DisplayListBuildState, StackingContextCollectionState};
|
||||
use crate::block::BlockFlow;
|
||||
use crate::context::LayoutContext;
|
||||
use crate::display_list::{DisplayListBuildState, StackingContextCollectionState};
|
||||
use euclid::{Point2D, Vector2D};
|
||||
use floats::FloatKind;
|
||||
use flow::{Flow, FlowClass, OpaqueFlow, FragmentationContext, GetBaseFlow};
|
||||
use fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
|
||||
use crate::floats::FloatKind;
|
||||
use crate::flow::{Flow, FlowClass, OpaqueFlow, FragmentationContext, GetBaseFlow};
|
||||
use crate::fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
|
||||
use gfx_traits::print_tree::PrintTree;
|
||||
use std::cmp::{min, max};
|
||||
use std::fmt;
|
||||
|
@ -24,7 +24,7 @@ use style::values::computed::{LengthOrPercentageOrAuto, LengthOrPercentageOrNone
|
|||
use style::values::generics::column::ColumnCount;
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
unsafe impl ::flow::HasBaseFlow for MulticolFlow {}
|
||||
unsafe impl crate::flow::HasBaseFlow for MulticolFlow {}
|
||||
|
||||
#[repr(C)]
|
||||
pub struct MulticolFlow {
|
||||
|
@ -36,7 +36,7 @@ pub struct MulticolFlow {
|
|||
}
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
unsafe impl ::flow::HasBaseFlow for MulticolColumnFlow {}
|
||||
unsafe impl crate::flow::HasBaseFlow for MulticolColumnFlow {}
|
||||
|
||||
#[repr(C)]
|
||||
pub struct MulticolColumnFlow {
|
||||
|
|
|
@ -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 display_list::items::OpaqueNode;
|
||||
use crate::display_list::items::OpaqueNode;
|
||||
use libc::c_void;
|
||||
use script_traits::UntrustedNodeAddress;
|
||||
|
||||
|
|
|
@ -8,10 +8,10 @@
|
|||
|
||||
#![allow(unsafe_code)]
|
||||
|
||||
use block::BlockFlow;
|
||||
use context::LayoutContext;
|
||||
use flow::{Flow, GetBaseFlow};
|
||||
use flow_ref::FlowRef;
|
||||
use crate::block::BlockFlow;
|
||||
use crate::context::LayoutContext;
|
||||
use crate::flow::{Flow, GetBaseFlow};
|
||||
use crate::flow_ref::FlowRef;
|
||||
use profile_traits::time::{self, TimerMetadata, profile};
|
||||
use rayon;
|
||||
use servo_config::opts;
|
||||
|
@ -19,8 +19,8 @@ use smallvec::SmallVec;
|
|||
use std::mem;
|
||||
use std::ptr;
|
||||
use std::sync::atomic::{AtomicIsize, Ordering};
|
||||
use traversal::{AssignBSizes, AssignISizes, BubbleISizes};
|
||||
use traversal::{PostorderFlowTraversal, PreorderFlowTraversal};
|
||||
use crate::traversal::{AssignBSizes, AssignISizes, BubbleISizes};
|
||||
use crate::traversal::{PostorderFlowTraversal, PreorderFlowTraversal};
|
||||
|
||||
/// Traversal chunk size.
|
||||
const CHUNK_SIZE: usize = 16;
|
||||
|
|
|
@ -5,17 +5,17 @@
|
|||
//! Utilities for querying the layout, as needed by the layout thread.
|
||||
|
||||
use app_units::Au;
|
||||
use construct::ConstructionResult;
|
||||
use context::LayoutContext;
|
||||
use display_list::IndexableText;
|
||||
use display_list::items::{DisplayList, OpaqueNode, ScrollOffsetMap};
|
||||
use crate::construct::ConstructionResult;
|
||||
use crate::context::LayoutContext;
|
||||
use crate::display_list::IndexableText;
|
||||
use crate::display_list::items::{DisplayList, OpaqueNode, ScrollOffsetMap};
|
||||
use euclid::{Point2D, Vector2D, Rect, Size2D};
|
||||
use flow::{Flow, GetBaseFlow};
|
||||
use fragment::{Fragment, FragmentBorderBoxIterator, SpecificFragmentInfo};
|
||||
use inline::InlineFragmentNodeFlags;
|
||||
use crate::flow::{Flow, GetBaseFlow};
|
||||
use crate::fragment::{Fragment, FragmentBorderBoxIterator, SpecificFragmentInfo};
|
||||
use crate::inline::InlineFragmentNodeFlags;
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use opaque_node::OpaqueNodeMethods;
|
||||
use crate::opaque_node::OpaqueNodeMethods;
|
||||
use script_layout_interface::{LayoutElementType, LayoutNodeType};
|
||||
use script_layout_interface::StyleData;
|
||||
use script_layout_interface::rpc::{ContentBoxResponse, ContentBoxesResponse, LayoutRPC};
|
||||
|
@ -25,7 +25,7 @@ use script_layout_interface::rpc::TextIndexResponse;
|
|||
use script_layout_interface::wrapper_traits::{LayoutNode, ThreadSafeLayoutElement, ThreadSafeLayoutNode};
|
||||
use script_traits::LayoutMsg as ConstellationMsg;
|
||||
use script_traits::UntrustedNodeAddress;
|
||||
use sequential;
|
||||
use crate::sequential;
|
||||
use std::cmp::{min, max};
|
||||
use std::ops::Deref;
|
||||
use std::sync::{Arc, Mutex};
|
||||
|
@ -39,7 +39,7 @@ use style::properties::{style_structs, PropertyId, PropertyDeclarationId, Longha
|
|||
use style::selector_parser::PseudoElement;
|
||||
use style_traits::ToCss;
|
||||
use webrender_api::ExternalScrollId;
|
||||
use wrapper::LayoutNodeLayoutData;
|
||||
use crate::wrapper::LayoutNodeLayoutData;
|
||||
|
||||
/// Mutable data belonging to the LayoutThread.
|
||||
///
|
||||
|
|
|
@ -5,18 +5,18 @@
|
|||
//! Implements sequential traversals over the DOM and flow trees.
|
||||
|
||||
use app_units::Au;
|
||||
use context::LayoutContext;
|
||||
use display_list::{DisplayListBuildState, StackingContextCollectionState};
|
||||
use crate::context::LayoutContext;
|
||||
use crate::display_list::{DisplayListBuildState, StackingContextCollectionState};
|
||||
use euclid::{Point2D, Vector2D};
|
||||
use floats::SpeculatedFloatPlacement;
|
||||
use flow::{Flow, ImmutableFlowUtils, FlowFlags, GetBaseFlow};
|
||||
use fragment::{FragmentBorderBoxIterator, CoordinateSystem};
|
||||
use generated_content::ResolveGeneratedContent;
|
||||
use incremental::RelayoutMode;
|
||||
use crate::floats::SpeculatedFloatPlacement;
|
||||
use crate::flow::{Flow, ImmutableFlowUtils, FlowFlags, GetBaseFlow};
|
||||
use crate::fragment::{FragmentBorderBoxIterator, CoordinateSystem};
|
||||
use crate::generated_content::ResolveGeneratedContent;
|
||||
use crate::incremental::RelayoutMode;
|
||||
use servo_config::opts;
|
||||
use style::servo::restyle_damage::ServoRestyleDamage;
|
||||
use traversal::{AssignBSizes, AssignISizes, BubbleISizes, BuildDisplayList};
|
||||
use traversal::{InorderFlowTraversal, PostorderFlowTraversal, PreorderFlowTraversal};
|
||||
use crate::traversal::{AssignBSizes, AssignISizes, BubbleISizes, BuildDisplayList};
|
||||
use crate::traversal::{InorderFlowTraversal, PostorderFlowTraversal, PreorderFlowTraversal};
|
||||
use webrender_api::LayoutPoint;
|
||||
|
||||
pub fn resolve_generated_content(root: &mut Flow, layout_context: &LayoutContext) {
|
||||
|
|
|
@ -5,18 +5,18 @@
|
|||
//! CSS table formatting contexts.
|
||||
|
||||
use app_units::Au;
|
||||
use block::{BlockFlow, CandidateBSizeIterator, ISizeAndMarginsComputer};
|
||||
use block::{ISizeConstraintInput, ISizeConstraintSolution};
|
||||
use context::LayoutContext;
|
||||
use display_list::{BlockFlowDisplayListBuilding, BorderPaintingMode};
|
||||
use display_list::{DisplayListBuildState, StackingContextCollectionFlags, StackingContextCollectionState};
|
||||
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 euclid::Point2D;
|
||||
use flow::{BaseFlow, EarlyAbsolutePositionInfo, Flow, FlowClass, ImmutableFlowUtils, GetBaseFlow, OpaqueFlow};
|
||||
use flow_list::{FlowListIterator, MutFlowListIterator};
|
||||
use fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
|
||||
use crate::flow::{BaseFlow, EarlyAbsolutePositionInfo, Flow, FlowClass, ImmutableFlowUtils, GetBaseFlow, OpaqueFlow};
|
||||
use crate::flow_list::{FlowListIterator, MutFlowListIterator};
|
||||
use crate::fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
|
||||
use gfx_traits::print_tree::PrintTree;
|
||||
use layout_debug;
|
||||
use model::{IntrinsicISizes, IntrinsicISizesContribution, MaybeAuto};
|
||||
use crate::layout_debug;
|
||||
use crate::model::{IntrinsicISizes, IntrinsicISizesContribution, MaybeAuto};
|
||||
use std::{cmp, fmt};
|
||||
use style::computed_values::{border_collapse, border_spacing, table_layout};
|
||||
use style::context::SharedStyleContext;
|
||||
|
@ -26,13 +26,13 @@ use style::properties::style_structs::Background;
|
|||
use style::servo::restyle_damage::ServoRestyleDamage;
|
||||
use style::values::CSSFloat;
|
||||
use style::values::computed::LengthOrPercentageOrAuto;
|
||||
use table_cell::TableCellFlow;
|
||||
use table_row::{self, CellIntrinsicInlineSize, CollapsedBorder, CollapsedBorderProvenance};
|
||||
use table_row::{TableRowFlow, TableRowSizeData};
|
||||
use table_wrapper::TableLayout;
|
||||
use crate::table_cell::TableCellFlow;
|
||||
use crate::table_row::{self, CellIntrinsicInlineSize, CollapsedBorder, CollapsedBorderProvenance};
|
||||
use crate::table_row::{TableRowFlow, TableRowSizeData};
|
||||
use crate::table_wrapper::TableLayout;
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
unsafe impl ::flow::HasBaseFlow for TableFlow {}
|
||||
unsafe impl crate::flow::HasBaseFlow for TableFlow {}
|
||||
|
||||
/// A table flow corresponded to the table's internal table fragment under a table wrapper flow.
|
||||
/// The properties `position`, `float`, and `margin-*` are used on the table wrapper fragment,
|
||||
|
@ -596,7 +596,7 @@ impl Flow for TableFlow {
|
|||
);
|
||||
}
|
||||
|
||||
fn repair_style(&mut self, new_style: &::ServoArc<ComputedValues>) {
|
||||
fn repair_style(&mut self, new_style: &crate::ServoArc<ComputedValues>) {
|
||||
self.block_flow.repair_style(new_style)
|
||||
}
|
||||
|
||||
|
|
|
@ -5,20 +5,20 @@
|
|||
//! CSS table formatting contexts.
|
||||
|
||||
use app_units::Au;
|
||||
use block::BlockFlow;
|
||||
use context::LayoutContext;
|
||||
use display_list::{BlockFlowDisplayListBuilding, DisplayListBuildState};
|
||||
use display_list::{StackingContextCollectionFlags, StackingContextCollectionState};
|
||||
use crate::block::BlockFlow;
|
||||
use crate::context::LayoutContext;
|
||||
use crate::display_list::{BlockFlowDisplayListBuilding, DisplayListBuildState};
|
||||
use crate::display_list::{StackingContextCollectionFlags, StackingContextCollectionState};
|
||||
use euclid::Point2D;
|
||||
use flow::{Flow, FlowClass, OpaqueFlow};
|
||||
use fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
|
||||
use crate::flow::{Flow, FlowClass, OpaqueFlow};
|
||||
use crate::fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
|
||||
use gfx_traits::print_tree::PrintTree;
|
||||
use std::fmt;
|
||||
use style::logical_geometry::LogicalSize;
|
||||
use style::properties::ComputedValues;
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
unsafe impl ::flow::HasBaseFlow for TableCaptionFlow {}
|
||||
unsafe impl crate::flow::HasBaseFlow for TableCaptionFlow {}
|
||||
|
||||
/// A table formatting context.
|
||||
#[repr(C)]
|
||||
|
@ -93,7 +93,7 @@ impl Flow for TableCaptionFlow {
|
|||
.collect_stacking_contexts_for_block(state, StackingContextCollectionFlags::empty());
|
||||
}
|
||||
|
||||
fn repair_style(&mut self, new_style: &::ServoArc<ComputedValues>) {
|
||||
fn repair_style(&mut self, new_style: &crate::ServoArc<ComputedValues>) {
|
||||
self.block_flow.repair_style(new_style)
|
||||
}
|
||||
|
||||
|
|
|
@ -5,16 +5,16 @@
|
|||
//! CSS table formatting contexts.
|
||||
|
||||
use app_units::Au;
|
||||
use block::{BlockFlow, ISizeAndMarginsComputer, MarginsMayCollapseFlag};
|
||||
use context::LayoutContext;
|
||||
use display_list::{BlockFlowDisplayListBuilding, DisplayListBuildState};
|
||||
use display_list::{StackingContextCollectionFlags, StackingContextCollectionState};
|
||||
use crate::block::{BlockFlow, ISizeAndMarginsComputer, MarginsMayCollapseFlag};
|
||||
use crate::context::LayoutContext;
|
||||
use crate::display_list::{BlockFlowDisplayListBuilding, DisplayListBuildState};
|
||||
use crate::display_list::{StackingContextCollectionFlags, StackingContextCollectionState};
|
||||
use euclid::{Point2D, Rect, SideOffsets2D, Size2D};
|
||||
use flow::{Flow, FlowClass, FlowFlags, GetBaseFlow, OpaqueFlow};
|
||||
use fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
|
||||
use crate::flow::{Flow, FlowClass, FlowFlags, GetBaseFlow, OpaqueFlow};
|
||||
use crate::fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
|
||||
use gfx_traits::print_tree::PrintTree;
|
||||
use layout_debug;
|
||||
use model::MaybeAuto;
|
||||
use crate::layout_debug;
|
||||
use crate::model::MaybeAuto;
|
||||
use script_layout_interface::wrapper_traits::ThreadSafeLayoutNode;
|
||||
use std::fmt;
|
||||
use style::logical_geometry::{LogicalMargin, LogicalRect, LogicalSize, WritingMode};
|
||||
|
@ -22,11 +22,11 @@ use style::properties::ComputedValues;
|
|||
use style::values::computed::Color;
|
||||
use style::values::generics::box_::VerticalAlign;
|
||||
use style::values::specified::BorderStyle;
|
||||
use table::InternalTable;
|
||||
use table_row::{CollapsedBorder, CollapsedBorderProvenance};
|
||||
use crate::table::InternalTable;
|
||||
use crate::table_row::{CollapsedBorder, CollapsedBorderProvenance};
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
unsafe impl ::flow::HasBaseFlow for TableCellFlow {}
|
||||
unsafe impl crate::flow::HasBaseFlow for TableCellFlow {}
|
||||
|
||||
/// A table formatting context.
|
||||
#[derive(Serialize)]
|
||||
|
@ -311,7 +311,7 @@ impl Flow for TableCellFlow {
|
|||
.collect_stacking_contexts_for_block(state, StackingContextCollectionFlags::empty());
|
||||
}
|
||||
|
||||
fn repair_style(&mut self, new_style: &::ServoArc<ComputedValues>) {
|
||||
fn repair_style(&mut self, new_style: &crate::ServoArc<ComputedValues>) {
|
||||
self.block_flow.repair_style(new_style)
|
||||
}
|
||||
|
||||
|
|
|
@ -5,19 +5,19 @@
|
|||
//! CSS table formatting contexts.
|
||||
|
||||
use app_units::Au;
|
||||
use context::LayoutContext;
|
||||
use display_list::{DisplayListBuildState, StackingContextCollectionState};
|
||||
use crate::context::LayoutContext;
|
||||
use crate::display_list::{DisplayListBuildState, StackingContextCollectionState};
|
||||
use euclid::Point2D;
|
||||
use flow::{BaseFlow, Flow, FlowClass, ForceNonfloatedFlag, OpaqueFlow};
|
||||
use fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
|
||||
use layout_debug;
|
||||
use crate::flow::{BaseFlow, Flow, FlowClass, ForceNonfloatedFlag, OpaqueFlow};
|
||||
use crate::fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
|
||||
use crate::layout_debug;
|
||||
use std::fmt;
|
||||
use style::logical_geometry::LogicalSize;
|
||||
use style::properties::ComputedValues;
|
||||
use style::values::computed::LengthOrPercentageOrAuto;
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
unsafe impl ::flow::HasBaseFlow for TableColGroupFlow {}
|
||||
unsafe impl crate::flow::HasBaseFlow for TableColGroupFlow {}
|
||||
|
||||
/// A table formatting context.
|
||||
#[repr(C)]
|
||||
|
@ -100,7 +100,7 @@ impl Flow for TableColGroupFlow {
|
|||
self.base.clipping_and_scrolling = Some(state.current_clipping_and_scrolling);
|
||||
}
|
||||
|
||||
fn repair_style(&mut self, _: &::ServoArc<ComputedValues>) {}
|
||||
fn repair_style(&mut self, _: &crate::ServoArc<ComputedValues>) {}
|
||||
|
||||
fn compute_overflow(&self) -> Overflow {
|
||||
Overflow::new()
|
||||
|
|
|
@ -5,17 +5,17 @@
|
|||
//! CSS table formatting contexts.
|
||||
|
||||
use app_units::Au;
|
||||
use block::{BlockFlow, ISizeAndMarginsComputer};
|
||||
use context::LayoutContext;
|
||||
use display_list::{BlockFlowDisplayListBuilding, DisplayListBuildState};
|
||||
use display_list::{StackingContextCollectionFlags, StackingContextCollectionState};
|
||||
use crate::block::{BlockFlow, ISizeAndMarginsComputer};
|
||||
use crate::context::LayoutContext;
|
||||
use crate::display_list::{BlockFlowDisplayListBuilding, DisplayListBuildState};
|
||||
use crate::display_list::{StackingContextCollectionFlags, StackingContextCollectionState};
|
||||
use euclid::Point2D;
|
||||
use flow::{EarlyAbsolutePositionInfo, Flow, FlowClass, ImmutableFlowUtils, GetBaseFlow, OpaqueFlow};
|
||||
use flow_list::MutFlowListIterator;
|
||||
use fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
|
||||
use crate::flow::{EarlyAbsolutePositionInfo, Flow, FlowClass, ImmutableFlowUtils, GetBaseFlow, OpaqueFlow};
|
||||
use crate::flow_list::MutFlowListIterator;
|
||||
use crate::fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
|
||||
use gfx_traits::print_tree::PrintTree;
|
||||
use layout_debug;
|
||||
use model::MaybeAuto;
|
||||
use crate::layout_debug;
|
||||
use crate::model::MaybeAuto;
|
||||
use serde::{Serialize, Serializer};
|
||||
use std::cmp::max;
|
||||
use std::fmt;
|
||||
|
@ -26,11 +26,11 @@ use style::computed_values::border_top_style::T as BorderStyle;
|
|||
use style::logical_geometry::{LogicalSize, PhysicalSide, WritingMode};
|
||||
use style::properties::ComputedValues;
|
||||
use style::values::computed::{Color, LengthOrPercentageOrAuto};
|
||||
use table::{ColumnComputedInlineSize, ColumnIntrinsicInlineSize, InternalTable, VecExt};
|
||||
use table_cell::{CollapsedBordersForCell, TableCellFlow};
|
||||
use crate::table::{ColumnComputedInlineSize, ColumnIntrinsicInlineSize, InternalTable, VecExt};
|
||||
use crate::table_cell::{CollapsedBordersForCell, TableCellFlow};
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
unsafe impl ::flow::HasBaseFlow for TableRowFlow {}
|
||||
unsafe impl crate::flow::HasBaseFlow for TableRowFlow {}
|
||||
|
||||
/// A single row of a table.
|
||||
#[repr(C)]
|
||||
|
@ -626,7 +626,7 @@ impl Flow for TableRowFlow {
|
|||
.collect_stacking_contexts_for_block(state, StackingContextCollectionFlags::empty());
|
||||
}
|
||||
|
||||
fn repair_style(&mut self, new_style: &::ServoArc<ComputedValues>) {
|
||||
fn repair_style(&mut self, new_style: &crate::ServoArc<ComputedValues>) {
|
||||
self.block_flow.repair_style(new_style)
|
||||
}
|
||||
|
||||
|
|
|
@ -5,25 +5,25 @@
|
|||
//! CSS table formatting contexts.
|
||||
|
||||
use app_units::Au;
|
||||
use block::{BlockFlow, ISizeAndMarginsComputer};
|
||||
use context::LayoutContext;
|
||||
use display_list::{BlockFlowDisplayListBuilding, DisplayListBuildState};
|
||||
use display_list::{StackingContextCollectionFlags, StackingContextCollectionState};
|
||||
use crate::block::{BlockFlow, ISizeAndMarginsComputer};
|
||||
use crate::context::LayoutContext;
|
||||
use crate::display_list::{BlockFlowDisplayListBuilding, DisplayListBuildState};
|
||||
use crate::display_list::{StackingContextCollectionFlags, StackingContextCollectionState};
|
||||
use euclid::Point2D;
|
||||
use flow::{Flow, FlowClass, OpaqueFlow};
|
||||
use fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
|
||||
use crate::flow::{Flow, FlowClass, OpaqueFlow};
|
||||
use crate::fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
|
||||
use gfx_traits::print_tree::PrintTree;
|
||||
use layout_debug;
|
||||
use crate::layout_debug;
|
||||
use serde::{Serialize, Serializer};
|
||||
use std::fmt;
|
||||
use std::iter::{IntoIterator, Iterator, Peekable};
|
||||
use style::computed_values::{border_collapse, border_spacing};
|
||||
use style::logical_geometry::LogicalSize;
|
||||
use style::properties::ComputedValues;
|
||||
use table::{ColumnIntrinsicInlineSize, InternalTable, TableLikeFlow};
|
||||
use crate::table::{ColumnIntrinsicInlineSize, InternalTable, TableLikeFlow};
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
unsafe impl ::flow::HasBaseFlow for TableRowGroupFlow {}
|
||||
unsafe impl crate::flow::HasBaseFlow for TableRowGroupFlow {}
|
||||
|
||||
/// A table formatting context.
|
||||
#[repr(C)]
|
||||
|
@ -224,7 +224,7 @@ impl Flow for TableRowGroupFlow {
|
|||
);
|
||||
}
|
||||
|
||||
fn repair_style(&mut self, new_style: &::ServoArc<ComputedValues>) {
|
||||
fn repair_style(&mut self, new_style: &crate::ServoArc<ComputedValues>) {
|
||||
self.block_flow.repair_style(new_style)
|
||||
}
|
||||
|
||||
|
|
|
@ -12,17 +12,17 @@
|
|||
//! Hereafter this document is referred to as INTRINSIC.
|
||||
|
||||
use app_units::Au;
|
||||
use block::{AbsoluteNonReplaced, BlockFlow, FloatNonReplaced, ISizeAndMarginsComputer, ISizeConstraintInput};
|
||||
use block::{ISizeConstraintSolution, MarginsMayCollapseFlag};
|
||||
use context::LayoutContext;
|
||||
use display_list::{BlockFlowDisplayListBuilding, DisplayListBuildState, StackingContextCollectionFlags};
|
||||
use display_list::StackingContextCollectionState;
|
||||
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 euclid::Point2D;
|
||||
use floats::FloatKind;
|
||||
use flow::{Flow, FlowClass, ImmutableFlowUtils, FlowFlags, OpaqueFlow};
|
||||
use fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
|
||||
use crate::floats::FloatKind;
|
||||
use crate::flow::{Flow, FlowClass, ImmutableFlowUtils, FlowFlags, OpaqueFlow};
|
||||
use crate::fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
|
||||
use gfx_traits::print_tree::PrintTree;
|
||||
use model::MaybeAuto;
|
||||
use crate::model::MaybeAuto;
|
||||
use std::cmp::{max, min};
|
||||
use std::fmt;
|
||||
use std::ops::Add;
|
||||
|
@ -32,7 +32,7 @@ use style::logical_geometry::{LogicalRect, LogicalSize};
|
|||
use style::properties::ComputedValues;
|
||||
use style::values::CSSFloat;
|
||||
use style::values::computed::LengthOrPercentageOrAuto;
|
||||
use table::{ColumnComputedInlineSize, ColumnIntrinsicInlineSize};
|
||||
use crate::table::{ColumnComputedInlineSize, ColumnIntrinsicInlineSize};
|
||||
|
||||
#[derive(Clone, Copy, Debug, Serialize)]
|
||||
pub enum TableLayout {
|
||||
|
@ -41,7 +41,7 @@ pub enum TableLayout {
|
|||
}
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
unsafe impl ::flow::HasBaseFlow for TableWrapperFlow {}
|
||||
unsafe impl crate::flow::HasBaseFlow for TableWrapperFlow {}
|
||||
|
||||
/// A table wrapper flow based on a block formatting context.
|
||||
#[derive(Serialize)]
|
||||
|
@ -515,7 +515,7 @@ impl Flow for TableWrapperFlow {
|
|||
);
|
||||
}
|
||||
|
||||
fn repair_style(&mut self, new_style: &::ServoArc<ComputedValues>) {
|
||||
fn repair_style(&mut self, new_style: &crate::ServoArc<ComputedValues>) {
|
||||
self.block_flow.repair_style(new_style)
|
||||
}
|
||||
|
||||
|
|
|
@ -5,15 +5,15 @@
|
|||
//! Text layout.
|
||||
|
||||
use app_units::Au;
|
||||
use context::LayoutFontContext;
|
||||
use fragment::{Fragment, ScannedTextFlags};
|
||||
use fragment::{ScannedTextFragmentInfo, SpecificFragmentInfo, UnscannedTextFragmentInfo};
|
||||
use crate::context::LayoutFontContext;
|
||||
use crate::fragment::{Fragment, ScannedTextFlags};
|
||||
use crate::fragment::{ScannedTextFragmentInfo, SpecificFragmentInfo, UnscannedTextFragmentInfo};
|
||||
use gfx::font::{FontRef, FontMetrics, RunMetrics, ShapingFlags, ShapingOptions};
|
||||
use gfx::text::glyph::ByteIndex;
|
||||
use gfx::text::text_run::TextRun;
|
||||
use gfx::text::util::{self, CompressionMode};
|
||||
use inline::{InlineFragmentNodeFlags, InlineFragments};
|
||||
use linked_list::split_off_head;
|
||||
use crate::inline::{InlineFragmentNodeFlags, InlineFragments};
|
||||
use crate::linked_list::split_off_head;
|
||||
use ordered_float::NotNan;
|
||||
use range::Range;
|
||||
use servo_atoms::Atom;
|
||||
|
@ -508,7 +508,7 @@ fn bounding_box_for_run_metrics(
|
|||
#[inline]
|
||||
pub fn font_metrics_for_style(
|
||||
mut font_context: &mut LayoutFontContext,
|
||||
style: ::ServoArc<FontStyleStruct>,
|
||||
style: crate::ServoArc<FontStyleStruct>,
|
||||
) -> FontMetrics {
|
||||
let font_group = font_context.font_group(style);
|
||||
let font = font_group.borrow_mut().first(&mut font_context);
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
|
||||
//! Traversals over the DOM and flow trees, running the layout computations.
|
||||
|
||||
use construct::FlowConstructor;
|
||||
use context::LayoutContext;
|
||||
use display_list::DisplayListBuildState;
|
||||
use flow::{FlowFlags, Flow, GetBaseFlow, ImmutableFlowUtils};
|
||||
use crate::construct::FlowConstructor;
|
||||
use crate::context::LayoutContext;
|
||||
use crate::display_list::DisplayListBuildState;
|
||||
use crate::flow::{FlowFlags, Flow, GetBaseFlow, ImmutableFlowUtils};
|
||||
use script_layout_interface::wrapper_traits::{LayoutNode, ThreadSafeLayoutNode};
|
||||
use servo_config::opts;
|
||||
use style::context::{SharedStyleContext, StyleContext};
|
||||
|
@ -17,8 +17,8 @@ use style::selector_parser::RestyleDamage;
|
|||
use style::servo::restyle_damage::ServoRestyleDamage;
|
||||
use style::traversal::{DomTraversal, recalc_style_at};
|
||||
use style::traversal::PerLevelTraversalData;
|
||||
use wrapper::{GetRawData, LayoutNodeLayoutData};
|
||||
use wrapper::ThreadSafeLayoutNodeHelpers;
|
||||
use crate::wrapper::{GetRawData, LayoutNodeLayoutData};
|
||||
use crate::wrapper::ThreadSafeLayoutNodeHelpers;
|
||||
|
||||
pub struct RecalcStyleAndConstructFlows<'a> {
|
||||
context: LayoutContext<'a>,
|
||||
|
@ -220,7 +220,7 @@ where
|
|||
.mutate_layout_data()
|
||||
.unwrap()
|
||||
.flags
|
||||
.insert(::data::LayoutDataFlags::HAS_BEEN_TRAVERSED);
|
||||
.insert(crate::data::LayoutDataFlags::HAS_BEEN_TRAVERSED);
|
||||
}
|
||||
|
||||
if let Some(el) = node.as_element() {
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#![allow(unsafe_code)]
|
||||
|
||||
use atomic_refcell::{AtomicRef, AtomicRefMut};
|
||||
use data::{LayoutData, LayoutDataFlags, StyleAndLayoutData};
|
||||
use crate::data::{LayoutData, LayoutDataFlags, StyleAndLayoutData};
|
||||
use script_layout_interface::wrapper_traits::{ThreadSafeLayoutElement, ThreadSafeLayoutNode};
|
||||
use script_layout_interface::wrapper_traits::GetLayoutData;
|
||||
use style::dom::{NodeInfo, TNode};
|
||||
|
@ -144,7 +144,7 @@ impl<T: ThreadSafeLayoutNode> ThreadSafeLayoutNodeHelpers for T {
|
|||
.layout_data
|
||||
.borrow()
|
||||
.flags
|
||||
.contains(::data::LayoutDataFlags::HAS_BEEN_TRAVERSED)
|
||||
.contains(crate::data::LayoutDataFlags::HAS_BEEN_TRAVERSED)
|
||||
{
|
||||
// We're reflowing a node that was styled for the first time and
|
||||
// has never been visited by layout. Return rebuild_and_reflow,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue