Strict import formatting (grouping and granularity) (#30325)

* strict imports formatting

* Reformat all imports
This commit is contained in:
Samson 2023-09-11 21:16:54 +02:00 committed by GitHub
parent 413da4ca69
commit aad2dccc9c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
802 changed files with 6861 additions and 6395 deletions

View file

@ -2,13 +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::layout_debug::DebugId;
use bitflags::bitflags;
use gfx_traits::{combine_id_with_fragment_type, FragmentType};
use serde::Serialize;
use style::dom::OpaqueNode;
use style::selector_parser::PseudoElement;
use crate::layout_debug::DebugId;
/// This data structure stores fields that are common to all non-base
/// Fragment types and should generally be the first member of all
/// concrete fragments.

View file

@ -2,10 +2,6 @@
* 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::{BaseFragment, BaseFragmentInfo, CollapsedBlockMargins, Fragment};
use crate::cell::ArcRefCell;
use crate::geom::flow_relative::{Rect, Sides};
use crate::geom::{PhysicalPoint, PhysicalRect, PhysicalSides, PhysicalSize};
use gfx_traits::print_tree::PrintTree;
use serde::Serialize;
use servo_arc::Arc as ServoArc;
@ -15,6 +11,11 @@ use style::properties::ComputedValues;
use style::values::computed::{CSSPixelLength, Length, LengthPercentage, LengthPercentageOrAuto};
use style::Zero;
use super::{BaseFragment, BaseFragmentInfo, CollapsedBlockMargins, Fragment};
use crate::cell::ArcRefCell;
use crate::geom::flow_relative::{Rect, Sides};
use crate::geom::{PhysicalPoint, PhysicalRect, PhysicalSides, PhysicalSize};
#[derive(Serialize)]
pub(crate) struct BoxFragment {
pub base: BaseFragment,

View file

@ -2,9 +2,10 @@
* 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::fragment_tree::Fragment;
use style::computed_values::position::T as ComputedPosition;
use crate::fragment_tree::Fragment;
/// A data structure used to track the containing block when recursing
/// through the Fragment tree. It tracks the three types of containing
/// blocks (for all descendants, for absolute and fixed position

View file

@ -2,18 +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 super::{BaseFragment, BoxFragment, ContainingBlockManager, HoistedSharedFragment, Tag};
use crate::cell::ArcRefCell;
use crate::geom::flow_relative::{Rect, Sides};
use crate::geom::PhysicalRect;
use crate::style_ext::ComputedValuesExt;
use std::sync::Arc;
use gfx::font::FontMetrics as GfxFontMetrics;
use gfx::text::glyph::GlyphStore;
use gfx_traits::print_tree::PrintTree;
use msg::constellation_msg::{BrowsingContextId, PipelineId};
use serde::Serialize;
use servo_arc::Arc as ServoArc;
use std::sync::Arc;
use style::logical_geometry::WritingMode;
use style::properties::ComputedValues;
use style::values::computed::Length;
@ -21,6 +17,12 @@ use style::values::specified::text::TextDecorationLine;
use style::Zero;
use webrender_api::{FontInstanceKey, ImageKey};
use super::{BaseFragment, BoxFragment, ContainingBlockManager, HoistedSharedFragment, Tag};
use crate::cell::ArcRefCell;
use crate::geom::flow_relative::{Rect, Sides};
use crate::geom::PhysicalRect;
use crate::style_ext::ComputedValuesExt;
#[derive(Serialize)]
pub(crate) enum Fragment {
Box(BoxFragment),

View file

@ -2,11 +2,6 @@
* 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::{ContainingBlockManager, Fragment, Tag};
use crate::cell::ArcRefCell;
use crate::display_list::StackingContext;
use crate::flow::CanvasBackground;
use crate::geom::PhysicalRect;
use app_units::Au;
use euclid::default::{Point2D, Rect, Size2D};
use fxhash::FxHashSet;
@ -17,6 +12,12 @@ use style::dom::OpaqueNode;
use style::values::computed::Length;
use webrender_api::units;
use super::{ContainingBlockManager, Fragment, Tag};
use crate::cell::ArcRefCell;
use crate::display_list::StackingContext;
use crate::flow::CanvasBackground;
use crate::geom::PhysicalRect;
#[derive(Serialize)]
pub struct FragmentTree {
/// Fragments at the top-level of the tree.

View file

@ -2,11 +2,13 @@
* 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::Fragment;
use crate::{cell::ArcRefCell, geom::flow_relative::Vec2};
use serde::Serialize;
use style::values::computed::{Length, LengthPercentage};
use super::Fragment;
use crate::cell::ArcRefCell;
use crate::geom::flow_relative::Vec2;
/// A reference to a Fragment which is shared between `HoistedAbsolutelyPositionedBox`
/// and its placeholder `AbsoluteOrFixedPositionedFragment` in the original tree position.
/// This will be used later in order to paint this hoisted box in tree order.