Handle cloned box decorations in grid containers.
Don't assume that items resume at block-offset in a flex container
fragment after a break. There may be cloned box decorations there. Just
use BorderScrollbarPadding(). If box decorations are to be sliced, they
will be 0 there.
Also only use BorderPadding() when resolving the total node size, since
cloned box decorations are multiplied there. Use
BorderScrollbarPadding() in call to FinishFragmentation().
Items in grid containers are distributed before fragmentation, and then
adjusted afterwards. If fragmentation inserts cloned box decorations on
the grid container, we need to compensate for that when dealing with
values based on unfragmented layout. We need something almost like
"previously consumed block-size", but not quite. Previously consumed
block-size of a grid container includes any cloned box decorations, but
they are not part of the imaginary unfragmented grid container. Hence
the rename from consumed_grid_block_size to offset_in_stitched_container
in GridBreakTokenData.
Bug: 40415661
Change-Id: Id2ad6171ddeee2effadfb4bbf49907528263e8f4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5806906
Commit-Queue: Morten Stenshorne mstensho@chromium.org
Reviewed-by: Ian Kilpatrick ikilpatrick@chromium.org
Cr-Commit-Position: refs/heads/main@{#1346839}