Changeset 85909 in webkit
- Timestamp:
- May 5, 2011 6:37:54 PM (13 years ago)
- Location:
- trunk/Source
- Files:
-
- 2 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r85855 r85909 1 2011-05-05 Jay Civelli <jcivelli@chromium.org> 2 3 Reviewed by Adam Barth. 4 5 Added convenience methods to convert from a byte to hex ASCII digit 6 characters and vice-versa. 7 https://bugs.webkit.org/show_bug.cgi?id=59834 8 9 * wtf/ASCIICType.h: 10 (WTF::toASCIIHexValue): 11 (WTF::lowerNibbleToASCIIHexDigit): 12 (WTF::upperNibbleToASCIIHexDigit): 13 1 14 2011-05-05 Alexis Menard <alexis.menard@openbossa.org> 2 15 -
trunk/Source/JavaScriptCore/wtf/ASCIICType.h
r73206 r85909 147 147 148 148 inline int toASCIIHexValue(char c) { ASSERT(isASCIIHexDigit(c)); return c < 'A' ? c - '0' : (c - 'A' + 10) & 0xF; } 149 inline int toASCIIHexValue(char upperValue, char lowerValue) { ASSERT(isASCIIHexDigit(upperValue) && isASCIIHexDigit(lowerValue)); return ((toASCIIHexValue(upperValue) << 4) & 0xF0) | toASCIIHexValue(lowerValue); } 149 150 inline int toASCIIHexValue(unsigned short c) { ASSERT(isASCIIHexDigit(c)); return c < 'A' ? c - '0' : (c - 'A' + 10) & 0xF; } 150 151 #if !COMPILER(MSVC) || defined(_NATIVE_WCHAR_T_DEFINED) … … 153 154 inline int toASCIIHexValue(int c) { ASSERT(isASCIIHexDigit(c)); return c < 'A' ? c - '0' : (c - 'A' + 10) & 0xF; } 154 155 inline int toASCIIHexValue(unsigned c) { ASSERT(isASCIIHexDigit(c)); return c < 'A' ? c - '0' : (c - 'A' + 10) & 0xF; } 156 157 inline char lowerNibbleToASCIIHexDigit(char c) { char nibble = c & 0xF; return nibble < 10 ? '0' + nibble : 'A' + nibble - 10; } 158 inline char upperNibbleToASCIIHexDigit(char c) { char nibble = (c >> 4) & 0xF; return nibble < 10 ? '0' + nibble : 'A' + nibble - 10; } 155 159 156 160 inline bool isASCIIPrintable(char c) { return c >= ' ' && c <= '~'; } … … 176 180 using WTF::toASCIILower; 177 181 using WTF::toASCIIUpper; 182 using WTF::lowerNibbleToASCIIHexDigit; 183 using WTF::upperNibbleToASCIIHexDigit; 178 184 179 185 #endif -
trunk/Source/WebCore/CMakeLists.txt
r85864 r85909 1170 1170 platform/text/Base64.cpp 1171 1171 platform/text/BidiContext.cpp 1172 platform/text/Hyphenation.cpp 1172 1173 platform/text/LineEnding.cpp 1173 1174 platform/text/LocalizedDateNone.cpp 1174 1175 platform/text/LocalizedNumberNone.cpp 1175 platform/text/ Hyphenation.cpp1176 platform/text/QuotedPrintable.cpp 1176 1177 platform/text/RegularExpression.cpp 1177 1178 platform/text/SegmentedString.cpp -
trunk/Source/WebCore/ChangeLog
r85903 r85909 1 2011-05-05 Jay Civelli <jcivelli@chromium.org> 2 3 Reviewed by Adam Barth. 4 5 Adding quoted-printable encoding/decoding capabilities. 6 This is needed for MHTML support. 7 https://bugs.webkit.org/show_bug.cgi?id=59834 8 9 * CMakeLists.txt: 10 * GNUmakefile.list.am: 11 * WebCore.gypi: 12 * WebCore.pro: 13 * WebCore.vcproj/WebCore.vcproj: 14 * WebCore.xcodeproj/project.pbxproj: 15 * platform/text/QuotedPrintable.cpp: Added. 16 * platform/text/QuotedPrintable.h: Added. 17 1 18 2011-05-05 Andy Estes <aestes@apple.com> 2 19 -
trunk/Source/WebCore/GNUmakefile.list.am
r85864 r85909 2638 2638 Source/WebCore/platform/text/ParserUtilities.h \ 2639 2639 Source/WebCore/platform/text/PlatformString.h \ 2640 Source/WebCore/platform/text/QuotedPrintable.cpp \ 2641 Source/WebCore/platform/text/QuotedPrintable.h \ 2640 2642 Source/WebCore/platform/text/RegularExpression.cpp \ 2641 2643 Source/WebCore/platform/text/RegularExpression.h \ -
trunk/Source/WebCore/WebCore.gypi
r85864 r85909 4908 4908 'platform/text/LocalizedNumberNone.cpp', 4909 4909 'platform/text/ParserUtilities.h', 4910 'platform/text/QuotedPrintable.h', 4911 'platform/text/QuotedPrintable.cpp', 4910 4912 'platform/text/RegularExpression.cpp', 4911 4913 'platform/text/SegmentedString.cpp', -
trunk/Source/WebCore/WebCore.pro
r85864 r85909 948 948 platform/text/LocalizedDateNone.cpp \ 949 949 platform/text/LocalizedNumberNone.cpp \ 950 platform/text/QuotedPrintable.cpp \ 950 951 platform/ContentType.cpp \ 951 952 platform/CrossThreadCopier.cpp \ … … 2039 2040 platform/text/BidiContext.h \ 2040 2041 platform/text/Hyphenation.h \ 2042 platform/text/QuotedPrintable.h \ 2041 2043 platform/text/qt/TextCodecQt.h \ 2042 2044 platform/text/RegularExpression.h \ -
trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj
r85864 r85909 30521 30521 > 30522 30522 </File> 30523 <File 30524 RelativePath="..\platform\text\QuotedPrintable.cpp" 30525 > 30526 </File> 30527 <File 30528 RelativePath="..\platform\text\QuotedPrintable.h" 30529 > 30530 </File> 30523 30531 <File 30524 30532 RelativePath="..\platform\text\RegularExpression.cpp" -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r85864 r85909 801 801 379919971200DDF400EA041C /* WOFFFileFormat.h in Headers */ = {isa = PBXBuildFile; fileRef = 379919951200DDF400EA041C /* WOFFFileFormat.h */; }; 802 802 379919B21200DE5000EA041C /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 379919B11200DE5000EA041C /* libz.dylib */; }; 803 379E371613736A6600B9E919 /* QuotedPrintable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 379E371413736A6600B9E919 /* QuotedPrintable.cpp */; }; 804 379E371713736A6600B9E919 /* QuotedPrintable.h in Headers */ = {isa = PBXBuildFile; fileRef = 379E371513736A6600B9E919 /* QuotedPrintable.h */; }; 803 805 379E61C9126CA5C300B63E8D /* BaseButtonInputType.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 379E61C5126CA5C300B63E8D /* BaseButtonInputType.cpp */; }; 804 806 379E61CA126CA5C400B63E8D /* BaseButtonInputType.h in Headers */ = {isa = PBXBuildFile; fileRef = 379E61C6126CA5C300B63E8D /* BaseButtonInputType.h */; }; … … 7242 7244 379919951200DDF400EA041C /* WOFFFileFormat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WOFFFileFormat.h; sourceTree = "<group>"; }; 7243 7245 379919B11200DE5000EA041C /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = /usr/lib/libz.dylib; sourceTree = "<absolute>"; }; 7246 379E371413736A6600B9E919 /* QuotedPrintable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = QuotedPrintable.cpp; sourceTree = "<group>"; }; 7247 379E371513736A6600B9E919 /* QuotedPrintable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QuotedPrintable.h; sourceTree = "<group>"; }; 7244 7248 379E61C5126CA5C300B63E8D /* BaseButtonInputType.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BaseButtonInputType.cpp; sourceTree = "<group>"; }; 7245 7249 379E61C6126CA5C300B63E8D /* BaseButtonInputType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BaseButtonInputType.h; sourceTree = "<group>"; }; … … 17738 17742 BC76AC110DD7AD5C00415F34 /* ParserUtilities.h */, 17739 17743 B2C3D9FB0D006C1D00EF6F26 /* PlatformString.h */, 17744 379E371413736A6600B9E919 /* QuotedPrintable.cpp */, 17745 379E371513736A6600B9E919 /* QuotedPrintable.h */, 17740 17746 B2C3D9FC0D006C1D00EF6F26 /* RegularExpression.cpp */, 17741 17747 B2C3D9FD0D006C1D00EF6F26 /* RegularExpression.h */, … … 22735 22741 977E2E0F12F0FC9C00C13379 /* XSSFilter.h in Headers */, 22736 22742 37AFFDF71370A0B800E895C0 /* SharedBufferCRLFLineReader.h in Headers */, 22743 379E371713736A6600B9E919 /* QuotedPrintable.h in Headers */, 22737 22744 ); 22738 22745 runOnlyForDeploymentPostprocessing = 0; … … 25399 25406 977E2E0E12F0FC9C00C13379 /* XSSFilter.cpp in Sources */, 25400 25407 37AFFDF61370A0B800E895C0 /* SharedBufferCRLFLineReader.cpp in Sources */, 25408 379E371613736A6600B9E919 /* QuotedPrintable.cpp in Sources */, 25401 25409 ); 25402 25410 runOnlyForDeploymentPostprocessing = 0;
Note: See TracChangeset
for help on using the changeset viewer.