1. 30 Nov, 2007 1 commit
  2. 21 Nov, 2007 1 commit
  3. 09 Jan, 2007 1 commit
    • darin's avatar
      JavaScriptCore: · f9e5d6c1
      darin authored
              Reviewed by Maciej.
      
              - fix http://bugs.webkit.org/show_bug.cgi?id=12174
                improve Unicode use (less WTF::Unicode:: prefix, centralized character names)
      
              * wtf/unicode/icu/UnicodeIcu.h: Change parameter and return types
              to UChar32 and UChar. Removed unneeded type casts and added some
              const to functions that lacked it. Removed WTF::Unicode::memcmp.
              (WTF::Unicode::umemcasecmp): Renamed from strcasecmp since this
              doesn't work on 0-terminated strings as the str functions do.
              * wtf/unicode/qt4/UnicodeQt4.h: Ditto.
      
              - got rid of namespace prefixes from most uses of WTF::Unicode
      
              * kjs/function.cpp:
              (KJS::isStrWhiteSpace):
              (KJS::escapeStringForPrettyPrinting):
              * kjs/lexer.cpp:
              (KJS::Lexer::isWhiteSpace):
              (KJS::Lexer::isIdentStart):
              (KJS::Lexer::isIdentPart):
              * kjs/string_object.cpp:
              (KJS::StringProtoFunc::callAsFunction):
      
      WebCore:
      
              Reviewed by Maciej.
      
              - fix http://bugs.webkit.org/show_bug.cgi?id=12174
                improve Unicode use (less WTF::Unicode:: prefix, centralized character names)
      
              - got rid of namespace prefixes from most uses of WTF::Unicode
      
              - updated for removal of WTF::Unicode::memcmp
              - updated for renaming of WTF::Unicode::strcasecmp to umemcasecmp.
      
              - unified constants for special Unicode characters in a new
                CharacterNames.h header
      
              * WebCore.xcodeproj/project.pbxproj:
              * css/cssparser.cpp:
              (WebCore::ParseString::lower):
              * dom/Document.cpp:
              (WebCore::isValidNameStart):
              (WebCore::isValidNamePart):
              * dom/Position.cpp:
              (WebCore::Position::leadingWhitespacePosition):
              (WebCore::Position::trailingWhitespacePosition):
              * editing/CompositeEditCommand.cpp:
              (WebCore::isWhitespace):
              * editing/HTMLInterchange.cpp:
              * editing/TextIterator.cpp:
              (WebCore::CircularSearchBuffer::CircularSearchBuffer):
              (WebCore::CircularSearchBuffer::append):
              * editing/htmlediting.cpp:
              (WebCore::stringWithRebalancedWhitespace):
              (WebCore::nonBreakingSpaceString):
              * editing/htmlediting.h:
              * html/HTMLFontElement.cpp:
              (WebCore::parseFontSizeNumber):
              * html/HTMLParser.cpp:
              (WebCore::HTMLParser::handleError):
              * html/HTMLSelectElement.cpp:
              (WebCore::stripLeadingWhiteSpace):
              * platform/Font.cpp:
              (WebCore::WidthIterator::advance):
              (WebCore::WidthIterator::normalizeVoicingMarks):
              * platform/GlyphMap.cpp:
              (WebCore::GlyphMap::locatePage):
              * platform/MimeTypeRegistry.h:
              * platform/StringHash.h:
              * platform/StringImpl.cpp:
              (WebCore::isSpace):
              (WebCore::StringImpl::append):
              (WebCore::StringImpl::insert):
              (WebCore::StringImpl::truncate):
              (WebCore::StringImpl::remove):
              (WebCore::parseLength):
              (WebCore::StringImpl::isLower):
              (WebCore::StringImpl::lower):
              (WebCore::StringImpl::upper):
              (WebCore::StringImpl::secure):
              (WebCore::StringImpl::foldCase):
              (WebCore::StringImpl::capitalize):t
              (WebCore::StringImpl::toInt):
              (WebCore::equalIgnoringCase):
              (WebCore::StringImpl::find):
              * platform/TextBoundaries.h:
              * platform/TextCodec.h:
              * platform/TextCodecLatin1.cpp:
              * platform/TextEncoding.h:
              * platform/TextEncodingRegistry.h:
              * platform/mac/PasteboardMac.mm:
              (WebCore::Pasteboard::writeSelection):
              * platform/mac/TextCodecMac.cpp:
              (WebCore::TextCodecMac::decode):
              * rendering/RenderBlock.cpp:
              (WebCore::RenderBlock::updateFirstLetter):
              * rendering/RenderListMarker.cpp:
              (WebCore::listMarkerText):
              (WebCore::RenderListMarker::paint):
              * rendering/RenderText.cpp:
              (WebCore::RenderText::widthFromCache):
              (WebCore::isSpaceAccordingToStyle):
              (WebCore::RenderText::setInternalString):
              * rendering/RenderTreeAsText.cpp:
              (WebCore::quoteAndEscapeNonPrintables):
              (WebCore::operator<<):
              * rendering/bidi.cpp:
              (WebCore::BidiState::BidiState):
              (WebCore::BidiContext::BidiContext):
              (WebCore::bidiNext):
              (WebCore::bidiFirst):
              (WebCore::BidiIterator::direction):
              (WebCore::appendRun):
              (WebCore::embed):
              (WebCore::RenderBlock::bidiReorderLine):
              (WebCore::RenderBlock::layoutInlineChildren):
              (WebCore::skipNonBreakingSpace):
              (WebCore::RenderBlock::findNextLineBreak):
              * rendering/break_lines.cpp:
              (WebCore::nextBreakablePosition):
              * rendering/break_lines.h:
              * xml/XPathParser.cpp:
              (WebCore::XPath::charCat):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@18712 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f9e5d6c1
  4. 07 Nov, 2006 1 commit
    • darin's avatar
      WebCore: · c370e7e1
      darin authored
              Reviewed by Geoff.
      
              - moved loader code from Frame/FrameMac to FrameLoader
      
              * WebCore.exp:
              * WebCore.xcodeproj/project.pbxproj:
              * bindings/js/JSXSLTProcessor.h:
              * bindings/js/kjs_events.cpp:
              (KJS::JSLazyEventListener::parseCode):
              * bindings/js/kjs_html.cpp:
              (KJS::JSHTMLDocument::putValueProperty):
              * bindings/js/kjs_navigator.cpp:
              (KJS::Navigator::getValueProperty):
              * bindings/js/kjs_proxy.cpp:
              (WebCore::KJSProxy::initScriptIfNeeded):
              * bindings/js/kjs_window.cpp:
              (KJS::Screen::Screen):
              (KJS::createNewWindow):
              (KJS::Window::getValueProperty):
              (KJS::Window::put):
              (KJS::Window::isSafeScript):
              (KJS::WindowFunc::callAsFunction):
              (KJS::ScheduledAction::execute):
              (KJS::Location::getValueProperty):
              (KJS::Location::put):
              (KJS::Location::toString):
              (KJS::LocationFunc::callAsFunction):
              (KJS::History::getValueProperty):
              (KJS::HistoryFunc::callAsFunction):
              * bindings/objc/DOM.mm:
              (+[DOMNode _nodeWith:WebCore::]):
              * bridge/mac/FrameMac.h:
              * bridge/mac/FrameMac.mm:
              (WebCore::FrameMac::~FrameMac):
              (WebCore::FrameMac::setView):
              (WebCore::FrameMac::setStatusBarText):
              * bridge/mac/WebCoreFrameBridge.h:
              * bridge/mac/WebCoreFrameBridge.mm:
              (-[WebCoreFrameBridge close]):
              (-[WebCoreFrameBridge addData:]):
              (-[WebCoreFrameBridge createFrameViewWithNSView:marginWidth:marginHeight:]):
              (-[WebCoreFrameBridge reapplyStylesForDeviceType:]):
              (-[WebCoreFrameBridge stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
              (-[WebCoreFrameBridge aeDescByEvaluatingJavaScriptFromString:]):
              (-[WebCoreFrameBridge baseURL]):
              (-[WebCoreFrameBridge dragOperationForDraggingInfo:]):
              (-[WebCoreFrameBridge dragExitedWithDraggingInfo:]):
              (-[WebCoreFrameBridge canProvideDocumentSource]):
              (-[WebCoreFrameBridge receivedData:textEncodingName:]):
              * css/cssparser.cpp:
              (WebCore::CSSParser::parseContent):
              * dom/DOMImplementation.cpp:
              (WebCore::DOMImplementation::createDocument):
              (WebCore::DOMImplementation::createHTMLDocument):
              * dom/DOMImplementation.h:
              * dom/Document.cpp:
              (WebCore::Document::readyState):
              (WebCore::Document::updateTitle):
              (WebCore::Document::open):
              (WebCore::Document::close):
              (WebCore::Document::implicitClose):
              (WebCore::Document::processHttpEquiv):
              (WebCore::Document::referrer):
              (WebCore::Document::finishedParsing):
              * dom/ProcessingInstruction.cpp:
              (WebCore::ProcessingInstruction::checkStyleSheet):
              * dom/XMLTokenizer.cpp:
              (WebCore::XMLTokenizer::endElementNs):
              (WebCore::ignorableWhitespaceHandler):
              (WebCore::XMLTokenizer::notifyFinished):
              * editing/TextIterator.cpp:
              (WebCore::TextIterator::rangeFromLocationAndLength):
              * html/HTMLAnchorElement.cpp:
              (WebCore::HTMLAnchorElement::defaultEventHandler):
              * html/HTMLBaseElement.cpp:
              (WebCore::HTMLBaseElement::process):
              * html/HTMLDocument.cpp:
              (WebCore::HTMLDocument::lastModified):
              * html/HTMLFormElement.cpp:
              (WebCore::HTMLFormElement::formData):
              (WebCore::HTMLFormElement::submit):
              * html/HTMLFrameElementBase.cpp:
              (WebCore::HTMLFrameElementBase::isURLAllowed):
              (WebCore::HTMLFrameElementBase::openURL):
              (WebCore::HTMLFrameElementBase::willRemove):
              * html/HTMLInputElement.cpp:
              (WebCore::HTMLInputElement::setValueFromRenderer):
              * html/HTMLLinkElement.cpp:
              (WebCore::HTMLLinkElement::process):
              * html/HTMLParser.cpp:
              (WebCore::HTMLParser::handleError):
              (WebCore::HTMLParser::handleResidualStyleCloseTagAcrossBlocks):
              * html/HTMLPreElement.idl:
              * html/HTMLScriptElement.cpp:
              (WebCore::HTMLScriptElement::parseMappedAttribute):
              (WebCore::HTMLScriptElement::insertedIntoDocument):
              * html/HTMLTokenizer.cpp:
              (WebCore::HTMLTokenizer::scriptExecution):
              (WebCore::HTMLTokenizer::parseTag):
              (WebCore::HTMLTokenizer::write):
              (WebCore::HTMLTokenizer::stopParsing):
              (WebCore::HTMLTokenizer::timerFired):
              * kcanvas/device/quartz/KCanvasFilterQuartz.mm:
              (WebCore::KCanvasFilterQuartz::prepareFilter):
              * ksvg2/svg/SVGAElement.cpp:
              (WebCore::SVGAElement::defaultEventHandler):
              * ksvg2/svg/SVGElement.cpp:
              (WebCore::SVGElement::sendSVGLoadEventIfPossible):
              * loader/DocLoader.cpp:
              (WebCore::DocLoader::setLoadInProgress):
              * loader/FrameLoader.cpp:
              (WebCore::FormSubmission::FormSubmission):
              (WebCore::ScheduledRedirection::):
              (WebCore::ScheduledRedirection::ScheduledRedirection):
              (WebCore::cancelAll):
              (WebCore::getString):
              (WebCore::isBackForwardLoadType):
              (WebCore::numRequests):
              (WebCore::FrameLoader::FrameLoader):
              (WebCore::FrameLoader::~FrameLoader):
              (WebCore::FrameLoader::createWindow):
              (WebCore::FrameLoader::changeLocation):
              (WebCore::FrameLoader::urlSelected):
              (WebCore::FrameLoader::requestFrame):
              (WebCore::FrameLoader::loadSubframe):
              (WebCore::FrameLoader::submitFormAgain):
              (WebCore::FrameLoader::submitForm):
              (WebCore::FrameLoader::stopLoading):
              (WebCore::FrameLoader::stop):
              (WebCore::FrameLoader::closeURL):
              (WebCore::FrameLoader::cancelRedirection):
              (WebCore::FrameLoader::iconURL):
              (WebCore::FrameLoader::didOpenURL):
              (WebCore::FrameLoader::didExplicitOpen):
              (WebCore::FrameLoader::replaceContentsWithScriptResult):
              (WebCore::FrameLoader::executeScript):
              (WebCore::FrameLoader::cancelAndClear):
              (WebCore::FrameLoader::clear):
              (WebCore::FrameLoader::receivedFirstData):
              (WebCore::FrameLoader::responseMIMEType):
              (WebCore::FrameLoader::setResponseMIMEType):
              (WebCore::FrameLoader::begin):
              (WebCore::FrameLoader::write):
              (WebCore::FrameLoader::end):
              (WebCore::FrameLoader::endIfNotLoading):
              (WebCore::FrameLoader::startIconLoader):
              (WebCore::FrameLoader::commitIconURLToIconDatabase):
              (WebCore::FrameLoader::gotoAnchor):
              (WebCore::FrameLoader::finishedParsing):
              (WebCore::FrameLoader::loadDone):
              (WebCore::FrameLoader::checkCompleted):
              (WebCore::FrameLoader::checkEmitLoadEvent):
              (WebCore::FrameLoader::baseURL):
              (WebCore::FrameLoader::baseTarget):
              (WebCore::FrameLoader::completeURL):
              (WebCore::FrameLoader::scheduleRedirection):
              (WebCore::FrameLoader::scheduleLocationChange):
              (WebCore::FrameLoader::scheduleRefresh):
              (WebCore::FrameLoader::isScheduledLocationChangePending):
              (WebCore::FrameLoader::scheduleHistoryNavigation):
              (WebCore::FrameLoader::redirectionTimerFired):
              (WebCore::FrameLoader::encoding):
              (WebCore::FrameLoader::requestObject):
              (WebCore::FrameLoader::shouldUsePlugin):
              (WebCore::FrameLoader::loadPlugin):
              (WebCore::FrameLoader::clearRecordedFormValues):
              (WebCore::FrameLoader::recordFormValue):
              (WebCore::FrameLoader::parentCompleted):
              (WebCore::FrameLoader::outgoingReferrer):
              (WebCore::FrameLoader::lastModified):
              (WebCore::FrameLoader::opener):
              (WebCore::FrameLoader::setOpener):
              (WebCore::FrameLoader::openedByJavaScript):
              (WebCore::FrameLoader::setOpenedByJavaScript):
              (WebCore::FrameLoader::handleFallbackContent):
              (WebCore::FrameLoader::provisionalLoadStarted):
              (WebCore::FrameLoader::userGestureHint):
              (WebCore::FrameLoader::didNotOpenURL):
              (WebCore::FrameLoader::resetMultipleFormSubmissionProtection):
              (WebCore::FrameLoader::setEncoding):
              (WebCore::FrameLoader::addData):
              (WebCore::FrameLoader::canCachePage):
              (WebCore::FrameLoader::updatePolicyBaseURL):
              (WebCore::FrameLoader::setPolicyBaseURL):
              (WebCore::FrameLoader::scrollToAnchor):
              (WebCore::FrameLoader::isComplete):
              (WebCore::FrameLoader::isLoadingMainResource):
              (WebCore::FrameLoader::url):
              (WebCore::FrameLoader::startRedirectionTimer):
              (WebCore::FrameLoader::stopRedirectionTimer):
              (WebCore::FrameLoader::updateBaseURLForEmptyDocument):
              (WebCore::FrameLoader::completed):
              (WebCore::FrameLoader::started):
              (WebCore::FrameLoader::containsPlugins):
              (WebCore::FrameLoader::prepareForLoadStart):
              (WebCore::FrameLoader::setupForReplace):
              (WebCore::FrameLoader::setupForReplaceByMIMEType):
              (WebCore::FrameLoader::finalSetupForReplace):
              (WebCore::FrameLoader::load):
              (WebCore::FrameLoader::canTarget):
              (WebCore::FrameLoader::stopLoadingPlugIns):
              (WebCore::FrameLoader::stopLoadingSubresources):
              (WebCore::FrameLoader::stopLoadingSubframes):
              (WebCore::FrameLoader::stopAllLoaders):
              (WebCore::FrameLoader::cancelMainResourceLoad):
              (WebCore::FrameLoader::cancelPendingArchiveLoad):
              (WebCore::FrameLoader::activeDocumentLoader):
              (WebCore::FrameLoader::addPlugInStreamLoader):
              (WebCore::FrameLoader::removePlugInStreamLoader):
              (WebCore::FrameLoader::hasMainResourceLoader):
              (WebCore::FrameLoader::isLoadingSubresources):
              (WebCore::FrameLoader::isLoadingPlugIns):
              (WebCore::FrameLoader::isLoading):
              (WebCore::FrameLoader::addSubresourceLoader):
              (WebCore::FrameLoader::removeSubresourceLoader):
              (WebCore::FrameLoader::releaseMainResourceLoader):
              (WebCore::FrameLoader::setDocumentLoader):
              (WebCore::FrameLoader::documentLoader):
              (WebCore::FrameLoader::setPolicyDocumentLoader):
              (WebCore::FrameLoader::provisionalDocumentLoader):
              (WebCore::FrameLoader::setProvisionalDocumentLoader):
              (WebCore::FrameLoader::state):
              (WebCore::FrameLoader::timeOfLastCompletedLoad):
              (WebCore::FrameLoader::setState):
              (WebCore::FrameLoader::clearProvisionalLoad):
              (WebCore::FrameLoader::markLoadComplete):
              (WebCore::FrameLoader::commitProvisionalLoad):
              (WebCore::FrameLoader::privateBrowsingEnabled):
              (WebCore::FrameLoader::clientRedirectCancelledOrFinished):
              (WebCore::FrameLoader::clientRedirected):
              (WebCore::FrameLoader::shouldReload):
              (WebCore::FrameLoader::closeOldDataSources):
              (WebCore::FrameLoader::open):
              (WebCore::FrameLoader::isStopping):
              (WebCore::FrameLoader::finishedLoading):
              (WebCore::FrameLoader::URL):
              (WebCore::FrameLoader::isArchiveLoadPending):
              (WebCore::FrameLoader::isHostedByObjectElement):
              (WebCore::FrameLoader::isLoadingMainFrame):
              (WebCore::FrameLoader::canShowMIMEType):
              (WebCore::FrameLoader::representationExistsForURLScheme):
              (WebCore::FrameLoader::generatedMIMETypeForURLScheme):
              (WebCore::FrameLoader::cancelContentPolicyCheck):
              (WebCore::FrameLoader::didReceiveServerRedirectForProvisionalLoadForFrame):
              (WebCore::FrameLoader::finishedLoadingDocument):
              (WebCore::FrameLoader::isReplacing):
              (WebCore::FrameLoader::setReplacing):
              (WebCore::FrameLoader::revertToProvisional):
              (WebCore::FrameLoader::subframeIsLoading):
              (WebCore::FrameLoader::willChangeTitle):
              (WebCore::FrameLoader::loadType):
              (WebCore::FrameLoader::stopPolicyCheck):
              (WebCore::FrameLoader::continueAfterContentPolicy):
              (WebCore::FrameLoader::continueAfterWillSubmitForm):
              (WebCore::FrameLoader::didFirstLayout):
              (WebCore::FrameLoader::frameLoadCompleted):
              (WebCore::FrameLoader::firstLayoutDone):
              (WebCore::FrameLoader::isQuickRedirectComing):
              (WebCore::FrameLoader::closeDocument):
              (WebCore::FrameLoader::detachChildren):
              (WebCore::FrameLoader::checkLoadComplete):
              (WebCore::FrameLoader::numPendingOrLoadingRequests):
              (WebCore::FrameLoader::setClient):
              (WebCore::FrameLoader::client):
              (WebCore::FrameLoader::userAgent):
              (WebCore::FrameLoader::createEmptyDocument):
              (WebCore::FrameLoader::tokenizerProcessedData):
              (WebCore::FrameLoader::didTellBridgeAboutLoad):
              (WebCore::FrameLoader::haveToldBridgeAboutLoad):
              (WebCore::FrameLoader::handledOnloadEvents):
              (WebCore::FrameLoader::frameDetached):
              (WebCore::FrameLoader::setTitle):
              (WebCore::FrameLoaderClient::~FrameLoaderClient):
              * loader/FrameLoader.h:
              (WebCore::):
              * loader/FrameLoaderClient.h:
              * loader/PluginDocument.cpp:
              (WebCore::PluginTokenizer::createDocumentStructure):
              (WebCore::PluginTokenizer::writeRawData):
              * loader/ResourceLoader.h:
              * loader/TextResourceDecoder.cpp:
              (WebCore::TextResourceDecoder::checkForHeadCharset):
              * loader/icon/IconLoader.cpp:
              (WebCore::IconLoader::startLoading):
              (WebCore::IconLoader::finishLoading):
              * loader/loader.cpp:
              (WebCore::Loader::didReceiveResponse):
              * loader/mac/DocumentLoaderMac.mm:
              (WebCore::DocumentLoader::~DocumentLoader):
              (WebCore::DocumentLoader::stopLoading):
              (WebCore::DocumentLoader::finishedLoading):
              (WebCore::DocumentLoader::setupForReplaceByMIMEType):
              (WebCore::DocumentLoader::setPrimaryLoadComplete):
              * loader/mac/FrameLoaderMac.mm:
              (WebCore::FrameLoader::load):
              (WebCore::FrameLoader::startLoading):
              (WebCore::FrameLoader::cancelMainResourceLoad):
              (WebCore::FrameLoader::receivedMainResourceError):
              (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy):
              (WebCore::FrameLoader::commitProvisionalLoad):
              (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
              (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
              (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
              (WebCore::FrameLoader::detachFromParent):
              (WebCore::FrameLoader::addExtraFieldsToRequest):
              (WebCore::FrameLoader::loadResourceSynchronously):
              (WebCore::FrameLoader::createFrame):
              (WebCore::FrameLoader::objectContentType):
              (WebCore::nsArray):
              (WebCore::FrameLoader::createPlugin):
              (WebCore::FrameLoader::redirectDataToPlugin):
              (WebCore::FrameLoader::createJavaAppletWidget):
              (WebCore::FrameLoader::partClearedInBegin):
              (WebCore::FrameLoader::saveDocumentState):
              (WebCore::FrameLoader::restoreDocumentState):
              (WebCore::FrameLoader::overrideMediaType):
              (WebCore::FrameLoader::mainResourceData):
              (WebCore::FrameLoader::canGoBackOrForward):
              (WebCore::FrameLoader::originalRequestURL):
              (WebCore::FrameLoader::getHistoryLength):
              (WebCore::FrameLoader::goBackOrForward):
              (WebCore::FrameLoader::historyURL):
              (WebCore::FrameLoader::didFinishLoad):
              * loader/mac/LoaderFunctionsMac.mm:
              (WebCore::ServeSynchronousRequest):
              (WebCore::CheckCacheObjectStatus):
              * loader/mac/ResourceLoaderMac.mm:
              (WebCore::ResourceLoader::cancel):
              * loader/mac/SubresourceLoaderMac.mm:
              (WebCore::SubresourceLoader::create):
              * loader/qt/FrameLoaderQt.cpp: Added.
              (WebCore::FrameLoader::submitForm):
              (WebCore::FrameLoader::urlSelected):
              (WebCore::FrameLoader::setTitle):
              (WebCore::FrameLoader::createFrame):
              (WebCore::FrameLoader::objectContentType):
              (WebCore::FrameLoader::createPlugin):
              (WebCore::FrameLoader::createJavaAppletWidget):
              (WebCore::FrameLoader::originalRequestURL):
              * page/DOMWindow.cpp:
              (WebCore::DOMWindow::document):
              * page/Frame.cpp:
              (WebCore::Frame::~Frame):
              (WebCore::Frame::reparseConfiguration):
              (WebCore::Frame::shouldDragAutoNode):
              (WebCore::Frame::prepareForUserAction):
              (WebCore::FramePrivate::FramePrivate):
              (WebCore::FramePrivate::~FramePrivate):
              * page/Frame.h:
              * page/FramePrivate.h:
              * page/FrameView.cpp:
              (WebCore::FrameView::layout):
              (WebCore::FrameView::mediaType):
              * page/FrameView.h:
              * page/PageState.cpp:
              (WebCore::PageState::PageState):
              (WebCore::PageState::restoreJavaScriptState):
              * platform/mac/CookieJar.mm:
              (WebCore::setCookies):
              * platform/mac/TextCodecMac.cpp:
              * platform/mac/WebFontCache.mm:
              (+[WebFontCache fontWithFamily:traits:size:]):
              * platform/network/cf/ResourceHandleCFNet.cpp:
              (WebCore::ResourceHandle::start):
              * platform/network/mac/ResourceHandleMac.mm:
              (WebCore::ResourceHandle::start):
              * platform/qt/FrameQt.cpp:
              * platform/qt/FrameQt.h:
              * rendering/RenderApplet.cpp:
              (WebCore::RenderApplet::createWidgetIfNecessary):
              * rendering/RenderBlock.h:
              * rendering/RenderPartObject.cpp:
              (WebCore::isURLAllowed):
              (WebCore::RenderPartObject::updateWidget):
              * xml/DOMParser.cpp:
              (WebCore::DOMParser::parseFromString):
              * xml/XSLTProcessor.cpp:
              (WebCore::XSLTProcessor::createDocumentFromSource):
              * xml/xmlhttprequest.cpp:
              (WebCore::XMLHttpRequest::getResponseXML):
      
      WebKit:
      
              Reviewed by Geoff.
      
              - udpated for changes to move from Frame/FrameMac to FrameLoader
      
              * DefaultDelegates/WebDefaultContextMenuDelegate.m:
              (-[WebDefaultUIDelegate openNewWindowWithURL:element:]):
              * Misc/WebNSAttributedStringExtras.m:
              (+[NSAttributedString _web_attributedStringFromRange:]):
              * Plugins/WebBaseNetscapePluginView.mm:
              (-[WebBaseNetscapePluginView requestWithURLCString:]):
              * Plugins/WebNetscapePluginEmbeddedView.m:
              (-[WebNetscapePluginEmbeddedView didStart]):
              * Plugins/WebNetscapePluginStream.mm:
              * Plugins/WebPluginController.mm:
              (-[WebPluginController pluginView:receivedResponse:]):
              * WebCoreSupport/WebFrameBridge.mm:
              (-[WebFrameBridge viewForPluginWithURL:attributeNames:attributeValues:MIMEType:DOMElement:loadManually:]):
              * WebCoreSupport/WebFrameLoaderClient.mm:
              (WebFrameLoaderClient::provisionalLoadStarted):
              * WebView/WebFrame.mm:
              (-[WebFrame _canCachePage]):
              (+[WebFrame _timeOfLastCompletedLoad]):
              (-[WebFrame _loadItem:withLoadType:]):
              (-[WebFrame _reloadForPluginChanges]):
              (-[WebFrame stopLoading]):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@17652 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c370e7e1
  5. 29 Oct, 2006 1 commit
    • darin's avatar
      WebCore: · 5b2cbe11
      darin authored
              - did the do-webcore-rename renames, including a number of changes
                to the names of loader files (and WebResourceLoader -> ResourceLoader),
                jScript() to scriptProxy(), jScriptEnabled() to javaScriptEnabled(),
                and improvements to the names of decoder classes and their source
                files (Decoder -> TextResourceDecoder, StreamingTextDecoder -> TextCodec)
      
      WebKit:
      
              - update for the WebCore renames
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@17431 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5b2cbe11
  6. 28 Sep, 2006 1 commit
    • darin's avatar
      JavaScriptCore: · 6138a1eb
      darin authored
              Reviewed by Alice.
      
              - support for change that should fix <rdar://problem/4733044>
                REGRESSION: XML iBench shows 10% perf. regression (copying
                strings while decoding)
      
              * wtf/Vector.h: Changed VectorBuffer so that the general case
              contains an instance of the 0 case, since deriving from it
              was violating the Liskov Substitution Principle.
              (WTF::VectorBuffer::releaseBuffer): Added. Releases the buffer so it can
              be adopted by another data structure that uses the FastMalloc.h allocator.
              Returns 0 if the internal buffer was being used.
              (WTF::Vector::releaseBuffer): Added. Releases the buffer as above or creates
              a new one in the case where the internal buffer was being used.
      
      WebCore:
      
              Reviewed by Alice.
      
              - change that should fix <rdar://problem/4733044> REGRESSION: XML iBench shows
                10% perf. regression (copying strings while decoding)
      
              Use Vector<UChar> instead of String when building up the decoded string in
              the ICU and Mac decoders. Using String leads to O(n^2) behavior because
              String grows the buffer every single time that append is called. Using
              Vector::append instead of String::append also avoids constructing a string
              each time just to append and a questionable copy that is done inside the
              String::append function which also contributed to the slowness.
      
              * platform/PlatformString.h:
              * platform/String.cpp: (WebCore::String::adopt): Added. Makes a String from a
              Vector<UChar>, adopting the buffer from the vector to avoid copying and memory
              allocation.
              * platform/StringImpl.h:
              * platform/StringImpl.cpp: (WebCore::StringImpl::adopt): Ditto.
      
              * platform/StreamingTextDecoder.h:
              * platform/StreamingTextDecoder.cpp: (WebCore::TextCodec::appendOmittingBOM):
              Change to use a Vector<UChar> instead of a String, since vectors have better
              resizing performance (they store a separate capacity).
      
              * platform/StreamingTextDecoderICU.cpp: (WebCore::TextCodecICU::decode):
              * platform/mac/StreamingTextDecoderMac.cpp: (WebCore::TextCodecMac::decode):
              Change to use Vector<UChar> instead of String and then create a string at
              the end of the process using the new adopt function.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@16622 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6138a1eb
  7. 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.
      
      WebCore:
      
              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:]):
              Ditto.
              (-[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):
              Ditto.
              * 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.
      
      WebKit:
      
              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
      b3547a37
  8. 15 Jul, 2006 1 commit
    • ap's avatar
      Reviewed by Darin. · 2bc2673f
      ap authored
              Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=4195
              REGRESSION: KOI8-U encoding no longer supported.
      
              Tests:
              * http/tests/misc/BOM-override.pl
              * http/tests/misc/BOM-override-script.html
              * fast/encoding/charset-koi8-u.html
              * fast/encoding/charset-x-nextstep.html
      
              Restored a TEC code path for encodings that are not supported by ICU (but which currently
              passes all layout tests even by itself with ICU disabled). A lot of refactoring is 
              still needed - most importantly, round-tripping encoding names via CFStringEncoding 
              makes little sense now.
      
              * WebCore.exp:
              * bridge/mac/WebCoreTextDecoder.h: Removed.
              * bridge/mac/WebCoreTextDecoder.mm: Removed.
              WebCoreTextDecoder was not used anywhere since WebTextView was moved into WebCore.
      
              * loader/Decoder.cpp:
              (Decoder::Decoder):
              (Decoder::setEncodingName):
              (Decoder::decode):
              Use StreamingTextDecoder::create().
      
              * platform/StreamingTextDecoder.cpp:
              (WebCore::StreamingTextDecoder::create):
              (WebCore::StreamingTextDecoder::~StreamingTextDecoder):
              * platform/StreamingTextDecoder.h:
              StreamingTextDecoder is just an abstract interface to implementations now.
      
              * platform/StreamingTextDecoderICU.cpp: Added.
              (WebCore::StreamingTextDecoderICU::StreamingTextDecoderICU):
              (WebCore::StreamingTextDecoderICU::~StreamingTextDecoderICU):
              (WebCore::StreamingTextDecoderICU::releaseICUConverter):
              (WebCore::StreamingTextDecoderICU::textEncodingSupported):
              (WebCore::StreamingTextDecoderICU::convertUTF16):
              (WebCore::StreamingTextDecoderICU::convertIfASCII):
              (WebCore::StreamingTextDecoderICU::createICUConverter):
              (WebCore::StreamingTextDecoderICU::appendOmittingBOM):
              (WebCore::StreamingTextDecoderICU::convertUsingICU):
              (WebCore::StreamingTextDecoderICU::convert):
              (WebCore::StreamingTextDecoderICU::toUnicode):
              (WebCore::StreamingTextDecoderICU::fromUnicode):
              * platform/StreamingTextDecoderICU.h: Added.
              Renamed from StreamingTextDecoder; added a way to tell whether the encoding is actually
              supported by the decoder; minor cleanup.
      
              * platform/TextEncoding.cpp:
              (WebCore::TextEncoding::effectiveEncoding): Moved from StreamingTextDecoder.
              (WebCore::TextEncoding::toUnicode): Use StreamingTextDecoder::create().
              (WebCore::TextEncoding::fromUnicode): Moved to StreamingTextDecoderICU.
              
              * platform/TextEncoding.h: Changed __APPLE__ to PLATFORM(MAC); added effectiveEncoding().
      
              * platform/mac/StreamingTextDecoderMac.cpp: Added.
              (WebCore::StreamingTextDecoderMac::StreamingTextDecoderMac):
              (WebCore::StreamingTextDecoderMac::~StreamingTextDecoderMac):
              (WebCore::StreamingTextDecoderMac::releaseTECConverter):
              (WebCore::StreamingTextDecoderMac::textEncodingSupported):
              (WebCore::StreamingTextDecoderMac::convertUTF16):
              (WebCore::StreamingTextDecoderMac::convertIfASCII):
              (WebCore::StreamingTextDecoderMac::createTECConverter):
              (WebCore::StreamingTextDecoderMac::appendOmittingBOM):
              (WebCore::StreamingTextDecoderMac::convertOneChunkUsingTEC):
              (WebCore::StreamingTextDecoderMac::convertUsingTEC):
              (WebCore::StreamingTextDecoderMac::convert):
              (WebCore::StreamingTextDecoderMac::toUnicode):
              (WebCore::StreamingTextDecoderMac::fromUnicode):
              * platform/mac/StreamingTextDecoderMac.h: Added.
              (WebCore::StreamingTextDecoderMac::convert):
              This is a TEC+CFString code path for decoding, basically restored from a year-old revision.
      
              * platform/mac/TextEncodingMac.cpp: Removed. Code moved to StreamingTextDecoderMac.
      
              * WebCore.xcodeproj/project.pbxproj:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15449 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2bc2673f