Skip to main content

atmos/os_lib/
layout.rs

1#![allow(dead_code)]
2
3use super::css::StyledNode;
4use super::dom::NodeType;
5use alloc::collections::BTreeMap;
6use alloc::string::String;
7use alloc::vec::Vec;
8use spin::Mutex;
9
10
11// ===== 分割サブモジュール(2026-07-16 リファクタ フェーズ4) =====
12// box レイアウトエンジン。型/グリッド/box モデル/レイアウト木/値解析/selftest を
13// layout/ 配下へ機械的に切り出した。ロジック不変。`layout::<name>` 外部参照パスを
14// 保つため pub(crate) use で全再エクスポート。詳細は walkthrough.md 参照。
15mod types;
16mod flex_min;
17mod grid;
18pub(crate) mod multicol;
19pub(crate) mod pseudo_box;
20mod boxmodel;
21mod tree;
22mod values;
23pub(crate) mod writing_mode;
24pub(crate) mod baseline;
25mod selftest;
26// 【2026-09-03 修正】`selftest` feature でのビルドが壊れていた。
27// `mod selftest;` は private のままで再輸出も無く、`main.rs` の
28// `os_lib::layout::selftest()` が「関数ではなくモジュール」に解決されて
29// コンパイルエラーになっていた(通常ビルドでは feature ごと落ちるため
30// 気づかれないまま残っていた=CI の回帰検出経路が動いていなかった)。
31// 関数を明示的に再輸出して呼べるようにする。
32#[cfg(feature = "selftest")]
33pub(crate) use selftest::selftest;
34
35
36pub(crate) use types::*;
37pub(crate) use grid::*;
38pub(crate) use boxmodel::*;
39pub(crate) use tree::*;
40pub(crate) use values::*;
41pub mod line_break;
42pub use crate::os_lib::viewport::{intersection_observer, resize_observer};