1. 30 Nov, 2007 1 commit
  2. 19 Jul, 2007 1 commit
    • darin's avatar
      Reviewed by Alexey. · f867690b
      darin authored
              - fix http://bugs.webkit.org/show_bug.cgi?id=14666
                remove unused xxx-encodings.txt for all platforms other than Mac
              * platform/gdk/gdk-encodings.txt: Removed.
              * platform/win/win-encodings.txt: Removed.
              * platform/wx/wx-encodings.txt: Removed.
              * platform/character-sets.txt: Moved into mac subdirectory since it's only used for Mac; at some
              point I hope to remove it completely.
              * platform/make-charset-table.pl: Ditto.
              * platform/mac/character-sets.txt: Copied from platform/character-sets.txt.
              * platform/mac/make-charset-table.pl: Copied from platform/make-charset-table.pl.
              * DerivedSources.make: Moved CharsetData.cpp into the MACOS section.
              Changed the build rule to use Mac-specific paths for everything and got rid of
              make variables.
              * WebCore.vcproj/build-generated-files.sh: Removed code to set ENCODINGS_FILE and ENCODINGS_PREFIX.
              * WebCore.xcodeproj/project.pbxproj: Ditto.
              * make-generated-sources.sh: Ditto.
              * Projects/gdk/webcore-gdk.bkl: Removed code to pass gdk-encodings.txt to make-generated-sources.sh.
              * Projects/wx/webcore-wx.bkl: Ditto, but for wx-encodings.txt.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@24454 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  3. 05 Sep, 2006 1 commit
    • darin's avatar
      LayoutTests: · b3547a37
      darin authored
              Reviewed by Alexey.
              - test for bug where the charset in a link element for a CSS stylesheet is ignored.
                I noticed this while working on new text encoding machinery.
              * fast/encoding/css-link-charset-expected.txt: Added.
              * fast/encoding/css-link-charset.css: Added.
              * fast/encoding/css-link-charset.html: Added.
              - test for http://bugzilla.opendarwin.org/show_bug.cgi?id=10681
                REGRESSION: Reproducible crash at Wikipedia
                (Alexey wrote this one, I reviewed.)
              * fast/forms/form-data-encoding-normalization-overrun-expected.txt: Added.
              * fast/forms/form-data-encoding-normalization-overrun.html: Added.
              - and a tweak to an existing test
              * fast/forms/form-data-encoding.html: Changed to dump encoded URL so it's easier to
              diagnose this when it fails.
              Reviewed by Alexey.
              - http://bugzilla.opendarwin.org/show_bug.cgi?id=10728
                text encodings should work without a numeric ID
              - includes a fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=10681
                REGRESSION: Reproducible crash at Wikipedia
              - fixed a bug where link elements would not set the charset properly for
                CSS stylesheets they loaded
              - converted DeprecatedString code paths that are related to decoding web
                pages to use String instead, to ensure that conversion back and forth won't
                hurt performance
              Test: fast/encoding/css-link-charset.html
              Test: fast/forms/form-data-encoding-normalization-overrun.html
              Coverage for encoding issues is pretty good, so we probably don't need more
              tests to land this. Our existing tests did find issues with this patch while
              it was under development. And I suppose it would be nice to have even more tests.
              * platform/TextEncoding.h:
              * platform/TextEncoding.cpp:
              (WebCore::addEncodingName): Added. Used to build up the set used by isJapanese.
              (WebCore::TextEncoding::TextEncoding): Removed boolean "eight bit only" parameter and
              added an overload for String as well as const char*. Simplified because now the only
              data member is m_name -- calls the registry's atomicCanonicalTextEncodingName function
              to make the name canonical (resolve aliases) and atomic (use a single pointer for each
              encoding name so we can compare and hash efficiently).
              (WebCore::TextEncoding::decode): Renamed from toUnicode. Just a simple wrapper on top
              of TextDecoder that can be used when the data to decode is all present at once.
              (WebCore::TextEncoding::encode): Renamed from fromUnicode. Handles the normalization and
              then uses the registry to get a codec to handle the rest.
              (WebCore::TextEncoding::usesVisualOrdering): New implementation that compares with the
              name of the only encoding that uses visual ordering. We blur the concepts a bit so that
              we treat the visual ordering and logical ordering variations as two separate encodings.
              (WebCore::TextEncoding::isJapanese): New implementation that uses a set to efficiently
              determine if an encoding is Japanese.
              (WebCore::TextEncoding::backslashAsCurrencySymbol): New implementation that compares
              with the names of the two encodings that have the strange backslash.
              (WebCore::TextEncoding::closest8BitEquivalent): Added. Replaces the old "eight bit only"
              boolean parameter to the constructor.
              (WebCore::ASCIIEncoding): Added.
              (WebCore::Latin1Encoding): Added.
              (WebCore::UTF16BigEndianEncoding): Added.
              (WebCore::UTF16LittleEndianEncoding): Added.
              (WebCore::UTF8Encoding): Added.
              (WebCore::WindowsLatin1Encoding): Added.
              * platform/TextEncodingRegistry.h: Added.
              * platform/TextEncodingRegistry.cpp: Added. Keeps a table of all the character set
              aliases and names and another of all the codecs and parameters for each name.
              * platform/TextDecoder.h: Added.
              * platform/TextDecoder.cpp: Added. Contains logic to look for a BOM and hand the data
              to the proper codec, based on code that used to be in both the ICU and Mac codecs.
              * platform/StreamingTextDecoder.h: Renamed class to TextCodec. We'll rename
              the files in a later check-in. Moved creation functions into TextEncodingRegistry.h.
              Added typedefs of the registrar function types so classes derived from this one
              can use them without including the TextEncodingRegistry header. Renamed toUnicode
              and fromUnicode to decode and encode. Changed the parameter and return types so that
              the parameters are pointers to the data and the return types are String and CString.
              * platform/StreamingTextDecoder.cpp:
              (WebCore::TextCodec::appendOmittingBOM): Added. Helper function used by multiple
              classes derived from this one.
              * platform/TextCodecLatin1.h: Added.
              * platform/TextCodecLatin1.cpp: Added. Contains logic to handle encoding and decoding
              Windows Latin-1, based on code that used to be in both the ICU and Mac codecs.
              * platform/TextCodecUTF16.h: Added.
              * platform/TextCodecUTF16.cpp: Added. Contains logic to handle encoding and decoding
              UTF-16, based on code that used to be in both the ICU and Mac codecs.
              * platform/StreamingTextDecoderICU.h: Renamed class to TextCodecICU. We'll rename
              the files in a later check-in. Removed all the functions having to do with handling
              BOM, UTF-16, and Latin-1; those are now handled elsewhere. Removed textEncodingSupported
              because that's superseded by the registry. Added registry hook functions.
              * platform/StreamingTextDecoderICU.cpp:
              (WebCore::TextCodecICU::registerEncodingNames): Added. Registers all encodings that
              ICU can handle with the "IANA" standard. Also includes a special case for a particular
              type of encoding for Hebrew that uses logical ordering. Also includes aliases that are
              not in ICU but that were historically known to WebKit for encodings that ICU handles. 
              (WebCore::newTextCodecICU): Added. Used by registerCodecs.
              (WebCore::TextCodecICU::registerCodecs): Added. Registers codecs for the same encodings
              as above.
              (WebCore::TextCodecICU::TextCodecICU): Much simplified since this now only handles the
              actual ICU encoding and decoding.
              (WebCore::TextCodecICU::~TextCodecICU): Renamed.
              (WebCore::TextCodecICU::releaseICUConverter): Changed to be a const member function.
              (WebCore::TextCodecICU::createICUConverter): Changed to be a const member function and
              to check if the cached converter can be reused in a simpler way.
              (WebCore::TextCodecICU::decode): Updated for changes to types.
              (WebCore::TextCodecICU::encode): Updated for changes to types, and removed normalization
              since this is now handled by the caller.
              * platform/mac/StreamingTextDecoderMac.h: Renamed class to TextCodecMac. We'll rename
              the files in a later check-in. Removed all the functions having to do with handling
              BOM, UTF-16, and Latin-1; those are now handled elsewhere. Removed textEncodingSupported
              because that's superseded by the registry. Added registry hook functions.
              * platform/mac/StreamingTextDecoderMac.cpp:
              (WebCore::TextCodecMac::registerEncodingNames): Added. Registers encodings based on
              the charset table generated by the make-charset-table.pl perl script.
              (WebCore::newTextCodecMac): Added. Used by registerCodecs.
              (WebCore::TextCodecMac::registerCodecs): Added. Registers codecs for the same encodings
              as above.
              (WebCore::TextCodecMac::TextCodecMac): Much simplified since this now only handles the
              actual TEC/CF encoding and decoding.
              (WebCore::TextCodecMac::~TextCodecMac): Renamed.
              (WebCore::TextCodecMac::releaseTECConverter): Changed to be a const member function.
              (WebCore::TextCodecMac::createTECConverter): Changed to be a const member function.
              (WebCore::TextCodecMac::decode): Updated for changes to types.
              (WebCore::TextCodecMac::encode): Updated for changes to types, and removed normalization
              since this is now handled by the caller.
              * platform/mac/mac-encodings.txt: Removed most of the names in this file. This now
              only includes encodings where we want to use Mac OS X Carbon Text Encoding Converter,
              which is only encodings that are not supported by ICU.
              * platform/make-charset-table.pl: Removed flags from output. We don't use them any more.
              * platform/CharsetData.h: Changed from a platform-independent header into a
              Macintosh-specific one. A later patch should move this and rename it. Also
              subsumes ExtraCFEncodings.h.
              * WebCore.xcodeproj/project.pbxproj: Added new files. Changed the prefix on the
              "make character sets" rule to be kTextEncoding instead of kCFStringEncoding.
              * loader/Decoder.h: Change the default encoding parameter to the constructor to be
              a TextEncoding object. Renamed setEncodingName to setEncoding, and made it take a
              TextEncoding for the encoding. Removed the encodingName and visuallyOrdered functions,
              since TextEncoding supports both directly in a straightforward way. Changed both
              decode and flush functions to return String instead of DeprecatedString. Added a
              number of private functions to factor this class a bit more so it's easier to read.
              Got rid of a number of redundant data members. Changed the buffer to a Vector<char>.
              * loader/Decoder.cpp:
              (WebCore::Decoder::determineContentType): Added. Used by constructor to determine
              the content type based on the passed-in MIME type.
              (WebCore::Decoder::defaultEncoding): Added. Used by constructor to determine the
              default encoding based on the passed in default and the content type.
              (WebCore::Decoder::Decoder): Changed to use the functions above. Also renamed
              m_reachedBody to m_checkedForHeadCharset.
              (WebCore::Decoder::setEncoding): Renamed and changed to take an encoding rather
              than an encoding name.
              (WebCore::Decoder::checkForBOM): Factored out of decode.
              (WebCore::Decoder::checkForCSSCharset): Factored out of decode.
              (WebCore::Decoder::checkForHeadCharset): Factored out of decode.
              (WebCore::Decoder::detectJapaneseEncoding): Factored out of decode.
              (WebCore::Decoder::decode): Refactored so it's no longer one huge function.
              Changed to use the new Vector<char> and the new API for TextDecoder.
              (WebCore::Decoder::flush): Added code to empty out the buffer. Not an issue in
              practice since we don't re-use the decoder after flushing it.
              * platform/UChar.h: Added. Has the type named WebCore::UChar that we'll be switching
              to. We'll switch away from the ICU ::UChar type, because we don't want to be so
              closely tied to ICU -- include this instead of <unicode/umachine.h>.
              * platform/PlatformString.h:
              * platform/String.cpp:
              (WebCore::String::latin1): Updated for changes to TextEncoding.
              (WebCore::String::utf8): Ditto.
              (WebCore::String::newUninitialized): Added. Gives a way to create a String and
              then write directly into its buffer.
              * platform/StringImpl.h: Changed return value for charactersWithNullTermination to
              be a const UChar*. While it's true that this function changes the underlying
              StringImpl, the characters still shouldn't be modified with the returned pointer.
              * platform/StringImpl.cpp:
              (WebCore::StringImpl::charactersWithNullTermination): Updated for change above.
              (WebCore::StringImpl::newUninitialized): Added. Gives a way to create a StringImpl
              and then write directly into its buffer.
              * platform/CString.h:
              * platform/CString.cpp: (WebCore::CString::newUninitialized): Added. Gives a way
              to create a CString and then write directly into its buffer.
              * bridge/mac/WebCoreFrameBridge.h: Removed textEncoding method, and replaced
              +[WebCoreFrameBridge stringWithData:textEncoding:] with
              -[WebCoreFrameBridge stringWithData:] to avoid having to pass text encoding
              IDs around.
              * bridge/mac/WebCoreFrameBridge.mm:
              (-[WebCoreFrameBridge setEncoding:userChosen:]): Removed now-unneeded conversion
              to DeprecatedString.
              (-[WebCoreFrameBridge stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
              (-[WebCoreFrameBridge aeDescByEvaluatingJavaScriptFromString:]): Ditto.
              (-[WebCoreFrameBridge referrer]): Removed now-unneeded call to getNSString.
              (-[WebCoreFrameBridge stringWithData:]): Added. Asks the document's decoder
              what its encoding is, and decodes using that.
              (+[WebCoreFrameBridge stringWithData:textEncodingName:]): Simplified so it
              no longer involved a text encoding ID number.
              (-[WebCoreFrameBridge smartInsertForString:replacingRange:beforeString:afterString:]):
              Changed to use UChar instead of DeprecatedChar.
              (-[WebCoreFrameBridge documentFragmentWithMarkupString:baseURLString:]): Removed
              now-unneeded conversion to DeprecatedString.
              (-[WebCoreFrameBridge documentFragmentWithText:inContext:]): Ditto.
              * html/HTMLFormElement.cpp:
              (WebCore::encodeCString): Changed parameter to CString.
              (WebCore::HTMLFormElement::formData): Updated code for improvements to TextEncoding.
              * loader/CachedCSSStyleSheet.h:
              * loader/CachedCSSStyleSheet.cpp:
              (WebCore::CachedCSSStyleSheet::CachedCSSStyleSheet): Fixed mistake where the
              decoder was created without passing in the character set. Also changed from
              DeprecatedString to String.
              (WebCore::CachedCSSStyleSheet::setCharset): More of the same.
              * bindings/js/kjs_window.h: (KJS::ScheduledAction::ScheduledAction): Changed
              to use String instead of DeprecatedString, UChar instead of DeprecatedChar,
              CString instead of DeprecatedCString, etc.
              * bridge/mac/FormDataMac.mm: (WebCore::arrayFromFormData): Ditto.
              * bridge/mac/FrameMac.h: Ditto.
              * bridge/mac/FrameMac.mm: (WebCore::FrameMac::isCharacterSmartReplaceExempt):
              * bridge/mac/WebCoreAXObject.mm:
              (-[WebCoreAXObject helpText]): Ditto.
              (-[WebCoreAXObject value]): Ditto.
              (-[WebCoreAXObject accessibilityDescription]): Ditto.
              (-[WebCoreAXObject doAXStringForTextMarkerRange:]): Ditto.
              * bridge/mac/WebCoreEncodings.mm: (+[WebCoreEncodings decodeData:]): Ditto.
              Also fixed code that does a deref without a ref to use RefPtr instead.
              * bridge/mac/WebCoreScriptDebugger.mm:
              (-[WebCoreScriptCallFrame evaluateWebScript:]): Ditto.
              * bridge/mac/WebCoreSettings.mm:
              (-[WebCoreSettings setDefaultTextEncoding:]): Ditto.
              * css/CSSImportRule.cpp: (WebCore::CSSImportRule::insertedIntoParent): Ditto.
              * css/cssparser.cpp: (WebCore::CSSParser::lex): Ditto.
              * dom/Document.h:
              * dom/Document.cpp:
              (WebCore::Document::setCharset): Ditto.
              (WebCore::Document::write): Ditto.
              (WebCore::Document::determineParseMode): Ditto.
              * dom/ProcessingInstruction.cpp:
              (WebCore::ProcessingInstruction::checkStyleSheet): Ditto.
              * dom/XMLTokenizer.h:
              * dom/XMLTokenizer.cpp:
              (WebCore::shouldAllowExternalLoad): Ditto.
              (WebCore::createStringParser): Ditto.
              (WebCore::XMLTokenizer::write): Ditto.
              (WebCore::toString): Ditto.
              (WebCore::handleElementAttributes): Ditto.
              (WebCore::XMLTokenizer::startElementNs): Ditto.
              (WebCore::XMLTokenizer::endElementNs): Ditto.
              (WebCore::XMLTokenizer::characters): Ditto.
              (WebCore::XMLTokenizer::processingInstruction): Ditto.
              (WebCore::XMLTokenizer::cdataBlock): Ditto.
              (WebCore::XMLTokenizer::comment): Ditto.
              (WebCore::XMLTokenizer::internalSubset): Ditto.
              (WebCore::getXHTMLEntity): Ditto.
              (WebCore::externalSubsetHandler): Ditto.
              (WebCore::XMLTokenizer::initializeParserContext): Ditto.
              (WebCore::XMLTokenizer::notifyFinished): Ditto.
              (WebCore::xmlDocPtrForString): Ditto.
              (WebCore::parseXMLDocumentFragment): Ditto.
              (WebCore::attributesStartElementNsHandler): Ditto.
              (WebCore::parseAttributes): Ditto.
              * html/FormDataList.h:
              * html/FormDataList.cpp:
              (WebCore::FormDataList::appendString): Ditto. Also changed to call the
              encoding function by its new name and with new parameters.
              (WebCore::FormDataList::appendFile): Ditto.
              * html/HTMLDocument.h:
              * html/HTMLDocument.cpp:
              (WebCore::parseDocTypePart): Ditto.
              (WebCore::containsString): Ditto.
              (WebCore::parseDocTypeDeclaration): Ditto.
              (WebCore::HTMLDocument::determineParseMode): Ditto.
              * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::appendFormData): Ditto.
              * html/HTMLScriptElement.cpp:
              (WebCore::HTMLScriptElement::parseMappedAttribute): Ditto.
              * html/HTMLTokenizer.h:
              * html/HTMLTokenizer.cpp:
              (WebCore::HTMLTokenizer::scriptHandler): Ditto.
              (WebCore::HTMLTokenizer::parseTag): Ditto.
              (WebCore::HTMLTokenizer::write): Ditto.
              (WebCore::HTMLTokenizer::finish): Ditto.
              (WebCore::parseHTMLDocumentFragment): Ditto.
              * loader/Cache.h:
              * loader/Cache.cpp:
              (WebCore::Cache::requestStyleSheet): Ditto.
              (WebCore::Cache::requestScript): Ditto.
              * loader/CachedResource.h: Ditto.
              * loader/CachedScript.h:
              * loader/CachedScript.cpp:
              (WebCore::CachedScript::CachedScript): Ditto.
              (WebCore::CachedScript::ref): Ditto.
              (WebCore::CachedScript::deref): Ditto.
              (WebCore::CachedScript::setCharset): Ditto.
              (WebCore::CachedScript::data): Ditto.
              (WebCore::CachedScript::checkNotify): Ditto.
              * loader/CachedXBLDocument.h:
              * loader/CachedXBLDocument.cpp:
              (WebCore::CachedXBLDocument::setCharset): Ditto.
              * loader/CachedXSLStyleSheet.h:
              * loader/CachedXSLStyleSheet.cpp:
              (WebCore::CachedXSLStyleSheet::setCharset): Ditto.
              * loader/DocLoader.cpp:
              (WebCore::DocLoader::requestStyleSheet): Ditto.
              (WebCore::DocLoader::requestScript): Ditto.
              * loader/DocLoader.h: Ditto.
              * loader/FormData.h:
              * loader/FormData.cpp:
              (WebCore::FormData::FormData): Ditto.
              (WebCore::FormData::appendFile): Ditto.
              (WebCore::FormData::flattenToString): Ditto.
              * page/Frame.h:
              * page/FramePrivate.h:
              * page/Frame.cpp:
              (WebCore::UserStyleSheetLoader::setStyleSheet): Ditto.
              (WebCore::getString): Ditto.
              (WebCore::Frame::replaceContentsWithScriptResult): Ditto.
              (WebCore::Frame::executeScript): Ditto.
              (WebCore::Frame::clear): Ditto.
              (WebCore::Frame::write): Ditto.
              (WebCore::Frame::endIfNotLoading): Ditto.
              (WebCore::Frame::baseTarget): Ditto.
              (WebCore::Frame::scheduleRedirection): Ditto.
              (WebCore::Frame::scheduleLocationChange): Ditto.
              (WebCore::Frame::scheduleHistoryNavigation): Ditto.
              (WebCore::Frame::changeLocation): Ditto.
              (WebCore::Frame::redirectionTimerFired): Ditto.
              (WebCore::Frame::encoding): Ditto.
              (WebCore::Frame::submitForm): Ditto.
              (WebCore::Frame::referrer): Ditto.
              (WebCore::Frame::isCharacterSmartReplaceExempt): Ditto.
              (WebCore::Frame::setEncoding): Ditto.
              * page/Settings.h: Ditto.
              * platform/SegmentedString.h: Ditto.
              * platform/SegmentedString.cpp: Ditto.
              * xml/XSLStyleSheet.cpp: (WebCore::XSLStyleSheet::parseString): Ditto.
              * xml/XSLTProcessor.cpp:
              (WebCore::transformTextStringToXHTMLDocumentString): Ditto.
              (WebCore::XSLTProcessor::createDocumentFromSource): Ditto.
              * xml/xmlhttprequest.h:
              * xml/xmlhttprequest.cpp:
              (WebCore::XMLHttpRequest::open): Ditto.
              (WebCore::XMLHttpRequest::send): Ditto.
              (WebCore::XMLHttpRequest::receivedData): Ditto.
              * platform/DeprecatedString.cpp:
              (WebCore::DeprecatedString::fromUtf8): Updated for changes to TextEncoding.
              (WebCore::DeprecatedString::utf8): Ditto.
              * platform/KURL.h:
              * platform/KURL.cpp:
              (WebCore::KURL::KURL): Updated to overload based on presence or absence of
              TextEncoding rather than having a default.
              (WebCore::KURL::init): Moved body of constructor in here. Updated to use
              the new TextEncoding interface.
              (WebCore::KURL::decode_string): Updated to overload based on presence or
              absence of TextEncoding rather than having a default. Updated to use
              the new TextEncoding interface.
              (WebCore::encodeRelativeString): Updated to use the new TextEncoding interface.
              * platform/Font.cpp: (WebCore::WidthIterator::normalizeVoicingMarks): Fixed
              code to use U_ZERO_ERROR instead of a typecast.
              * bindings/js/kjs_proxy.h: Removed unneeded declaration of DeprecatedString.
              * platform/GraphicsContext.h: Ditto.
              * platform/GraphicsContext.cpp: Removed unneeded include of "DeprecatedString.h".
              * rendering/break_lines.cpp: Ditto.
              * xml/XMLSerializer.cpp: Ditto.
              * platform/mac/FontDataMac.mm: Removed unneeded include of <unicode/unorm.h>.
              * platform/CharsetNames.h: Emptied out this file. A later patch could remove it.
              * platform/CharsetNames.cpp: Ditto.
              * platform/mac/ExtraCFEncodings.h: Ditto.
              Reviewed by Alexey.
              - WebKit side of changes to encoding
              * WebView/WebHTMLRepresentation.m: (-[WebHTMLRepresentation documentSource]):
              Changed to call new -[WebCoreFrameBridge stringWithData:] instead of the calling
              the old methods that used a CFStringEncoding: -[WebCoreFrameBridge textEncoding]
              and +[WebCoreFrameBridge stringWithData:textEncoding:].
              * WebView/WebResource.m: (-[WebResource _stringValue]): Removed special case for
              nil encoding name. The bridge itself now has the rule that "nil encoding name
              means Latin-1", so we don't need to check for nil.
              * WebView/WebFrame.m: (-[WebFrame _checkLoadComplete]): Retain the frame until
              we get the parent frame while walking up parent frames, because it's possible
              for _checkLoadCompleteForThisFrame to release the last reference to the frame.
              (Not reviewed; needed to run performance tests successfully.)
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@16245 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  4. 19 Jun, 2006 1 commit
  5. 29 Mar, 2006 1 commit
    • darin's avatar
      2006-03-29 Darin Adler <darin@apple.com> · a3fcbc17
      darin authored
              Reviewed by Anders.
              - another cut at fixing the buildbot
              * generate-derived-sources: Fix if statement that was always following
              the Windows case. I believe this is the main problem.
              * WebCore.xcodeproj/project.pbxproj: Added CharsetData.h and added CharsetData.cpp
              to the target.
              * WebCore.vcproj/WebCore/WebCore.vcproj: Similar changes.
              * platform/CharsetData.h: Added.
              * platform/CharsetNames.cpp: Moved the actual character set data out into a
              separate source file instead of include a .cpp file.
              * platform/make-charset-table.pl: Changed to generate a file that can stand alone.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@13558 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  6. 27 Feb, 2006 1 commit
    • mjs's avatar
      Reviewed by Darin. · 4235891a
      mjs authored
              - platformize KWQTextCodec
              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:
              * khtml/ecma/kjs_dom.cpp:
              * khtml/html/FormDataList.cpp:
              * khtml/html/FormDataList.h:
              * khtml/html/HTMLFormElementImpl.cpp:
              * khtml/html/htmltokenizer.cpp:
              * khtml/misc/decoder.cpp:
              * khtml/misc/decoder.h:
              * khtml/xsl/xslt_processorimpl.cpp:
              * 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:
              * loader/CachedCSSStyleSheet.h:
              * loader/CachedScript.cpp:
              * loader/CachedScript.h:
              * loader/CachedXSLStyleSheet.cpp:
              * page/Frame.cpp:
              * platform/CharsetNames.cpp: Added.
              * platform/CharsetNames.h: Added.
              * platform/KURL.cpp:
              * platform/KURL.h:
              * platform/QString.cpp:
              * platform/StreamingTextDecoder.cpp: Added.
              * platform/StreamingTextDecoder.h: Added.
              * platform/TextEncoding.cpp: Added.
              * platform/TextEncoding.h: Added.
              * platform/character-sets.txt: Added.
              * platform/mac/ExtraCFEncodings.h: Added.
              * platform/mac/QStringMac.mm:
              * platform/mac/TextEncodingMac.cpp: Added.
              * 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:
              * xml/xmlhttprequest.cpp:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@13002 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  7. 02 Jul, 2003 2 commits
    • darin's avatar
      Rolled out accidentally-checked-in changes. · ae1c633d
      darin authored
              * kwq/KWQCharsetData.c:
              * kwq/KWQCharsets.mm:
              * kwq/KWQTextArea.mm:
              * kwq/mac-encodings.txt:
              * kwq/make-charset-table.pl:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4582 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • darin's avatar
      Reviewed by Ken. · 4dba2297
      darin authored
              - fixed 3299715 -- unrepro nil-deref in KHTMLPart::xmlDocImpl handling timer
              * khtml/khtmlview.cpp: (KHTMLView::timerEvent): Add check for nil.
              - fixed clean builds
              * Makefile.am: Delete the config-timestamp.
              - added some other nil checks (perhaps inspired by some other bug reports, I can't remember)
              * khtml/html/html_inlineimpl.cpp: (HTMLAnchorElementImpl::defaultEventHandler):
              Added a check for nil document or nil view.
              * khtml/xml/dom_nodeimpl.cpp:
              * kwq/KWQCharsetData.c:
              * kwq/KWQCharsets.mm:
              * kwq/KWQTextArea.mm:
              (-[KWQTextArea _createTextView]):
              * kwq/mac-encodings.txt:
              * kwq/make-charset-table.pl:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4580 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  8. 24 Apr, 2003 1 commit
    • darin's avatar
      WebCore: · a7d237cf
      darin authored
              Reviewed by John.
              - improved the text encoding database
              * kwq/mac-encodings.txt: Changed to a new format. Now the first encoding name in every list
              is the "canonical" one and is in canonical case and punctuation (no longer requiring lowercase).
              Since the first is the one that will be used outgoing to send to servers, it's good to have
              that one in canonical form. All subsequent aliases in the list are now required to be all
              lowercase and not use any punctuation. Since the comparison is done ignoring non-alphanumeric
              characters, and ignoring case, this will have no effect on which encodings are recognized.
              * kwq/make-charset-table.pl: Updated to enforce the new format rules.
              * kwq/KWQCharsetData.c: Regenerated.
              * khtml/html/html_formimpl.cpp: (HTMLFormElementImpl::formData): Simplify the "change commas
              to spaces" code in a way that lets us get rid of APPLE_CHANGES. Use the official "ISO-8859-1"
              here instead of something almost, but not quite, like it.
              * kwq/KWQKCharsets.mm: (KCharsets::codecForName): Use the official "ISO-8859-1" here instead
              of the unofficial "latin1". Unimportant, but cleaner this way.
              - preparation for some text encoding changes to fix some bugs
              * kwq/KWQKHTMLSettings.h: Added an encoding value rather than always returning a hardcoded
              value. Other minor cleanup.
              * kwq/KWQKHTMLSettings.mm: Removed.
              * WebCore.pbproj/project.pbxproj: Removed KWQKHTMLSettings.mm.
              - other changes
              * kwq/KWQKHTMLPart.h: Removed "using" statement. Headers must not pollute the namespace
              by doing "using".
              * khtml/khtml_part.cpp: Added a "using" here.
              * kwq/KWQPageState.mm: Added a "using" here.
              * kwq/KWQString.h: Added an append that takes a const char * and length for use by the decoder.
              * kwq/KWQString.mm: (QString::append): Implemented it.
              * kwq/WebCoreSettings.h: Added default text encoding field and methods.
              * kwq/WebCoreSettings.mm:
              (-[WebCoreSettings dealloc]): Release defaultTextEncoding.
              (-[WebCoreSettings setDefaultTextEncoding:]): Added.
              (-[WebCoreSettings defaultTextEncoding]): Added.
              Reviewed by John.
              * WebView.subproj/WebViewPrivate.m: (-[WebView _updateWebCoreSettingsFromPreferences:]):
              Added a call to the new setDefaultTextEncoding: method in WebCore. A preparation
              step for some encoding bug fixes.
              * WebView.subproj/WebHTMLView.m: (-[WebHTMLView addSuperviewObservers]): Improved a comment.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4174 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  9. 15 Apr, 2003 1 commit
    • darin's avatar
      Reviewed by Ken. · 3dce2437
      darin authored
              - fixed 3056913 -- please add Japanese auto-detect
              * khtml/misc/decoder.cpp: (Decoder::decode): Turn on the auto-detect code if the
              default encoding is one of the Japanese encodings. Also change things around so
              the auto-detection process doesn't clobber the old chosen encoding if it does
              not yield a result.
              * kwq/KWQCharsets.h: Add a new IsJapanese encoding flag.
              * kwq/KWQTextCodec.h: Add a new isJapanese() member function, used by the above.
              * kwq/mac-encodings.txt: Add the IsJapanese flag to all Japanese encodings, and
              add "jis7" as a synonym for ISO-2022-JP.
              * kwq/make-charset-table.pl: Changed to allow flags even for unused encodings.
              * kwq/KWQCharsetData.c: Regenerated.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4113 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  10. 18 Mar, 2003 1 commit
    • darin's avatar
      Reviewed by Maciej. · d206196b
      darin authored
      	- fixed 3164522 -- text encoding conversion is done a chunk at a time with no state; won't work in some cases
      	- fixed 3164557 -- pages served with encoding UTF-16LE but no BOM character won't be decoded correctly
      	- fixed 3164569 -- pages without BOM that have a server-specified encoding of utf-16 will fail to decode
      	- fixed 3165002 -- can't open link with tilde (~) in page with Japanese encoding
      	- fixed 3181297 -- can't open link with backslash (\) in page with Japanese encoding (download at netscape.com)
      	- fixed 3182977 -- "unicode" encoding handled as UTF-16 rather than UTF-8 at www.delcom-eng.com
              * khtml/misc/decoder.h: Add an optional "8-bit-only" parameter to the
              setEncoding method.
              * khtml/misc/decoder.cpp:
              (Decoder::setEncoding): Add an "8-bit-only" parameter. Use the new
              codeForNameEightBitOnly method when that parameter is true. Use the new
              usesVisualOrdering constant rather than all the hardcoded logic here to
              tell logical from visual Hebrew encodings.
              (Decoder::decode): Pass true for "8-bit-only" when the encoding came out
              of an HTML header, since we are already parsing the file by this point so
              it makes no sense to use a non-8-bit encoding.
              (Decoder::flush): Pass true for the "flush" parameter when calling the decoder.
              * kwq/KWQCharsets.h: Add a new KWQEncodingFlags enum, and return a parameter of
              that type (optionally) from KWQCFStringEncodingFromIANACharsetName.
              * kwq/KWQCharsets.mm:
              (buildDictionaries): Make the dictionaries lead to table entries so we can get
              both the flags and the encoding.
              (KWQCFStringEncodingFromIANACharsetName): Get the flags as well as the encoding.
              (KWQCFStringEncodingToIANACharsetName): Use the new dictionary format.
              (encodingNameHash): Removed special case for hash for 0. This was useful in
              JavaScriptCore where this hash function came from, but it's not relevant for
              a CF hash function.
              * kwq/KWQTextCodec.h: Added codecForNameEightBitOnly function to QTextCodec. Added optional
              KWQEncodingFlags parameter to QTextCodec constructor. Replaced isISOLatin1Hebrew with
              usesVisualOrdering. Added == and hash functions to QTextCodec. Added virtual destructor to
              QTextDecoder. Added optional "flush" boolean parameter to QTextDecoder's toUnicode function.
              * kwq/KWQTextCodec.mm:
              (codecForCFStringEncoding): Use both the encoding and the flags as a key for the dictionary
              that holds QTextCodec objects.
              (QTextCodec::codecForName): Pass flags through.
              (QTextCodec::codecForNameEightBitOnly): Added. Maps kCFStringEncodingUnicode to
              (QTextCodec::codecForLocale): Pass noEncodingFlags.
              (QTextCodec::makeDecoder): Pass flags to KWQTextDecoder constructor.
              (QTextCodec::toUnicode): Pass true for the "flush" boolean parameter to KWQTextDecoder.
              (operator==): Added. Compares both encoding and flags.
              (QTextCodec::hash): Added. Computes a hash of encoding and flags.
              (QTextCodecsEqual): Added. Calls operator==.
              (QTextCodecHash): Added. Calls hash member function.
              (QTextDecoder::~QTextDecoder): Added. Empty.
              (KWQTextDecoder::KWQTextDecoder): Made this no longer inline.
              (KWQTextDecoder::~KWQTextDecoder): Added. Cache the TEC object for use next time.
              (KWQTextDecoder::convertUTF16): Use the flags to decide on big vs. little endian when the
              page does not have a BOM marker that makes it unambiguous.
              (KWQTextDecoder::convertUsingTEC): Added flush parameter. Changed code to reuse the same
              converter for successive convert calls, and only flush when the flush parameter is passed.
              Added code to set the kUnicodeForceASCIIRangeMask. Do it directly since we can't use
              TECSetBasicOptions due to bug 3201405.
              (KWQTextDecoder::toUnicode): Pass flush parameter through.
              * kwq/mac-encodings.txt: Added new sections for "Unicode, bigEndian", "Unicode, littleEndian",
              and "ISOLatinHebrew, visualOrdering". Also moved UTF-16 to "Unicode" from "UTF8" since we now
              handle this with the "8-bit-only" mechanism.
              * kwq/make-charset-table.pl: Updated script to support flags (after a comma), and made it a bit
              more strict about what to do with ill-formed lines.
              * kwq/KWQCharsetData.c: Regenerated.
              - other changes
              * kwq/KWQKHTMLPart.mm:
              (KWQKHTMLPart::searchForLabelsBeforeElement): Take advantage of "using" and remove
              unneeded namespace prefixes.
              (KWQKHTMLPart::matchLabelsAgainstElement): Ditto.
              (KWQKHTMLPart::pauseActions): Ditto.
              (KWQKHTMLPart::resumeActions): Add check for nil to match pauseActions. Also take
              advantage of "using" and remove unneeded namespace prefixes.
              (KWQKHTMLPart::saveWindowProperties): Use ERROR instead of ASSERT for the nil case.
              (KWQKHTMLPart::saveLocationProperties): Use ERROR instead of ASSERT for the nil case.
              (KWQKHTMLPart::restoreWindowProperties): Use ERROR instead of ASSERT for the nil case.
              (KWQKHTMLPart::restoreLocationProperties): Use ERROR instead of printf for the nil case.
              (KWQKHTMLPart::openURLFromPageCache): Take advantage of "using" and remove
              unneeded namespace prefixes.
              (KWQKHTMLPart::passWidgetMouseDownEventToWidget): Ditto.
              (KWQKHTMLPart::passSubframeEventToSubframe): Ditto.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3853 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  11. 04 Feb, 2003 1 commit
    • darin's avatar
      Reviewed by Maciej. · dd417a20
      darin authored
              - we say goodbye to "MIB numbers"
              * khtml/misc/decoder.cpp:
              (Decoder::Decoder): Get the Latin-1 codec using a name.
              (Decoder::setEncoding): Detect the Hebrew encoding using isISOLatin1Hebrew()
              instead of MIB number.
              (Decoder::decode): Get the UCS-2 codec using a name. Redo APPLE_CHANGES so
              we don't get the MIB-number-based workaround for a bug in QTextCodec that
              KWQ doesn't have. Get the Latin-1 codec using a name.
              * khtml/misc/loader.cpp:
              (CachedCSSStyleSheet::CachedCSSStyleSheet): Get the Latin-1 codec using a name.
              (CachedScript::CachedScript): Get the Latin-1 codec using a name.
              * kwq/KWQCharsets.h: Remove the two MIB-related functions.
              * kwq/KWQCharsets.mm: Remove the MIB number from the character set table struct.
              Remove the MIB-related dictionary globals and functions.
              (buildDictionaries): Remove code to set up the MIB-related dictionaries.
              * kwq/KWQTextCodec.h: Remove codecForMib, mibEnum, and encoding member functions.
              Add isISOLatin1Hebrew member function.
              * kwq/KWQTextCodec.mm:
              (QTextCodec::makeDecoder): Pass in the encoding when making KWQTextDecoder rather
              than passing in the QTextCodec object.
              (QTextCodec::toUnicode): Ditto.
              (QTextCodec::isISOLatin1Hebrew): Return true for kCFStringEncodingISOLatinHebrew only.
              (KWQTextDecoder::convertUsingTEC): Get encoding directly instead of from a QTextCodec.
              (KWQTextDecoder::toUnicode): Ditto.
              * kwq/make-charset-table.pl: Don't write out MIB numbers.
              * kwq/KWQCharsetData.c: Regenerated.
              * khtml/khtml_part.cpp: (KHTMLPart::completeURL):
              Don't bother passing the MIB number to KURL. Soon, we'll have to
              do something smart here, but we won't use MIB numbers.
              * kwq/mac-encodings.txt: Added more 16-bit Unicode character set names.
              Updated some comments.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3568 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  12. 28 Aug, 2002 1 commit
  13. 14 Aug, 2002 1 commit
    • darin's avatar
      Fix the build. · 5d81c889
      darin authored
              * khtml/ecma/kjs_html.cpp: (KJS::HTMLDocument::putValue):
      	Add braces and fix a syntax error.
              * kwq/mac-encodings.txt: Add comments. Make utf-16 be a synonym for
      	utf-8 rather than having it actually try to treat things as 16-bit.
      	We will have to revisit this, but for now it makes zingermans.com work again.
              * kwq/make-charset-table.pl: Allow comments.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1814 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  14. 13 Aug, 2002 2 commits
    • darin's avatar
      Character set handling improvements. In total, this adds 92 new character encoding · 15830392
      darin authored
      	names to the list we know how to handle (299, up from 207), so it probably makes
      	some pages work that didn't work before. It probably also adds character encoding
      	names that are never used in practice.
              * kwq/character-sets.txt: Took out all but one of our changes. We now handle aliases
      	that are not in this file by adding them to mac-encodings.txt.
              * kwq/mac-encodings.txt: Added. Lists CFStringEncoding values and IANA names for them.
      	We keep this file small by using the aliasing in character-sets.txt, and we also continue
      	to get MIB numbers from character-sets.txt.
              * kwq/make-charset-table.pl: Rewrote to read from new format mac-encodings.txt file, and
      	check for new kinds of errors.
              * kwq/.cvsignore: Don't ignore the make-mac-encodings files any more, since we
      	don't compile that any more.
              * kwq/Makefile.am: Remove rules for compiling and running make-mac-encodings.
      	* kwq/make-mac-encodings.c: Removed.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1809 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • darin's avatar
      - fixed 3023439 -- support for windows-874 charset for thai · 81dc6ae8
      darin authored
              * kwq/character-sets.txt: Added cp874 and windows-874.
              * kwq/make-charset-table.pl: Fix bug where it would right out a bad MIB enum for
      	the many Macintosh character sets without associated MIB numbers.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1808 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  15. 08 Aug, 2002 1 commit
    • darin's avatar
      top level: · c6125447
      darin authored
              * Tests/WebFoundation-Misc/ifnsurlextensions-test.m: Added code to
      	check the new URL extras methods against the old original versions,
      	which are pasted in here for now.
              * Tests/WebFoundation-Misc/ifnsurlextensions-test.chk: Updated result
      	to match the changes to _web_URLByRemovingLastPathComponent, and to
      	reflect the new "compare with old original versions" testing.
              * Misc.subproj/WebNSURLExtras.m:
              (-[NSURL _web_URLByRemovingLastPathComponent]): Changed behavior
      	when the path is "/" to return the same URL with a path of "", to
      	match the behavior of the old WebNSURLGetParent. I had hoped this would
      	fix bug 3019790, but it did not.
      	- fixed 3019353 -- Japanese (Autodetect) encoding not properly supported
              * kwq/make-charset-table.pl: Add a "japanese-autodetect" entry to the table
      	explicitly, with a hardcoded encoding value. This should be good enough.
              * kwq/KWQKHTMLSettings.mm: (KHTMLSettings::mediumFixedFontSize):
              * kwq/WebCoreEncodings.h:
              * kwq/WebCoreSettings.h:
              * kwq/WebCoreSettings.m:
              Change "fixed font size" to "default fixed font size".
      	Placeholders for the "drawing observer" method that I'll be using
      	to implement the "dump page as diffable text" feature.
              * kwq/WebCoreTestController.h: Added.
              * kwq/WebCoreTestController.m: Added.
              * WebCore.exp: Mention new class.
              * WebCore.pbproj/project.pbxproj: Mention new files.
      	Placeholders for the "drawing observer" method that I'll be using
      	to implement the "dump page as diffable text" feature.
              * Misc.subproj/WebTestController.h: Added.
              * Misc.subproj/WebTestController.m: Added.
              * WebKit.pbproj/project.pbxproj: Mention new files.
      	* WebKit.exp: Mention new class.
              * WebView.subproj/WebPreferences.h:
              * WebView.subproj/WebPreferences.m:
              Changed "fixed font size" to "default fixed font size".
      	Some fixes to the text encoding menus.
              * Preferences.subproj/TextPreferences.m:
              (-[TextPreferences takeDefaultCharacterSetFrom:]): Update the text encoding
      	menu when the character set is changed, because the section that includes
      	that character set shows up at the top.
              (-[TextPreferences awakeFromNib]): Pass the TextPreferences object as the target
      	for the menu items, because it's not going to be in the responder chain.
              * AppController.h: Added updateTextEncodingMenu.
              * AppController.m:
              (-[AppController applicationDidFinishLaunching:]): Call updateTextEncodingMenu.
              (-[AppController updateTextEncodingMenu]): Put the code to set up the text
      	encoding menu in here, so it can be called when the default encoding changes.
              * TextEncodingMenu.h: Added target and preferred encoding parameters.
              * TextEncodingMenu.m:
              (-[NSMenu addItemToMenuForEncoding:withTarget:action:]): Add target setting.
              (-[NSMenu addStandardTextEncodingMenuItemsWithTarget:action:preferredEncoding:]):
      	Remove old items before adding new so this can be reused on a menu. Fixed a bug
      	in the original Mail code that causes an extra separator to be left at the bottom
      	when the chosen group is the last one in the list.
              * LocationChangeHandler.m: Add an import that is needed now that I removed some
      	unneeded imports from AppController.h.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1778 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  16. 05 Aug, 2002 1 commit
  17. 29 Jul, 2002 1 commit
    • darin's avatar
      top level: · 04ad623d
      darin authored
              * Tests/kde/kurl-test.cpp: (operator<<):
              * Tests/qt/qregexp-test.cpp: (operator<<):
              * Tests/qt/qstring-test.cpp: (operator<<):
              * Tests/qt/qstringlist-test.cpp: (operator<<):
      	Added output streaming so the tests work even without the implicit
      	conversion of QString to const char *.
      	- fixed 3010875 -- Find only works for latin characters
      	- dealt with part of 2948387 -- stop button flashes to "go" twice while loading citibank.com
              * force-clean-timestamp: Make everyone do a make clean because dependencies won't do
      	the right thing.
              * khtml/khtml_part.h:
              * khtml/khtml_part.cpp: (KHTMLPart::slotRedirect): Changed the APPLE_CHANGES ifdefs around
      	in this function so we can start using it again.
      	(KHTMLPart::jumpToSelection): Removed. The bridge goes straight to the impl.
              * kwq/WebCoreBridge.mm: (-[WebCoreBridge jumpToSelection]): Go straight to the impl.
              * WebCore-tests.exp: One new export needed for tests with change to qstring.h.
              * kwq/qt/qevent.h:
              * kwq/KWQEvent.mm: Removed unused stuff.
              * kwq/KWQKHTMLPartImpl.h: Removed redirectURL(); we now use KHTMLPart::slotRedirect().
              * kwq/KWQKHTMLPartImpl.mm:
              (KWQKHTMLPartImpl::write): Call latin1() explicitly in here for m_documentSource. It was being
      	done implicitly before.
              (KWQKHTMLPartImpl::scheduleRedirection): Get rid of 1-second minimum delay for meta refresh.
              (KWQKHTMLPartImpl::timerEvent): Call KHTMLPart::slotRedirect() instead of redirectURL(), because
      	they were identical, so we don't need our own copy.
              * kwq/kdeui/kmessagebox.h:
              * kwq/KWQKMessageBox.mm: (KMessageBox::questionYesNo): Added dontAskAgain string parameter.
      	Before, it was being turned into a bool!
              * kwq/KWQKProtocolManager.mm: Tweak and add FIXME.
              * kwq/qt/qstring.h: Remove implicit conversion to const char *, which causes only pain.
              * kwq/KWQString.mm:
              (QString::find): Add caseSensitive parameter to the QString overload of this.
              (QString::contains): Add a QString version of this.
              * kwq/character-sets.txt: Add the MIB number for ISO-10646-J-1.
              * kwq/make-charset-table.pl: Remove special case for ISO-10646-J-1 MIB number.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1691 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  18. 25 Jun, 2002 1 commit
    • darin's avatar
      Removed remaining uses of BORROWED defines. · d2867d5b
      darin authored
      	Made some simplifications and formatting fixes. All safe.
              * kwq/KWQArrayImpl.h:
              * kwq/KWQArrayImpl.mm:
              * kwq/KWQChar.mm:
              * kwq/KWQCharsets.mm:
              * kwq/KWQFile.mm:
              * kwq/KWQKCursor.mm:
              * kwq/KWQKHTMLPart.mm:
              * kwq/KWQListImpl.h:
              * kwq/KWQMapImpl.mm:
              * kwq/KWQString.mm:
              * kwq/KWQValueListImpl.mm:
              * kwq/KWQVectorImpl.h:
              * kwq/KWQtextcodec.mm:
              * kwq/make-charset-table.pl:
              * kwq/make-mac-encodings.c:
              * kwq/qt/qfile.h:
              * kwq/qt/qregexp.h:
              * kwq/qt/qtextcodec.h:
              * WebCore-tests.exp: Small change to exports for the array test.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1428 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  19. 25 Apr, 2002 1 commit
  20. 24 Feb, 2002 1 commit
    • mjs's avatar
      Top level: · 417de420
      mjs authored
      	Stop borrowing QRegExp and QValueList.
      	* borrowed-classes.txt:
      	Added more test cases for QRegExp and QValueList.
      	* Tests/qt/qregexp-test.chk:
      	* Tests/qt/qregexp-test.cpp: (main):
      	* Tests/qt/qstringlist-test.cpp: (main):
      	* Tests/qt/qvaluelist-test.chk:
      	* Tests/qt/qvaluelist-test.cpp: (main):
      	Reimplemented QRegExp in terms of POSIX regexp facilities. This
      	will only support Latin1, however, it won't support all languages.
      	* src/kwq/qt/qregexp.h:
      	* src/kwq/KWQRegExp.mm: (QRegExp::KWQRegExpPrivate::KWQRegExpPrivate),
      	(QRegExp::KWQRegExpPrivate::~KWQRegExpPrivate), (QRegExp::QRegExp),
      	(QRegExp::~QRegExp), (QRegExp::operator=), (QRegExp::pattern), (QRegExp::match):
      	Reimplement QValueList as a doubly-linked list, using a generic
      	implementation class and a templatized facade.
      	* src/kwq/qt/qvaluelist.h:
      	* src/kwq/KWQValueListImpl.h:
      	* src/kwq/KWQValueListImpl.mm: (KWQValueListNodeImpl::KWQValueListNodeImpl),
      	(KWQValueListIteratorImpl::operator=), (KWQValueListIteratorImpl::operator==),
      	(KWQValueListIteratorImpl::operator!=), (KWQValueListIteratorImpl::node),
      	(KWQValueListIteratorImpl::operator++), (KWQValueListIteratorImpl::operator--),
      	(KWQValueListImpl::KWQValueListImpl), (KWQValueListImpl::~KWQValueListImpl),
      	(KWQValueListImpl::clear), (KWQValueListImpl::count),
      	(KWQValueListImpl::isEmpty), (KWQValueListImpl::appendNode),
      	(KWQValueListImpl::prependNode), (KWQValueListImpl::removeEqualNodes),
      	(KWQValueListImpl::containsEqualNodes), (KWQValueListImpl::removeIterator),
      	(KWQValueListImpl::fromLast), (KWQValueListImpl::firstNode),
      	(KWQValueListImpl::lastNode), (KWQValueListImpl::begin), (KWQValueListImpl::end),
      	(KWQValueListImpl::nodeAt), (KWQValueListImpl::operator=),
      	* src/kwq/Makefile.am:
      	* src/kwq/kio/netaccess.h: Don't declare private copy constructor
      	- this class needs to be copyable to be stored in a QValueList!
      	Hack these scripts a bit so the large tables they generate are
      	constant data.
      	* src/kwq/make-charset-table.pl:
      	* src/kdelibs/khtml/css/makeprop:
      	* src/kdelibs/khtml/css/makevalues:
      	* src/kdelibs/khtml/misc/makeattrs:
      	* src/kdelibs/khtml/misc/maketags:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@666 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  21. 13 Dec, 2001 1 commit
    • mjs's avatar
      WebCore changes: · e8e12995
      mjs authored
      	Changes for international character set support. Still needs work,
      	but no worse than before. amazon.co.jp renders almost correctly.
      	* src/kwq/KWQCharsets.h, src/kwq/KWQCharsets.mm:
      	KWQCFStringEncodingFromMIB, KWQCFStringEncodingToIANACharsetName,
      	KWQCFStringEncodingToMIB): New functions that translate between
      	the Qt concept of charaxcter sets and the
      	(buildDictionaries): static helper function for the above.
      	* src/kwq/KWQtextcodec.mm: (codecForCFStringEncoding,
      	QTextCodec::codecForMib), QTextCodec::codecForName,
      	QTextCodec::codecForLocale, QTextCodec::name,QTextCodec::mibEnum):
      	Implement for real.
      	* src/kwq/KWQKCharsets.mm: (KCharsets::codecForName,
      	KCharsets::charsetForEncoding, KCharsets::charsetForEncoding):
      	Implement for real.
      	* src/kwq/KWQKHTMLPart.mm: (KHTMLPart::slotData): Get encoding
      	from headers if present.
      	(encodingFromContentType): Helper function for the above.
      	(KHTMLPart::begin): Reinitialize decoder for every page.
      	(KHTMLPart::write): Minor bug fix.
      	(KHTMLPart::setEncoding): Implement.
      	KHTMLPart::khtmlMouseReleaseEvent, KHTMLPart::checkCompleted):
      	Simplify ifdefs to make prepare-ChangeLog happy.
      	* src/kwq/qt/qstring.h, src/kwq/KWQString.mm:
      	(QString::fromCFString): New convenience method to create a
      	QString from an immutable CFString by copying,
      	* src/kwq/character-sets.txt: IANA document describing character
      	* src/kwq/make-charset-table.pl, src/kwq/make-mac-encodings.c:
      	Helper programs to construct charset tables from IANA document.
      	* src/kwq/Makefile.in: Update to handle the autogenerated code.
      	* src/kwq/.cvsignore: Ignore new autogenerated files.
      	* src/kdelibs/khtml/misc/decoder.cpp: (Decoder::decode): Fix
      	decoding when the encoding is specified in the http headers (which
      	seems like it could never have worked in KDE).
      	* include/WCBackForwardList.h, include/WCURICache.h,
      	include/WCURICacheData.h, include/WCURIEntry.h: Fix prototypes of
      	C functions with no arguments to use (void), not (), to avoid
      	warnings in WebKit.
      WebKit changes:
      	Warning fixes and support to pass the http headers along with
      	cache data items
      	* Cache.subproj/NSURICacheData.h, Cache.subproj/NSURICacheData.m:
      	-[NSURICacheData dealloc], -[NSURICacheData error],
      	-[NSURICacheData headers]:
      	NSURICacheData now carries a copy of the response headers
      	* Cache.subproj/NSURICache.m: include "WCURICache.h" to fix warnings.
      	(-[NSURICache requestWithURL:requestor:userData:]):
      	Handle headers in CacheData.
      	* Cache.subproj/NSURILoad.h, Cache.subproj/NSURILoad.m:
      	(-[NSURILoad __NSURILoadReadStreamCallback:event:data:],
      	-[NSURILoad headers], -[NSURILoad dealloc], -[NSURILoad done]):
      	An NSURILoad object now carries the response headers associated
      	with its connection, if any.
      	* History.subproj/WKBackForwardList.m: include WCBackForwardList.h
      	to fix warning.
      	* History.subproj/WKURIEntry.m: include WCURIEntry.h to fix
      	* Misc.subproj/WebKitDebug.h: Use (void) for C prototypes, not ().
      	* WebView.subproj/NSWebPageDataSource.mm: (+[NSWebPageDataSource
      	initialize]): Remove unused variable to fix warning.
      	* WebKit.pbproj/project.pbxproj: Enable many warning flags and -Werror
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@500 268f45cc-cd09-0410-ab3c-d52691b4dbfc