mirror of
https://github.com/servo/servo.git
synced 2025-08-12 17:05:33 +01:00
Update rustfmt to the 2024 style edition (#35764)
* Use 2024 style edition Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Reformat all code Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
parent
6300e820b4
commit
3d320fa96a
603 changed files with 1739 additions and 1648 deletions
|
@ -4,10 +4,10 @@
|
|||
|
||||
use app_units::Au;
|
||||
use atomic_refcell::{AtomicRef, AtomicRefCell};
|
||||
use style::Zero;
|
||||
use style::properties::ComputedValues;
|
||||
use style::values::specified::align::AlignFlags;
|
||||
use style::values::specified::box_::DisplayInside;
|
||||
use style::Zero;
|
||||
use taffy::style_helpers::{TaffyMaxContent, TaffyMinContent};
|
||||
use taffy::{AvailableSpace, MaybeMath, RequestedAxis, RunMode};
|
||||
|
||||
|
@ -619,11 +619,11 @@ impl TaffyContainer {
|
|||
)),
|
||||
LogicalVec2 {
|
||||
inline: resolve_alignment(
|
||||
child.style.clone_align_self().0 .0,
|
||||
child.style.clone_align_self().0.0,
|
||||
align_items.0,
|
||||
),
|
||||
block: resolve_alignment(
|
||||
child.style.clone_justify_self().0 .0,
|
||||
child.style.clone_justify_self().0.0,
|
||||
justify_items.computed.0,
|
||||
),
|
||||
},
|
||||
|
|
|
@ -10,6 +10,7 @@ use servo_arc::Arc;
|
|||
use style::properties::ComputedValues;
|
||||
use stylo_taffy::TaffyStyloStyle;
|
||||
|
||||
use crate::PropagatedBoxTreeData;
|
||||
use crate::cell::ArcRefCell;
|
||||
use crate::construct_modern::{ModernContainerBuilder, ModernItemKind};
|
||||
use crate::context::LayoutContext;
|
||||
|
@ -18,7 +19,6 @@ use crate::dom_traversal::{NodeAndStyleInfo, NonReplacedContents};
|
|||
use crate::formatting_contexts::IndependentFormattingContext;
|
||||
use crate::fragment_tree::Fragment;
|
||||
use crate::positioned::{AbsolutelyPositionedBox, PositioningContext};
|
||||
use crate::PropagatedBoxTreeData;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub(crate) struct TaffyContainer {
|
||||
|
|
|
@ -8,11 +8,11 @@ mod stylo {
|
|||
pub(crate) use style::properties::longhands::aspect_ratio::computed_value::T as AspectRatio;
|
||||
pub(crate) use style::properties::longhands::position::computed_value::T as Position;
|
||||
pub(crate) use style::values::computed::{LengthPercentage, Percentage};
|
||||
pub(crate) use style::values::generics::NonNegative;
|
||||
pub(crate) use style::values::generics::length::{
|
||||
GenericLengthPercentageOrNormal, GenericMargin, GenericMaxSize, GenericSize,
|
||||
};
|
||||
pub(crate) use style::values::generics::position::{Inset as GenericInset, PreferredRatio};
|
||||
pub(crate) use style::values::generics::NonNegative;
|
||||
pub(crate) use style::values::specified::align::{AlignFlags, ContentDistribution};
|
||||
pub(crate) use style::values::specified::box_::{
|
||||
Display, DisplayInside, DisplayOutside, Overflow,
|
||||
|
@ -157,7 +157,7 @@ pub fn overflow(input: stylo::Overflow) -> taffy::Overflow {
|
|||
pub fn aspect_ratio(input: stylo::AspectRatio) -> Option<f32> {
|
||||
match input.ratio {
|
||||
stylo::PreferredRatio::None => None,
|
||||
stylo::PreferredRatio::Ratio(val) => Some(val.0 .0 / val.1 .0),
|
||||
stylo::PreferredRatio::Ratio(val) => Some(val.0.0 / val.1.0),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -216,11 +216,11 @@ impl<T: Deref<Target = ComputedValues>> taffy::GridItemStyle for TaffyStyloStyle
|
|||
|
||||
#[inline]
|
||||
fn align_self(&self) -> Option<taffy::AlignSelf> {
|
||||
convert::item_alignment(self.0.get_position().align_self.0 .0)
|
||||
convert::item_alignment(self.0.get_position().align_self.0.0)
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn justify_self(&self) -> Option<taffy::AlignSelf> {
|
||||
convert::item_alignment(self.0.get_position().justify_self.0 .0)
|
||||
convert::item_alignment(self.0.get_position().justify_self.0.0)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue