Fix the positioning of backgrounds positioned right and bottom
A recent change unnecessarily pixel snapped the destination rect
for background image painting before computing values determined by
that rectangle. This caused situations where subsequent sub-pixel
snapping pushes right and bottom positioned 1-pixel images outside
the dest rect when it is intersected with the paint rect.
The fix is to revert the line that early-snaps the dest rect.
New test added to cover this case. One other test that had got slightly
worse with the previous change gets better again with this change.
R=pdr@chromium.org
BUG=629075
Review-Url: https://codereview.chromium.org/2167323002
Cr-Commit-Position: refs/heads/master@{#406946}
4 files changed