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::generated::longhands::direction::computed_value::T as Direction;
16    pub(crate) use style::properties::longhands::aspect_ratio::computed_value::T as AspectRatio;
17    pub(crate) use style::properties::longhands::position::computed_value::T as Position;
18    pub(crate) use style::values::computed::length_percentage::{
19        CalcLengthPercentage, Unpacked as UnpackedLengthPercentage,
20    };
21    pub(crate) use style::values::computed::{LengthPercentage, Percentage};
22    pub(crate) use style::values::generics::NonNegative;
23    pub(crate) use style::values::generics::length::{
24        GenericLengthPercentageOrNormal, GenericMargin, GenericMaxSize, GenericSize,
25    };
26    pub(crate) use style::values::generics::position::{Inset as GenericInset, PreferredRatio};
27    pub(crate) use style::values::specified::align::{AlignFlags, ContentDistribution};
28    pub(crate) use style::values::specified::box_::{
29        Display, DisplayInside, DisplayOutside, Overflow,
30    };
31    pub(crate) type MarginVal = GenericMargin<LengthPercentage>;
32    pub(crate) type InsetVal = GenericInset<Percentage, LengthPercentage>;
33    pub(crate) type Size = GenericSize<NonNegative<LengthPercentage>>;
34    pub(crate) type MaxSize = GenericMaxSize<NonNegative<LengthPercentage>>;
35
36    pub(crate) type Gap = GenericLengthPercentageOrNormal<NonNegative<LengthPercentage>>;
37
38    pub(crate) use style::computed_values::grid_auto_flow::T as GridAutoFlow;
39    pub(crate) use style::values::computed::GridLine;
40    pub(crate) use style::values::generics::grid::{
41        RepeatCount, TrackBreadth, TrackListValue, TrackSize,
42    };
43    pub(crate) use style::values::specified::GenericGridTemplateComponent;
44}