Provide adjusted block-end border/padding to FinishFragmentation().
Don't provide the entire strut, since it was used incorrectly anyway. FinishFragmentation() sometimes calls IsNodeFullyGrown(), and used to pass the border_padding strut that was passed to it. This was wrong for fieldsets, because, internally, fieldset padding isn't part of the fieldset, but rather the anonymous wrapper child block. To fix this, get the actual border/padding from the fragment builder, which is what IsNodeFullyGrown() needs to use when calculating a block-size. This isn't fixing any known issue, but I was playing with some code, and stumbled into the DCHECK_GE() failure in IsNodeFullyGrown() when fieldset block-size was non-auto. Example: <fieldset style="height:100px; border:10px solid; padding:30px;"> The border-box size should be 180px. This is what would be passed as current_total_block_size (correct). The border_padding passed would be 10px on each side (just the border, no padding - WRONG!), and the call to ComputeBlockSizeForFragment() would only return 120px, triggering the DCHECK. No behavior changes intended. Change-Id: I9782f785e2b915b8a4784c443389ba9d434ec5c8 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2438061Reviewed-by:Ian Kilpatrick <ikilpatrick@chromium.org> Reviewed-by:
Alison Maher <almaher@microsoft.com> Commit-Queue: Morten Stenshorne <mstensho@chromium.org> Cr-Commit-Position: refs/heads/master@{#811976}
Showing
Please register or sign in to comment