snapToSize rounds the incorrectly for negative locations
https://bugs.webkit.org/show_bug.cgi?id=97265
Reviewed by Eric Seidel.
Source/WebCore:
Change snapSizeToPixel to preserve sign for location which
affects rounding.
Test: fast/sub-pixel/snap-negative-location.html
* platform/FractionalLayoutUnit.h:
(WebCore::snapSizeToPixel):
LayoutTests:
Add test for snapSizeToPixel handling of negative locations.
Skipped on platforms that do not enable subpixel layout.
* fast/sub-pixel/snap-negative-location-expected.html: Added.
* fast/sub-pixel/snap-negative-location.html: Added.
* platform/mac-lion/Skipped:
* platform/mac-snowleopard/Skipped:
* platform/mac-wk2/Skipped:
* platform/mac/Skipped:
* platform/qt-4.8/Skipped:
* platform/qt/Skipped:
* platform/win-wk2/Skipped:
* platform/win-xp/Skipped:
* platform/win/Skipped:
* platform/wincairo/Skipped:
* platform/wk2/Skipped:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@129370
268f45cc-cd09-0410-ab3c-
d52691b4dbfc