Reland "[LayoutNG] Fix border/background painting for multi-line"
Fix border, background, and mask painting for inline blocks spanning two or more lines or that are otherwise fragmented across multiple entities. This involved refactoring the existing inline box painting code to allow code sharing between legacy and LayoutNG painting code. It also required changing LayoutNG painting to further distinguish between inline and non inline boxes as the background image painting code in particular require taking the other fragments for a fragmented object into account when the image offsets and clipping is computed. Finally, this cleans up the flow box paint logic for both legacy and NG. This reverts r561186 (01dda95e) which in turn was a revert of the original patch (r558871) which was reverted due to a performance regression in blink_perf.paint color-changes benchmark. To avoid the regression this patch moves construction of the box painter from the inline box painter constructor to the paint methods where it is needed, thereby avoiding the construction overhead in cases where cached drawings may be reused. It also limits the lifecycle of the box painter. Bug: 714962, 844624 Test: fast/backgrounds/border-radius-split-background-image.html Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng;luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel Change-Id: I87ae744fdd204133e40b50721eca6947c81da817 Reviewed-on: https://chromium-review.googlesource.com/1144216 Commit-Queue: Emil A Eklund <eae@chromium.org> Reviewed-by:Philip Rogers <pdr@chromium.org> Cr-Commit-Position: refs/heads/master@{#577385}
Showing
This diff is collapsed.
Please register or sign in to comment