Commit 5fcc0d68 authored by eae@chromium.org's avatar eae@chromium.org
Browse files

Add saturation arithmetic support to FractionalLayoutUnit

https://bugs.webkit.org/show_bug.cgi?id=94364

Reviewed by Benjamin Poulain.

Source/WebCore:

Add experimental saturation arithmetic support to FractionalLayoutUnit,
guarded by a flag.
The idea here is to saturate (or clamp) rather than overflow when
computing positions and sizes.

No new tests for WebCore, not enabled by default.

* platform/FractionalLayoutUnit.h:
(WebCore::FractionalLayoutUnit::intMinForLayoutUnit):
Use INT_MIN instead of -INT_MAX to compute minimum value as the two are
not the same.

(WebCore::FractionalLayoutUnit::FractionalLayoutUnit):
(WebCore::FractionalLayoutUnit::fromFloatCeil):
(WebCore::FractionalLayoutUnit::fromFloatFloor):
(WebCore::FractionalLayoutUnit::fromFloatRound):
(WebCore::FractionalLayoutUnit::setValue):
Add range checks.

(WebCore::operator*):
(WebCore::operator+):
(WebCore::operator-):
(WebCore::operator+=):
(WebCore::operator-=):
Use the saturatedAddition and saturatedSubtraction functions, which have
been optimized to reduce branching, instead of range checks for the most
common operators.

Source/WTF:

Add support functions for saturated addition and subtraction.

Test: TestWebKitAPI/Tests/WTF/SaturatedArithmeticOperations.cpp

* GNUmakefile.list.am:
* WTF.gypi:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* WTF.xcodeproj/project.pbxproj:
* WTF/wtf/CMakeLists.txt:
Add SaturatedArithmetic.h to build files.

* wtf/SaturatedArithmetic.h: Added.
(saturatedAddition):
(saturatedSubtraction):
Support functions for saturated addition/subtraction. Compares the signed
bit of the values instead of using range checks to reduce branching.

* wtf/Platform.h:
Add ENABLE_SATURATED_LAYOUT_ARITHMETIC flag.

Tools:

Add test for new saturatedArithmetic functions.

* TestWebKitAPI/CMakeLists.txt:
* TestWebKitAPI/GNUmakefile.am:
* TestWebKitAPI/TestWebKitAPI.gypi:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WTF/SaturatedArithmeticOperations.cpp: Added.
(TestWebKitAPI):
(TestWebKitAPI::TEST):
* TestWebKitAPI/win/TestWebKitAPI.vcproj:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126509 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 0979988e
2012-08-23 Emil A Eklund <eae@chromium.org>
Add saturation arithmetic support to FractionalLayoutUnit
https://bugs.webkit.org/show_bug.cgi?id=94364
Reviewed by Benjamin Poulain.
Add support functions for saturated addition and subtraction.
Test: TestWebKitAPI/Tests/WTF/SaturatedArithmeticOperations.cpp
* GNUmakefile.list.am:
* WTF.gypi:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* WTF.xcodeproj/project.pbxproj:
* WTF/wtf/CMakeLists.txt:
Add SaturatedArithmetic.h to build files.
* wtf/SaturatedArithmetic.h: Added.
(saturatedAddition):
(saturatedSubtraction):
Support functions for saturated addition/subtraction. Compares the signed
bit of the values instead of using range checks to reduce branching.
* wtf/Platform.h:
Add ENABLE_SATURATED_LAYOUT_ARITHMETIC flag.
2012-08-23 Mark Rowe <mrowe@apple.com>
Roll out part of r126475 that breaks the build with older versions of Clang.
......
......@@ -128,6 +128,7 @@ wtf_sources += \
Source/WTF/wtf/RetainPtr.h \
Source/WTF/wtf/SHA1.cpp \
Source/WTF/wtf/SHA1.h \
Source/WTF/wtf/SaturatedArithmetic.h \
Source/WTF/wtf/SegmentedVector.h \
Source/WTF/wtf/SentinelLinkedList.h \
Source/WTF/wtf/SimpleStats.h \
......
......@@ -75,6 +75,7 @@
'wtf/RefPtr.h',
'wtf/RefPtrHashMap.h',
'wtf/RetainPtr.h',
'wtf/SaturatedArithmetic.h',
'wtf/SentinelLinkedList.h',
'wtf/SinglyLinkedList.h',
'wtf/StackBounds.h',
......
......@@ -119,6 +119,7 @@ HEADERS += \
RefPtrHashMap.h \
RetainPtr.h \
SHA1.h \
SaturatedArithmetic.h \
Spectrum.h \
StackBounds.h \
StaticConstructors.h \
......
......@@ -1084,6 +1084,10 @@
RelativePath="..\wtf\RetainPtr.h"
>
</File>
<File
RelativePath="..\wtf\SaturatedArithmetic.h"
>
</File>
<File
RelativePath="..\wtf\SegmentedVector.h"
>
......
......@@ -10,6 +10,7 @@
0FD81AC5154FB22E00983E72 /* FastBitVector.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FD81AC4154FB22E00983E72 /* FastBitVector.h */; settings = {ATTRIBUTES = (); }; };
143F611F1565F0F900DB514A /* RAMSize.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 143F611D1565F0F900DB514A /* RAMSize.cpp */; };
143F61201565F0F900DB514A /* RAMSize.h in Headers */ = {isa = PBXBuildFile; fileRef = 143F611E1565F0F900DB514A /* RAMSize.h */; settings = {ATTRIBUTES = (Private, ); }; };
14F3B0F715E45E4600210069 /* SaturatedArithmetic.h in Headers */ = {isa = PBXBuildFile; fileRef = 14F3B0F615E45E4600210069 /* SaturatedArithmetic.h */; settings = {ATTRIBUTES = (Private, ); }; };
2C05385415BC819000F21B96 /* GregorianDateTime.h in Headers */ = {isa = PBXBuildFile; fileRef = 2C05385315BC819000F21B96 /* GregorianDateTime.h */; };
2CCD892A15C0390200285083 /* GregorianDateTime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2CCD892915C0390200285083 /* GregorianDateTime.cpp */; };
4330F38F15745B0500AAFA8F /* URLString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4330F38E15745B0500AAFA8F /* URLString.cpp */; };
......@@ -254,6 +255,7 @@
0FD81AC4154FB22E00983E72 /* FastBitVector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FastBitVector.h; sourceTree = "<group>"; };
143F611D1565F0F900DB514A /* RAMSize.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RAMSize.cpp; sourceTree = "<group>"; };
143F611E1565F0F900DB514A /* RAMSize.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RAMSize.h; sourceTree = "<group>"; };
14F3B0F615E45E4600210069 /* SaturatedArithmetic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SaturatedArithmetic.h; sourceTree = "<group>"; };
2C05385315BC819000F21B96 /* GregorianDateTime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GregorianDateTime.h; sourceTree = "<group>"; };
2CCD892915C0390200285083 /* GregorianDateTime.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GregorianDateTime.cpp; sourceTree = "<group>"; };
4330F38E15745B0500AAFA8F /* URLString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = URLString.cpp; sourceTree = "<group>"; };
......@@ -690,6 +692,7 @@
A8A47303151A825B004123FF /* RefPtr.h */,
A8A47304151A825B004123FF /* RefPtrHashMap.h */,
A8A47305151A825B004123FF /* RetainPtr.h */,
14F3B0F615E45E4600210069 /* SaturatedArithmetic.h */,
A8A47306151A825B004123FF /* SegmentedVector.h */,
A8A47307151A825B004123FF /* SentinelLinkedList.h */,
A8A47308151A825B004123FF /* SHA1.cpp */,
......@@ -1003,6 +1006,7 @@
A8A4741C151A825B004123FF /* RefPtr.h in Headers */,
A8A4741D151A825B004123FF /* RefPtrHashMap.h in Headers */,
A8A4741E151A825B004123FF /* RetainPtr.h in Headers */,
14F3B0F715E45E4600210069 /* SaturatedArithmetic.h in Headers */,
A8A47466151A825B004123FF /* ScriptCodesFromICU.h in Headers */,
A8A4741F151A825B004123FF /* SegmentedVector.h in Headers */,
A8A47420151A825B004123FF /* SentinelLinkedList.h in Headers */,
......
......@@ -82,6 +82,7 @@ SET(WTF_HEADERS
RefPtr.h
RefPtrHashMap.h
RetainPtr.h
SaturatedArithmetic.h
SegmentedVector.h
SHA1.h
StackBounds.h
......
......@@ -834,6 +834,14 @@
#endif
#endif
#if !defined(ENABLE_SATURATED_LAYOUT_ARITHMETIC)
#define ENABLE_SATURATED_LAYOUT_ARITHMETIC 0
#endif
#if ENABLE(ENABLE_SATURATED_LAYOUT_ARITHMETIC) && !ENABLE(ENABLE_SUBPIXEL_LAYOUT)
#error "ENABLE_SATURATED_LAYOUT_ARITHMETIC requires ENABLE_SUBPIXEL_LAYOUT"
#endif
#define ENABLE_DEBUG_WITH_BREAKPOINT 0
#define ENABLE_SAMPLING_COUNTERS 0
#define ENABLE_SAMPLING_FLAGS 0
......
/*
* Copyright (c) 2012, Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef SaturatedArithmetic_h
#define SaturatedArithmetic_h
#include <limits>
#include <stdint.h>
#include <stdlib.h>
inline int32_t saturatedAddition(int32_t a, int32_t b)
{
uint32_t ua = a;
uint32_t ub = b;
uint32_t result = ua + ub;
// Can only overflow if the signed bit of the two values match. If the signed
// bit of the result and one of the values differ it did overflow.
if (!((ua ^ ub) >> 31) & (result ^ ua) >> 31)
result = std::numeric_limits<int>::max() + (ua >> 31);
return result;
}
inline int32_t saturatedSubtraction(int32_t a, int32_t b)
{
uint32_t ua = a;
uint32_t ub = b;
uint32_t result = ua - ub;
// Can only overflow if the signed bit of the two values do not match. If the
// signed bit of the result and the first value differ it did overflow.
if ((ua ^ ub) >> 31 & (result ^ ua) >> 31)
result = std::numeric_limits<int>::max() + (ua >> 31);
return result;
}
#endif // SaturatedArithmetic_h
2012-08-23 Emil A Eklund <eae@chromium.org>
Add saturation arithmetic support to FractionalLayoutUnit
https://bugs.webkit.org/show_bug.cgi?id=94364
Reviewed by Benjamin Poulain.
Add experimental saturation arithmetic support to FractionalLayoutUnit,
guarded by a flag.
The idea here is to saturate (or clamp) rather than overflow when
computing positions and sizes.
No new tests for WebCore, not enabled by default.
* platform/FractionalLayoutUnit.h:
(WebCore::FractionalLayoutUnit::intMinForLayoutUnit):
Use INT_MIN instead of -INT_MAX to compute minimum value as the two are
not the same.
(WebCore::FractionalLayoutUnit::FractionalLayoutUnit):
(WebCore::FractionalLayoutUnit::fromFloatCeil):
(WebCore::FractionalLayoutUnit::fromFloatFloor):
(WebCore::FractionalLayoutUnit::fromFloatRound):
(WebCore::FractionalLayoutUnit::setValue):
Add range checks.
(WebCore::operator*):
(WebCore::operator+):
(WebCore::operator-):
(WebCore::operator+=):
(WebCore::operator-=):
Use the saturatedAddition and saturatedSubtraction functions, which have
been optimized to reduce branching, instead of range checks for the most
common operators.
2012-08-23 Kenneth Russell <kbr@google.com>
Unreviewed, rolling out r126483.
http://trac.webkit.org/changeset/126483
https://bugs.webkit.org/show_bug.cgi?id=92272
Caused two Chromium browser_tests to time out 100% reliably.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::init):
(WebCore::FrameLoader::prepareForLoadStart):
(WebCore::FrameLoader::clearProvisionalLoad):
(WebCore::FrameLoader::checkLoadCompleteForThisFrame):
(WebCore::FrameLoader::detachFromParent):
* loader/FrameLoader.h:
(FrameLoader):
2012-08-23 Kentaro Hara <haraken@chromium.org>
 
Unreviewed. Just added comments I forgot to add in r126506.
......@@ -36,6 +36,7 @@
#include <math.h>
#include <stdlib.h>
#include <wtf/MathExtras.h>
#include <wtf/SaturatedArithmetic.h>
#if PLATFORM(QT)
#include <QDataStream>
......@@ -63,7 +64,7 @@ static const int kFixedPointDenominator = 60;
static const int kFixedPointDenominator = 1;
#endif
const int intMaxForLayoutUnit = INT_MAX / kFixedPointDenominator;
const int intMinForLayoutUnit = -intMaxForLayoutUnit;
const int intMinForLayoutUnit = INT_MIN / kFixedPointDenominator;
class FractionalLayoutUnit {
public:
......@@ -73,11 +74,27 @@ public:
FractionalLayoutUnit() : m_value(0) { }
#if ENABLE(SUBPIXEL_LAYOUT)
FractionalLayoutUnit(int value) { REPORT_OVERFLOW(isInBounds(value)); m_value = value * kFixedPointDenominator; }
FractionalLayoutUnit(unsigned short value) { REPORT_OVERFLOW(isInBounds(value)); m_value = value * kFixedPointDenominator; }
FractionalLayoutUnit(unsigned int value) { REPORT_OVERFLOW(isInBounds(value)); m_value = value * kFixedPointDenominator; }
FractionalLayoutUnit(float value) { REPORT_OVERFLOW(isInBounds(value)); m_value = value * kFixedPointDenominator; }
FractionalLayoutUnit(double value) { REPORT_OVERFLOW(isInBounds(value)); m_value = value * kFixedPointDenominator; }
FractionalLayoutUnit(int value) { setValue(value); }
FractionalLayoutUnit(unsigned short value) { setValue(value); }
FractionalLayoutUnit(unsigned int value) { setValue(value); }
FractionalLayoutUnit(float value)
{
#if ENABLE(SATURATED_LAYOUT_ARITHMETIC)
m_value = clampTo<float>(value * kFixedPointDenominator, INT_MIN, INT_MAX);
#else
REPORT_OVERFLOW(isInBounds(value));
m_value = value * kFixedPointDenominator;
#endif
}
FractionalLayoutUnit(double value)
{
#if ENABLE(SATURATED_LAYOUT_ARITHMETIC)
m_value = clampTo<double>(value * kFixedPointDenominator, INT_MIN, INT_MAX);
#else
REPORT_OVERFLOW(isInBounds(value));
m_value = value * kFixedPointDenominator;
#endif
}
#else
FractionalLayoutUnit(int value) { REPORT_OVERFLOW(isInBounds(value)); m_value = value; }
FractionalLayoutUnit(unsigned short value) { REPORT_OVERFLOW(isInBounds(value)); m_value = value; }
......@@ -89,25 +106,42 @@ public:
static FractionalLayoutUnit fromFloatCeil(float value)
{
REPORT_OVERFLOW(isInBounds(value));
FractionalLayoutUnit v;
#if ENABLE(SATURATED_LAYOUT_ARITHMETIC)
v.m_value = clampToInteger(ceilf(value * kFixedPointDenominator));
#else
REPORT_OVERFLOW(isInBounds(value));
v.m_value = ceilf(value * kFixedPointDenominator);
#endif
return v;
}
static FractionalLayoutUnit fromFloatFloor(float value)
{
REPORT_OVERFLOW(isInBounds(value));
FractionalLayoutUnit v;
#if ENABLE(SATURATED_LAYOUT_ARITHMETIC)
v.m_value = clampToInteger(floorf(value * kFixedPointDenominator));
#else
REPORT_OVERFLOW(isInBounds(value));
v.m_value = floorf(value * kFixedPointDenominator);
#endif
return v;
}
static FractionalLayoutUnit fromFloatRound(float value)
{
#if ENABLE(SATURATED_LAYOUT_ARITHMETIC)
if (value >= 0)
return clamp(value + epsilon() / 2.0f);
return clamp(value - epsilon() / 2.0f);
#else
if (value >= 0) {
REPORT_OVERFLOW(isInBounds(value + epsilon() / 2.0f));
return FractionalLayoutUnit(value + epsilon() / 2.0f);
}
REPORT_OVERFLOW(isInBounds(value - epsilon() / 2.0f));
return FractionalLayoutUnit(value - epsilon() / 2.0f);
#endif
}
#if ENABLE(SUBPIXEL_LAYOUT)
......@@ -143,8 +177,8 @@ public:
return *this;
}
int rawValue() const { return m_value; }
void setRawValue(int value) { m_value = value; }
inline int rawValue() const { return m_value; }
inline void setRawValue(int value) { m_value = value; }
void setRawValue(long long value)
{
REPORT_OVERFLOW(value > std::numeric_limits<int>::min() && value < std::numeric_limits<int>::max());
......@@ -214,7 +248,7 @@ public:
{
return clampTo<FractionalLayoutUnit>(value, FractionalLayoutUnit::min(), FractionalLayoutUnit::max());
}
private:
static bool isInBounds(int value)
{
......@@ -228,6 +262,33 @@ private:
{
return ::fabs(value) <= std::numeric_limits<int>::max() / kFixedPointDenominator;
}
inline void setValue(int value)
{
#if ENABLE(SATURATED_LAYOUT_ARITHMETIC)
if (value >= intMaxForLayoutUnit)
m_value = std::numeric_limits<int>::max();
else if (value <= intMinForLayoutUnit)
m_value = std::numeric_limits<int>::min();
else
m_value = value * kFixedPointDenominator;
#else
REPORT_OVERFLOW(isInBounds(value));
m_value = value * kFixedPointDenominator;
#endif
}
inline void setValue(unsigned value)
{
#if ENABLE(SATURATED_LAYOUT_ARITHMETIC)
if (value >= static_cast<unsigned>(intMaxForLayoutUnit))
m_value = std::numeric_limits<int>::max();
else
m_value = value * kFixedPointDenominator;
#else
REPORT_OVERFLOW(isInBounds(value));
m_value = value * kFixedPointDenominator;
#endif
}
int m_value;
};
......@@ -411,7 +472,9 @@ inline FractionalLayoutUnit boundedMultiply(const FractionalLayoutUnit& a, const
inline FractionalLayoutUnit operator*(const FractionalLayoutUnit& a, const FractionalLayoutUnit& b)
{
#if ENABLE(SUBPIXEL_LAYOUT)
#if ENABLE(SUBPIXEL_LAYOUT) && ENABLE(SATURATED_LAYOUT_ARITHMETIC)
return boundedMultiply(a, b);
#elif ENABLE(SUBPIXEL_LAYOUT)
FractionalLayoutUnit returnVal;
long long rawVal = static_cast<long long>(a.rawValue()) * b.rawValue() / kFixedPointDenominator;
returnVal.setRawValue(rawVal);
......@@ -516,7 +579,11 @@ inline FractionalLayoutUnit operator/(unsigned int a, const FractionalLayoutUnit
inline FractionalLayoutUnit operator+(const FractionalLayoutUnit& a, const FractionalLayoutUnit& b)
{
FractionalLayoutUnit returnVal;
#if ENABLE(SATURATED_LAYOUT_ARITHMETIC)
returnVal.setRawValue(saturatedAddition(a.rawValue(), b.rawValue()));
#else
returnVal.setRawValue(a.rawValue() + b.rawValue());
#endif
return returnVal;
}
......@@ -553,7 +620,11 @@ inline double operator+(const double a, const FractionalLayoutUnit& b)
inline FractionalLayoutUnit operator-(const FractionalLayoutUnit& a, const FractionalLayoutUnit& b)
{
FractionalLayoutUnit returnVal;
#if ENABLE(SATURATED_LAYOUT_ARITHMETIC)
returnVal.setRawValue(saturatedSubtraction(a.rawValue(), b.rawValue()));
#else
returnVal.setRawValue(a.rawValue() - b.rawValue());
#endif
return returnVal;
}
......@@ -627,7 +698,11 @@ inline FractionalLayoutUnit operator%(int a, const FractionalLayoutUnit& b)
inline FractionalLayoutUnit& operator+=(FractionalLayoutUnit& a, const FractionalLayoutUnit& b)
{
#if ENABLE(SATURATED_LAYOUT_ARITHMETIC)
a.setRawValue(saturatedAddition(a.rawValue(), b.rawValue()));
#else
a = a + b;
#endif
return a;
}
......@@ -657,7 +732,11 @@ inline FractionalLayoutUnit& operator-=(FractionalLayoutUnit& a, int b)
inline FractionalLayoutUnit& operator-=(FractionalLayoutUnit& a, const FractionalLayoutUnit& b)
{
#if ENABLE(SATURATED_LAYOUT_ARITHMETIC)
a.setRawValue(saturatedSubtraction(a.rawValue(), b.rawValue()));
#else
a = a - b;
#endif
return a;
}
......
2012-08-23 Emil A Eklund <eae@chromium.org>
Add saturation arithmetic support to FractionalLayoutUnit
https://bugs.webkit.org/show_bug.cgi?id=94364
Reviewed by Benjamin Poulain.
Add test for new saturatedArithmetic functions.
* TestWebKitAPI/CMakeLists.txt:
* TestWebKitAPI/GNUmakefile.am:
* TestWebKitAPI/TestWebKitAPI.gypi:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WTF/SaturatedArithmeticOperations.cpp: Added.
(TestWebKitAPI):
(TestWebKitAPI::TEST):
* TestWebKitAPI/win/TestWebKitAPI.vcproj:
2012-08-23 Ryosuke Niwa <rniwa@webkit.org>
 
Replay tests take forever to load
......
......@@ -73,6 +73,7 @@ ADD_EXECUTABLE(test_wtf
${TESTWEBKITAPI_DIR}/Tests/WTF/HashMap.cpp
${TESTWEBKITAPI_DIR}/Tests/WTF/MetaAllocator.cpp
${TESTWEBKITAPI_DIR}/Tests/WTF/RedBlackTree.cpp
${TESTWEBKITAPI_DIR}/Tests/WTF/SaturatedArithmeticOperations.cpp
${TESTWEBKITAPI_DIR}/Tests/WTF/StringBuilder.cpp
${TESTWEBKITAPI_DIR}/Tests/WTF/StringImpl.cpp
${TESTWEBKITAPI_DIR}/Tests/WTF/StringOperators.cpp
......
......@@ -57,6 +57,7 @@ Programs_TestWebKitAPI_TestWTF_SOURCES = \
Tools/TestWebKitAPI/Tests/WTF/HashMap.cpp \
Tools/TestWebKitAPI/Tests/WTF/MediaTime.cpp \
Tools/TestWebKitAPI/Tests/WTF/RedBlackTree.cpp \
Tools/TestWebKitAPI/Tests/WTF/SaturatedArithmeticOperations.cpp \
Tools/TestWebKitAPI/Tests/WTF/StringBuilder.cpp \
Tools/TestWebKitAPI/Tests/WTF/StringImpl.cpp \
Tools/TestWebKitAPI/Tests/WTF/StringOperators.cpp \
......
......@@ -36,6 +36,7 @@
'Tests/WTF/HashMap.cpp',
'Tests/WTF/MediaTime.cpp',
'Tests/WTF/RedBlackTree.cpp',
'Tests/WTF/SaturatedArithmeticOperations.cpp',
'Tests/WTF/StringBuilder.cpp',
'Tests/WTF/StringOperators.cpp',
'Tests/WTF/TemporaryChange.cpp',
......
......@@ -13,6 +13,7 @@
0F17BBD615AF6C4D007AB753 /* WebCoreStatisticsWithNoWebProcess.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F17BBD415AF6C4D007AB753 /* WebCoreStatisticsWithNoWebProcess.cpp */; };
0FC6C4CC141027E0005B7F0C /* RedBlackTree.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FC6C4CB141027E0005B7F0C /* RedBlackTree.cpp */; };
0FC6C4CF141034AD005B7F0C /* MetaAllocator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FC6C4CE141034AD005B7F0C /* MetaAllocator.cpp */; };
14F3B11315E45EAB00210069 /* SaturatedArithmeticOperations.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14F3B11215E45EAB00210069 /* SaturatedArithmeticOperations.cpp */; };
1A02C84F125D4A8400E3F4BD /* Find.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A02C84E125D4A8400E3F4BD /* Find.cpp */; };
1A02C870125D4CFD00E3F4BD /* find.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 1A02C84B125D4A5E00E3F4BD /* find.html */; };
1A5FEFDD1270E2A3000E2921 /* EvaluateJavaScript.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A5FEFDC1270E2A3000E2921 /* EvaluateJavaScript.cpp */; };
......@@ -245,6 +246,7 @@
0F17BBD415AF6C4D007AB753 /* WebCoreStatisticsWithNoWebProcess.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebCoreStatisticsWithNoWebProcess.cpp; sourceTree = "<group>"; };
0FC6C4CB141027E0005B7F0C /* RedBlackTree.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RedBlackTree.cpp; path = WTF/RedBlackTree.cpp; sourceTree = "<group>"; };
0FC6C4CE141034AD005B7F0C /* MetaAllocator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MetaAllocator.cpp; path = WTF/MetaAllocator.cpp; sourceTree = "<group>"; };
14F3B11215E45EAB00210069 /* SaturatedArithmeticOperations.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SaturatedArithmeticOperations.cpp; path = WTF/SaturatedArithmeticOperations.cpp; sourceTree = "<group>"; };
1A02C84B125D4A5E00E3F4BD /* find.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = find.html; sourceTree = "<group>"; };
1A02C84E125D4A8400E3F4BD /* Find.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Find.cpp; sourceTree = "<group>"; };
1A5FEFDC1270E2A3000E2921 /* EvaluateJavaScript.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EvaluateJavaScript.cpp; sourceTree = "<group>"; };
......@@ -638,6 +640,7 @@
1AA9E55714980A9900001A8A /* Functional.cpp */,
0BCD833414857CE400EA2003 /* HashMap.cpp */,
26B2DFF815BDE599004F691D /* HashSet.cpp */,
14F3B11215E45EAB00210069 /* SaturatedArithmeticOperations.cpp */,
81B50192140F232300D9EB58 /* StringBuilder.cpp */,
26F1B44315CA434F00D1E4BF /* StringImpl.cpp */,
C01363C713C3997300EF3964 /* StringOperators.cpp */,
......@@ -873,105 +876,106 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
BC246D8E132F115A00B56D7C /* AboutBlankLoad.cpp in Sources */,
379028B614FABD92007E6B43 /* AcceptsFirstMouse.mm in Sources */,
26F1B44415CA434F00D1E4BF /* AtomicString.cpp in Sources */,
B55F11A01516834F00915916 /* AttributedString.mm in Sources */,
00CD9F6315BE312C002DA2CE /* BackForwardList.mm in Sources */,
26DF5A5E15A29BAA003689C2 /* CancelLoadFromResourceLoadDelegate.mm in Sources */,
BC246D9A132F1FE100B56D7C /* CanHandleRequest.cpp in Sources */,
A7A966DB140ECCC8005EF9B4 /* CheckedArithmeticOperations.cpp in Sources */,
5142B2711517C88B00C32B19 /* ContextMenuCanCopyURL.mm in Sources */,
F6F3F29113342FEB00A6BF19 /* CookieManager.cpp in Sources */,
26A2C72F15E2E73C005B1A14 /* CString.cpp in Sources */,
BC131885117114B600B69727 /* PlatformUtilitiesMac.mm in Sources */,
BC131A9B1171316900B69727 /* main.mm in Sources */,
BC131AA9117131FC00B69727 /* TestsController.cpp in Sources */,
BC90955D125548AA00083756 /* PlatformWebViewMac.mm in Sources */,
BC90964C125561BF00083756 /* VectorBasic.cpp in Sources */,
BC90977A125571AB00083756 /* PageLoadBasic.cpp in Sources */,
BC90995E12567BC100083756 /* WKString.cpp in Sources */,
BC9099941256ACF100083756 /* WKStringJSString.cpp in Sources */,
BCBD3710125AA2EB00D2C29F /* FrameMIMETypeHTML.cpp in Sources */,
BCBD3761125ABCFE00D2C29F /* FrameMIMETypePNG.cpp in Sources */,
1A02C84F125D4A8400E3F4BD /* Find.cpp in Sources */,
BCC8B95B12611F4700DE46A4 /* FailedLoad.cpp in Sources */,
C02B77F2126612140026BF0F /* SpacebarScrolling.cpp in Sources */,
BC575AAD126E83B9006F0F12 /* InjectedBundleBasic.cpp in Sources */,
BC575BC0126F5752006F0F12 /* PlatformUtilities.cpp in Sources */,
3776BC63150946BC0043A66D /* DeviceScaleFactorInDashboardRegions.mm in Sources */,
939BA91714103412001A01BD /* DeviceScaleFactorOnBack.mm in Sources */,
BCB68040126FBFE100642A61 /* DocumentStartUserScriptAlertCrash.cpp in Sources */,
37DC678D140D7C5000ABCCDB /* DOMRangeOfString.mm in Sources */,
51393E201523944A005F39C5 /* DOMWindowExtensionBasic.cpp in Sources */,
F6F49C6915545C8E0007F39D /* DOMWindowExtensionNoCache.cpp in Sources */,
C045F9451385C2EA00C0F3CD /* DownloadDecideDestinationCrash.cpp in Sources */,
C07E6CAF13FD67650038B22B /* DynamicDeviceScaleFactor.mm in Sources */,
BCAA485814A044D40088FAC4 /* EditorCommands.mm in Sources */,
1A5FEFDD1270E2A3000E2921 /* EvaluateJavaScript.cpp in Sources */,
333B9CE21277F23100FEFCE3 /* PreventEmptyUserAgent.cpp in Sources */,
BC7B61AA129A038700D174A4 /* WKPreferences.cpp in Sources */,
BC2D004912A9FDFA00E732A3 /* PageLoadDidChangeLocationWithinPageForFrame.cpp in Sources */,
C0ADBE7C12FCA4D000D2C129 /* JavaScriptTest.cpp in Sources */,
C0ADBE8312FCA6AA00D2C129 /* RestoreSessionStateContainingFormData.cpp in Sources */,
BCC8B95B12611F4700DE46A4 /* FailedLoad.cpp in Sources */,
1A02C84F125D4A8400E3F4BD /* Find.cpp in Sources */,
1ADBEFAE130C689C00D61D19 /* ForceRepaint.cpp in Sources */,
BCBD3710125AA2EB00D2C29F /* FrameMIMETypeHTML.cpp in Sources */,
BCBD3761125ABCFE00D2C29F /* FrameMIMETypePNG.cpp in Sources */,
1AA9E55914980A9900001A8A /* Functional.cpp in Sources */,
C0C5D3BE14598B6F00A802A6 /* GetBackingScaleFactor.mm in Sources */,
F660AA0D15A5F061003A1243 /* GetInjectedBundleInitializationUserDataCallback.cpp in Sources */,
0BCD833514857CE400EA2003 /* HashMap.cpp in Sources */,
26B2DFF915BDE599004F691D /* HashSet.cpp in Sources */,
4BFDFFA9131477770061F24B /* HitTestResultNodeHandle.cpp in Sources */,
C0BD669D131D3CF700E18F2A /* ResponsivenessTimerDoesntFireEarly.cpp in Sources */,
BC246D8E132F115A00B56D7C /* AboutBlankLoad.cpp in Sources */,
BC246D9A132F1FE100B56D7C /* CanHandleRequest.cpp in Sources */,
F6F3F29113342FEB00A6BF19 /* CookieManager.cpp in Sources */,
33BE5AF5137B5A6C00705813 /* MouseMoveAfterCrash.cpp in Sources */,
C045F9451385C2EA00C0F3CD /* DownloadDecideDestinationCrash.cpp in Sources */,
37200B9213A16230007A4FAD /* VectorReverse.cpp in Sources */,
C01363C813C3997300EF3964 /* StringOperators.cpp in Sources */,
C081224213FC172400DC39AE /* JavaScriptTestMac.mm in Sources */,
C081224513FC19EC00DC39AE /* SyntheticBackingScaleFactorWindow.m in Sources */,
C07E6CAF13FD67650038B22B /* DynamicDeviceScaleFactor.mm in Sources */,
C08587BF13FE956C001EF4E5 /* WebKitAgnosticTest.mm in Sources */,
9B4F8FA4159D52B1002D9F94 /* HTMLCollectionNamedItem.mm in Sources */,
9B26FC6C159D061000CC3765 /* HTMLFormCollectionNamedItem.mm in Sources */,