Stop composer layout recursion on spaces

This commit is contained in:
iris committed 2026-09-09 19:54:53 -04:00
1 parent 5ece49b8d9
commit e5fee03da8
4 files changed
+86 -14

No files matched your search

+8 -1
View File
@@ -289,7 +289,14 @@ those changed widgets from the outside in, after their parents have assigned
the final boxes. Otherwise a newly appended child can retain the provisional
(even inverted) region it was measured in until another update happens. The
downward work is confined to the branch that changed; unchanged descendants
still take `draw_inner`'s retained fast path.
still take `draw_inner`'s retained fast path. Each downward visit is exactly
one redraw, not another upward propagation: a wrapping child can have no fixed
point when an ancestor shrink-wraps it (a trailing space alternated between one
line in the offered width and two lines in its reported natural width). Feeding
that answer back into the same branch recursively overflowed Android's native
UI-thread stack before Rust could report a panic. A container that intends a
wrapping child to occupy its width declares that constraint explicitly; the
message composer does so on both sides of its vertical `ScrollArea`.
### 4. Wrapped text, and "needs child height before choosing width"