Skip to content
  • zimmermann@webkit.org's avatar
    2011-03-24 Nikolas Zimmermann <nzimmermann@rim.com> · 2fd3903b
    zimmermann@webkit.org authored
            Reviewed by Darin Adler.
    
            Introduce WTF HexNumber.h
            https://bugs.webkit.org/show_bug.cgi?id=56099
    
            Introduce a set of functions that ease converting from a bye or a number to a hex string,
            replacing several of these conversions and String::format("%x") usages all over WebCore.
    
            * GNUmakefile.am: Add HexNumber.h to build.
            * JavaScriptCore.exp: Export StringBuilder::reserveCapacity.
            * JavaScriptCore.gypi: Add HexNumber.h to build.
            * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Export StringBuilder::reserveCapacity.
            * JavaScriptCore.vcproj/WTF/WTF.vcproj: Add HexNumber.h to build.
            * JavaScriptCore.xcodeproj/project.pbxproj: Ditto.
            * wtf/CMakeLists.txt: Ditto.
            * wtf/HexNumber.h: Added.
            (WTF::Internal::hexDigitsForMode): Internal helper.
            (WTF::appendByteAsHex): Free function, that appends a byte as hex string into a destination.
            (WTF::placeByteAsHex): Ditto, but places the result using *foo++ = '..' or foo[index++] = '..'
            (WTF::appendUnsignedAsHex): Free function, that appends a number as hex string into a destination.
    2011-03-24  Nikolas Zimmermann  <nzimmermann@rim.com>
    
            Reviewed by Darin Adler.
    
            Introduce WTF HexNumber.h
            https://bugs.webkit.org/show_bug.cgi?id=56099
    
            Introduce a set of functions that ease converting from a bye or a number to a hex string,
            replacing several of these conversions and String::format("%x") usages all over WebCore.
    
            * ForwardingHeaders/wtf/HexNumber.h: Added.
            * css/CSSOMUtils.cpp:
            (WebCore::serializeCharacterAsCodePoint):
            * css/CSSParser.cpp:
            (WebCore::quoteCSSString):
            * inspector/InspectorResourceAgent.cpp:
            (WebCore::createReadableStringFromBinary):
            * platform/FileSystem.cpp:
            (WebCore::encodeForFileName):
            * platform/KURL.cpp:
            (WebCore::appendEscapedChar):
            * platform/UUID.cpp:
            (WebCore::createCanonicalUUIDString):
            * platform/graphics/Color.cpp:
            (WebCore::Color::serialized):
            * platform/network/FormDataBuilder.cpp:
            (WebCore::FormDataBuilder::encodeStringAsFormData):
            * rendering/RenderTreeAsText.cpp:
            (WebCore::quoteAndEscapeNonPrintables):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@81943 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    2fd3903b