M2 layout: LayoutEngine on Milky2018/chicle, conformance suite
- layout: port of GPUI's TaffyLayoutEngine (request_layout, request_measured_layout, compute_layout, layout_bounds, stretch_auto_size_to_fill) and LayoutStyle::to_taffy, with rem resolution and device-pixel snapping (round_half_toward_zero, stroke snapping, ceiled measured sizes). No cross-frame node cache yet (needs element ids, M6). - Depend on Milky2018/chicle 0.6.3, the maintained successor of moon_taffy (which no longer compiles), instead of vendoring. - conformance/chicle: standalone module running moon_taffy's 1,038 taffy fixtures against chicle; all pass on wasm, wasm-gc, js and native. - card example now lays out its content with the engine. - Docs: PORTING.md M2 status, revised decision 3, M2 deviations; README; NOTICE attribution for the conformance fixtures. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
10ee6d1f21
commit
cca9a49c51
60 files changed
+46155
-27
No files matched your search
@@ -0,0 +1,159 @@
|
||||
// Copyright 2025 International Digital Economy Academy
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
///|
|
||||
pub using @geometry {
|
||||
abstract_axis_block,
|
||||
abstract_axis_inline,
|
||||
type AvailableSpace,
|
||||
type AbsoluteAxis,
|
||||
type AbstractAxis,
|
||||
type Line,
|
||||
type Point,
|
||||
type Rect,
|
||||
type Size,
|
||||
}
|
||||
|
||||
///|
|
||||
pub using @style {
|
||||
length_percentage_auto_auto,
|
||||
length_percentage_auto_length,
|
||||
length_percentage_auto_percent,
|
||||
length_percentage_length,
|
||||
length_percentage_percent,
|
||||
type AlignContent,
|
||||
type AlignItems,
|
||||
type AlignSelf,
|
||||
type BoxSizing,
|
||||
type Dimension,
|
||||
type Display,
|
||||
type FlexDirection,
|
||||
type FlexWrap,
|
||||
type GridAutoFlow,
|
||||
type GridPlacement,
|
||||
type GridTrackRepetition,
|
||||
type JustifyContent,
|
||||
type JustifyItems,
|
||||
type JustifySelf,
|
||||
type LengthPercentage,
|
||||
type LengthPercentageAuto,
|
||||
type MaxTrackSizingFunction,
|
||||
type MinTrackSizingFunction,
|
||||
type NonRepeatedTrackSizingFunction,
|
||||
type Overflow,
|
||||
type Position,
|
||||
type Style,
|
||||
type TrackSizingFunction,
|
||||
}
|
||||
|
||||
///|
|
||||
pub using @style_helpers {
|
||||
align_content_center,
|
||||
align_content_end,
|
||||
align_content_flex_end,
|
||||
align_content_flex_start,
|
||||
align_content_space_around,
|
||||
align_content_space_between,
|
||||
align_content_space_evenly,
|
||||
align_content_start,
|
||||
align_content_stretch,
|
||||
align_items_baseline,
|
||||
align_items_center,
|
||||
align_items_end,
|
||||
align_items_flex_end,
|
||||
align_items_flex_start,
|
||||
align_items_start,
|
||||
align_items_stretch,
|
||||
auto,
|
||||
available_space_definite,
|
||||
box_sizing_border_box,
|
||||
box_sizing_content_box,
|
||||
display_block,
|
||||
display_flex,
|
||||
display_grid,
|
||||
display_none,
|
||||
evenly_sized_tracks,
|
||||
fit_content,
|
||||
flex,
|
||||
flex_direction_column,
|
||||
flex_direction_column_reverse,
|
||||
flex_direction_row,
|
||||
flex_direction_row_reverse,
|
||||
flex_wrap_no_wrap,
|
||||
flex_wrap_wrap,
|
||||
flex_wrap_wrap_reverse,
|
||||
fr,
|
||||
grid_auto_flow_column,
|
||||
grid_auto_flow_column_dense,
|
||||
grid_auto_flow_row,
|
||||
grid_auto_flow_row_dense,
|
||||
grid_max_content,
|
||||
grid_min_content,
|
||||
justify_content_center,
|
||||
justify_content_end,
|
||||
justify_content_flex_end,
|
||||
justify_content_flex_start,
|
||||
justify_content_space_around,
|
||||
justify_content_space_between,
|
||||
justify_content_space_evenly,
|
||||
justify_content_start,
|
||||
justify_content_stretch,
|
||||
length,
|
||||
line,
|
||||
max_content,
|
||||
max_track_auto,
|
||||
max_track_fit_content,
|
||||
max_track_fixed,
|
||||
max_track_fraction,
|
||||
max_track_max_content,
|
||||
max_track_min_content,
|
||||
min_content,
|
||||
min_track_auto,
|
||||
min_track_fixed,
|
||||
min_track_max_content,
|
||||
min_track_min_content,
|
||||
minmax,
|
||||
overflow_clip,
|
||||
overflow_hidden,
|
||||
overflow_scroll,
|
||||
overflow_visible,
|
||||
percent,
|
||||
place_auto,
|
||||
position_absolute,
|
||||
position_relative,
|
||||
repeat,
|
||||
repeat_auto_fill,
|
||||
repeat_auto_fit,
|
||||
repeat_count,
|
||||
repeated_track_sizing_function,
|
||||
span,
|
||||
track_sizing_function,
|
||||
zero,
|
||||
}
|
||||
|
||||
///|
|
||||
pub using @tree {
|
||||
layout_input_for_compute_size,
|
||||
layout_input_for_perform_layout,
|
||||
requested_axis_from_absolute,
|
||||
type Layout,
|
||||
type LayoutInput,
|
||||
type LayoutOutput,
|
||||
type NodeId,
|
||||
type RequestedAxis,
|
||||
type RunMode,
|
||||
type SizingMode,
|
||||
type ChicleError,
|
||||
type ChicleTree,
|
||||
}
|
||||
Reference in new issue
Block a user