[LayoutNG] Truncate block-end child margins at fragmentainer boundaries.
This was almost working correctly even without this fix, because we currently just brutally break inside a block that overflows if there are no breaks inside, losing any trailing margins. The only problem currently, is that such a break still produces a break token, so that the broken block would resume in the next fragmentainer (even if there's nothing left to lay out), producing no content there, but an empty fragment would create a break opportunity that shouldn't really be there. This was a problem both for regular block containers and fieldsets. This CL fixes that. It's also a problem for column spanners if they participate in an outer fragmentainer context, but we have some underlying issues there, so I just added a TODO. The -001.html test wouldn't even fail without this CL, but as I'm working on fixing the aforementioned brutal breaking, I felt we need slightly better test coverage. The new function AdjustedMarginAfterFinalChildFragment() is extremely simple, and the amount of code duplication it prevents is negligible (or even non-existent). Still, it seems reasonable to provide this function, for the sake of visibility, as this is something that all algorithms need to implement, if they want to get block fragmentation right. Bug: 829028 Change-Id: Ide568f6eaad38cd07e3cfc164bb97745a751fbb1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2252042 Commit-Queue: Morten Stenshorne <mstensho@chromium.org> Reviewed-by:Ian Kilpatrick <ikilpatrick@chromium.org> Reviewed-by:
Alison Maher <almaher@microsoft.com> Cr-Commit-Position: refs/heads/master@{#780742}
Showing
Please register or sign in to comment