Improve saturation arithmetic support in FractionalLayoutUnit
https://bugs.webkit.org/show_bug.cgi?id=97938

Reviewed by Levi Weintraub.

Source/WebCore:

Fix bug in FractionalLayoutUnit::setValue where greater than or
equals is used instead of greater than to clamp the values.
Add SATURATED_LAYOUT_ARITHMETIC support to round preventing it
from overflowing when adding the fraction.

Test: fast/sub-pixel/large-sizes.html

* platform/FractionalLayoutUnit.h:
(WebCore::FractionalLayoutUnit::round):
(WebCore::FractionalLayoutUnit::setValue):

LayoutTests:

Update large sizes test to better cover values near limit.

* fast/sub-pixel/large-sizes-expected.txt:
* fast/sub-pixel/large-sizes.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk/LayoutTests@129958 268f45cc-cd09-0410-ab3c-d52691b4dbfc
3 files changed