-
eae@chromium.org authored
https://bugs.webkit.org/show_bug.cgi?id=104955 Reviewed by Julien Chaffraix. Source/WebCore: LayoutUnit::operator/ currently does not clamp values and instead overflows when given a value greater than INT_MAX or less than INT_MIN. Test: TestWebKitAPI/Tests/WebCore/LayoutUnit.cpp * platform/LayoutUnit.h: (WebCore::operator/): Clamp value if SATURATED_LAYOUT_ARITHMETIC is enabled. Tools: Add tests for LayoutUnit. * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/ForwardingHeaders: Added. * TestWebKitAPI/ForwardingHeaders/WebCore: Added. * TestWebKitAPI/ForwardingHeaders/WebCore/LayoutUnit.h: Added. * TestWebKitAPI/TestWebKitAPI.gyp/TestWebKitAPI.gyp: * TestWebKitAPI/TestWebKitAPI.gypi: * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebCore/LayoutUnit.cpp: Added. (TestWebKitAPI): (TestWebKitAPI::TEST): * TestWebKitAPI/win/TestWebKitAPI.vcproj: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137924 268f45cc-cd09-0410-ab3c-d52691b4dbfc
8dfcf073