diff options
author | Samson <16504129+sagudev@users.noreply.github.com> | 2023-09-11 21:16:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-11 19:16:54 +0000 |
commit | aad2dccc9c9f6b89922c07933cfa7087a8cd1ec4 (patch) | |
tree | 68dec1a9d53f4ed564843a9580fba70bf90dbef1 /components/layout_2020/display_list | |
parent | 413da4ca69d3013528c09bbaf38629a72384372d (diff) | |
download | servo-aad2dccc9c9f6b89922c07933cfa7087a8cd1ec4.tar.gz servo-aad2dccc9c9f6b89922c07933cfa7087a8cd1ec4.zip |
Strict import formatting (grouping and granularity) (#30325)
* strict imports formatting
* Reformat all imports
Diffstat (limited to 'components/layout_2020/display_list')
-rw-r--r-- | components/layout_2020/display_list/background.rs | 8 | ||||
-rw-r--r-- | components/layout_2020/display_list/conversions.rs | 6 | ||||
-rw-r--r-- | components/layout_2020/display_list/mod.rs | 20 | ||||
-rw-r--r-- | components/layout_2020/display_list/stacking_context.rs | 27 |
4 files changed, 33 insertions, 28 deletions
diff --git a/components/layout_2020/display_list/background.rs b/components/layout_2020/display_list/background.rs index c5ad553efb8..a8e5b6cce24 100644 --- a/components/layout_2020/display_list/background.rs +++ b/components/layout_2020/display_list/background.rs @@ -2,17 +2,19 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::replaced::IntrinsicSizes; use euclid::{Size2D, Vector2D}; use style::computed_values::background_clip::single_value::T as Clip; use style::computed_values::background_origin::single_value::T as Origin; use style::properties::ComputedValues; use style::values::computed::background::BackgroundSize as Size; use style::values::computed::{Length, LengthPercentage}; -use style::values::specified::background::BackgroundRepeat as RepeatXY; -use style::values::specified::background::BackgroundRepeatKeyword as Repeat; +use style::values::specified::background::{ + BackgroundRepeat as RepeatXY, BackgroundRepeatKeyword as Repeat, +}; use webrender_api::{self as wr, units}; +use crate::replaced::IntrinsicSizes; + pub(super) struct BackgroundLayer { pub common: wr::CommonItemProperties, pub bounds: units::LayoutRect, diff --git a/components/layout_2020/display_list/conversions.rs b/components/layout_2020/display_list/conversions.rs index bcd42df789d..b0022c99cdf 100644 --- a/components/layout_2020/display_list/conversions.rs +++ b/components/layout_2020/display_list/conversions.rs @@ -2,14 +2,14 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::geom::{PhysicalPoint, PhysicalRect, PhysicalSides, PhysicalSize}; use style::computed_values::mix_blend_mode::T as ComputedMixBlendMode; use style::computed_values::text_decoration_style::T as ComputedTextDecorationStyle; use style::computed_values::transform_style::T as ComputedTransformStyle; -use style::values::computed::Filter as ComputedFilter; -use style::values::computed::Length; +use style::values::computed::{Filter as ComputedFilter, Length}; use webrender_api::{units, FilterOp, LineStyle, MixBlendMode, TransformStyle}; +use crate::geom::{PhysicalPoint, PhysicalRect, PhysicalSides, PhysicalSize}; + pub trait ToWebRender { type Type; fn to_webrender(&self) -> Self::Type; diff --git a/components/layout_2020/display_list/mod.rs b/components/layout_2020/display_list/mod.rs index 4cf11e17485..228aa6df62f 100644 --- a/components/layout_2020/display_list/mod.rs +++ b/components/layout_2020/display_list/mod.rs @@ -2,13 +2,9 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::context::LayoutContext; -use crate::display_list::conversions::ToWebRender; -use crate::display_list::stacking_context::StackingContextSection; -use crate::fragment_tree::{BoxFragment, Fragment, FragmentTree, Tag, TextFragment}; -use crate::geom::{PhysicalPoint, PhysicalRect}; -use crate::replaced::IntrinsicSizes; -use crate::style_ext::ComputedValuesExt; +use std::cell::OnceCell; +use std::sync::Arc; + use embedder_traits::Cursor; use euclid::{Point2D, SideOffsets2D, Size2D}; use fnv::FnvHashMap; @@ -16,8 +12,6 @@ use gfx::text::glyph::GlyphStore; use msg::constellation_msg::BrowsingContextId; use net_traits::image_cache::UsePlaceholder; use script_traits::compositor::{CompositorDisplayListInfo, ScrollTreeNodeId}; -use std::cell::OnceCell; -use std::sync::Arc; use style::computed_values::text_decoration_style::T as ComputedTextDecorationStyle; use style::dom::OpaqueNode; use style::properties::longhands::visibility::computed_value::T as Visibility; @@ -28,6 +22,14 @@ use style::values::specified::ui::CursorKind; use style_traits::CSSPixel; use webrender_api::{self as wr, units, ClipChainId, ClipId, CommonItemProperties}; +use crate::context::LayoutContext; +use crate::display_list::conversions::ToWebRender; +use crate::display_list::stacking_context::StackingContextSection; +use crate::fragment_tree::{BoxFragment, Fragment, FragmentTree, Tag, TextFragment}; +use crate::geom::{PhysicalPoint, PhysicalRect}; +use crate::replaced::IntrinsicSizes; +use crate::style_ext::ComputedValuesExt; + mod background; mod conversions; mod gradient; diff --git a/components/layout_2020/display_list/stacking_context.rs b/components/layout_2020/display_list/stacking_context.rs index 1dfee6741f5..f69e8f6e946 100644 --- a/components/layout_2020/display_list/stacking_context.rs +++ b/components/layout_2020/display_list/stacking_context.rs @@ -2,27 +2,18 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use super::DisplayList; -use crate::cell::ArcRefCell; -use crate::display_list::conversions::ToWebRender; -use crate::display_list::DisplayListBuilder; -use crate::fragment_tree::{ - AnonymousFragment, BoxFragment, ContainingBlockManager, Fragment, FragmentTree, -}; -use crate::geom::PhysicalRect; -use crate::style_ext::ComputedValuesExt; +use std::cmp::Ordering; +use std::mem; + use euclid::default::Rect; use script_traits::compositor::{ScrollTreeNodeId, ScrollableNodeInfo}; use servo_arc::Arc as ServoArc; -use std::cmp::Ordering; -use std::mem; use style::computed_values::float::T as ComputedFloat; use style::computed_values::mix_blend_mode::T as ComputedMixBlendMode; use style::computed_values::overflow_x::T as ComputedOverflow; use style::computed_values::position::T as ComputedPosition; use style::properties::ComputedValues; -use style::values::computed::ClipRectOrAuto; -use style::values::computed::Length; +use style::values::computed::{ClipRectOrAuto, Length}; use style::values::generics::box_::Perspective; use style::values::generics::transform; use style::values::specified::box_::DisplayOutside; @@ -30,6 +21,16 @@ use webrender_api as wr; use webrender_api::units::{LayoutPoint, LayoutRect, LayoutTransform, LayoutVector2D}; use webrender_api::ScrollSensitivity; +use super::DisplayList; +use crate::cell::ArcRefCell; +use crate::display_list::conversions::ToWebRender; +use crate::display_list::DisplayListBuilder; +use crate::fragment_tree::{ + AnonymousFragment, BoxFragment, ContainingBlockManager, Fragment, FragmentTree, +}; +use crate::geom::PhysicalRect; +use crate::style_ext::ComputedValuesExt; + #[derive(Clone)] pub(crate) struct ContainingBlock { /// The SpatialId of the spatial node that contains the children |