Snap rectangles to nearest pixels consistently.

Snapping the top-left and bottom-right corners separately can cause a
rectangle to change size when offset by a subpixel amount.  Instead, this
patch snaps the top-left corner, then rounds the size to a whole pixel amount,
so any rectangle of a given size will always have the same snapped size.

Fixes #7152.
This commit is contained in:
Matt Brubeck 2015-08-10 22:43:14 -07:00
parent c315404db8
commit 3b6dc09e47
5 changed files with 41 additions and 13 deletions

View file

@ -1,3 +1,4 @@
[position-relative-035.htm]
type: reftest
expected: FAIL
expected:
if os == "mac": FAIL