layout/taffy/stylo_taffy/
mod.rs

1/* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4
5//! Conversion functions from Stylo types to Taffy types
6
7mod convert;
8mod wrapper;
9
10pub(crate) use wrapper::TaffyStyloStyle;
11
12/// Private module of type aliases so we can refer to stylo types with nicer names
13mod stylo {
14    pub(crate) use style::properties::generated::longhands::box_sizing::computed_value::T as BoxSizing;
15    pub(crate) use style::properties::longhands::aspect_ratio::computed_value::T as AspectRatio;
16    pub(crate) use style::properties::longhands::position::computed_value::T as Position;
17    pub(crate) use style::values::computed::length_percentage::{
18        CalcLengthPercentage, Unpacked as UnpackedLengthPercentage,
19    };
20    pub(crate) use style::values::computed::{LengthPercentage, Percentage};
21    pub(crate) use style::values::generics::NonNegative;
22    pub(crate) use style::values::generics::length::{
23        GenericLengthPercentageOrNormal, GenericMargin, GenericMaxSize, GenericSize,
24    };
25    pub(crate) use style::values::generics::position::{Inset as GenericInset, PreferredRatio};
26    pub(crate) use style::values::specified::align::{AlignFlags, ContentDistribution};
27    pub(crate) use style::values::specified::box_::{
28        Display, DisplayInside, DisplayOutside, Overflow,
29    };
30    pub(crate) type MarginVal = GenericMargin<LengthPercentage>;
31    pub(crate) type InsetVal = GenericInset<Percentage, LengthPercentage>;
32    pub(crate) type Size = GenericSize<NonNegative<LengthPercentage>>;
33    pub(crate) type MaxSize = GenericMaxSize<NonNegative<LengthPercentage>>;
34
35    pub(crate) type Gap = GenericLengthPercentageOrNormal<NonNegative<LengthPercentage>>;
36
37    pub(crate) use style::computed_values::grid_auto_flow::T as GridAutoFlow;
38    pub(crate) use style::values::computed::GridLine;
39    pub(crate) use style::values::generics::grid::{
40        RepeatCount, TrackBreadth, TrackListValue, TrackSize,
41    };
42    pub(crate) use style::values::specified::GenericGridTemplateComponent;
43}