Changeset 119073 in webkit
- Timestamp:
- May 31, 2012, 1:28:29 AM (13 years ago)
- Location:
- trunk/Source
- Files:
-
- 3 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/CMakeLists.txt
r119067 r119073 1110 1110 platform/CrossThreadCopier.cpp 1111 1111 platform/DateComponents.cpp 1112 platform/Decimal.cpp 1112 1113 platform/DragData.cpp 1113 1114 platform/DragImage.cpp -
trunk/Source/WebCore/ChangeLog
r119070 r119073 1 2012-05-31 Yoshifumi Inoue <yosin@chromium.org> 2 3 [Platform] Introduce Decimal class for Number/Range input type. 4 https://bugs.webkit.org/show_bug.cgi?id=87360 5 6 Reviewed by Kent Tamura. 7 8 This patch added new class Decimal for decimal arithmatic in two 9 files: platform/Decimal.cpp and Decimal.h with unit test. 10 11 Test: WebKit/chromium/tests/DecimalTest.cpp 12 13 * CMakeLists.txt: 14 * GNUmakefile.list.am: 15 * Target.pri: 16 * WebCore.gypi: 17 * WebCore.vcproj/WebCore.vcproj: 18 * WebCore.xcodeproj/project.pbxproj: 19 * platform/Decimal.cpp: Added. 20 (WebCore): 21 (DecimalPrivate): 22 (SpecialValueHandler): 23 (WebCore::DecimalPrivate::SpecialValueHandler::SpecialValueHandler): 24 (WebCore::DecimalPrivate::SpecialValueHandler::handle): 25 (WebCore::DecimalPrivate::SpecialValueHandler::value): 26 (UInt128): 27 (WebCore::DecimalPrivate::UInt128::UInt128): 28 (WebCore::DecimalPrivate::UInt128::high): 29 (WebCore::DecimalPrivate::UInt128::low): 30 (WebCore::DecimalPrivate::UInt128::multiply): 31 (WebCore::DecimalPrivate::UInt128::highUInt32): 32 (WebCore::DecimalPrivate::UInt128::lowUInt32): 33 (WebCore::DecimalPrivate::UInt128::isZero): 34 (WebCore::DecimalPrivate::UInt128::makeUInt64): 35 (WebCore::DecimalPrivate::UInt128::operator/=): 36 (WebCore::DecimalPrivate::UInt128::multiplyHigh): 37 (WebCore::DecimalPrivate::countDigits): 38 (WebCore::DecimalPrivate::scaleDown): 39 (WebCore::DecimalPrivate::scaleUp): 40 (WebCore::Decimal::EncodedData::EncodedData): 41 (WebCore::Decimal::EncodedData::operator==): 42 (WebCore::Decimal::Decimal): 43 (WebCore::Decimal::operator=): 44 (WebCore::Decimal::operator+=): 45 (WebCore::Decimal::operator-=): 46 (WebCore::Decimal::operator*=): 47 (WebCore::Decimal::operator/=): 48 (WebCore::Decimal::operator-): 49 (WebCore::Decimal::operator+): 50 (WebCore::Decimal::operator*): 51 (WebCore::Decimal::operator/): 52 (WebCore::Decimal::operator==): 53 (WebCore::Decimal::operator!=): 54 (WebCore::Decimal::operator<): 55 (WebCore::Decimal::operator<=): 56 (WebCore::Decimal::operator>): 57 (WebCore::Decimal::operator>=): 58 (WebCore::Decimal::abs): 59 (WebCore::Decimal::alignOperands): 60 (WebCore::Decimal::ceiling): 61 (WebCore::Decimal::compareTo): 62 (WebCore::Decimal::floor): 63 (WebCore::Decimal::fromString): 64 (WebCore::Decimal::infinity): 65 (WebCore::Decimal::nan): 66 (WebCore::Decimal::remainder): 67 (WebCore::Decimal::round): 68 (WebCore::Decimal::toString): 69 (WebCore::Decimal::zero): 70 * platform/Decimal.h: Added. 71 (WebCore): 72 (DecimalPrivate): 73 (Decimal): 74 (EncodedData): 75 (WebCore::Decimal::EncodedData::operator!=): 76 (WebCore::Decimal::EncodedData::coefficient): 77 (WebCore::Decimal::EncodedData::exponent): 78 (WebCore::Decimal::EncodedData::isFinite): 79 (WebCore::Decimal::EncodedData::isNaN): 80 (WebCore::Decimal::EncodedData::isSpecial): 81 (WebCore::Decimal::EncodedData::isZero): 82 (WebCore::Decimal::EncodedData::sign): 83 (WebCore::Decimal::EncodedData::setSign): 84 (WebCore::Decimal::EncodedData::formatClass): 85 (WebCore::Decimal::isFinite): 86 (WebCore::Decimal::isNaN): 87 (WebCore::Decimal::isNegative): 88 (WebCore::Decimal::isPositive): 89 (WebCore::Decimal::isSpecial): 90 (WebCore::Decimal::isZero): 91 (WebCore::Decimal::value): 92 (AlignedOperands): 93 (WebCore::Decimal::invertSign): 94 (WebCore::Decimal::exponent): 95 (WebCore::Decimal::sign): 96 1 97 2012-05-31 Kentaro Hara <haraken@chromium.org> 2 98 -
trunk/Source/WebCore/GNUmakefile.list.am
r119067 r119073 3118 3118 Source/WebCore/platform/DateComponents.cpp \ 3119 3119 Source/WebCore/platform/DateComponents.h \ 3120 Source/WebCore/platform/Decimal.cpp \ 3121 Source/WebCore/platform/Decimal.h \ 3120 3122 Source/WebCore/platform/DragData.cpp \ 3121 3123 Source/WebCore/platform/DragData.h \ -
trunk/Source/WebCore/Target.pri
r119067 r119073 1085 1085 platform/CrossThreadCopier.cpp \ 1086 1086 platform/DateComponents.cpp \ 1087 platform/Decimal.cpp \ 1087 1088 platform/DragData.cpp \ 1088 1089 platform/DragImage.cpp \ … … 2207 2208 platform/CrossThreadCopier.h \ 2208 2209 platform/DateComponents.h \ 2210 platform/Decimal.h \ 2209 2211 platform/DragData.h \ 2210 2212 platform/DragImage.h \ -
trunk/Source/WebCore/WebCore.gypi
r119067 r119073 273 273 'platform/Cursor.h', 274 274 'platform/DateComponents.h', 275 'platform/Decimal.h', 275 276 'platform/DragData.h', 276 277 'platform/DragImage.h', … … 3150 3151 'platform/Cursor.cpp', 3151 3152 'platform/DateComponents.cpp', 3153 'platform/Decimal.cpp', 3152 3154 'platform/DragData.cpp', 3153 3155 'platform/DragImage.cpp', -
trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj
r119067 r119073 27900 27900 </File> 27901 27901 <File 27902 RelativePath="..\platform\Decimal.cpp" 27903 > 27904 </File> 27905 <File 27906 RelativePath="..\platform\Decimal.h" 27907 > 27908 </File> 27909 <File 27902 27910 RelativePath="..\platform\DragData.cpp" 27903 27911 > -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r119067 r119073 1194 1194 450CEBF115073BBE002BB149 /* LabelableElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 450CEBEF15073BBE002BB149 /* LabelableElement.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1195 1195 45BAC2B01360BBAB005DA258 /* IconURL.h in Headers */ = {isa = PBXBuildFile; fileRef = 45BAC2AF1360BBAB005DA258 /* IconURL.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1196 45FEA5CF156DDE8C00654101 /* Decimal.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 45FEA5CD156DDE8C00654101 /* Decimal.cpp */; }; 1197 45FEA5D0156DDE8C00654101 /* Decimal.h in Headers */ = {isa = PBXBuildFile; fileRef = 45FEA5CE156DDE8C00654101 /* Decimal.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1196 1198 4614A1FE0B23A8D600446E1C /* copyCursor.png in Resources */ = {isa = PBXBuildFile; fileRef = 4614A1FD0B23A8D600446E1C /* copyCursor.png */; }; 1197 1199 46700ED0127B96CB00F5D5D6 /* FileWriterSync.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46700ECE127B96CB00F5D5D6 /* FileWriterSync.cpp */; }; … … 8204 8206 450CEBEF15073BBE002BB149 /* LabelableElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LabelableElement.h; sourceTree = "<group>"; }; 8205 8207 45BAC2AF1360BBAB005DA258 /* IconURL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IconURL.h; sourceTree = "<group>"; }; 8208 45FEA5CD156DDE8C00654101 /* Decimal.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Decimal.cpp; sourceTree = "<group>"; }; 8209 45FEA5CE156DDE8C00654101 /* Decimal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Decimal.h; sourceTree = "<group>"; }; 8206 8210 4614A1FD0B23A8D600446E1C /* copyCursor.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = copyCursor.png; sourceTree = "<group>"; }; 8207 8211 46700ECE127B96CB00F5D5D6 /* FileWriterSync.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FileWriterSync.cpp; path = Modules/filesystem/FileWriterSync.cpp; sourceTree = "<group>"; }; … … 20344 20348 A5732B08136A161D005C8D7C /* DateComponents.cpp */, 20345 20349 A5732B09136A161D005C8D7C /* DateComponents.h */, 20350 45FEA5CD156DDE8C00654101 /* Decimal.cpp */, 20351 45FEA5CE156DDE8C00654101 /* Decimal.h */, 20346 20352 A79546420B5C4CB4007B438F /* DragData.cpp */, 20347 20353 A7B6E69D0B291A9600D0529F /* DragData.h */, … … 22103 22109 F55B3DB81251F12D003EF269 /* DateTimeInputType.h in Headers */, 22104 22110 F55B3DBA1251F12D003EF269 /* DateTimeLocalInputType.h in Headers */, 22111 45FEA5D0156DDE8C00654101 /* Decimal.h in Headers */, 22105 22112 A8C228A111D5722E00D5A7D3 /* DecodedDataDocumentParser.h in Headers */, 22106 22113 CECCFC3B141973D5002A0AC1 /* DecodeEscapeSequences.h in Headers */, … … 25599 25606 F55B3DB71251F12D003EF269 /* DateTimeInputType.cpp in Sources */, 25600 25607 F55B3DB91251F12D003EF269 /* DateTimeLocalInputType.cpp in Sources */, 25608 45FEA5CF156DDE8C00654101 /* Decimal.cpp in Sources */, 25601 25609 A8C228A211D5722E00D5A7D3 /* DecodedDataDocumentParser.cpp in Sources */, 25602 25610 4162A450101145AE00DFF3ED /* DedicatedWorkerContext.cpp in Sources */, -
trunk/Source/WebKit/chromium/ChangeLog
r119068 r119073 1 2012-05-31 Yoshifumi Inoue <yosin@chromium.org> 2 3 [Platform] Introduce Decimal class for Number/Range input type. 4 https://bugs.webkit.org/show_bug.cgi?id=87360 5 6 Reviewed by Kent Tamura. 7 8 This patch added unit test for Decimal class. 9 10 * WebKit.gypi: 11 * tests/DecimalTest.cpp: Added. 12 (WebCore): 13 (WebCore::operator<<): Output Decimal for unit test debugging 14 (DecimalStepRange): 15 (DecimalStepRange::DecimalStepRange): 16 (DecimalStepRange::clampValue): 17 (DecimalTest): 18 (DecimalTest::encode): 19 (DecimalTest::fromString): 20 (DecimalTest::stepDown): 21 (DecimalTest::stepUp): 22 (TEST_F): 23 1 24 2012-05-30 Yury Semikhatsky <yurys@chromium.org> 2 25 -
trunk/Source/WebKit/chromium/WebKit.gypi
r119067 r119073 96 96 'tests/CompositorFakeGraphicsContext3D.h', 97 97 'tests/CompositorFakeWebGraphicsContext3D.h', 98 'tests/DecimalTest.cpp', 98 99 'tests/DragImageTest.cpp', 99 100 'tests/DrawingBufferChromiumTest.cpp',
Note:
See TracChangeset
for help on using the changeset viewer.