Place a locally redrawn widget once, in the box already chosen for it
`redraw` asks a dirty widget at its offer, and then again in the final box its parent chose from that answer. The second ask handed that box over as if it were an offer, so `draw_inner` ran `placed_box` on it and applied the widget's own alignment to a box that had already been placed -- a second placement on every local redraw of a widget that is not near-aligned. It only showed where the widget's alignment was its own to apply: a container override makes `draw_inner` take the box as given, and `Stack`, `Pad` and `Scroll` override every child they hand a box to. It is the fix for both of the handoff's standing warm-against-cold failures. Shrinker seed 288 on `region-node` was an 8.8px inset at each end of a `Text` under a `Span(Y-)` under two `Stack`s; oracle seed 326 at depth 6 was 88px on a `Text` under two `Branch`es. Neither reduced below 11 and 43 widgets, and both are this. Checked: fmt, clippy, 80 suite tests, 17 core unit tests, the release oracle at 100 seeds, **all fifteen shrinker cases at 400 seeds of depth 5**, and **1000 seeds of depth 6** -- the last two for the first time. `tabs`, `text`, `random` and the tab replay render byte-identical at 1920x1200 against `08c9d5a`, since nothing about a cold layout changes. Generated seed 20 at depth 4 catches it and joins the ordinary set, so `cargo test` fails without this rather than only the ignored long run. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
08c9d5aa32
commit
d8ae9c3bdd
2 files changed
+15
-6
No files matched your search
+5
-3
@@ -25,9 +25,11 @@ fn depth() -> usize {
|
||||
env("IRIS_GENERATED_DEPTH", 4)
|
||||
}
|
||||
|
||||
/// The seeds the ordinary tests take. Eight that have never failed and one,
|
||||
/// 86, that a `Scroll` fixed point once settled differently on.
|
||||
const SEEDS: [u64; 9] = [1, 2, 3, 5, 8, 10, 13, 86, 98];
|
||||
/// The seeds the ordinary tests take. Seven that have never failed; 86,
|
||||
/// which a `Scroll` fixed point once settled differently on; and 20, which
|
||||
/// caught a locally redrawn widget being placed twice in the box its parent
|
||||
/// had already placed it in.
|
||||
const SEEDS: [u64; 10] = [1, 2, 3, 5, 8, 10, 13, 20, 86, 98];
|
||||
|
||||
fn check(seed: u64, depth: usize, case: Case) {
|
||||
let grown = plan(seed, depth, &Edits::default());
|
||||
|
||||
Reference in new issue
Block a user