alonso.torres 47b597a5da 🐛 Measure a layout's content with the paddings it uses
The content bounds of a grid or flex layout, which size a fill child
that is itself a layout and a layout that hugs, read the four stored
paddings. A simple padding type repeats the top and right values on the
bottom and left, so a layout whose sides were edited one by one before
its type was set to simple measured its content with the stale left and
bottom values: a fill grid with paddings 3, 6, 9 and 12 came out 6 px
wider than its content.

Both use `ctl/paddings`, as the layouts themselves do.

Test: `geom-grid-layout-test/grid-content-bounds-take-simple-paddings`
(fails before the fix).

Benchmark (bench-components, alone):

|                             :world | :baseline |   :now |   :mean | :ratio |
|------------------------------------+-----------+--------+---------+--------|
|  deepest-edit-through-three-levels |    35.215 | 22.925 |  23.239 |   0.65 |
| edit-through-a-chain-of-dependents |    68.931 | 45.225 |  46.994 |   0.66 |
|         library-update-into-copies |    83.083 | 54.842 |  57.554 |   0.66 |
|        main-edit-among-many-shapes |     4.837 |  2.528 |   2.705 |   0.52 |
|           main-edit-into-10-copies |      1.79 |  1.136 |   1.163 |   0.63 |
|          main-edit-into-100-copies |    15.415 | 10.746 |  11.596 |    0.7 |
|         main-edit-into-1000-copies |   153.086 | 109.63 | 113.323 |   0.72 |
|         variant-switch-into-copies |    32.052 | 23.103 |  24.367 |   0.72 |

AI-assisted-by: claude-opus-5-5
2026-11-18 10:29:50 +01:00
..
2026-11-10 20:21:16 +01:00
2026-09-29 09:07:34 +02:00
2026-03-11 15:24:40 +01:00