// +spec:line-breaking:16e64c - soft wrap opportunity controls (word-break, overflow-wrap, line-break) threaded via UnifiedConstraints
#[allow(clippy::too_many_lines)] // large but cohesive: single-purpose layout/render/parse routine (one branch per case)
// +spec:line-breaking:f12241 - shaping across intra-word breaks: shaped clusters preserve joining forms
// +spec:line-breaking:2d3674 - U+002D/U+2010 are soft wrap opportunities, not hyphenation opportunities (no extra glyph inserted)
// +spec:line-breaking:28a40b - Hyphenation is a rendering-only effect (no change to underlying content)
// +spec:line-breaking:f23fe8 - UA may use language-tailored heuristics (delegated to hyphenation crate)
#[allow(clippy::match_same_arms)] // enum/value mapping/dispatch table: one arm per input variant (or cross-type bindings that can't merge)
#[allow(clippy::too_many_lines)] // large but cohesive: single-purpose layout/render/parse routine (one branch per case)
fn find_optimal_breakpoints(nodes: &[LayoutNode], constraints: &UnifiedConstraints) -> Vec<usize> {
#[allow(clippy::suboptimal_flops)] // mul_add not guaranteed faster/available without target +fma; keep explicit a*b+c
#[allow(clippy::match_same_arms)] // enum/value mapping/dispatch table: one arm per input variant (or cross-type bindings that can't merge)
#[allow(clippy::too_many_lines)] // large but cohesive: single-purpose layout/render/parse routine (one branch per case)
// +spec:display-contents:858337 - text-align justification: last line start-aligned, justify-all forces last line justify
// +spec:display-property:50e074 - justify stretches spaces/words in inline boxes, not inline-table/inline-block
// +spec:display-property:ce8d54 - text-justify selects justification method, inherited from block containers to root inline box
// +spec:display-contents:21b27a - text-indent applies to initial letter's originating line as usual
// +spec:box-model:96f5a7 - line box height uses line-height only; inline margins/borders/padding do not enter calculation
assert!(matches!(nodes.last(), Some(LayoutNode::Penalty { penalty, .. }) if *penalty <= -INFINITY_BADNESS),
let c = UnifiedConstraints { available_width: AvailableSpace::Definite(60.0), ..Default::default() };
let c = UnifiedConstraints { available_width: AvailableSpace::Definite(60.0), ..Default::default() };
let c = UnifiedConstraints { available_width: AvailableSpace::MinContent, ..Default::default() };
let n_pen_normal = nodes_normal.iter().filter(|n| matches!(n, LayoutNode::Penalty { .. })).count();
let n_pen_break_all = nodes_break_all.iter().filter(|n| matches!(n, LayoutNode::Penalty { .. })).count();
"break-all must add intra-word opportunities: normal={n_pen_normal}, break-all={n_pen_break_all}"