1. 27 May, 2010 1 commit
    • eric@webkit.org's avatar
      2010-05-27 Luiz Agostini <luiz.agostini@openbossa.org> · 4ad71207
      eric@webkit.org authored
              Reviewed by Darin Adler.
      
              UTF-16 code points compare() for String objects
              https://bugs.webkit.org/show_bug.cgi?id=39701
      
              Moving compare() implementation from UString to StringImpl for it to be shared
              with String. Adding overloaded free functions codePointCompare() in StringImpl
              and WTFString. Renaming function compare in UString to codePointCompare to be
              consistent.
      
              * runtime/JSArray.cpp:
              (JSC::compareByStringPairForQSort):
              * runtime/UString.cpp:
              * runtime/UString.h:
              (JSC::codePointCompare):
              * wtf/text/StringImpl.cpp:
              (WebCore::codePointCompare):
              * wtf/text/StringImpl.h:
              * wtf/text/WTFString.cpp:
              (WebCore::codePointCompare):
              * wtf/text/WTFString.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@60332 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4ad71207
  2. 11 May, 2010 2 commits
    • bweinstein@apple.com's avatar
      Possible Gtk build fix - use ALWAYS_INLINE on functions that were inlined. · 642d1fe3
      bweinstein@apple.com authored
      * wtf/text/AtomicString.h:
      (WebCore::AtomicString::add): Use ALWAYS_INLINE.
      * wtf/text/WTFString.h:
      (WebCore::String::length): Ditto.
      (WebCore::String::isEmpty): Ditto.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@59202 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      642d1fe3
    • bweinstein@apple.com's avatar
      Patch by Gavin Barraclough. · e1e6398e
      bweinstein@apple.com authored
              
      Reviewed by Maciej Stachowiak.
      
      Rest of REGRESSION (r57900-57919): 3% PLT Regression from moving strings into WTF.
      https://bugs.webkit.org/show_bug.cgi?id=38930
      <rdar://problem/7937188>
              
      Inline string functions that are commonly used in WTFString, CString, and AtomicString.
      
      * JavaScriptCore.exp: Remove exports of inline functions.
      * wtf/text/AtomicString.cpp:
      (WebCore::AtomicString::addSlowCase): Rename add to addSlowCase, and inline the fast path
          of add.
      * wtf/text/AtomicString.h:
      (WebCore::AtomicString::add): Inline the fast path of add.
      * wtf/text/CString.cpp: Inline implementation of data and length in the header.
      * wtf/text/CString.h:
      (WTF::CString::data): Inline implementation of data.
      (WTF::CString::length): Inline implementation of length.
      * wtf/text/WTFString.cpp: Remove implementations of functions to be inlined.
      * wtf/text/WTFString.h:
      (WebCore::String::String): Inline implementation.
      (WebCore::String::length): Ditto.
      (WebCore::String::characters): Ditto.
      (WebCore::String::operator[]): Ditto.
      (WebCore::String::isEmpty): Ditto.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@59196 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e1e6398e
  3. 20 Apr, 2010 1 commit
    • barraclough@apple.com's avatar
      Bug 37828 - Move WebCore's String classes to WTF · 87f3b744
      barraclough@apple.com authored
      Reviewed by Geoff Garen.
      
      Move these classes up to WTF so they are available to all clients of WTF (in
      particular JSC).
      
      As a first patch, making the most minimal change possible, since this patch
      could easily grow rather large since we'll have to change every class forward
      declaration ( e.g. every "namespace WebCore { class String; }" much change to
      "namespace WTF { class String; }").
      
      JavaScriptCore: 
      
      Moving the files, but leaving the classes logically in the WebCore namespace -
      which is technically a layering violation - I'll come back and fix this up in a
      subsequent patch.
      
      * Android.mk:
      * Android.v8.wtf.mk:
      * GNUmakefile.am:
      * JavaScriptCore.exp:
      * JavaScriptCore.gypi:
      * JavaScriptCore.pro:
      * JavaScriptCore.vcproj/WTF/WTF.vcproj:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * config.h:
      * wtf/StaticConstructors.h: Copied from WebCore/platform/StaticConstructors.h.
      * wtf/text/AtomicString.cpp: Copied from WebCore/platform/text/AtomicString.cpp.
      * wtf/text/AtomicString.h: Copied from WebCore/platform/text/AtomicString.h.
      * wtf/text/AtomicStringImpl.h: Copied from WebCore/platform/text/AtomicStringImpl.h.
      * wtf/text/StringBuffer.h: Copied from WebCore/platform/text/StringBuffer.h.
      * wtf/text/StringHash.h: Copied from WebCore/platform/text/StringHash.h.
      * wtf/text/StringImpl.cpp: Copied from WebCore/platform/text/StringImpl.cpp.
      * wtf/text/StringImpl.h: Copied from WebCore/platform/text/StringImpl.h.
      * wtf/text/WTFString.cpp: Copied from WebCore/platform/text/String.cpp.
      (WebCore::charactersToFloat):
      * wtf/text/WTFString.h: Copied from WebCore/platform/text/PlatformString.h.
      
      WebCore: 
      
      Moving the files, but leaving the classes logically in the WebCore namespace –
      which is technically a layering violation – I'll come back and fix this up in a
      subsequent patch.
      
      * Android.mk:
      * ForwardingHeaders/wtf/StaticConstructors.h: Added.
      * ForwardingHeaders/wtf/text/AtomicString.h: Added.
      * ForwardingHeaders/wtf/text/AtomicStringImpl.h: Added.
      * ForwardingHeaders/wtf/text/StringBuffer.h: Added.
      * ForwardingHeaders/wtf/text/StringHash.h: Added.
      * ForwardingHeaders/wtf/text/StringImpl.h: Added.
      * ForwardingHeaders/wtf/text/WTFString.h: Added.
      * GNUmakefile.am:
      * WebCore.gypi:
      * WebCore.pro:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.xcodeproj/project.pbxproj:
      * css/MediaFeatureNames.cpp:
      * dom/QualifiedName.cpp:
      * dom/make_names.pl:
      * platform/StaticConstructors.h: Removed.
      * platform/text/AtomicString.cpp: Removed.
      * platform/text/AtomicString.h:
      * platform/text/AtomicStringImpl.h:
      * platform/text/PlatformString.h:
      * platform/text/String.cpp:
      * platform/text/StringHash.h:
      * platform/text/StringImpl.cpp: Removed.
      * platform/text/StringImpl.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@57904 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      87f3b744
  4. 16 Apr, 2010 1 commit
    • barraclough@apple.com's avatar
      https://bugs.webkit.org/show_bug.cgi?id=37675 · 49a688c5
      barraclough@apple.com authored
      Remove casts/constructors to/from JSC::UString type from WebCore::String
              
      Reviewed by Sam Weinig & Oliver Hunt.
      
      WebCore's strings should not know about JSC::UString, this should be abstracted
      away in the bindings.  Add explicit conversion methods rather than relying on
      overloaded cast operators / constructors being implicitly called.
      
      This patch only changes the class String, once this has landed StringImpl, and
      hopefully AtomicString too, should follow suit.
      
      WebCore: 
      
      This patch adds:
          WebCore::identifierToString
          WebCore::ustringToString
          WebCore::stringToUString
      
      - to JSDOMBindings.h, and updates code to call these methods.
      
      * WebCore.base.exp:
      * WebCore.order:
      * bindings/js/CachedScriptSourceProvider.h:
      (WebCore::CachedScriptSourceProvider::CachedScriptSourceProvider):
      * bindings/js/JSAudioConstructor.cpp:
      (WebCore::constructAudio):
      * bindings/js/JSCSSStyleDeclarationCustom.cpp:
      (WebCore::JSCSSStyleDeclaration::nameGetter):
      * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
      (WebCore::toHTMLCanvasStyle):
      (WebCore::JSCanvasRenderingContext2D::setFillColor):
      (WebCore::JSCanvasRenderingContext2D::setStrokeColor):
      (WebCore::JSCanvasRenderingContext2D::drawImageFromRect):
      (WebCore::JSCanvasRenderingContext2D::setShadow):
      (WebCore::JSCanvasRenderingContext2D::fillText):
      (WebCore::JSCanvasRenderingContext2D::strokeText):
      * bindings/js/JSClipboardCustom.cpp:
      (WebCore::JSClipboard::types):
      (WebCore::JSClipboard::clearData):
      (WebCore::JSClipboard::getData):
      (WebCore::JSClipboard::setData):
      * bindings/js/JSCustomXPathNSResolver.cpp:
      (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
      * bindings/js/JSDOMBinding.cpp:
      (WebCore::identifierToString):
      (WebCore::ustringToString):
      (WebCore::stringToUString):
      (WebCore::valueToStringWithNullCheck):
      (WebCore::valueToStringWithUndefinedOrNullCheck):
      (WebCore::reportException):
      * bindings/js/JSDOMBinding.h:
      * bindings/js/JSDOMFormDataCustom.cpp:
      (WebCore::JSDOMFormData::append):
      * bindings/js/JSDOMWindowCustom.cpp:
      (WebCore::namedItemGetter):
      (WebCore::JSDOMWindow::setLocation):
      (WebCore::JSDOMWindow::openDatabase):
      * bindings/js/JSDatabaseCustom.cpp:
      (WebCore::JSDatabase::changeVersion):
      * bindings/js/JSDocumentCustom.cpp:
      (WebCore::JSDocument::setLocation):
      * bindings/js/JSEventListener.cpp:
      (WebCore::JSEventListener::handleEvent):
      * bindings/js/JSEventSourceConstructor.cpp:
      (WebCore::constructEventSource):
      * bindings/js/JSHTMLAllCollectionCustom.cpp:
      (WebCore::callHTMLAllCollection):
      * bindings/js/JSHTMLCanvasElementCustom.cpp:
      (WebCore::JSHTMLCanvasElement::getContext):
      * bindings/js/JSHTMLCollectionCustom.cpp:
      (WebCore::callHTMLCollection):
      * bindings/js/JSHTMLDocumentCustom.cpp:
      (WebCore::JSHTMLDocument::nameGetter):
      (WebCore::documentWrite):
      * bindings/js/JSInjectedScriptHostCustom.cpp:
      (WebCore::InjectedScriptHost::createInjectedScript):
      * bindings/js/JSInspectorFrontendHostCustom.cpp:
      (WebCore::JSInspectorFrontendHost::showContextMenu):
      * bindings/js/JSLazyEventListener.cpp:
      (WebCore::JSLazyEventListener::initializeJSFunction):
      * bindings/js/JSLocationCustom.cpp:
      (WebCore::JSLocation::setHref):
      (WebCore::JSLocation::setProtocol):
      (WebCore::JSLocation::setHost):
      (WebCore::JSLocation::setHostname):
      (WebCore::JSLocation::setPathname):
      (WebCore::JSLocation::setSearch):
      (WebCore::JSLocation::setHash):
      (WebCore::JSLocation::replace):
      (WebCore::JSLocation::assign):
      * bindings/js/JSMessageEventCustom.cpp:
      (WebCore::JSMessageEvent::initMessageEvent):
      * bindings/js/JSNamedNodeMapCustom.cpp:
      (WebCore::JSNamedNodeMap::canGetItemsForName):
      (WebCore::JSNamedNodeMap::nameGetter):
      * bindings/js/JSOptionConstructor.cpp:
      (WebCore::constructHTMLOptionElement):
      * bindings/js/JSSQLResultSetRowListCustom.cpp:
      (WebCore::JSSQLResultSetRowList::item):
      * bindings/js/JSSQLTransactionCustom.cpp:
      (WebCore::JSSQLTransaction::executeSql):
      * bindings/js/JSSharedWorkerConstructor.cpp:
      (WebCore::constructSharedWorker):
      * bindings/js/JSStorageCustom.cpp:
      (WebCore::JSStorage::canGetItemsForName):
      (WebCore::JSStorage::nameGetter):
      (WebCore::JSStorage::deleteProperty):
      (WebCore::JSStorage::getOwnPropertyNames):
      (WebCore::JSStorage::putDelegate):
      * bindings/js/JSStyleSheetListCustom.cpp:
      (WebCore::JSStyleSheetList::canGetItemsForName):
      (WebCore::JSStyleSheetList::nameGetter):
      * bindings/js/JSWebKitCSSMatrixConstructor.cpp:
      (WebCore::constructWebKitCSSMatrix):
      * bindings/js/JSWebSocketConstructor.cpp:
      (WebCore::constructWebSocket):
      * bindings/js/JSWebSocketCustom.cpp:
      (WebCore::JSWebSocket::send):
      * bindings/js/JSWorkerConstructor.cpp:
      (WebCore::constructWorker):
      * bindings/js/JSWorkerContextCustom.cpp:
      (WebCore::JSWorkerContext::importScripts):
      * bindings/js/JSXMLHttpRequestCustom.cpp:
      (WebCore::JSXMLHttpRequest::open):
      (WebCore::JSXMLHttpRequest::setRequestHeader):
      (WebCore::JSXMLHttpRequest::send):
      (WebCore::JSXMLHttpRequest::overrideMimeType):
      * bindings/js/JSXSLTProcessorCustom.cpp:
      (WebCore::JSXSLTProcessor::setParameter):
      (WebCore::JSXSLTProcessor::getParameter):
      (WebCore::JSXSLTProcessor::removeParameter):
      * bindings/js/ScheduledAction.cpp:
      (WebCore::ScheduledAction::create):
      * bindings/js/ScriptCallFrame.cpp:
      (WebCore::ScriptCallFrame::ScriptCallFrame):
      * bindings/js/ScriptController.cpp:
      (WebCore::ScriptController::evaluateInWorld):
      * bindings/js/ScriptDebugServer.cpp:
      (WebCore::ScriptDebugServer::hasBreakpoint):
      (WebCore::ScriptDebugServer::dispatchDidParseSource):
      (WebCore::ScriptDebugServer::dispatchFailedToParseSource):
      (WebCore::ScriptDebugServer::sourceParsed):
      * bindings/js/ScriptEventListener.cpp:
      (WebCore::getEventListenerHandlerBody):
      * bindings/js/ScriptFunctionCall.cpp:
      (WebCore::ScriptFunctionCall::appendArgument):
      (WebCore::ScriptFunctionCall::call):
      (WebCore::ScriptFunctionCall::construct):
      * bindings/js/ScriptObject.cpp:
      (WebCore::ScriptObject::set):
      * bindings/js/ScriptProfiler.cpp:
      (WebCore::ScriptProfiler::start):
      (WebCore::ScriptProfiler::stop):
      * bindings/js/ScriptString.h:
      (WebCore::ScriptString::operator String):
      (WebCore::ScriptString::ustring):
      (WebCore::ScriptString::operator+=):
      * bindings/js/ScriptValue.cpp:
      (WebCore::ScriptValue::getString):
      * bindings/js/ScriptValue.h:
      (WebCore::ScriptValue::toString):
      * bindings/js/SerializedScriptValue.cpp:
      (WebCore::SerializedObject::set):
      (WebCore::SerializingTreeWalker::convertIfTerminal):
      (WebCore::DeserializingTreeWalker::putProperty):
      * bindings/js/StringSourceProvider.h:
      (WebCore::StringSourceProvider::StringSourceProvider):
      * bindings/objc/WebScriptObject.mm:
      (-[WebScriptObject callWebScriptMethod:withArguments:]):
      (-[WebScriptObject setValue:forKey:]):
      (-[WebScriptObject valueForKey:]):
      (-[WebScriptObject removeWebScriptKey:]):
      * bindings/scripts/CodeGeneratorJS.pm:
      * bridge/IdentifierRep.cpp:
      (WebCore::IdentifierRep::get):
      * bridge/c/c_utility.cpp:
      (JSC::Bindings::identifierFromNPIdentifier):
      * inspector/InspectorController.cpp:
      (WebCore::InspectorController::scriptImported):
      (WebCore::InspectorController::addProfileFinishedMessageToConsole):
      (WebCore::InspectorController::createProfileHeader):
      * inspector/InspectorResource.cpp:
      (WebCore::InspectorResource::sourceString):
      * inspector/JavaScriptCallFrame.cpp:
      (WebCore::JavaScriptCallFrame::functionName):
      * platform/KURL.h:
      (WebCore::KURL::operator const String&):
      * platform/text/AtomicString.cpp:
      (WebCore::AtomicString::operator UString):
      * platform/text/AtomicString.h:
      * platform/text/PlatformString.h:
      * platform/text/String.cpp:
      
      WebKit/mac: 
      
      * Plugins/Hosted/NetscapePluginHostProxy.mm:
      (identifierFromIdentifierRep):
      * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
      (WebKit::NetscapePluginInstanceProxy::addValueToArray):
      (WebKit::NetscapePluginInstanceProxy::moveGlobalExceptionToExecState):
      * Plugins/Hosted/ProxyInstance.mm:
      (WebKit::ProxyInstance::getPropertyNames):
      * WebView/WebFrame.mm:
      (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
      (-[WebFrame _stringByEvaluatingJavaScriptFromString:withGlobalObject:inScriptWorld:]):
      * WebView/WebScriptDebugDelegate.mm:
      (-[WebScriptCallFrame evaluateWebScript:]):
      * WebView/WebScriptDebugger.mm:
      (toNSURL):
      * WebView/WebView.mm:
      (aeDescFromJSValue):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@57738 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      49a688c5
  5. 31 Mar, 2010 1 commit
    • barraclough@apple.com's avatar
      Remove dependency on TextBreakIterator from StringImpl.cpp, · c72059ea
      barraclough@apple.com authored
      and from member methods of String.
      
      Reviewed by Oliver Hunt.
      
      Make 'numGraphemeClusters' & 'numCharactersInGraphemeClusters'
      global function defined in PlatformString.h, rather than
      member methods on String (these can be implemented purely
      using the characters() and length() public interface),
      and make 'makeCapitalized' a static function in RenderText.cpp.
      
      * dom/InputElement.cpp:
      (WebCore::InputElement::sanitizeUserInputValue):
      (WebCore::InputElement::handleBeforeTextInsertedEvent):
      * html/HTMLInputElement.cpp:
      (WebCore::HTMLInputElement::tooLong):
      * html/HTMLTextAreaElement.cpp:
      (WebCore::HTMLTextAreaElement::handleBeforeTextInsertedEvent):
      (WebCore::HTMLTextAreaElement::sanitizeUserInputValue):
      (WebCore::HTMLTextAreaElement::tooLong):
      * platform/text/PlatformString.h:
      (WebCore::String::makeSecure):
      * platform/text/String.cpp:
      (WebCore::numGraphemeClusters):
      (WebCore::numCharactersInGraphemeClusters):
      * platform/text/StringImpl.cpp:
      * platform/text/StringImpl.h:
      * rendering/RenderText.cpp:
      (WebCore::makeCapitalized):
      (WebCore::RenderText::setTextInternal):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@56878 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c72059ea
  6. 30 Mar, 2010 1 commit
    • barraclough@apple.com's avatar
      Rubber stamped by Sam Weinig. · 00b7992e
      barraclough@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=36866
      Move CString to WTF
      
      JavaScriptCore: 
      
      * Android.mk:
      * GNUmakefile.am:
      * JavaScriptCore.exp:
      * JavaScriptCore.gypi:
      * JavaScriptCore.pro:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
      * JavaScriptCore.vcproj/WTF/WTF.vcproj:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * wtf/text: Added.
      * wtf/text/CString.cpp: Copied from WebCore/platform/text/CString.cpp.
      * wtf/text/CString.h: Copied from WebCore/platform/text/CString.h.
      (WTF::CStringBuffer::data):
      (WTF::CStringBuffer::length):
      (WTF::CStringBuffer::create):
      (WTF::CStringBuffer::CStringBuffer):
      (WTF::CStringBuffer::mutableData):
      (WTF::CString::CString):
      (WTF::CString::isNull):
      (WTF::CString::buffer):
      (WTF::operator!=):
      
      WebCore: 
      
      * Android.mk:
      * ForwardingHeaders/wtf/text: Added.
      * ForwardingHeaders/wtf/text/CString.h: Added.
      * GNUmakefile.am:
      * WebCore.base.exp:
      * WebCore.gypi:
      * WebCore.order:
      * WebCore.pro:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.xcodeproj/project.pbxproj:
      * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
      * bindings/js/JSDOMWindowBase.cpp:
      * bindings/js/ScheduledAction.cpp:
      * bindings/js/ScriptController.cpp:
      * bindings/v8/ScriptController.cpp:
      * bindings/v8/V8Binding.cpp:
      * bindings/v8/V8DOMWindowShell.cpp:
      * bridge/jni/JNIBridge.cpp:
      * bridge/jni/v8/JavaStringV8.h:
      (JSC::Bindings::JavaStringImpl::init):
      * css/CSSParser.cpp:
      * dom/CharacterData.cpp:
      * dom/Document.cpp:
      * dom/Element.cpp:
      * dom/Node.cpp:
      * dom/Position.cpp:
      * dom/Range.cpp:
      * dom/Text.cpp:
      * dom/XMLTokenizer.cpp:
      * dom/XMLTokenizerLibxml2.cpp:
      * dom/XMLTokenizerQt.cpp:
      * editing/SelectionController.cpp:
      * editing/VisiblePosition.cpp:
      * editing/VisibleSelection.cpp:
      * history/CachedFrame.cpp:
      * history/HistoryItem.cpp:
      * history/qt/HistoryItemQt.cpp:
      * html/FormDataList.h:
      (WebCore::FormDataList::appendData):
      (WebCore::FormDataList::Item::Item):
      (WebCore::FormDataList::Item::data):
      * html/HTMLDocument.cpp:
      * html/PreloadScanner.cpp:
      * inspector/InspectorController.cpp:
      * inspector/InspectorDOMAgent.cpp:
      * loader/DocLoader.cpp:
      * loader/FTPDirectoryDocument.cpp:
      * loader/FrameLoader.cpp:
      * loader/HistoryController.cpp:
      * loader/ProgressTracker.cpp:
      * loader/appcache/ApplicationCacheStorage.cpp:
      * loader/archive/cf/LegacyWebArchive.cpp:
      * loader/icon/wince/IconDatabaseWince.cpp:
      * loader/loader.cpp:
      * page/Console.cpp:
      * page/DOMWindow.cpp:
      * page/SecurityOrigin.cpp:
      * page/XSSAuditor.cpp:
      * page/animation/AnimationBase.cpp:
      * platform/ContextMenu.cpp:
      * platform/FileSystem.h:
      * platform/KURL.cpp:
      * platform/KURLGoogle.cpp:
      * platform/KURLGooglePrivate.h:
      * platform/Pasteboard.h:
      * platform/android/FileSystemAndroid.cpp:
      * platform/android/TemporaryLinkStubs.cpp:
      * platform/brew/KURLBrew.cpp:
      * platform/cf/FileSystemCF.cpp:
      * platform/chromium/MIMETypeRegistryChromium.cpp:
      * platform/efl/FileSystemEfl.cpp:
      * platform/efl/PasteboardEfl.cpp:
      * platform/efl/PlatformKeyboardEventEfl.cpp:
      * platform/efl/PlatformScreenEfl.cpp:
      * platform/efl/RenderThemeEfl.cpp:
      * platform/efl/ScrollbarEfl.cpp:
      * platform/efl/SharedBufferEfl.cpp:
      * platform/efl/WidgetEfl.cpp:
      * platform/graphics/GlyphPageTreeNode.cpp:
      * platform/graphics/cairo/FontPlatformDataCairo.cpp:
      * platform/graphics/cg/ImageBufferCG.cpp:
      * platform/graphics/chromium/FontCacheLinux.cpp:
      * platform/graphics/chromium/FontPlatformDataLinux.h:
      * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
      * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
      * platform/graphics/gtk/FontPlatformDataPango.cpp:
      * platform/graphics/gtk/IconGtk.cpp:
      * platform/graphics/gtk/ImageGtk.cpp:
      * platform/graphics/haiku/GraphicsContextHaiku.cpp:
      * platform/graphics/mac/GraphicsContext3DMac.cpp:
      * platform/graphics/mac/GraphicsLayerCA.mm:
      * platform/graphics/qt/GraphicsContext3DQt.cpp:
      * platform/graphics/qt/ImageBufferQt.cpp:
      * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp:
      * platform/graphics/qt/MediaPlayerPrivateQt.cpp:
      * platform/graphics/skia/GraphicsLayerSkia.cpp:
      * platform/graphics/win/GraphicsLayerCACF.cpp:
      * platform/graphics/win/WKCACFLayer.cpp:
      * platform/graphics/wx/FontPlatformData.h:
      * platform/gtk/ClipboardGtk.cpp:
      * platform/gtk/ContextMenuItemGtk.cpp:
      * platform/gtk/DataObjectGtk.h:
      * platform/gtk/FileChooserGtk.cpp:
      * platform/gtk/FileSystemGtk.cpp:
      * platform/gtk/GeolocationServiceGtk.cpp:
      * platform/gtk/KURLGtk.cpp:
      * platform/gtk/Language.cpp:
      * platform/gtk/LocalizedStringsGtk.cpp:
      * platform/gtk/PasteboardGtk.cpp:
      * platform/gtk/PopupMenuGtk.cpp:
      * platform/gtk/RenderThemeGtk.cpp:
      * platform/gtk/SharedBufferGtk.cpp:
      * platform/haiku/FileSystemHaiku.cpp:
      * platform/haiku/PlatformKeyboardEventHaiku.cpp:
      * platform/network/CredentialStorage.cpp:
      * platform/network/FormData.cpp:
      * platform/network/FormData.h:
      * platform/network/FormDataBuilder.cpp:
      * platform/network/FormDataBuilder.h:
      * platform/network/HTTPParsers.cpp:
      * platform/network/android/ResourceHandleAndroid.cpp:
      * platform/network/cf/FormDataStreamCFNet.cpp:
      * platform/network/cf/ResourceHandleCFNet.cpp:
      * platform/network/chromium/ResourceResponse.h:
      * platform/network/curl/FormDataStreamCurl.cpp:
      * platform/network/curl/ResourceHandleManager.cpp:
      * platform/network/curl/ResourceHandleManager.h:
      * platform/network/mac/FormDataStreamMac.mm:
      * platform/network/mac/ResourceHandleMac.mm:
      * platform/network/qt/QNetworkReplyHandler.cpp:
      * platform/network/soup/CookieJarSoup.cpp:
      * platform/network/soup/ResourceHandleSoup.cpp:
      * platform/network/soup/ResourceRequestSoup.cpp:
      * platform/network/soup/ResourceResponseSoup.cpp:
      * platform/network/win/ResourceHandleWin.cpp:
      * platform/posix/FileSystemPOSIX.cpp:
      * platform/qt/FileSystemQt.cpp:
      * platform/qt/KURLQt.cpp:
      * platform/qt/TemporaryLinkStubs.cpp:
      * platform/sql/chromium/SQLiteFileSystemChromium.cpp:
      * platform/text/CString.cpp: Removed.
      * platform/text/CString.h: Removed.
      * platform/text/PlatformString.h:
      * platform/text/String.cpp:
      * platform/text/StringImpl.cpp:
      * platform/text/TextCodec.h:
      * platform/text/TextCodecICU.cpp:
      * platform/text/TextCodecLatin1.cpp:
      * platform/text/TextCodecUTF16.cpp:
      * platform/text/TextCodecUserDefined.cpp:
      * platform/text/TextEncoding.cpp:
      * platform/text/TextEncoding.h:
      * platform/text/chromium/TextBreakIteratorInternalICUChromium.cpp:
      * platform/text/gtk/TextCodecGtk.cpp:
      * platform/text/haiku/StringHaiku.cpp:
      * platform/text/mac/TextCodecMac.cpp:
      * platform/text/qt/TextCodecQt.cpp:
      * platform/text/wx/StringWx.cpp:
      * platform/win/ClipboardUtilitiesWin.cpp:
      * platform/win/ClipboardWin.cpp:
      * platform/win/ContextMenuItemWin.cpp:
      * platform/win/ContextMenuWin.cpp:
      * platform/win/FileSystemWin.cpp:
      * platform/win/GDIObjectCounter.cpp:
      * platform/win/Language.cpp:
      * platform/win/PasteboardWin.cpp:
      * platform/wince/FileSystemWince.cpp:
      * platform/wince/KeygenWince.cpp:
      * platform/wince/PasteboardWince.cpp:
      * platform/wx/FileSystemWx.cpp:
      * platform/wx/LoggingWx.cpp:
      * plugins/PluginDebug.h:
      * plugins/PluginPackage.cpp:
      * plugins/PluginStream.cpp:
      * plugins/PluginStream.h:
      * plugins/PluginView.h:
      * plugins/gtk/PluginPackageGtk.cpp:
      * plugins/mac/PluginPackageMac.cpp:
      * plugins/qt/PluginPackageQt.cpp:
      * plugins/symbian/PluginPackageSymbian.cpp:
      * plugins/win/PluginPackageWin.cpp:
      * rendering/RenderLayer.cpp:
      * rendering/RenderLayerCompositor.cpp:
      * rendering/RenderTreeAsText.cpp:
      * storage/Database.cpp:
      * storage/SQLTransactionCoordinator.cpp:
      * storage/SQLTransactionCoordinator.h:
      * storage/StorageAreaSync.cpp:
      * storage/StorageSyncManager.cpp:
      * storage/chromium/DatabaseTrackerChromium.cpp:
      * storage/chromium/QuotaTracker.cpp:
      * storage/chromium/QuotaTracker.h:
      * svg/SVGFontFaceElement.cpp:
      * svg/SVGStyledElement.cpp:
      * svg/SVGUseElement.cpp:
      * websockets/WebSocket.cpp:
      * websockets/WebSocketChannel.cpp:
      * websockets/WebSocketHandshake.cpp:
      * wml/WMLErrorHandling.cpp:
      * wml/WMLGoElement.cpp:
      * wml/WMLPageState.cpp:
      * wml/WMLPostfieldElement.cpp:
      * wml/WMLSelectElement.cpp:
      * xml/XMLHttpRequest.cpp:
      * xml/XSLStyleSheetLibxslt.cpp:
      * xml/XSLTProcessorLibxslt.cpp:
      
      WebKit: 
      
      * efl/WebCoreSupport/ChromeClientEfl.cpp:
      * efl/ewk/ewk_frame.cpp:
      (ewk_frame_name_get):
      (ewk_frame_selection_get):
      (ewk_frame_uri_changed):
      * efl/ewk/ewk_history.cpp:
      * efl/ewk/ewk_settings.cpp:
      
      WebKit/chromium: 
      
      * public/WebCString.h:
      * src/FrameLoaderClientImpl.cpp:
      * src/GraphicsContext3D.cpp:
      * src/WebCString.cpp:
      (WebKit::WebCString::assign):
      (WebKit::WebCString::WebCString):
      (WebKit::WebCString::operator=):
      (WebKit::WebCString::operator WTF::CString):
      * src/WebMediaPlayerClientImpl.cpp:
      * src/WebString.cpp:
      * src/WebURLError.cpp:
      
      WebKit/gtk: 
      
      * WebCoreSupport/ChromeClientGtk.cpp:
      * WebCoreSupport/ContextMenuClientGtk.cpp:
      * WebCoreSupport/EditorClientGtk.cpp:
      * WebCoreSupport/FrameLoaderClientGtk.cpp:
      * WebCoreSupport/InspectorClientGtk.cpp:
      * gdom/ConvertToGCharPrivate.h:
      * webkit/webkitdownload.cpp:
      * webkit/webkithittestresult.cpp:
      * webkit/webkitnetworkrequest.cpp:
      * webkit/webkitprivate.h:
      * webkit/webkitsecurityorigin.cpp:
      * webkit/webkitwebdatabase.cpp:
      * webkit/webkitwebframe.cpp:
      * webkit/webkitwebhistoryitem.cpp:
      (webkit_web_history_item_finalize):
      (webkit_web_history_item_get_target):
      * webkit/webkitwebresource.cpp:
      * webkit/webkitwebsettings.cpp:
      * webkit/webkitwebview.cpp:
      
      WebKit/mac: 
      
      * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
      (WebKit::NetscapePluginInstanceProxy::getCookies):
      (WebKit::NetscapePluginInstanceProxy::getProxy):
      (WebKit::NetscapePluginInstanceProxy::getAuthenticationInfo):
      (WebKit::NetscapePluginInstanceProxy::resolveURL):
      * Plugins/WebBaseNetscapePluginView.h:
      * Plugins/WebBaseNetscapePluginView.mm:
      * Plugins/WebNetscapePluginView.mm:
      (-[WebNetscapePluginView resolveURL:forTarget:]):
      
      WebKit/qt: 
      
      * Api/qwebelement.cpp:
      
      WebKit/win: 
      
      * WebDownload.cpp:
      * WebDownloadCFNet.cpp:
      * WebDownloadCurl.cpp:
      * WebHistoryItem.cpp:
      * WebLocalizableStrings.cpp:
      * WebMutableURLRequest.cpp:
      * WebPreferences.cpp:
      (WebPreferences::migrateWebKitPreferencesToCFPreferences):
      * WebView.cpp:
      
      WebKit/wx: 
      
      * WebFrame.cpp:
      * WebView.cpp:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@56825 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      00b7992e
  7. 16 Mar, 2010 1 commit
    • hamaji@chromium.org's avatar
      2010-03-16 Shinichiro Hamaji <hamaji@chromium.org> · 5e3b1e24
      hamaji@chromium.org authored
              Reviewed by Darin Adler.
      
              RenderText::m_text should be a String, not RefPtr<StringImpl>
              https://bugs.webkit.org/show_bug.cgi?id=36010
      
              Refactoring only, so no new tests.
      
              * platform/text/PlatformString.h:
              (WebCore::String::makeLower):
              (WebCore::String::makeUpper):
              (WebCore::String::makeSecure):
              (WebCore::String::makeCapitalized):
              (WebCore::String::containsOnlyASCII):
              * rendering/RenderText.cpp:
              (WebCore::RenderText::RenderText):
              (WebCore::RenderText::widthFromCache):
              (WebCore::RenderText::trimmedPrefWidths):
              (WebCore::RenderText::containsOnlyWhitespace):
              (WebCore::RenderText::setTextInternal):
              (WebCore::RenderText::setText):
              (WebCore::RenderText::previousOffset):
              (WebCore::RenderText::previousOffsetForBackwardDeletion):
              (WebCore::RenderText::nextOffset):
              * rendering/RenderText.h:
              (WebCore::RenderText::text):
              (WebCore::RenderText::characters):
              (WebCore::RenderText::textLength):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@56047 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5e3b1e24
  8. 18 Jan, 2010 2 commits
    • barraclough@apple.com's avatar
      Eeeep! reverting r53416 & r53417, more to be done to fix windows. · 162c8651
      barraclough@apple.com authored
      Reviewed by NOBODY (build fix).
      
      * WebCore.base.exp:
      * platform/sql/SQLiteFileSystem.cpp:
      (WebCore::SQLiteFileSystem::openDatabase):
      * platform/sql/SQLiteStatement.cpp:
      (WebCore::SQLiteStatement::prepare):
      * platform/sql/SQLiteStatement.h:
      * platform/sql/chromium/SQLiteFileSystemChromium.cpp:
      (WebCore::SQLiteFileSystem::openDatabase):
      * platform/text/PlatformString.h:
      * platform/text/String.cpp:
      (WebCore::String::charactersWithNullTermination):
      * platform/text/StringImpl.cpp:
      (WebCore::StringImpl::operator new):
      (WebCore::StringImpl::operator delete):
      (WebCore::StringImpl::StringImpl):
      (WebCore::StringImpl::~StringImpl):
      (WebCore::StringImpl::create):
      (WebCore::StringImpl::createWithTerminatingNullCharacter):
      (WebCore::StringImpl::crossThreadString):
      (WebCore::StringImpl::sharedBuffer):
      * platform/text/StringImpl.h:
      (WebCore::StringImpl::hasTerminatingNullCharacter):
      (WebCore::StringImpl::inTable):
      (WebCore::StringImpl::setInTable):
      (WebCore::StringImpl::):
      * platform/win/ClipboardUtilitiesWin.cpp:
      (WebCore::createGlobalData):
      * storage/OriginUsageRecord.cpp:
      (WebCore::OriginUsageRecord::addDatabase):
      (WebCore::OriginUsageRecord::markDatabase):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53418 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      162c8651
    • barraclough@apple.com's avatar
      https://bugs.webkit.org/show_bug.cgi?id=33731 · 735ee66c
      barraclough@apple.com authored
      Remove uses of PtrAndFlags from WebCore::StringImpl.
      
      Reviewed by Darin Adler.
      
      These break the OS X Leaks tool.  Move the management of null-terminated copies
      out from StringImpl to String, and use a bit stolen from the refCount to hold the
      'InTable' flag.
      
      * platform/sql/SQLiteFileSystem.cpp:
      (WebCore::SQLiteFileSystem::openDatabase):
      * platform/sql/SQLiteStatement.cpp:
      (WebCore::SQLiteStatement::prepare):
      * platform/sql/SQLiteStatement.h:
      * platform/text/PlatformString.h:
      * platform/text/String.cpp:
      (WebCore::String::copyWithNullTermination):
      * platform/text/StringImpl.cpp:
      (WebCore::StringImpl::StringImpl):
      (WebCore::StringImpl::~StringImpl):
      (WebCore::StringImpl::create):
      (WebCore::StringImpl::crossThreadString):
      (WebCore::StringImpl::sharedBuffer):
      * platform/text/StringImpl.h:
      (WebCore::StringImpl::inTable):
      (WebCore::StringImpl::setInTable):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53416 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      735ee66c
  9. 17 Dec, 2009 2 commits
  10. 10 Nov, 2009 1 commit
  11. 02 Nov, 2009 1 commit
    • eric@webkit.org's avatar
      2009-11-02 Laszlo Gombos <laszlo.1.gombos@nokia.com> · 70ef0c0a
      eric@webkit.org authored
              Reviewed by Darin Adler.
      
              PLATFORM(CF) should be set when building for Qt on Darwin
              https://bugs.webkit.org/show_bug.cgi?id=23671
      
              * wtf/Platform.h: Turn on CF support if both QT and DARWIN
              platforms are defined.
      2009-11-02  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
      
              Reviewed by Darin Adler.
      
              PLATFORM(CF) should be set when building for Qt on Darwin
              https://bugs.webkit.org/show_bug.cgi?id=23671
      
              * WebCore.pro: Add SharedBufferCF.cpp and SmartReplaceCF.cpp
              to the Darwin build.
              * loader/archive/ArchiveFactory.cpp: Change the support for
              legacy WebArchive from all CF platforms to Mac and Chromium
              CF platforms.
              (WebCore::archiveMIMETypes):
              * platform/text/AtomicString.h: Remove PLATFORM(QT) &&
              PLATFORM(DARWIN) test as it is redundant now.
              * platform/text/PlatformString.h: Ditto.
              * platform/text/StringImpl.h: Ditto.
              * platform/text/cf/StringCF.cpp: Ditto.
              * platform/text/cf/StringImplCF.cpp: Ditto.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50438 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      70ef0c0a
  12. 06 Oct, 2009 1 commit
    • levin@chromium.org's avatar
      StringImpl needs a method to get an instance for another thread which doesn't... · bcb91543
      levin@chromium.org authored
      StringImpl needs a method to get an instance for another thread which doesn't copy the underlying buffer.
      https://bugs.webkit.org/show_bug.cgi?id=30095
      
      Patch by David Levin <levin@chromium.org> on 2009-10-06
      Reviewed by Oliver Hunt.
      
      JavaScriptCore:
      
      * wtf/CrossThreadRefCounted.h:
      Removed an unused function and assert improvement.
      (WTF::CrossThreadRefCounted::isOwnedByCurrentThread): Moved out common code from asserts.
      (WTF::CrossThreadRefCounted::ref): Changed assert to use the common method.
      (WTF::CrossThreadRefCounted::deref): Changed assert to use the common method.
      (WTF::CrossThreadRefCounted::crossThreadCopy): Since this includes a potentially
      non-threadsafe operation, add an assert that the class is owned by the current thread.
      
      WebCore:
      
      All String::copy methods were changed to call either threadsafeCopy or crossThreadString. The method
      call was made threadsafeCopy unless I could show that threadsafety wasn't needed.
      
      No visible change in functionality so no new tests.
      
      * dom/MessagePortChannel.cpp:
      (WebCore::MessagePortChannel::EventData::EventData):
      * loader/WorkerThreadableLoader.cpp:
      (WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):
      * loader/icon/IconDatabase.cpp:
      (WebCore::IconDatabase::open):
      (WebCore::IconDatabase::iconForPageURL):
      (WebCore::IconDatabase::iconURLForPageURL):
      (WebCore::IconDatabase::retainIconForPageURL):
      (WebCore::IconDatabase::releaseIconForPageURL):
      (WebCore::IconDatabase::setIconDataForIconURL):
      (WebCore::IconDatabase::setIconURLForPageURL):
      (WebCore::IconDatabase::databasePath):
      (WebCore::IconDatabase::defaultDatabaseFilename):
      * page/SecurityOrigin.cpp:
      (WebCore::SecurityOrigin::SecurityOrigin): Since this is used by SecurityOrigin::threadsafeCopy,
      it makes threadsafe calls.
      (WebCore::SecurityOrigin::threadsafeCopy): The only place that called this
      needed a threadsafe method.
      * page/SecurityOrigin.h:
      * platform/CrossThreadCopier.cpp:
      (WebCore::::copy):
      * platform/KURL.cpp:
      (WebCore::KURL::copy):
      * platform/network/HTTPHeaderMap.cpp:
      (WebCore::HTTPHeaderMap::copyData):
      * platform/network/ResourceErrorBase.cpp:
      (WebCore::ResourceErrorBase::copy):
      * platform/network/ResourceRequestBase.cpp:
      (WebCore::ResourceRequestBase::copyData):
      * platform/network/ResourceResponseBase.cpp:
      (WebCore::ResourceResponseBase::copyData):
      * platform/sql/SQLValue.cpp:
      (WebCore::SQLValue::SQLValue):
      (WebCore::SQLValue::string):
      * platform/sql/SQLValue.h:
      (WebCore::SQLValue::SQLValue):
      All constructors now initialize the m_number which is a double. Failure to
      do so can result in unexpected crashes when it is copied in the copy constructor.
      See http://blogs.msdn.com/oldnewthing/archive/2008/07/02/8679191.aspx, I was that colleague.
      * platform/text/PlatformString.h:
      * platform/text/String.cpp:
      (WebCore::String::threadsafeCopy):
      (WebCore::String::crossThreadString):
      * platform/text/StringImpl.cpp:
      Removed StringImpl::substringCopy which was no longer being used anywhere.
      (WebCore::StringImpl::threadsafeCopy): Changed the name to indicate that
      it is threadsafe.
      (WebCore::StringImpl::crossThreadString): The way to get strings for
      another thread which is not threadsafe. This shares the underlying buffer
      with both strings and gives them a way to do threadsafe refcounting for it.
      * platform/text/StringImpl.h:
      * storage/ChangeVersionWrapper.cpp:
      (WebCore::ChangeVersionWrapper::ChangeVersionWrapper):
      * storage/Database.cpp:
      (WebCore::updateGuidVersionMap):
      (WebCore::Database::Database):
      (WebCore::Database::getVersionFromDatabase):
      (WebCore::Database::setVersionInDatabase):
      (WebCore::Database::version):
      (WebCore::Database::setExpectedVersion):
      (WebCore::Database::securityOriginCopy):
      (WebCore::Database::stringIdentifier):
      * storage/DatabaseTracker.cpp:
      (WebCore::DatabaseTracker::scheduleNotifyDatabaseChanged):
      * storage/OriginQuotaManager.cpp:
      (WebCore::OriginQuotaManager::addDatabase):
      * storage/SQLError.h:
      (WebCore::SQLError::message):
      (WebCore::SQLError::SQLError):
      * storage/SQLStatement.cpp:
      (WebCore::SQLStatement::SQLStatement):
      * storage/StorageAreaSync.cpp:
      (WebCore::StorageAreaSync::syncTimerFired):
      * storage/StorageMap.cpp:
      (WebCore::StorageMap::importItem):
      * storage/StorageNamespaceImpl.cpp:
      (WebCore::StorageNamespaceImpl::StorageNamespaceImpl):
      * storage/StorageSyncManager.cpp:
      (WebCore::StorageSyncManager::StorageSyncManager):
      * workers/DefaultSharedWorkerRepository.cpp:
      (WebCore::SharedWorkerProxy::url): Do the copy of the url in a way that is threadsafe.
      (WebCore::SharedWorkerProxy::name):
      (WebCore::SharedWorkerProxy::SharedWorkerProxy):
      (WebCore::DefaultSharedWorkerRepository::getProxy): Do the copy of the url in a way that is threadsafe.
      * workers/SharedWorkerThread.cpp:
      (WebCore::SharedWorkerThread::SharedWorkerThread):
      * workers/WorkerMessagingProxy.cpp:
      (WebCore::MessageWorkerContextTask::MessageWorkerContextTask):
      (WebCore::MessageWorkerTask::MessageWorkerTask):
      (WebCore::WorkerExceptionTask::WorkerExceptionTask):
      * workers/WorkerRunLoop.cpp:
      (WebCore::WorkerRunLoop::Task::Task):
      (WebCore::WorkerRunLoop::postTaskForMode):
      * workers/WorkerThread.cpp:
      (WebCore::WorkerThreadStartupData::WorkerThreadStartupData):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49160 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bcb91543
  13. 23 Sep, 2009 1 commit
    • eric@webkit.org's avatar
      2009-09-23 Kent Tamura <tkent@chromium.org> · fa588e67
      eric@webkit.org authored
              Reviewed by Darin Adler.
      
              Tests for maxLength of <textarea>
              https://bugs.webkit.org/show_bug.cgi?id=29292
      
              * fast/forms/script-tests/textarea-maxlength.js: Added.
              * fast/forms/textarea-maxlength-expected.txt: Added.
              * fast/forms/textarea-maxlength.html: Added.
      2009-09-23  Kent Tamura  <tkent@chromium.org>
      
              Reviewed by Darin Adler.
      
              - Support for maxLength of <textarea>
              - Move numGraphemeClusters() and numCharactersInGraphemeClusters() from InputElement to String.
              https://bugs.webkit.org/show_bug.cgi?id=29292
      
              Test: fast/forms/textarea-maxlength.html
      
              * dom/InputElement.cpp:
              (WebCore::InputElement::sanitizeUserInputValue):
              (WebCore::InputElement::handleBeforeTextInsertedEvent):
              * html/HTMLTextAreaElement.cpp:
              (WebCore::HTMLTextAreaElement::defaultEventHandler):
              (WebCore::HTMLTextAreaElement::handleBeforeTextInsertedEvent):
              (WebCore::HTMLTextAreaElement::sanitizeUserInputValue):
              (WebCore::HTMLTextAreaElement::maxLength):
              (WebCore::HTMLTextAreaElement::setMaxLength):
              * html/HTMLTextAreaElement.h:
              * html/HTMLTextAreaElement.idl:
              * platform/text/PlatformString.h:
              * platform/text/String.cpp:
              (WebCore::String::numGraphemeClusters):
              (WebCore::String::numCharactersInGraphemeClusters):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48698 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fa588e67
  14. 12 Aug, 2009 1 commit
    • eric@webkit.org's avatar
      2009-08-12 Maxime Simon <simon.maxime@gmail.com> · 1c3f6321
      eric@webkit.org authored
              Reviewed by Eric Seidel.
      
              [Haiku] Tiny modifications on WebCore files to allow Haiku port.
              https://bugs.webkit.org/show_bug.cgi?id=28128
      
              * bindings/js/ScriptControllerHaiku.cpp: Style cleanup.
              * loader/CachedFont.cpp: Haiku behaves like Qt, Gtk, or Chromium,
              so many PLATFORM(HAIKU) were added to these functions.
              (WebCore::CachedFont::~CachedFont):
              (WebCore::CachedFont::ensureCustomFontData):
              (WebCore::CachedFont::platformDataFromCustomData):
              (WebCore::CachedFont::allClientsRemoved):
              * page/EventHandler.cpp: Like the mac and Qt port, Haiku doesn't need the
              invertSenseOfTabsToLinks() function.
              * page/haiku/DragControllerHaiku.cpp: Style cleanup.
              * platform/image-decoders/ImageDecoder.h: For image decoding Haiku
              behaves like Cairo or Wx, (not like Skia).
              (WebCore::RGBA32Buffer::getAddr):
              * platform/text/PlatformString.h: Adding the String(BString&) and BString()
              methods specific to Haiku.
              * platform/text/UnicodeRange.h: Haiku needs to include stdint.h.
              * platform/text/haiku/TextBreakIteratorInternalICUHaiku.cpp:
              (WebCore::currentSearchLocaleID): Missing function.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47144 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1c3f6321
  15. 07 Aug, 2009 1 commit
    • beidson@apple.com's avatar
      WebCore: · 8127cdcb
      beidson@apple.com authored
      2009-08-07  Brady Eidson  <beidson@apple.com>
      
              Reviewed by Darin Adler.
      
              Implement the HTML5 hashchange event.
              https://bugs.webkit.org/show_bug.cgi?id=21605
      
              Test: fast/loader/hashchange-event.html
      
              * dom/EventNames.h: Add "hashchange"
              * html/HTMLAttributeNames.in: Add "onhashchange"
      
              * loader/FrameLoader.cpp:
              (WebCore::HashChangeEventTask::create):
              (WebCore::HashChangeEventTask::performTask):
              (WebCore::HashChangeEventTask::HashChangeEventTask):
              (WebCore::FrameLoader::scrollToAnchor): When an anchor navigation is completed and the
                new fragment identifier is different from the old one, queue a hash change event
                on the Document.
      
              Add a window event listener for the hashchange event if onhashchange is encountered:
              * html/HTMLBodyElement.cpp:
              (WebCore::HTMLBodyElement::parseMappedAttribute): 
              * html/HTMLFrameSetElement.cpp:
              (WebCore::HTMLFrameSetElement::parseMappedAttribute):
      
              Add a new string utility method that gives "null and empty are equivalent" behavior:
              * platform/text/PlatformString.h:
              (WebCore::equalIgnoringNullity):
              * platform/text/StringImpl.cpp:
              (WebCore::equalIgnoringNullity):
              * platform/text/StringImpl.h:
      
      LayoutTests:
      
      2009-08-07  Brady Eidson  <beidson@apple.com>
      
              Reviewed by Darin Adler.
      
              Implement the HTML5 hashchange event.
              https://bugs.webkit.org/show_bug.cgi?id=21605
      
              * fast/loader/hashchange-event-expected.txt: Added.
              * fast/loader/hashchange-event.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@46892 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8127cdcb
  16. 26 Jun, 2009 1 commit
    • hausmann@webkit.org's avatar
      JavaScriptCore: · c51cbc88
      hausmann@webkit.org authored
      2009-06-26  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
      
              Reviewed by Simon Hausmann.
      
              Add support for QDataStream operators to Vector.
      
      WebCore:
      
      2009-06-26  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
      
              Reviewed by Simon Hausmann.
      
              Add support for QDataStream operators to String and IntPoint.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@45262 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c51cbc88
  17. 18 Jun, 2009 1 commit
    • kmccullough@apple.com's avatar
      JavaScriptCore: · 918d6360
      kmccullough@apple.com authored
      2009-06-18  Kevin McCullough  <kmccullough@apple.com>
      
              Reviewed by Oliver Hunt.
      
              <rdar://problem/6940880> REGRESSION: Breakpoints don't break in 64-bit
      
              - Exposed functions now needed by WebCore.
      
              * JavaScriptCore.exp:
      
      WebCore:
      
      2009-06-18  Kevin McCullough  <kmccullough@apple.com>
      
              Reviewed by Oliver Hunt.
      
              <rdar://problem/6940880> REGRESSION: Breakpoints don't break in 64-bit
      
              Convert intptr_t to Strings so that we don't loose bits in the
              conversion to JS.  Previously they were being put into 32bit ints.
      
              * inspector/InspectorController.cpp: Convert the String back to an
              intptr_t.
              (WebCore::InspectorController::addBreakpoint):
              (WebCore::InspectorController::removeBreakpoint):
              * inspector/InspectorController.h:
              * inspector/InspectorController.idl: Use strings in JS to avoid 32bit
              truncation.
              * inspector/InspectorFrontend.cpp: Make the intptr_t into a String.
              (WebCore::InspectorFrontend::parsedScriptSource):
              * platform/text/PlatformString.h: Implemented the necessary conversion
              functions to be able to convert to and from an intptr_t.
              * platform/text/String.cpp: Ditto.
              (WebCore::String::toIntPtrStrict):
              (WebCore::String::toIntPtr):
              (WebCore::charactersToIntPtrStrict):
              (WebCore::charactersToIntPtr):
              * platform/text/StringImpl.cpp: Ditto.
              (WebCore::StringImpl::toIntPtrStrict):
              (WebCore::StringImpl::toIntPtr):
              * platform/text/StringImpl.h: Ditto.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44831 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      918d6360
  18. 16 May, 2009 1 commit
  19. 24 Mar, 2009 1 commit
    • dglazkov@chromium.org's avatar
      2009-03-24 Mark Mentovai <mark@chromium.org> · 6b1b6d94
      dglazkov@chromium.org authored
              Reviewed by Mark Rowe.
      
              https://bugs.webkit.org/show_bug.cgi?id=24653
              WebKit should be buildable without prefix header injection.
              Adds missing #includes and forward declarations as needed.
      
              * editing/SmartReplaceCF.cpp:
              * platform/graphics/mac/ColorMac.mm:
              * platform/graphics/mac/FontCacheMac.mm:
              * platform/graphics/mac/FontCustomPlatformData.h:
              * platform/graphics/mac/FontMac.mm:
              * platform/graphics/mac/FontMacATSUI.mm:
              * platform/graphics/mac/FontPlatformData.h:
              * platform/graphics/mac/FontPlatformDataMac.mm:
              * platform/graphics/mac/GraphicsContextMac.mm:
              * platform/graphics/mac/SimpleFontDataMac.mm:
              * platform/mac/FoundationExtras.h:
              * platform/mac/LocalCurrentGraphicsContext.h:
              * platform/mac/WebCoreSystemInterface.h:
              * platform/mac/WebCoreSystemInterface.mm:
              * platform/mac/WebCoreTextRenderer.h:
              * platform/mac/WebCoreTextRenderer.mm:
              * platform/mac/WebFontCache.h:
              * platform/mac/WebFontCache.mm:
              * platform/text/PlatformString.h:
              * platform/text/mac/ShapeArabic.c:
              * platform/text/mac/StringMac.mm:
              * rendering/RenderThemeChromiumMac.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@41939 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6b1b6d94
  20. 11 Mar, 2009 1 commit
  21. 02 Feb, 2009 1 commit
    • darin@apple.com's avatar
      2009-02-01 Darin Adler <darin@apple.com> · e8c3a2ad
      darin@apple.com authored
              Reviewed by Dave Hyatt.
      
              Bug 23674: Speed up some things based on profiling the page load test
              https://bugs.webkit.org/show_bug.cgi?id=23674
      
              * css/CSSStyleSelector.cpp:
              (WebCore::CSSStyleSelector::canShareStyleWithElement): Use the newly named cssTarget instead
              of the old name, getCSSTarget.
              (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): Ditto.
      
              * dom/ContainerNode.cpp:
              (WebCore::ContainerNode::insertedIntoDocument): Moved code from Node in here rather than
              calling through to EventTargetNode::insertedIntoDocument.
              (WebCore::ContainerNode::removedFromDocument): Ditto.
              (WebCore::ContainerNode::insertedIntoTree): Tweaked a bit.
              (WebCore::ContainerNode::removedFromTree): Ditto.
      
              * dom/ContainerNode.h: Moved the constructor definition here and made it inline.
      
              * dom/Document.cpp:
              (WebCore::Document::removeAllEventListenersFromAllNodes): Iterate the document element and
              its contents only to avoid the document type node. This allows us to remove the virtual
              function call to isEventTargetNode from the loop.
              (WebCore::Document::setCSSTarget): Changed argument to be an Element rather than Node.
      
              * dom/Document.h: Changed CSS target to be an Element rather than a Node. Renamed
              getCSSTarget to cssTarget.
      
              * dom/EventTargetNode.cpp:
              (WebCore::EventTargetNode::removeAllEventListenersSlowCase): Renamed and turned the
              rare data check into an assertion.
      
              * dom/EventTargetNode.h: Made the fast case of removeAllEventListeners be inline.
              Also moved the constructor definition here and made it inline. And added toEventTargetNode,
              matching the design of the render tree checked casts. Later we can migrate all callers
              from EventTargetNodeCast to toEventTargetNode.
      
              * dom/NamedAttrMap.cpp:
              (WebCore::NamedAttrMap::detachAttributesFromElement): Added. Factored out from
              clearAttributes, so we could use this loop in cases where we're not clearing the attributes.
              (WebCore::NamedAttrMap::~NamedAttrMap): Call detachAttributesFromElement instead of
              clearAttributes here.
              (WebCore::NamedAttrMap::clearAttributes): Call detachAttributesFromElement here.
              (WebCore::NamedAttrMap::detachFromElement): Call detachAttributesFromElement instead of
              clearAttributes. We don't need to clear the attributes array just because the element is
              going away, so don't.
              (WebCore::NamedAttrMap::virtualLength): Added.
      
              * dom/NamedAttrMap.h: Made all the virtual functions inherited from NamedNodeMap be private.
              These are all unnecessarily inefficient for use outside the DOM. Changed length to be a
              non-virtual function. This was a fairly hot function.
      
              * dom/NamedMappedAttrMap.cpp:
              (WebCore::NamedMappedAttrMap::setClass): Changed to use element() function now that the
              m_element data member is private.
      
              * dom/NamedMappedAttrMap.h: Made a few functions private. Made the
              hasMappedAttributes function non-virtual.
      
              * dom/NamedNodeMap.h: Made length a non-virtual inline function that calls a virtual
              function, name virtualLength. This lets NamedAttrMap::length be a non-virtual function.
      
              * dom/Node.cpp:
              (WebCore::Node::insertedIntoDocument): Removed call to insertedIntoTree, since it's
              only non-empty in subclasses of ContainerNode.
              (WebCore::Node::removedFromDocument): Ditto. Also removed setCSSTarget. Since a CSS
              target has to be an Element, this can be moved down to ContainerNode (or it could be
              moved down to Element for that matter).
      
              * dom/QualifiedName.cpp:
              (WebCore::QualifiedName::QualifiedName): Removed double initialization of m_impl.
      
              * dom/QualifiedName.h: Moved the destructor, copy constructor, assignment operator, and
              setPrefix function definitions into the header and made them inline.
      
              * html/HTMLAreaElement.cpp:
              (WebCore::HTMLAreaElement::mapMouseEvent): Updated since the stored region is now
              an OwnPtr.
              (WebCore::HTMLAreaElement::accessKey): Use AtomicString.
              (WebCore::HTMLAreaElement::setAccessKey): Ditto.
              (WebCore::HTMLAreaElement::alt): Ditto.
              (WebCore::HTMLAreaElement::setAlt): Ditto.
              (WebCore::HTMLAreaElement::coords): Ditto.
              (WebCore::HTMLAreaElement::setCoords): Ditto.
              (WebCore::HTMLAreaElement::setHref): Ditto.
              (WebCore::HTMLAreaElement::shape): Ditto.
              (WebCore::HTMLAreaElement::setShape): Ditto.
              (WebCore::HTMLAreaElement::setTarget): Ditto.
      
              * html/HTMLAreaElement.h: Use AtomicString in the getter and setter DOM operations.
              Change the region data member to be an OwnPtr<Path> instead of a Path to optimize
              the common case where an area element is parsed but never hit-tested. This could
              also have been done by changing the Path class's null case to be more efficient,
              but this seems fine.
      
              * html/HTMLViewSourceDocument.cpp:
              (WebCore::HTMLViewSourceDocument::createContainingTable): Use addAttribute instead
              of insertAttribute.
              (WebCore::HTMLViewSourceDocument::addSpanWithClassName): Ditto.
              (WebCore::HTMLViewSourceDocument::addLine): Ditto.
              (WebCore::HTMLViewSourceDocument::addLink): Ditto.
      
              * loader/FrameLoader.cpp:
              (WebCore::FrameLoader::gotoAnchor): Use cssTarget under its new name instead
              of its old name getCSSTarget.
      
              * platform/graphics/GlyphWidthMap.cpp:
              (WebCore::GlyphWidthMap::locatePageSlowCase): Refactored from locatePage.
      
              * platform/graphics/GlyphWidthMap.h: Made most of this class inline.
              Changed m_pages to use OwnPtr.
      
              * platform/text/PlatformString.h: Remove include no longer needed since
              StringImpl.h includes it.
      
              * platform/text/StringImpl.cpp:
              (WebCore::StringImpl::createStrippingNullCharactersSlowCase): Refactored
              from createStrippingNullCharacters.
              * platform/text/StringImpl.h: Moved the definition of
              createStrippingNullCharacters here and made it inline.
      
              * rendering/RenderObject.cpp:
              (WebCore::RenderObject::firstLineStyleSlowCase): Refactored from
              firstLineStyle.
      
              * rendering/RenderObject.h: Moved the definition of the firstLineStyle
              function here and made it inline. Moved the definition of the
              documentBeingDestroyed function here and made it inline.
      
              * svg/SVGSVGElement.cpp:
              (WebCore::SVGSVGElement::getCTM): Use getAttributeItem instead of
              getNamedItem here since it accomplishes the same thing but is more efficient.
              (WebCore::SVGSVGElement::getScreenCTM): Ditto.
              * svg/SVGStyledElement.cpp:
              (WebCore::SVGStyledElement::getPresentationAttribute): Ditto.
      
              * xml/XPathFunctions.cpp:
              (WebCore::XPath::FunLang::evaluate): Use getAttributeItem instead of
              getNamedItemNS.
      
              * xml/XPathStep.cpp:
              (WebCore::XPath::Step::nodesInAxis): Use attributeItem instead of item here.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40475 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e8c3a2ad
  22. 30 Jan, 2009 1 commit
    • andersca@apple.com's avatar
      2009-01-30 Anders Carlsson <andersca@apple.com> · 4bbcb885
      andersca@apple.com authored
              Reviewed by Sam Weinig.
      
              Add IdentifierRep which will be used by both plug-in implementations.
      
              * GNUmakefile.am:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * bridge/IdentifierRep.cpp: Added.
              (WebCore::IdentifierRep::IdentifierRep):
              (WebCore::IdentifierRep::):
              (WebCore::intIdentifierMap):
              (WebCore::identifierRep):
              (WebCore::stringIdentifierMap):
              * bridge/IdentifierRep.h: Added.
              * bridge/c/c_utility.h:
              * platform/text/PlatformString.h:
              * platform/text/String.cpp:
              (WebCore::String::fromUTF8WithLatin1Fallback):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40412 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4bbcb885
  23. 20 Jan, 2009 1 commit
    • darin@apple.com's avatar
      JavaScriptCore: · ed7a6435
      darin@apple.com authored
      2009-01-20  Darin Adler  <darin@apple.com>
      
              Reviewed by Mark Rowe.
      
              Bug 23352: Turn on more compiler warnings in the Mac build
              https://bugs.webkit.org/show_bug.cgi?id=23352
      
              First patch: Fix some simple cases of various warnings.
      
              * pcre/pcre_compile.cpp:
              (jsRegExpCompile): Use const_cast to change const-ness.
      
              * runtime/StringPrototype.cpp:
              (JSC::substituteBackreferences): Remove unneeded initialization and
              use UChar instead of unsigned short for UTF-16 values.
      
              * wtf/dtoa.cpp:
              (WTF::strtod): Use const_cast to change const-ness.
      
      WebCore:
      
      2009-01-20  Darin Adler  <darin@apple.com>
      
              Reviewed by Mark Rowe.
      
              Bug 23352: Turn on more compiler warnings in the Mac build
              https://bugs.webkit.org/show_bug.cgi?id=23352
      
              First patch: Fix some simple cases of various warnings.
      
              * platform/DeprecatedPtrListImpl.cpp:
              (WebCore::DeprecatedPtrListImpl::insert): Use const_cast to change const-ness.
              * platform/graphics/mac/SimpleFontDataMac.mm:
              (WebCore::SimpleFontData::containsCharacters): Ditto.
      
              * platform/text/PlatformString.h: Overload for short and unsigned short to avoid
              ambiguity leading to warnings.
              * platform/text/String.cpp:
              (WebCore::String::number): Implemented overloads.
      
              * platform/text/TextStream.cpp:
              (WebCore::TextStream::operator<<): Overload for bool to avoid ambiguity leading
              to warnings.
              * platform/text/TextStream.h: Ditto.
      
              * rendering/InlineFlowBox.h: Fix declaration that was specifying the wrong type.
      
              * svg/graphics/filters/cg/WKLinearTransferFilter.m: Fix stray characters after
              #endif that should be a comment instead.
              * svg/graphics/filters/cg/WKSpecularLightingFilter.h: Ditto.
      
              * xml/XPathPath.h: Remove unneeded redundant declaration.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40059 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ed7a6435
  24. 25 Nov, 2008 1 commit
    • ap@webkit.org's avatar
      2008-11-25 David Levin <levin@chromium.org> · 6a0673f4
      ap@webkit.org authored
              Reviewed by Alexey Proskuryakov.
      
              Made the PreflightResultCache thread-safe in preparation for usage of XMLHttpRequest by
              Workers on threads.
      
              No observable change in behavior, so no test.
      
              * platform/text/PlatformString.h:
              * platform/text/String.cpp:
              (WebCore::String::substringCopy):
              * platform/text/StringImpl.cpp:
              (WebCore::StringImpl::substringCopy):
              * platform/text/StringImpl.h:
              Added the ability to copy a substring.
      
              * xml/XMLHttpRequest.cpp:
              (WebCore::PreflightResultCacheItem::PreflightResultCacheItem):
              (WebCore::PreflightResultCache::PreflightResultCache):
              (WebCore::PreflightResultCacheItem::addToAccessControlAllowList):
              (WebCore::PreflightResultCacheItem::parseAccessControlAllowList):
              (WebCore::PreflightResultCacheItem::parseAccessControlMaxAge):
              (WebCore::PreflightResultCacheItem::parse):
              (WebCore::PreflightResultCacheItem::allowsRequest):
              (WebCore::PreflightResultCache::shared):
              (WebCore::PreflightResultCache::appendEntry):
              (WebCore::PreflightResultCache::canSkipPreflight):
              (WebCore::XMLHttpRequest::makeCrossSiteAccessRequestWithPreflight):
              (WebCore::XMLHttpRequest::didReceiveResponsePreflight):
              Made the PreflightResultCache threadsafe.
      
              (WebCore::PreflightResultCacheItem::allowsCrossSiteMethod):
              (WebCore::PreflightResultCacheItem::allowsCrossSiteHeaders):
              Consolidation of duplicate logic.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@38756 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6a0673f4
  25. 18 Nov, 2008 1 commit
  26. 06 Nov, 2008 1 commit
  27. 05 Nov, 2008 2 commits
    • ddkilzer@apple.com's avatar
      Bug 21596: WebCore::Cache should use parsed Pragma and Cache-Control headers · b02df967
      ddkilzer@apple.com authored
              <https://bugs.webkit.org/show_bug.cgi?id=21596>
      
              Reviewed by Antti.
      
              This patch adds real parsing for Pragma and Cache-Control headers
              based on RFC 2616, Sections 2, 14.9 and 14.32.  It also adds some
              new String and StringImpl methods to assist with the parsing.
      
              * loader/Cache.cpp:
              (WebCore::Cache::dumpStats): Added.  Convenience method for dumping
              stats outside of Safari.
              * loader/Cache.h: Declared dumpStats().
      
              * loader/CachedResource.cpp:
              (WebCore::CachedResource::mustRevalidate): Updated to use
              ResourceResponseBase::cacheControlDirectives() instead of substring
              matching of the entire Cache-Control header.
      
              * loader/loader.cpp:
              (WebCore::Loader::Host::didReceiveResponse): Used the local
              'resource' variable instead of 'request->cachedResource()'.
      
              * platform/network/ResourceResponseBase.cpp:
              (WebCore::ResourceResponseBase::setHTTPHeaderField): Set
              m_haveParsedCacheControlHeader to false when a "Cache-Control"
              header is set.  Ditto for m_haveParsedPragmaHeader and "Pragma".
              (WebCore::ResourceResponseBase::parsePragmaDirectives): Added.
              Provides parsed Pragma header directives.
              (WebCore::ResourceResponseBase::parseCacheControlDirectives): Added.
              Provides parsed Cache-Control header directives.
              (WebCore::isCacheHeaderSeparator): Added.  Returns true if a
              character is a separator character per RFC 2616, Section 2.2, else
              returns false.
              (WebCore::isControlCharacter): Added.  Returns true if a character
              is a control character per RFC 2616 Section 2.2, else returns false.
              (WebCore::trimToNextSeparator): Added.  Returns a string truncated
              at the first separator character per isCacheHeaderSeparator().
              (WebCore::parseCacheHeader): Added.  This is the main parsing
              routine for both Cache-Control and Pragma headers.
              (WebCore::parseCacheControlDirectiveValues): Added.  This splits
              certain Cache-Control directive values into a vector of strings.
              * platform/network/ResourceResponseBase.h:
              (WebCore::CacheControlDirectiveMap): Added.  Typedef for a parsed
              Cache-Control header.
              (WebCore::PragmaDirectiveMap): Added.  Typedef for a parsed Pragma
              header.
              (WebCore::ResourceResponseBase::parsePragmaDirectives): Added
              declaration.
              (WebCore::ResourceResponseBase::parseCacheControlDirectives): Ditto.
              (WebCore::ResourceResponseBase::m_haveParsedCacheControlHeader):
              Added.  Boolean to describe when the "Cache-Control" header needs to
              be reparsed.
              (WebCore::ResourceResponseBase::m_haveParsedPragmaHeader):  Added.
              Boolean to describe when the "Pragma" header needs to be reparsed.
              (WebCore::ResourceResponseBase::m_cacheControlDirectiveMap): Added.
              Cached map to hold parsed "Cache-Control" headers.
              (WebCore::ResourceResponseBase::m_pragmaDirectiveMap): Added.
              Cached map to hold parsed "Pragma" headers.
      
              * platform/text/PlatformString.h:
              (WebCore::String::find): Added.  Returns the first match based on
              the character-matching function pointer passed in.
              (WebCore::String::removeCharacters): Added declaration.
              (WebCore::find): Added.  Inline method that takes a character-
              matching function pointer.  Called by StringImpl::find().
              * platform/text/String.cpp:
              (WebCore::String::removeCharacters): Added.  Calls
              StringImpl::removeCharacters().
              * platform/text/StringImpl.cpp:
              (WebCore::StringImpl::removeCharacters): Added.  Returns a string
              with all characters removed that match the character-matching
              function pointer passed in.  If there is no change to the string, it
              returns itself.  Based heavily on StringImpl::simplifyWhitespace().
              (WebCore::StringImpl::find): Added.  Calls WebCore::find().
              * platform/text/StringImpl.h:
              (WebCore::FindMatchFunctionPtr): Added.  Typedef for a character-
              matching function pointer.
              (WebCore::StringImpl::removeCharacters): Added declaration.
              (WebCore::StringImpl::find): Ditto.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@38145 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b02df967
    • cwzwarich@webkit.org's avatar
      2008-11-05 Cameron Zwarich <zwarich@apple.com> · 0b51a73b
      cwzwarich@webkit.org authored
              Rubber-stamped by Sam Weinig.
      
              Move more files to the runtime subdirectory of JavaScriptCore.
      
              JavaScriptCore:
      
              * API/APICast.h:
              * API/JSBase.cpp:
              * API/JSCallbackObject.cpp:
              * API/JSClassRef.cpp:
              * API/JSClassRef.h:
              * API/JSStringRefCF.cpp:
              * API/JSValueRef.cpp:
              * API/OpaqueJSString.cpp:
              * API/OpaqueJSString.h:
              * AllInOneFile.cpp:
              * GNUmakefile.am:
              * JavaScriptCore.pri:
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
              * JavaScriptCore.xcodeproj/project.pbxproj:
              * JavaScriptCoreSources.bkl:
              * VM/CodeBlock.h:
              * VM/CodeGenerator.cpp:
              * VM/Machine.cpp:
              * VM/RegisterFile.h:
              * debugger/Debugger.h:
              * kjs/SourceProvider.h:
              * kjs/TypeInfo.h: Removed.
              * kjs/collector.cpp: Removed.
              * kjs/collector.h: Removed.
              * kjs/completion.h: Removed.
              * kjs/create_hash_table:
              * kjs/identifier.cpp: Removed.
              * kjs/identifier.h: Removed.
              * kjs/interpreter.cpp: Removed.
              * kjs/interpreter.h: Removed.
              * kjs/lexer.cpp:
              * kjs/lexer.h:
              * kjs/lookup.cpp: Removed.
              * kjs/lookup.h: Removed.
              * kjs/nodes.cpp:
              * kjs/nodes.h:
              * kjs/operations.cpp: Removed.
              * kjs/operations.h: Removed.
              * kjs/protect.h: Removed.
              * kjs/regexp.cpp: Removed.
              * kjs/regexp.h: Removed.
              * kjs/ustring.cpp: Removed.
              * kjs/ustring.h: Removed.
              * pcre/pcre_exec.cpp:
              * profiler/CallIdentifier.h:
              * profiler/Profile.h:
              * runtime/ArrayConstructor.cpp:
              * runtime/ArrayPrototype.cpp:
              * runtime/ArrayPrototype.h:
              * runtime/Collector.cpp: Copied from kjs/collector.cpp.
              * runtime/Collector.h: Copied from kjs/collector.h.
              * runtime/CollectorHeapIterator.h:
              * runtime/Completion.h: Copied from kjs/completion.h.
              * runtime/ErrorPrototype.cpp:
              * runtime/Identifier.cpp: Copied from kjs/identifier.cpp.
              * runtime/Identifier.h: Copied from kjs/identifier.h.
              * runtime/InitializeThreading.cpp:
              * runtime/Interpreter.cpp: Copied from kjs/interpreter.cpp.
              * runtime/Interpreter.h: Copied from kjs/interpreter.h.
              * runtime/JSCell.h:
              * runtime/JSGlobalData.cpp:
              * runtime/JSGlobalData.h:
              * runtime/JSLock.cpp:
              * runtime/JSNumberCell.cpp:
              * runtime/JSNumberCell.h:
              * runtime/JSObject.cpp:
              * runtime/JSValue.h:
              * runtime/Lookup.cpp: Copied from kjs/lookup.cpp.
              * runtime/Lookup.h: Copied from kjs/lookup.h.
              * runtime/MathObject.cpp:
              * runtime/NativeErrorPrototype.cpp:
              * runtime/NumberPrototype.cpp:
              * runtime/Operations.cpp: Copied from kjs/operations.cpp.
              * runtime/Operations.h: Copied from kjs/operations.h.
              * runtime/PropertyMapHashTable.h:
              * runtime/Protect.h: Copied from kjs/protect.h.
              * runtime/RegExp.cpp: Copied from kjs/regexp.cpp.
              * runtime/RegExp.h: Copied from kjs/regexp.h.
              * runtime/RegExpConstructor.cpp:
              * runtime/RegExpObject.h:
              * runtime/RegExpPrototype.cpp:
              * runtime/SmallStrings.h:
              * runtime/StringObjectThatMasqueradesAsUndefined.h:
              * runtime/StructureID.cpp:
              * runtime/StructureID.h:
              * runtime/StructureIDTransitionTable.h:
              * runtime/SymbolTable.h:
              * runtime/TypeInfo.h: Copied from kjs/TypeInfo.h.
              * runtime/UString.cpp: Copied from kjs/ustring.cpp.
              * runtime/UString.h: Copied from kjs/ustring.h.
              * wrec/CharacterClassConstructor.h:
              * wrec/WREC.h:
      
              WebCore:
      
              * ForwardingHeaders/kjs/collector.h: Removed.
              * ForwardingHeaders/kjs/completion.h: Removed.
              * ForwardingHeaders/kjs/identifier.h: Removed.
              * ForwardingHeaders/kjs/interpreter.h: Removed.
              * ForwardingHeaders/kjs/lookup.h: Removed.
              * ForwardingHeaders/kjs/operations.h: Removed.
              * ForwardingHeaders/kjs/protect.h: Removed.
              * ForwardingHeaders/kjs/ustring.h: Removed.
              * ForwardingHeaders/runtime/Collector.h: Copied from ForwardingHeaders/kjs/collector.h.
              * ForwardingHeaders/runtime/Completion.h: Copied from ForwardingHeaders/kjs/completion.h.
              * ForwardingHeaders/runtime/Identifier.h: Copied from ForwardingHeaders/kjs/identifier.h.
              * ForwardingHeaders/runtime/Interpreter.h: Copied from ForwardingHeaders/kjs/interpreter.h.
              * ForwardingHeaders/runtime/Lookup.h: Copied from ForwardingHeaders/kjs/lookup.h.
              * ForwardingHeaders/runtime/Operations.h: Copied from ForwardingHeaders/kjs/operations.h.
              * ForwardingHeaders/runtime/Protect.h: Copied from ForwardingHeaders/kjs/protect.h.
              * ForwardingHeaders/runtime/UString.h: Copied from ForwardingHeaders/kjs/ustring.h.
              * bindings/js/GCController.cpp:
              * bindings/js/JSCustomPositionCallback.h:
              * bindings/js/JSCustomPositionErrorCallback.h:
              * bindings/js/JSCustomSQLStatementCallback.h:
              * bindings/js/JSCustomSQLStatementErrorCallback.h:
              * bindings/js/JSCustomSQLTransactionErrorCallback.h:
              * bindings/js/JSCustomVoidCallback.h:
              * bindings/js/JSDOMBinding.h:
              * bindings/js/JSDOMWindowBase.h:
              * bindings/js/JSEventListener.h:
              * bindings/js/ScheduledAction.h:
              * bindings/js/ScriptController.cpp:
              * bindings/js/ScriptController.h:
              * bindings/objc/WebScriptObject.mm:
              * bindings/scripts/CodeGeneratorJS.pm:
              * bridge/NP_jsobject.cpp:
              * bridge/c/c_class.cpp:
              * bridge/jni/jni_class.cpp:
              * bridge/jni/jni_jsobject.mm:
              * bridge/npruntime.cpp:
              * bridge/runtime_root.h:
              * history/CachedPage.h:
              * html/CanvasRenderingContext2D.cpp:
              * html/HTMLCanvasElement.cpp:
              * inspector/InspectorController.cpp:
              * inspector/JavaScriptCallFrame.cpp:
              * page/Console.cpp:
              * page/Page.cpp:
              * platform/text/AtomicString.cpp:
              * platform/text/PlatformString.h:
      
              WebKit/mac:
      
              * ForwardingHeaders/kjs/collector.h: Removed.
              * ForwardingHeaders/kjs/identifier.h: Removed.
              * ForwardingHeaders/kjs/interpreter.h: Removed.
              * ForwardingHeaders/kjs/lookup.h: Removed.
              * ForwardingHeaders/kjs/operations.h: Removed.
              * ForwardingHeaders/kjs/protect.h: Removed.
              * ForwardingHeaders/runtime/Interpreter.h: Copied from ForwardingHeaders/kjs/interpreter.h.
              * WebView/WebScriptDebugDelegate.mm:
      
              WebKit/wx:
      
              * WebFrame.cpp:
              * WebView.cpp:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@38137 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0b51a73b
  28. 30 Oct, 2008 1 commit
  29. 12 Oct, 2008 1 commit
    • weinig@apple.com's avatar
      2008-10-12 Sam Weinig <sam@webkit.org> · 68017dfd
      weinig@apple.com authored
              Reviewed by Darin Adler.
      
              Fix for https://bugs.webkit.org/show_bug.cgi?id=21560
              Layering violation: String should not be responsible for creating Lengths
      
              It was a layering violation for String to know haw to parse
              into Lengths, LengthArrays, and CoordsArrays.
      
              * GNUmakefile.am:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * WebCoreSources.bkl:
              * html/HTMLAreaElement.cpp:
              (WebCore::HTMLAreaElement::parseMappedAttribute):
              * html/HTMLFrameSetElement.cpp:
              (WebCore::HTMLFrameSetElement::parseMappedAttribute):
              * platform/text/AtomicString.h:
              (WebCore::AtomicString::percentage):
              * platform/text/PlatformString.h:
              * platform/text/String.cpp:
              * platform/text/StringImpl.cpp:
              * platform/text/StringImpl.h:
              * rendering/Length.cpp: Added.
              (WebCore::parseLength):
              (WebCore::countCharacter):
              (WebCore::newCoordsArray):
              (WebCore::newLengthArray):
              * rendering/Length.h:
              (WebCore::LengthSize::LengthSize):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37527 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      68017dfd
  30. 06 Oct, 2008 1 commit
  31. 29 Sep, 2008 1 commit
    • mrowe@apple.com's avatar
      Speed up computedStyle.getPropertyValue('color') by 4.5x. · 512eca0f
      mrowe@apple.com authored
      Using a Vector<UChar> while building up the property's cssText is substantially cheaper than using String::operator+=
      as it avoids many memory reallocations.
      
      This also speeds up the jQuery .offset() benchmark at <http://dev.jquery.com/~john/speed/1.2.6/offset-1.2.6.html>
      by 20% due to jQuery's strange need to call getPropertyValue('color') when retrieving the computed styles for
      unrelated properties on an element.
      
      Reviewed by Oliver Hunt.
      
      * css/CSSPrimitiveValue.cpp:
      (WebCore::CSSPrimitiveValue::cssText): Build the result for the color types into a Vector<UChar>
      and use appendNumber rather than the String::number in order to cut down on memory allocations.
      * platform/text/PlatformString.h:
      (WebCore::appendNumber): A helper function for formatting an unsigned character as a number
      into a Vector<UChar>.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37054 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      512eca0f
  32. 07 Sep, 2008 1 commit
    • cwzwarich@webkit.org's avatar
      2008-09-07 Cameron Zwarich <cwzwarich@uwaterloo.ca> · 3f782f6a
      cwzwarich@webkit.org authored
              Reviewed by Maciej Stachowiak.
      
              Bug 20704: Replace the KJS namespace
              <https://bugs.webkit.org/show_bug.cgi?id=20704>
      
              Rename the KJS namespace to JSC. There are still some uses of KJS in
              preprocessor macros and comments, but these will also be changed some
              time in the near future. There are also some uses in the names of JNI
              functions, but I will check if these are safe to change as well.
      
              JavaScriptCore:
      
              * API/APICast.h:
              (toJS):
              (toRef):
              (toGlobalRef):
              * API/JSBase.cpp:
              * API/JSCallbackConstructor.cpp:
              * API/JSCallbackConstructor.h:
              * API/JSCallbackFunction.cpp:
              * API/JSCallbackFunction.h:
              * API/JSCallbackObject.cpp:
              * API/JSCallbackObject.h:
              * API/JSCallbackObjectFunctions.h:
              * API/JSClassRef.cpp:
              (OpaqueJSClass::staticValues):
              (OpaqueJSClass::staticFunctions):
              * API/JSClassRef.h:
              * API/JSContextRef.cpp:
              * API/JSObjectRef.cpp:
              * API/JSProfilerPrivate.cpp:
              * API/JSStringRef.cpp:
              * API/JSValueRef.cpp:
              (JSValueGetType):
              * API/OpaqueJSString.cpp:
              * API/OpaqueJSString.h:
              * JavaScriptCore.Debug.exp:
              * JavaScriptCore.base.exp:
              * VM/CTI.cpp:
              (JSC::):
              * VM/CTI.h:
              * VM/CodeBlock.cpp:
              * VM/CodeBlock.h:
              * VM/CodeGenerator.cpp:
              * VM/CodeGenerator.h:
              * VM/ExceptionHelpers.cpp:
              * VM/ExceptionHelpers.h:
              * VM/Instruction.h:
              * VM/JSPropertyNameIterator.cpp:
              * VM/JSPropertyNameIterator.h:
              * VM/LabelID.h:
              * VM/Machine.cpp:
              * VM/Machine.h:
              * VM/Opcode.cpp:
              * VM/Opcode.h:
              * VM/Register.h:
              (WTF::):
              * VM/RegisterFile.cpp:
              * VM/RegisterFile.h:
              * VM/RegisterID.h:
              (WTF::):
              * VM/SamplingTool.cpp:
              * VM/SamplingTool.h:
              * VM/SegmentedVector.h:
              * kjs/ArgList.cpp:
              * kjs/ArgList.h:
              * kjs/Arguments.cpp:
              * kjs/Arguments.h:
              * kjs/ArrayConstructor.cpp:
              * kjs/ArrayConstructor.h:
              * kjs/ArrayPrototype.cpp:
              * kjs/ArrayPrototype.h:
              * kjs/BatchedTransitionOptimizer.h:
              * kjs/BooleanConstructor.cpp:
              * kjs/BooleanConstructor.h:
              * kjs/BooleanObject.cpp:
              * kjs/BooleanObject.h:
              * kjs/BooleanPrototype.cpp:
              * kjs/BooleanPrototype.h:
              * kjs/CallData.cpp:
              * kjs/CallData.h:
              * kjs/ClassInfo.h:
              * kjs/CommonIdentifiers.cpp:
              * kjs/CommonIdentifiers.h:
              * kjs/ConstructData.cpp:
              * kjs/ConstructData.h:
              * kjs/DateConstructor.cpp:
              * kjs/DateConstructor.h:
              * kjs/DateInstance.cpp:
              (JSC::DateInstance::msToGregorianDateTime):
              * kjs/DateInstance.h:
              * kjs/DateMath.cpp:
              * kjs/DateMath.h:
              * kjs/DatePrototype.cpp:
              * kjs/DatePrototype.h:
              * kjs/DebuggerCallFrame.cpp:
              * kjs/DebuggerCallFrame.h:
              * kjs/Error.cpp:
              * kjs/Error.h:
              * kjs/ErrorConstructor.cpp:
              * kjs/ErrorConstructor.h:
              * kjs/ErrorInstance.cpp:
              * kjs/ErrorInstance.h:
              * kjs/ErrorPrototype.cpp:
              * kjs/ErrorPrototype.h:
              * kjs/ExecState.cpp:
              * kjs/ExecState.h:
              * kjs/FunctionConstructor.cpp:
              * kjs/FunctionConstructor.h:
              * kjs/FunctionPrototype.cpp:
              * kjs/FunctionPrototype.h:
              * kjs/GetterSetter.cpp:
              * kjs/GetterSetter.h:
              * kjs/GlobalEvalFunction.cpp:
              * kjs/GlobalEvalFunction.h:
              * kjs/IndexToNameMap.cpp:
              * kjs/IndexToNameMap.h:
              * kjs/InitializeThreading.cpp:
              * kjs/InitializeThreading.h:
              * kjs/InternalFunction.cpp:
              * kjs/InternalFunction.h:
              (JSC::InternalFunction::InternalFunction):
              * kjs/JSActivation.cpp:
              * kjs/JSActivation.h:
              * kjs/JSArray.cpp:
              * kjs/JSArray.h:
              * kjs/JSCell.cpp:
              * kjs/JSCell.h:
              * kjs/JSFunction.cpp:
              * kjs/JSFunction.h:
              (JSC::JSFunction::JSFunction):
              * kjs/JSGlobalData.cpp:
              (JSC::JSGlobalData::JSGlobalData):
              * kjs/JSGlobalData.h:
              * kjs/JSGlobalObject.cpp:
              * kjs/JSGlobalObject.h:
              * kjs/JSGlobalObjectFunctions.cpp:
              * kjs/JSGlobalObjectFunctions.h:
              * kjs/JSImmediate.cpp:
              * kjs/JSImmediate.h:
              * kjs/JSLock.cpp:
              * kjs/JSLock.h:
              * kjs/JSNotAnObject.cpp:
              * kjs/JSNotAnObject.h:
              * kjs/JSNumberCell.cpp:
              * kjs/JSNumberCell.h:
              * kjs/JSObject.cpp:
              * kjs/JSObject.h:
              * kjs/JSStaticScopeObject.cpp:
              * kjs/JSStaticScopeObject.h:
              * kjs/JSString.cpp:
              * kjs/JSString.h:
              * kjs/JSType.h:
              * kjs/JSValue.cpp:
              * kjs/JSValue.h:
              * kjs/JSVariableObject.cpp:
              * kjs/JSVariableObject.h:
              * kjs/JSWrapperObject.cpp:
              * kjs/JSWrapperObject.h:
              * kjs/LabelStack.cpp:
              * kjs/LabelStack.h:
              * kjs/MathObject.cpp:
              * kjs/MathObject.h:
              * kjs/NativeErrorConstructor.cpp:
              * kjs/NativeErrorConstructor.h:
              * kjs/NativeErrorPrototype.cpp:
              * kjs/NativeErrorPrototype.h:
              * kjs/NodeInfo.h:
              * kjs/NumberConstructor.cpp:
              * kjs/NumberConstructor.h:
              * kjs/NumberObject.cpp:
              * kjs/NumberObject.h:
              * kjs/NumberPrototype.cpp:
              * kjs/NumberPrototype.h:
              * kjs/ObjectConstructor.cpp:
              * kjs/ObjectConstructor.h:
              * kjs/ObjectPrototype.cpp:
              * kjs/ObjectPrototype.h:
              * kjs/Parser.cpp:
              * kjs/Parser.h:
              * kjs/PropertyMap.cpp:
              (JSC::PropertyMapStatisticsExitLogger::~PropertyMapStatisticsExitLogger):
              * kjs/PropertyMap.h:
              * kjs/PropertyNameArray.cpp:
              * kjs/PropertyNameArray.h:
              * kjs/PropertySlot.cpp:
              * kjs/PropertySlot.h:
              * kjs/PrototypeFunction.cpp:
              * kjs/PrototypeFunction.h:
              * kjs/PutPropertySlot.h:
              * kjs/RegExpConstructor.cpp:
              * kjs/RegExpConstructor.h:
              * kjs/RegExpObject.cpp:
              * kjs/RegExpObject.h:
              * kjs/RegExpPrototype.cpp:
              * kjs/RegExpPrototype.h:
              * kjs/ScopeChain.cpp:
              * kjs/ScopeChain.h:
              * kjs/ScopeChainMark.h:
              * kjs/Shell.cpp:
              (jscmain):
              * kjs/SmallStrings.cpp:
              * kjs/SmallStrings.h:
              * kjs/SourceProvider.h:
              * kjs/SourceRange.h:
              * kjs/StringConstructor.cpp:
              * kjs/StringConstructor.h:
              * kjs/StringObject.cpp:
              * kjs/StringObject.h:
              * kjs/StringObjectThatMasqueradesAsUndefined.h:
              * kjs/StringPrototype.cpp:
              * kjs/StringPrototype.h:
              * kjs/StructureID.cpp:
              * kjs/StructureID.h:
              * kjs/SymbolTable.h:
              * kjs/collector.cpp:
              * kjs/collector.h:
              * kjs/completion.h:
              * kjs/create_hash_table:
              * kjs/debugger.cpp:
              * kjs/debugger.h:
              * kjs/dtoa.cpp:
              * kjs/dtoa.h:
              * kjs/grammar.y:
              * kjs/identifier.cpp:
              * kjs/identifier.h:
              (JSC::Identifier::equal):
              * kjs/interpreter.cpp:
              * kjs/interpreter.h:
              * kjs/lexer.cpp:
              (JSC::Lexer::Lexer):
              (JSC::Lexer::clear):
              (JSC::Lexer::makeIdentifier):
              * kjs/lexer.h:
              * kjs/lookup.cpp:
              * kjs/lookup.h:
              * kjs/nodes.cpp:
              * kjs/nodes.h:
              * kjs/nodes2string.cpp:
              * kjs/operations.cpp:
              * kjs/operations.h:
              * kjs/protect.h:
              * kjs/regexp.cpp:
              * kjs/regexp.h:
              * kjs/ustring.cpp:
              * kjs/ustring.h:
              (JSC::operator!=):
              (JSC::IdentifierRepHash::hash):
              (WTF::):
              * masm/MacroAssembler.h:
              * masm/MacroAssemblerWin.cpp:
              * masm/X86Assembler.h:
              * pcre/pcre_exec.cpp:
              * profiler/CallIdentifier.h:
              (WTF::):
              * profiler/HeavyProfile.cpp:
              * profiler/HeavyProfile.h:
              * profiler/Profile.cpp:
              * profiler/Profile.h:
              * profiler/ProfileGenerator.cpp:
              * profiler/ProfileGenerator.h:
              * profiler/ProfileNode.cpp:
              * profiler/ProfileNode.h:
              * profiler/Profiler.cpp:
              * profiler/Profiler.h:
              * profiler/TreeProfile.cpp:
              * profiler/TreeProfile.h:
              * wrec/WREC.cpp:
              * wrec/WREC.h:
              * wtf/AVLTree.h:
      
              WebCore:
      
              * WebCore.base.exp:
              * bindings/js/GCController.cpp:
              * bindings/js/JSAttrCustom.cpp:
              * bindings/js/JSAudioConstructor.cpp:
              * bindings/js/JSAudioConstructor.h:
              (WebCore::JSAudioConstructor::classInfo):
              * bindings/js/JSCSSRuleCustom.cpp:
              * bindings/js/JSCSSStyleDeclarationCustom.cpp:
              * bindings/js/JSCSSValueCustom.cpp:
              * bindings/js/JSCanvasPixelArrayCustom.cpp:
              * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
              * bindings/js/JSClipboardCustom.cpp:
              * bindings/js/JSConsoleCustom.cpp:
              * bindings/js/JSCustomSQLStatementCallback.cpp:
              (WebCore::JSCustomSQLStatementCallback::handleEvent):
              * bindings/js/JSCustomSQLStatementCallback.h:
              (WebCore::JSCustomSQLStatementCallback::create):
              * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
              (WebCore::JSCustomSQLStatementErrorCallback::handleEvent):
              * bindings/js/JSCustomSQLStatementErrorCallback.h:
              (WebCore::JSCustomSQLStatementErrorCallback::create):
              * bindings/js/JSCustomSQLTransactionCallback.cpp:
              (WebCore::JSCustomSQLTransactionCallback::handleEvent):
              * bindings/js/JSCustomSQLTransactionCallback.h:
              (WebCore::JSCustomSQLTransactionCallback::create):
              * bindings/js/JSCustomSQLTransactionErrorCallback.cpp:
              (WebCore::JSCustomSQLTransactionErrorCallback::handleEvent):
              * bindings/js/JSCustomSQLTransactionErrorCallback.h:
              (WebCore::JSCustomSQLTransactionErrorCallback::create):
              * bindings/js/JSCustomVoidCallback.cpp:
              (WebCore::JSCustomVoidCallback::handleEvent):
              * bindings/js/JSCustomVoidCallback.h:
              (WebCore::JSCustomVoidCallback::create):
              * bindings/js/JSCustomXPathNSResolver.cpp:
              (WebCore::JSCustomXPathNSResolver::create):
              * bindings/js/JSCustomXPathNSResolver.h:
              * bindings/js/JSDOMApplicationCacheCustom.cpp:
              (WebCore::JSDOMApplicationCache::dispatchEvent):
              * bindings/js/JSDOMBinding.cpp:
              (WebCore::jsOwnedStringOrNull):
              * bindings/js/JSDOMBinding.h:
              (WebCore::DOMObject::DOMObject):
              (WebCore::cacheDOMObject):
              (WebCore::cacheSVGDOMObject):
              (WebCore::DOMExceptionTranslator::DOMExceptionTranslator):
              (WebCore::toJS):
              * bindings/js/JSDOMWindowBase.cpp:
              * bindings/js/JSDOMWindowBase.h:
              (WebCore::JSDOMWindowBase::classInfo):
              (WebCore::JSDOMWindowBase::d):
              * bindings/js/JSDOMWindowCustom.cpp:
              (WebCore::JSDOMWindow::getPropertyAttributes):
              * bindings/js/JSDOMWindowCustom.h:
              (WebCore::asJSDOMWindow):
              (WebCore::JSDOMWindow::customGetOwnPropertySlot):
              (WebCore::JSDOMWindow::customPut):
              (WebCore::JSDOMWindowBase::allowsAccessFrom):
              (WebCore::JSDOMWindowBase::allowsAccessFromNoErrorMessage):
              * bindings/js/JSDOMWindowShell.cpp:
              (WebCore::JSDOMWindowShell::getPropertyAttributes):
              * bindings/js/JSDOMWindowShell.h:
              (WebCore::JSDOMWindowShell::classInfo):
              * bindings/js/JSDatabaseCustom.cpp:
              * bindings/js/JSDocumentCustom.cpp:
              * bindings/js/JSDocumentFragmentCustom.cpp:
              * bindings/js/JSElementCustom.cpp:
              * bindings/js/JSEventCustom.cpp:
              * bindings/js/JSEventListener.cpp:
              * bindings/js/JSEventListener.h:
              (WebCore::JSUnprotectedEventListener::create):
              (WebCore::JSEventListener::create):
              * bindings/js/JSEventTargetBase.cpp:
              * bindings/js/JSEventTargetBase.h:
              (WebCore::JSEventTargetBase::getValueProperty):
              (WebCore::JSEventTargetBase::putValueProperty):
              (WebCore::JSEventTargetBase::getOwnPropertySlot):
              (WebCore::JSEventTargetBase::put):
              (WebCore::JSEventTargetPrototype::JSEventTargetPrototype):
              (WebCore::JSEventTargetPrototype::self):
              (WebCore::JSEventTargetPrototype::getOwnPropertySlot):
              (WebCore::JSEventTargetPrototype::classInfo):
              * bindings/js/JSEventTargetNode.cpp:
              * bindings/js/JSEventTargetNode.h:
              (WebCore::JSEventTargetNode::getOwnPropertySlot):
              (WebCore::JSEventTargetNode::getValueProperty):
              (WebCore::JSEventTargetNode::put):
              (WebCore::JSEventTargetNode::putValueProperty):
              * bindings/js/JSHTMLAllCollection.h:
              (WebCore::JSHTMLAllCollection::JSHTMLAllCollection):
              (WebCore::JSHTMLAllCollection::toBoolean):
              * bindings/js/JSHTMLAppletElementCustom.cpp:
              * bindings/js/JSHTMLCollectionCustom.cpp:
              * bindings/js/JSHTMLDocumentCustom.cpp:
              * bindings/js/JSHTMLElementCustom.cpp:
              * bindings/js/JSHTMLEmbedElementCustom.cpp:
              * bindings/js/JSHTMLFormElementCustom.cpp:
              * bindings/js/JSHTMLFrameElementCustom.cpp:
              * bindings/js/JSHTMLFrameSetElementCustom.cpp:
              * bindings/js/JSHTMLIFrameElementCustom.cpp:
              * bindings/js/JSHTMLInputElementBase.cpp:
              (WebCore::JSHTMLInputElementBase::JSHTMLInputElementBase):
              (WebCore::JSHTMLInputElementBase::getOwnPropertySlot):
              * bindings/js/JSHTMLInputElementBase.h:
              (WebCore::JSHTMLInputElementBase::classInfo):
              * bindings/js/JSHTMLObjectElementCustom.cpp:
              * bindings/js/JSHTMLOptionElementConstructor.cpp:
              * bindings/js/JSHTMLOptionElementConstructor.h:
              (WebCore::JSHTMLOptionElementConstructor::classInfo):
              * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
              * bindings/js/JSHTMLSelectElementCustom.cpp:
              (WebCore::selectIndexSetter):
              (WebCore::JSHTMLSelectElement::indexSetter):
              * bindings/js/JSHTMLSelectElementCustom.h:
              * bindings/js/JSHistoryCustom.cpp:
              * bindings/js/JSImageConstructor.cpp:
              * bindings/js/JSImageConstructor.h:
              (WebCore::JSImageConstructor::classInfo):
              * bindings/js/JSInspectedObjectWrapper.cpp:
              * bindings/js/JSInspectedObjectWrapper.h:
              (WebCore::JSInspectedObjectWrapper::wrapOutgoingValue):
              (WebCore::JSInspectedObjectWrapper::classInfo):
              * bindings/js/JSInspectorCallbackWrapper.cpp:
              * bindings/js/JSInspectorCallbackWrapper.h:
              (WebCore::JSInspectorCallbackWrapper::classInfo):
              (WebCore::JSInspectorCallbackWrapper::wrapOutgoingValue):
              * bindings/js/JSJavaScriptCallFrameCustom.cpp:
              * bindings/js/JSLocationCustom.cpp:
              * bindings/js/JSMimeTypeArrayCustom.cpp:
              * bindings/js/JSNSResolver.cpp:
              * bindings/js/JSNSResolver.h:
              (WebCore::JSNSResolver::create):
              * bindings/js/JSNamedNodeMapCustom.cpp:
              * bindings/js/JSNamedNodesCollection.cpp:
              (WebCore::JSNamedNodesCollection::JSNamedNodesCollection):
              * bindings/js/JSNamedNodesCollection.h:
              (WebCore::JSNamedNodesCollection::classInfo):
              * bindings/js/JSNavigatorCustom.cpp:
              * bindings/js/JSNodeCustom.cpp:
              * bindings/js/JSNodeFilterCondition.cpp:
              (WebCore::JSNodeFilterCondition::acceptNode):
              * bindings/js/JSNodeFilterCondition.h:
              (WebCore::JSNodeFilterCondition::create):
              * bindings/js/JSNodeFilterCustom.cpp:
              * bindings/js/JSNodeIteratorCustom.cpp:
              * bindings/js/JSNodeListCustom.cpp:
              * bindings/js/JSPluginArrayCustom.cpp:
              * bindings/js/JSPluginCustom.cpp:
              * bindings/js/JSPluginElementFunctions.cpp:
              (WebCore::getRuntimeObject):
              * bindings/js/JSPluginElementFunctions.h:
              * bindings/js/JSQuarantinedObjectWrapper.cpp:
              (WebCore::JSQuarantinedObjectWrapper::construct):
              (WebCore::JSQuarantinedObjectWrapper::call):
              * bindings/js/JSQuarantinedObjectWrapper.h:
              (WebCore::JSQuarantinedObjectWrapper::unwrappedObject):
              (WebCore::JSQuarantinedObjectWrapper::unwrappedGlobalObject):
              (WebCore::JSQuarantinedObjectWrapper::className):
              * bindings/js/JSRGBColor.cpp:
              * bindings/js/JSRGBColor.h:
              (WebCore::JSRGBColor::classInfo):
              * bindings/js/JSSQLResultSetRowListCustom.cpp:
              * bindings/js/JSSQLTransactionCustom.cpp:
              * bindings/js/JSSVGLazyEventListener.cpp:
              * bindings/js/JSSVGLazyEventListener.h:
              * bindings/js/JSSVGLengthCustom.cpp:
              * bindings/js/JSSVGMatrixCustom.cpp:
              (WebCore::JSSVGMatrix::inverse):
              (WebCore::JSSVGMatrix::rotateFromVector):
              * bindings/js/JSSVGPathSegCustom.cpp:
              * bindings/js/JSSVGPathSegListCustom.cpp:
              (WebCore::JSSVGPathSegList::initialize):
              (WebCore::JSSVGPathSegList::getItem):
              (WebCore::JSSVGPathSegList::insertItemBefore):
              (WebCore::JSSVGPathSegList::replaceItem):
              (WebCore::JSSVGPathSegList::removeItem):
              (WebCore::JSSVGPathSegList::appendItem):
              * bindings/js/JSSVGPointListCustom.cpp:
              * bindings/js/JSSVGTransformListCustom.cpp:
              * bindings/js/JSStorageCustom.cpp:
              * bindings/js/JSStyleSheetCustom.cpp:
              * bindings/js/JSStyleSheetListCustom.cpp:
              * bindings/js/JSTextCustom.cpp:
              * bindings/js/JSTreeWalkerCustom.cpp:
              * bindings/js/JSXMLHttpRequestConstructor.cpp:
              * bindings/js/JSXMLHttpRequestConstructor.h:
              (WebCore::JSXMLHttpRequestConstructor::classInfo):
              * bindings/js/JSXMLHttpRequestCustom.cpp:
              * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
              * bindings/js/JSXSLTProcessorConstructor.cpp:
              * bindings/js/JSXSLTProcessorConstructor.h:
              (WebCore::JSXSLTProcessorConstructor::classInfo):
              * bindings/js/JSXSLTProcessorCustom.cpp:
              * bindings/js/ScheduledAction.cpp:
              * bindings/js/ScheduledAction.h:
              * bindings/js/ScriptController.cpp:
              (WebCore::ScriptController::attachDebugger):
              (WebCore::ScriptController::windowScriptNPObject):
              * bindings/js/ScriptController.h:
              * bindings/js/ScriptControllerGtk.cpp:
              (WebCore::ScriptController::createScriptInstanceForWidget):
              * bindings/js/ScriptControllerMac.mm:
              (WebCore::ScriptController::createScriptInstanceForWidget):
              (WebCore::ScriptController::windowScriptObject):
              (WebCore::ScriptController::clearPlatformScriptObjects):
              (WebCore::updateRenderingForBindings):
              (WebCore::ScriptController::initJavaJSBindings):
              * bindings/js/ScriptControllerQt.cpp:
              (WebCore::ScriptController::createScriptInstanceForWidget):
              * bindings/js/ScriptControllerWin.cpp:
              (WebCore::ScriptController::createScriptInstanceForWidget):
              * bindings/js/ScriptControllerWx.cpp:
              (WebCore::ScriptController::createScriptInstanceForWidget):
              * bindings/js/StringSourceProvider.h:
              (WebCore::StringSourceProvider::getRange):
              * bindings/objc/DOM.mm:
              (-[DOMNode JSC::Bindings::]):
              * bindings/objc/DOMInternal.h:
              * bindings/objc/DOMInternal.mm:
              (-[WebScriptObject _initializeScriptDOMNodeImp]):
              * bindings/objc/DOMUtility.mm:
              (JSC::createDOMWrapper):
              (WebCore::createDOMWrapper):
              * bindings/objc/WebScriptObject.mm:
              (WebCore::createJSWrapper):
              (-[WebScriptObject _initWithJSObject:JSC::originRootObject:JSC::Bindings::rootObject:JSC::Bindings::]):
              * bindings/objc/WebScriptObjectPrivate.h:
              * bindings/scripts/CodeGeneratorJS.pm:
              * bridge/NP_jsobject.cpp:
              * bridge/NP_jsobject.h:
              * bridge/c/c_class.cpp:
              * bridge/c/c_class.h:
              * bridge/c/c_instance.cpp:
              * bridge/c/c_instance.h:
              * bridge/c/c_runtime.cpp:
              * bridge/c/c_runtime.h:
              * bridge/c/c_utility.cpp:
              * bridge/c/c_utility.h:
              * bridge/jni/jni_class.cpp:
              * bridge/jni/jni_class.h:
              * bridge/jni/jni_instance.cpp:
              * bridge/jni/jni_instance.h:
              * bridge/jni/jni_jsobject.h:
              * bridge/jni/jni_jsobject.mm:
              (JavaJSObject::call):
              (JavaJSObject::convertJObjectToValue):
              * bridge/jni/jni_objc.mm:
              (JSC::Bindings::dispatchJNICall):
              * bridge/jni/jni_runtime.cpp:
              * bridge/jni/jni_runtime.h:
              * bridge/jni/jni_utility.cpp:
              * bridge/jni/jni_utility.h:
              * bridge/npruntime.cpp:
              (_NPN_GetStringIdentifier):
              * bridge/objc/WebScriptObject.h:
              * bridge/objc/objc_class.h:
              * bridge/objc/objc_class.mm:
              * bridge/objc/objc_instance.h:
              * bridge/objc/objc_instance.mm:
              * bridge/objc/objc_runtime.h:
              * bridge/objc/objc_runtime.mm:
              * bridge/objc/objc_utility.h:
              * bridge/objc/objc_utility.mm:
              * bridge/qt/qt_class.cpp:
              * bridge/qt/qt_class.h:
              * bridge/qt/qt_instance.cpp:
              * bridge/qt/qt_instance.h:
              * bridge/qt/qt_runtime.cpp:
              (JSC::Bindings::convertQVariantToValue):
              (JSC::Bindings::):
              * bridge/qt/qt_runtime.h:
              * bridge/runtime.cpp:
              * bridge/runtime.h:
              * bridge/runtime_array.cpp:
              * bridge/runtime_array.h:
              * bridge/runtime_method.cpp:
              * bridge/runtime_method.h:
              * bridge/runtime_object.cpp:
              * bridge/runtime_object.h:
              * bridge/runtime_root.cpp:
              (JSC::Bindings::RootObject::invalidate):
              (JSC::Bindings::RootObject::gcProtect):
              (JSC::Bindings::RootObject::gcUnprotect):
              * bridge/runtime_root.h:
              * bridge/testbindings.cpp:
              * bridge/testbindings.mm:
              * bridge/testqtbindings.cpp:
              * dom/Document.cpp:
              (WebCore::Document::~Document):
              * dom/NSResolver.h:
              * dom/Node.cpp:
              (WebCore::Node::setDocument):
              (WebCore::ResolveNamespaceFunctor::ResolveNamespaceFunctor):
              (WebCore::resolveNamespacesForSelector):
              (WebCore::Node::querySelector):
              (WebCore::Node::querySelectorAll):
              * dom/Node.h:
              * dom/NodeFilter.cpp:
              * dom/NodeFilter.h:
              * dom/NodeFilterCondition.cpp:
              * dom/NodeFilterCondition.h:
              * dom/NodeIterator.cpp:
              * dom/NodeIterator.h:
              * dom/Traversal.cpp:
              * dom/Traversal.h:
              * dom/TreeWalker.cpp:
              * dom/TreeWalker.h:
              * dom/make_names.pl:
              * history/CachedPage.cpp:
              * history/CachedPage.h:
              * html/HTMLPlugInElement.cpp:
              (WebCore::HTMLPlugInElement::getInstance):
              * html/HTMLPlugInElement.h:
              * loader/FrameLoader.cpp:
              * loader/FrameLoader.h:
              * loader/icon/IconDatabase.cpp:
              (WebCore::iconDatabase):
              * page/Console.cpp:
              * page/Console.h:
              * page/InspectorController.cpp:
              (WebCore::XMLHttpRequestResource::XMLHttpRequestResource):
              (WebCore::XMLHttpRequestResource::~XMLHttpRequestResource):
              (WebCore::InspectorResource::setXMLHttpRequestProperties):
              (WebCore::InspectorResource::sourceString):
              (WebCore::getResourceDocumentNode):
              (WebCore::search):
              (WebCore::InspectorController::focusNode):
              (WebCore::InspectorController::inspectedWindowScriptObjectCleared):
              (WebCore::InspectorController::addDatabaseScriptResource):
              (WebCore::InspectorController::resourceRetrievedByXMLHttpRequest):
              * page/InspectorController.h:
              (WebCore::InspectorController::profiles):
              * page/JavaScriptCallFrame.cpp:
              (WebCore::JavaScriptCallFrame::scopeChain):
              * page/JavaScriptCallFrame.h:
              (WebCore::JavaScriptCallFrame::create):
              (WebCore::JavaScriptCallFrame::update):
              * page/JavaScriptDebugListener.h:
              * page/JavaScriptDebugServer.cpp:
              (WebCore::dispatchDidParseSource):
              * page/JavaScriptDebugServer.h:
              * page/JavaScriptProfile.cpp:
              * page/JavaScriptProfile.h:
              * page/JavaScriptProfileNode.cpp:
              (WebCore::getTotalTime):
              (WebCore::getSelfTime):
              (WebCore::getTotalPercent):
              (WebCore::getSelfPercent):
              (WebCore::getNumberOfCalls):
              (WebCore::getChildren):
              (WebCore::getVisible):
              * page/JavaScriptProfileNode.h:
              * page/Page.cpp:
              (WebCore::Page::setDebuggerForAllPages):
              (WebCore::Page::setDebugger):
              * page/Page.h:
              (WebCore::Page::debugger):
              * page/mac/FrameMac.mm:
              * platform/KURL.h:
              (WebCore::KURL::operator JSC::UString):
              * platform/text/AtomicString.cpp:
              (WebCore::AtomicString::add):
              (WebCore::AtomicString::find):
              * platform/text/AtomicString.h:
              (WebCore::AtomicString::AtomicString):
              * platform/text/PlatformString.h:
              * platform/text/String.cpp:
              (WebCore::charactersToDouble):
              * platform/win/BString.cpp:
              * platform/win/BString.h:
              * plugins/MimeTypeArray.h:
              * plugins/Plugin.h:
              * plugins/PluginArray.h:
              * plugins/PluginView.cpp:
              (WebCore::PluginView::start):
              (WebCore::PluginView::performRequest):
              (WebCore::PluginView::bindingInstance):
              * plugins/PluginView.h:
              * plugins/gtk/PluginViewGtk.cpp:
              (WebCore::PluginView::paint):
              (WebCore::PluginView::handleKeyboardEvent):
              (WebCore::PluginView::handleMouseEvent):
              (WebCore::PluginView::setNPWindowRect):
              (WebCore::PluginView::stop):
              (WebCore::PluginView::init):
              * plugins/qt/PluginViewQt.cpp:
              (WebCore::PluginView::setNPWindowRect):
              (WebCore::PluginView::stop):
              (WebCore::PluginView::init):
              * plugins/win/PluginViewWin.cpp:
              (WebCore::PluginView::dispatchNPEvent):
              (WebCore::PluginView::handleKeyboardEvent):
              (WebCore::PluginView::handleMouseEvent):
              (WebCore::PluginView::setNPWindowRect):
              (WebCore::PluginView::stop):
              * storage/Database.cpp:
              (WebCore::Database::Database):
              * xml/XMLHttpRequest.cpp:
              (WebCore::XMLHttpRequest::responseText):
              (WebCore::XMLHttpRequest::loadRequestAsynchronously):
              (WebCore::XMLHttpRequest::clearResponse):
              (WebCore::XMLHttpRequest::dropProtection):
              (WebCore::XMLHttpRequest::didFinishLoading):
              (WebCore::XMLHttpRequest::didReceiveData):
              * xml/XMLHttpRequest.h:
      
              WebKit/gtk:
      
              * webkit/webkitprivate.cpp:
              (webkit_init):
      
              WebKit/mac:
      
              * Misc/WebCoreStatistics.mm:
              * Plugins/WebBaseNetscapePluginStream.mm:
              (-[WebBaseNetscapePluginStream wantsAllStreams]):
              * Plugins/WebBaseNetscapePluginView.mm:
              (-[WebBaseNetscapePluginView sendEvent:isDrawRect:]):
              (-[WebBaseNetscapePluginView setWindowIfNecessary]):
              (-[WebBaseNetscapePluginView start]):
              (-[WebBaseNetscapePluginView createPluginScriptableObject]):
              (-[WebBaseNetscapePluginView evaluateJavaScriptPluginRequest:]):
              (-[WebBaseNetscapePluginView webFrame:didFinishLoadWithReason:]):
              (-[WebBaseNetscapePluginView loadPluginRequest:]):
              (-[WebBaseNetscapePluginView _printedPluginBitmap]):
              * Plugins/WebPluginController.mm:
              (+[WebPluginController plugInViewWithArguments:fromPluginPackage:]):
              (-[WebPluginController startAllPlugins]):
              (-[WebPluginController stopAllPlugins]):
              (-[WebPluginController addPlugin:]):
              (-[WebPluginController destroyPlugin:]):
              (-[WebPluginController destroyAllPlugins]):
              * WebView/WebFrame.mm:
              * WebView/WebScriptDebugDelegate.mm:
              * WebView/WebScriptDebugger.h:
              * WebView/WebScriptDebugger.mm:
              * WebView/WebView.mm:
              (-[WebViewPrivate init]):
      
              WebKit/qt:
              
              * Api/qwebframe.cpp:
              (QWebFrame::addToJavaScriptWindowObject):
              (QWebFrame::evaluateJavaScript):
      
              WebKit/win:
      
              * WebCoreStatistics.cpp:
              * WebJavaScriptCollector.cpp:
              * WebScriptCallFrame.cpp:
              (WebScriptCallFrame::jsValueToString):
              * WebScriptCallFrame.h:
              (WebScriptCallFrame::state):
              * WebView.cpp:
              (WebView::WebView):
              (WebView::stringByEvaluatingJavaScriptFromString):
      
              WebKit/wx:
      
              * WebFrame.cpp:
              (wxWebFrame::RunScript):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36263 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3f782f6a
  33. 04 Sep, 2008 1 commit
  34. 03 Sep, 2008 1 commit
    • eric@webkit.org's avatar
      Reviewed by Sam. · 3eefe679
      eric@webkit.org authored
              https://bugs.webkit.org/show_bug.cgi?id=20620
      
              Add #if USE(JSC) around KJS dependencies
              Remove !USE(JAVASCRIPTCORE_BINDINGS) support for 3 reasons:
              1. Most platforms have it on anyway
              2. V8 is going to want to share some of that code
              3. Those platforms which want it off, should have a separate file instead of an #ifdef in our .cpp
      
              * bindings/js/JSPluginElementFunctions.cpp: remove !USE(JAVASCRIPTCORE_BINDINGS) support
              * config.h: change JAVASCRIPTCORE_BINDINGS to JSC and add USE(V8)
              * html/HTMLAppletElement.cpp: remove USE(JAVASCRIPTCORE_BINDINGS) wrappers
              * html/HTMLAppletElement.h: remove USE(JAVASCRIPTCORE_BINDINGS) wrappers
              * html/HTMLEmbedElement.cpp: remove USE(JAVASCRIPTCORE_BINDINGS) wrappers
              * html/HTMLEmbedElement.h: remove USE(JAVASCRIPTCORE_BINDINGS) wrappers
              * html/HTMLObjectElement.cpp: remove USE(JAVASCRIPTCORE_BINDINGS) wrappers
              * html/HTMLObjectElement.h: remove USE(JAVASCRIPTCORE_BINDINGS) wrappers
              * html/HTMLPlugInElement.cpp: replace USE(JAVASCRIPTCORE_BINDINGS) with USE(JSC) where needed
              * html/HTMLPlugInElement.h: replace USE(JAVASCRIPTCORE_BINDINGS) with USE(JSC) where needed
              * platform/text/AtomicString.cpp: add USE(JSC)
              * platform/text/AtomicString.h: add USE(JSC)
              * platform/text/PlatformString.h: add USE(JSC)
              * platform/text/String.cpp: add USE(JSC)
              * platform/text/StringImpl.cpp: add USE(JSC)
              * platform/text/StringImpl.h: add USE(JSC)
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36073 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3eefe679
  35. 16 Jun, 2008 1 commit
  36. 27 Apr, 2008 1 commit
    • darin@apple.com's avatar
      JavaScriptCore: · 3beb3006
      darin@apple.com authored
      2008-04-25  Darin Adler  <darin@apple.com>
      
              Reviewed by Maciej.
      
              - fix <rdar://problem/5657459> REGRESSION: JavaScriptCore no longer builds with
                GCC 4.2 due to pointer aliasing warnings
      
              Fix this by removing the HashTable optimizations that allowed us to share a back end
              implementation between hash tables with integers, pointers, RefPtr, and String objects
              as keys. The way it worked was incompatible with strict aliasing.
      
              This increases code size. On Mac OS X we'll have to regenerate .order files to avoid
              slowing down Safari startup times.
      
              This creates a slight slowdown in SunSpider, mitigated by the following four speedups:
      
              - speed up array put slightly by moving a branch (was already done for get)
      
              - speed up symbol table access by adding a function named inlineGet to HashMap
                and using that in symbolTableGet/Put
      
              - speed up PropertyNameArray creation by reducing the amount of reference count
                churn and uniqueness checking when adding names and not doing any allocation at
                all when building small arrays
      
              - speed up conversion of strings to floating point numbers by eliminating the
                malloc/free of the buffer for the ASCII copy of the string; a way to make
                things even faster would be to change strtod to take a UTF-16 string
      
              Note that there is considerable unused complexity now in HashSet/Map/Table to support
              "storage types", which is no longer used. Will do in a separate patch.
      
              * API/JSCallbackObjectFunctions.h:
              (KJS::JSCallbackObject<Base>::getPropertyNames): Removed explicit cast to Identifier to
              take advantage of the new PropertyNameArray::add overload and avoid reference count churn.
              * API/JSObjectRef.cpp:
              (JSPropertyNameAccumulatorAddName): Ditto.
              * JavaScriptCore.exp: Updated PropertyNameArray::add entry point name.
      
              * kjs/JSVariableObject.cpp: Removed now-unneeded IdentifierRepHashTraits::nullRepPtr
              definition (see below).
              (KJS::JSVariableObject::getPropertyNames): Removed explicit cast to Identifier.
      
              * kjs/JSVariableObject.h:
              (KJS::JSVariableObject::symbolTableGet): Use inlineGet for speed. Also changed to do
              early exit instead of nesting the body inside an if.
              (KJS::JSVariableObject::symbolTablePut): Ditto.
      
              * kjs/PropertyNameArray.cpp:
              (KJS::PropertyNameArray::add): Changed implementation to take a raw pointer instead of
              a reference to an identifier. Do uniqueness checking by searching the vector when the
              vector is short, only building the set once the vector is large enough.
      
              * kjs/PropertyNameArray.h: Added an overload of add for a raw pointer, and made the old
              add function call that one. Added an addKnownUnique function for use when the new
              name is known to be different from any other in the array. Changed the vector to have
              an inline capacity of 20.
      
              * kjs/SymbolTable.h: Changed IdentifierRepHash to inherit from the default hash for
              a RefPtr so we don't have to define so much. Added an overload of the hash function for
              a raw pointer as required by the new RefPtrHashMap. Got rid of the now-unneeded
              IdentifierRepHashTraits -- the default traits now work fine. Added a definition of
              empthValueIsZero to SymbolTableIndexHashTraits; not having it was incorrect, but harmless.
      
              * kjs/array_instance.cpp:
              (KJS::ArrayInstance::put): Move the maxArrayIndex check inside the branch that checks
              the index against the length, as done in the get function.
      
              * kjs/function.cpp:
              (KJS::globalFuncKJSPrint): Changed to use the new getCString instead of cstring.
      
              * kjs/internal.cpp: Removed printInfo debugging function, a client of cstring.
              If we need a debugging function we can easily make a better one and we haven't
              used this one in a long time.
              * kjs/internal.h: Ditto.
      
              * kjs/object.cpp:
              (KJS::JSObject::getPropertyNames): Removed explicit cast to Identifier.
              * kjs/property_map.cpp:
              (KJS::PropertyMap::getEnumerablePropertyNames): Ditto. Also added a special case for
              the case where the propertyNames array is empty -- in that case we know we're adding
              a set of names that are non-overlapping so we can use addKnownUnique.
              * kjs/ustring.cpp:
              (KJS::UString::getCString): Replaces cstring. Puts the C string into a CStringBuffer,
              which is a char Vector with an inline capacity. Also returns a boolean to indicate if
              the converion was lossy, which eliminates the need for a separate is8Bit call.
              (KJS::UString::toDouble): Changed to call getCString instead of cstring.
              * kjs/ustring.h: Ditto.
      
              * wtf/HashFunctions.h: Overload the hash and equal functions for RefPtr's default
              hash to take raw pointers. This works with the changes to RefPtrHashMap to avoid
              introducing refcount churn.
      
              * wtf/HashMap.h: Removed special code to convert the deleted value to the empty value
              when writing a new value into the map. This is now handled elsewhere.
              (WTF::HashMap::get): Removed code that checks for an empty hash table before calling
              HashTable::lookup; it's slightly more efficient to do this check inside lookup.
      
              * wtf/HashTable.h:
              (WTF::HashTable::isDeletedBucket): Changed to use isDeletedValue instead of using
              deletedValue and the equality operator.
              (WTF::HashTable::deleteBucket): Changed to use constructDeletedValue instead of
              using deletedValue and the assignment operator.
              (WTF::HashTable::checkKey): Added. Factors out the check for values that are empty
              or deleted keys that's used in various functions below.
              (WTF::HashTable::lookup): Changed to use checkKey, check for a 0 table, and also
              made public for use by RefPtrHashMap.
              (WTF::HashTable::lookupForWriting): Changed to use checkKey.
              (WTF::HashTable::fullLookupForWriting): Changed to use checkKey.
              (WTF::HashTable::add): Changed to use checkKey, and call initializeBucket on a
              deleted bucket before putting a new entry into it.
              (WTF::HashTable::addPassingHashCode): Ditto.
              (WTF::HashTable::deallocateTable): Check isDeletedBucket before calling ~ValueType.
      
              * wtf/HashTraits.h: Got ridd of all the HashTraits specialization for the integer
              types, since GeneicHashTraitsBase already deals with integers separately. Put the
              deleted value support into GenericHashTraitsBase. Changed FloatHashTraits to
              inherit from GenericHashTraits, and define construct/isDeletedValue rather than
              deletedValue. Removed the ref and deref functions from RefPtr's HashTraits, and
              defined construct/isDeletedValue. Eliminated DeletedValueAssigner. Changed
              PairHashTraits to define construct/isDeletedValue, and also merged
              PairBaseHashTraits in with PairHashTraits. Got rid of all specialization of
              HashKeyStorageTraits. We'll remove that, and the needsRef data member, later.
      
              * wtf/RefPtr.h: Added HashTableDeletedValueType, an enum type with a single value,
              HashTableDeletedValue. Used that type to make a new constructor to construct
              deleted values and also added an isHashTableDeletedValue function.
      
              * wtf/RefPtrHashMap.h: Added RefPtrHashMapRawKeyTranslator and used it to implement
              the raw pointer functions. This is a way to continue to avoid refcount thrash. We
              can't use the old way because it depended on the underlying map using a non-RefPtr
              type.
              (WTF::HashMap::find): Use find with RefPtrHashMapRawKeyTranslator.
              (WTF::HashMap::contains): Use contains with RefPtrHashMapRawKeyTranslator.
              (WTF::HashMap::inlineAdd): Use add with RefPtrHashMapRawKeyTranslator.
              (WTF::HashMap::get): Removed code that checks for an empty hash table before calling
              HashTable::lookup; it's slightly more efficient to do this check inside lookup.
              (WTF::HashMap::inlineGet): Added. Just like get, but marked inline for use in the
              symbol table code.
      
      WebCore:
      
      2008-04-25  Darin Adler  <darin@apple.com>
      
              Reviewed by Maciej.
      
              - update for compatibility with HashTable that no longer has optimization to share
                implementation between hash tables with integers, pointers, RefPtr, and String
                objects as keys
      
              * bindings/js/JSSVGPODTypeWrapper.h:
              (WebCore::PODTypeReadWriteHashInfo::PODTypeReadWriteHashInfo): Added constructor
              for HashTableDeletedValue.
              (WebCore::PODTypeReadWriteHashInfo::isHashTableDeletedValue): Added.
              (WebCore::PODTypeReadWriteHashInfoTraits::constructDeletedValue): Added.
              (WebCore::PODTypeReadWriteHashInfoTraits::isDeletedValue): Added.
      
              * dom/Document.cpp: Made changedDocuments internal to the file rather than a
              static data member of Document.
              (WebCore::FormElementKey::ref): Removed unneeded check for deleted value -- this
              will never be called on a deleted element.
              (WebCore::FormElementKey::deref): Ditto.
      
              * dom/Document.h: Added HashTableDeletedValue constructor and isHashTableDeletedValue
              to FormElementKey. Changed FormElementKeyHashTraits to use construct/isDeletedValue.
              Got rid of the changedDocuments data member. Changed iconURL to be an inline that
              returns a const String&.
      
              * dom/StyledElement.cpp: Changed MappedAttributeKeyTraits to use
              construct/isDeletedValue.
      
              * page/mac/AXObjectCacheMac.mm:
              (WebCore::AXObjectCache::getAXID): Call isDeletedValue instead of deletedValue.
      
              * platform/SecurityOriginHash.h: Added overload so that SecurityOriginHash can work
              with raw pointers as well as RefPt (helpful with the new RefPtrHashMap). Eliminated
              SecurityOriginTraits, since we can now use the default traits. Changed the value of
              safeToCompareToEmptyOrDeleted to false, since it's not safe to compare a deleted
              value using this hash function. I don't think it was safe before either; I'm not sure
              why it didn't cause a problem before.
      
              * platform/cf/SchedulePair.h: Removed SchedulePairTraits -- custom traits are no
              longer needed.
      
              * platform/graphics/FontCache.cpp:
              (WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey): Added constructor
              for HashTableDeletedValue.
              (WebCore::FontPlatformDataCacheKey::isHashTableDeletedValue): Added.
              (WebCore::FontPlatformDataCacheKey::hashTableDeletedSize): Added.
              (WebCore::FontPlatformDataCacheKeyTraits::constructDeletedValue): Added.
              (WebCore::FontPlatformDataCacheKeyTraits::isDeletedValue): Added.
              (WebCore::FontDataCacheKeyTraits::constructDeletedValue): Added.
              (WebCore::FontDataCacheKeyTraits::isDeletedValue): Added.
      
              * platform/graphics/IntSizeHash.h: Changed HashTraits<IntSize> to use
              construct/isDeletedValue.
      
              * platform/graphics/mac/FontPlatformData.h:
              (WebCore::FontPlatformData::FontPlatformData): Added constructor for
              HashTableDeletedValue.
              (WebCore::FontPlatformData::isHashTableDeletedValue): Added.
              (WebCore::FontPlatformData::hashTableDeletedFontValue): Added.
      
              * platform/text/PlatformString.h:
              (WebCore::String::swap): Added. Avoids any refcount churn when swapping two strings.
              (WebCore::String::String): Added constructor for HashTableDeletedValue.
              (WebCore::String::isHashTableDeletedValue): Added.
              (WebCore::swap): Added. Avoids any refcount churn when swapping two strings.
      
              * platform/text/StringHash.h: Changed specialization of HashTraits for
              WebCore::String to use the deleted value now defined in that class and removed
              the code to do ref/deref. Removed HashKeyStorageTraits specializations.
              
              * platform/win/COMPtr.h: Changed specialization of HashTraits for
              COMPtr to use the deleted value now defined in that class and removed
              the code to do ref/deref. Removed HashKeyStorageTraits specializations.
              (COMPtr::COMPtr): Added constructor for HashTableDeletedValue.
              (COMPtr::isHashTableDeletedValue): Added.
              (COMPtr::query): Removed inline keyword not needed since functions defined in the
              class definition are automatically marked inline.
              (COMPtr::hashTableDeletedValue): Added.
      
              * storage/DatabaseTracker.h: Removed now-unneeded SecurityOriginTraits.
              * storage/LocalStorage.h: Ditto.
              * storage/OriginQuotaManager.h: Ditto.
              * storage/SessionStorage.h: Ditto.
      
              * svg/SVGAnimatedTemplate.h:
              (WebCore::SVGAnimatedTypeWrapperKey::SVGAnimatedTypeWrapperKey): Added constructor
              for HashTableDeletedValue.
              (WebCore::SVGAnimatedTypeWrapperKey::isHashTableDeletedValue): Added.
              (WebCore::SVGAnimatedTypeWrapperKeyHashTraits::constructDeletedValue): Added.
              (WebCore::SVGAnimatedTypeWrapperKeyHashTraits::isDeletedValue): Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@32609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3beb3006