Stop keeping what nothing reads back

`ActiveData::size_deps` was written on every draw, cleared on every undraw,
and read nowhere: a `Vec<WidgetId>` per active widget for a list only the
`Painter`'s own copy is used from, in `draw_at`, before the record is built.
What it looked like it was for -- reaching a widget whose size was read --
is already done there, by recording whoever asked about a child it did not
draw.

`SizeRule::apply` had no caller and would have been wrong if it found one:
it answers with the rule's own length, where `draw_at` resolves a fraction
against the rel base first. One rule, applied in one place.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
iris-aiandClaude Opus 5 committed 2026-09-20 00:18:18 -04:00
1 parent 1ebd4d3a05
commit aea0387567
3 files changed
-13

No files matched your search

-3
View File
@@ -489,7 +489,6 @@ impl UiRenderState {
primitives,
mask_region,
children,
size_deps,
declared: rsc.widgets().declared_lens(id),
own_align: rsc.widgets().alignment(id),
move_idx,
@@ -800,7 +799,6 @@ impl UiRenderState {
}
// After the descendants, whose slots name this one as their parent.
self.drop_slot(id);
active.size_deps.clear();
active.drawn = false;
self.active.insert(id, active);
}
@@ -844,7 +842,6 @@ impl UiRenderState {
primitives: Vec::new(),
mask_region: None,
children: Vec::new(),
size_deps: Vec::new(),
move_idx: info.parent_move,
declared: Declared::NONE,
own_align: rsc.widgets().alignment(id),