Fix NG table collapsed border pixel-snapping and clipping #27765
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes the following issues:
We missed pixel-snapping of the collapsed borders.
Add ObjectPainterBase::DrawBoxSide() which accepts IntRect instead of
float parameters. Previously if the float parameters were not
pixel-snapped, they would be converted to int by truncating which
implicitly snapped to whole pixels incorrectly.
We missed pixel-snapping and shrinking by border outsets for the clip
when painting background for layered table parts. Combine the clip
logic for cell background and other table part background with
correct pixel-snapping and clip rect, with a test.
Bug: 1180773
Change-Id: I81a967b3de08c116eed97a08e0f608a966088f40
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2717524
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Reviewed-by: Aleks Totic <atotic@chromium.org>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Cr-Commit-Position: refs/heads/master@{#857955}