diff options
author | Simon Sapin <simon.sapin@exyr.org> | 2020-06-09 22:54:48 +0200 |
---|---|---|
committer | Simon Sapin <simon.sapin@exyr.org> | 2020-06-10 08:43:51 +0200 |
commit | dd0d6a2a6ffa52b45721448dc76ed44bde93b589 (patch) | |
tree | b5bc4c579d7af0c995f4fefb636a91b476902775 /components/layout_2020/flexbox/layout.rs | |
parent | dcd25a06da623e1620a82f5debe08c03397e3568 (diff) | |
download | servo-dd0d6a2a6ffa52b45721448dc76ed44bde93b589.tar.gz servo-dd0d6a2a6ffa52b45721448dc76ed44bde93b589.zip |
Split `layout_2020/flexbox.rs` into modules
Diffstat (limited to 'components/layout_2020/flexbox/layout.rs')
-rw-r--r-- | components/layout_2020/flexbox/layout.rs | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/components/layout_2020/flexbox/layout.rs b/components/layout_2020/flexbox/layout.rs new file mode 100644 index 00000000000..1da062b7764 --- /dev/null +++ b/components/layout_2020/flexbox/layout.rs @@ -0,0 +1,33 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * 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::FlexContainer; +use crate::context::LayoutContext; +use crate::formatting_contexts::IndependentLayout; +use crate::positioned::PositioningContext; +use crate::ContainingBlock; +use style::values::computed::Length; +use style::Zero; + +// FIXME: `min-width: auto` is not zero: https://drafts.csswg.org/css-flexbox/#min-size-auto + +impl FlexContainer { + pub(crate) fn layout( + &self, + layout_context: &LayoutContext, + positioning_context: &mut PositioningContext, + containing_block: &ContainingBlock, + tree_rank: usize, + ) -> IndependentLayout { + // FIXME + let _ = layout_context; + let _ = positioning_context; + let _ = containing_block; + let _ = tree_rank; + IndependentLayout { + fragments: Vec::new(), + content_block_size: Length::zero(), + } + } +} |