Reviewed by Darin.
authormjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 27 Feb 2006 09:17:06 +0000 (09:17 +0000)
committermjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 27 Feb 2006 09:17:06 +0000 (09:17 +0000)
commit070f9b3869141d271f599774a12937c433ba5f96
tree251e3a36f415ca052de26a772ba67a7d2f9dbdd1
parentbbf166d5b5c42ca4441d2ca8f47ab2360a19e257
    Reviewed by Darin.

        - platformize KWQTextCodec
        http://bugzilla.opendarwin.org/show_bug.cgi?id=7487

        I renamed QTextCodec to TextEncoding and QTextDecoder to
        StreamingTextDecoder. I also made a bunch of other changes to make
        the API more sensible.

        * ForwardingHeaders/qtextcodec.h: Removed.
        * WebCore.xcodeproj/project.pbxproj:
        * bridge/mac/MacFrame.mm:
        * bridge/mac/WebCoreFrameBridge.mm:
        (-[WebCoreFrameBridge URLWithAttributeString:]):
        (-[WebCoreFrameBridge textEncoding]):
        (+[WebCoreFrameBridge stringWithData:textEncoding:]):
        (+[WebCoreFrameBridge stringWithData:textEncodingName:]):
        * dom/DocumentImpl.cpp:
        (WebCore::DocumentImpl::completeURL):
        * khtml/ecma/kjs_dom.cpp:
        (KJS::DOMDocument::getValueProperty):
        (KJS::DOMDocument::putValueProperty):
        * khtml/html/FormDataList.cpp:
        (DOM::FormDataList::FormDataList):
        (DOM::FormDataList::appendString):
        * khtml/html/FormDataList.h:
        * khtml/html/HTMLFormElementImpl.cpp:
        (WebCore::HTMLFormElementImpl::HTMLFormElementImpl):
        (WebCore::HTMLFormElementImpl::formData):
        * khtml/html/htmltokenizer.cpp:
        * khtml/misc/decoder.cpp:
        (Decoder::Decoder):
        (Decoder::setEncodingName):
        (Decoder::encodingName):
        (Decoder::decode):
        * khtml/misc/decoder.h:
        (khtml::Decoder::):
        (khtml::Decoder::visuallyOrdered):
        (khtml::Decoder::encoding):
        * khtml/xsl/xslt_processorimpl.cpp:
        (DOM::XSLTProcessorImpl::createDocumentFromSource):
        * kwq/KWQCharsets.cpp: Removed.
        * kwq/KWQCharsets.h: Removed.
        * kwq/KWQTextCodec.cpp: Removed.
        * kwq/KWQTextCodec.h: Removed.
        * kwq/WebCoreTextDecoder.h:
        * kwq/WebCoreTextDecoder.mm:
        * kwq/can-convert.mm: Removed.
        * kwq/character-sets.txt: Removed.
        * kwq/mac-encodings.txt: Removed.
        * kwq/make-charset-table.pl: Removed.
        * loader/CachedCSSStyleSheet.cpp:
        (WebCore::CachedCSSStyleSheet::CachedCSSStyleSheet):
        (WebCore::CachedCSSStyleSheet::setCharset):
        (WebCore::CachedCSSStyleSheet::data):
        * loader/CachedCSSStyleSheet.h:
        * loader/CachedScript.cpp:
        (WebCore::CachedScript::CachedScript):
        (WebCore::CachedScript::setCharset):
        (WebCore::CachedScript::data):
        * loader/CachedScript.h:
        * loader/CachedXSLStyleSheet.cpp:
        (WebCore::CachedXSLStyleSheet::setCharset):
        * page/Frame.cpp:
        (WebCore::Frame::write):
        (WebCore::Frame::gotoAnchor):
        (WebCore::Frame::encoding):
        (WebCore::Frame::backslashAsCurrencySymbol):
        * platform/CharsetNames.cpp: Added.
        (KXMLCore::):
        (WebCore::EncodingHash::equal):
        (WebCore::EncodingHash::hash):
        (WebCore::buildDictionaries):
        (WebCore::textEncodingIDFromCharsetName):
        (WebCore::charsetNameFromTextEncodingID):
        * platform/CharsetNames.h: Added.
        * platform/KURL.cpp:
        (KURL::KURL):
        (KURL::decode_string):
        (encodeRelativeString):
        * platform/KURL.h:
        * platform/QString.cpp:
        (QString::fromUtf8):
        * platform/StreamingTextDecoder.cpp: Added.
        (WebCore::StreamingTextDecoder::StreamingTextDecoder):
        (WebCore::StreamingTextDecoder::convertLatin1):
        (WebCore::StreamingTextDecoder::~StreamingTextDecoder):
        (WebCore::StreamingTextDecoder::convertUTF16):
        (WebCore::effectiveEncoding):
        (WebCore::StreamingTextDecoder::createICUConverter):
        (WebCore::unwanted):
        (WebCore::StreamingTextDecoder::appendOmittingUnwanted):
        (WebCore::StreamingTextDecoder::convertUsingICU):
        (WebCore::StreamingTextDecoder::convert):
        (WebCore::StreamingTextDecoder::toUnicode):
        * platform/StreamingTextDecoder.h: Added.
        (WebCore::StreamingTextDecoder::convert):
        * platform/TextEncoding.cpp: Added.
        (WebCore::TextEncoding::TextEncoding):
        (WebCore::TextEncoding::name):
        (WebCore::effectiveEncoding):
        (WebCore::TextEncoding::backslashAsCurrencySymbol):
        (WebCore::TextEncoding::toUnicode):
        * platform/TextEncoding.h: Added.
        (WebCore::):
        (WebCore::TextEncoding::):
        (WebCore::TextEncoding::TextEncoding):
        (WebCore::TextEncoding::isValid):
        (WebCore::TextEncoding::usesVisualOrdering):
        (WebCore::TextEncoding::isJapanese):
        (WebCore::TextEncoding::encodingID):
        (WebCore::TextEncoding::flags):
        (WebCore::operator==):
        (WebCore::operator!=):
        * platform/character-sets.txt: Added.
        * platform/mac/ExtraCFEncodings.h: Added.
        * platform/mac/QStringMac.mm:
        * platform/mac/TextEncodingMac.cpp: Added.
        (WebCore::effectiveEncoding):
        (WebCore::TextEncoding::fromUnicode):
        * platform/mac/can-convert.mm: Added.
        * platform/mac/mac-encodings.txt: Added.
        * platform/make-charset-table.pl: Added.
        * platform/win/win-encodings.txt: Added.
        * rendering/render_object.cpp:
        (WebCore::RenderObject::backslashAsCurrencySymbol):
        * xml/xmlhttprequest.cpp:
        (WebCore::XMLHttpRequest::send):
        (WebCore::XMLHttpRequest::slotData):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@13002 268f45cc-cd09-0410-ab3c-d52691b4dbfc
44 files changed:
WebCore/ChangeLog
WebCore/ForwardingHeaders/qtextcodec.h [deleted file]
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/bridge/mac/MacFrame.mm
WebCore/bridge/mac/WebCoreFrameBridge.mm
WebCore/dom/DocumentImpl.cpp
WebCore/khtml/ecma/kjs_dom.cpp
WebCore/khtml/html/FormDataList.cpp
WebCore/khtml/html/FormDataList.h
WebCore/khtml/html/HTMLFormElementImpl.cpp
WebCore/khtml/html/htmltokenizer.cpp
WebCore/khtml/misc/decoder.cpp
WebCore/khtml/misc/decoder.h
WebCore/khtml/xsl/xslt_processorimpl.cpp
WebCore/kwq/KWQCharsets.cpp [deleted file]
WebCore/kwq/KWQTextCodec.cpp [deleted file]
WebCore/kwq/KWQTextCodec.h [deleted file]
WebCore/kwq/WebCoreTextDecoder.h
WebCore/kwq/WebCoreTextDecoder.mm
WebCore/loader/CachedCSSStyleSheet.cpp
WebCore/loader/CachedCSSStyleSheet.h
WebCore/loader/CachedScript.cpp
WebCore/loader/CachedScript.h
WebCore/loader/CachedXSLStyleSheet.cpp
WebCore/page/Frame.cpp
WebCore/platform/CharsetNames.cpp [new file with mode: 0644]
WebCore/platform/CharsetNames.h [moved from WebCore/kwq/KWQCharsets.h with 71% similarity]
WebCore/platform/KURL.cpp
WebCore/platform/KURL.h
WebCore/platform/QString.cpp
WebCore/platform/StreamingTextDecoder.cpp [new file with mode: 0644]
WebCore/platform/StreamingTextDecoder.h [new file with mode: 0644]
WebCore/platform/TextEncoding.cpp [new file with mode: 0644]
WebCore/platform/TextEncoding.h [new file with mode: 0644]
WebCore/platform/character-sets.txt [moved from WebCore/kwq/character-sets.txt with 100% similarity]
WebCore/platform/mac/ExtraCFEncodings.h [new file with mode: 0644]
WebCore/platform/mac/QStringMac.mm
WebCore/platform/mac/TextEncodingMac.cpp [new file with mode: 0644]
WebCore/platform/mac/can-convert.mm [moved from WebCore/kwq/can-convert.mm with 100% similarity]
WebCore/platform/mac/mac-encodings.txt [moved from WebCore/kwq/mac-encodings.txt with 97% similarity]
WebCore/platform/make-charset-table.pl [moved from WebCore/kwq/make-charset-table.pl with 68% similarity]
WebCore/platform/win/win-encodings.txt [new file with mode: 0644]
WebCore/rendering/render_object.cpp
WebCore/xml/xmlhttprequest.cpp