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