Auto merge of #7161 - mbrubeck:underline, r=pcwalton

Snap rectangles to nearest pixels consistently.

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

Fixes #7152. r? @pcwalton or @glennw

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7161)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2015-08-11 11:31:32 -06:00
commit 9c528c6382
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