1. 12 Nov, 2009 1 commit
    • aroben@apple.com's avatar
      Replace worldIDs with world objects · f6cbb76a
      aroben@apple.com authored
      Part of <http://webkit.org/b/31414> Implement new SPI for dealing with
      user scripts/stylesheets and isolated worlds
      
      Reviewed by Sam Weinig.
      
      WebCore:
      
      Covered by existing tests.
      
      * WebCore.base.exp: Update exported symbols to match what now exists
      and is needed by WebKit.
      
      * bindings/js/ScheduledAction.cpp:
      (WebCore::ScheduledAction::execute): Updated for function rename.
      
      * bindings/js/ScriptController.cpp: Removed code that dealt with
      worldIDs.
      (WebCore::ScriptController::createWorld): Added. Returns a new world
      suitable for use on the main thread.
      (WebCore::ScriptController::executeScriptInWorld): Renamed from
      executeScriptInIsolatedWorld, since this works just fine with a
      "normal" world.
      
      * bindings/js/ScriptController.h: Added createWorld, removed functions
      that took worldIDs, renamed executeScriptInIsolatedWorld to
      executeScriptInWorld.
      
      * page/Frame.cpp:
      (WebCore::Frame::injectUserScripts):
      (WebCore::Frame::injectUserScriptsForWorld):
      Updated for changes to UserScriptMap and ScriptController.
      
      * page/Frame.h: Changed injectUserScriptsForWorld to take a
      DOMWrapperWorld* instead of a worldID.
      
      * page/PageGroup.cpp:
      (WebCore::PageGroup::addUserScriptToWorld):
      (WebCore::PageGroup::addUserStyleSheetToWorld):
      (WebCore::PageGroup::removeUserScriptFromWorld):
      (WebCore::PageGroup::removeUserStyleSheetFromWorld):
      (WebCore::PageGroup::removeUserScriptsFromWorld):
      (WebCore::PageGroup::removeUserStyleSheetsFromWorld):
      * page/PageGroup.h:
      Changed these functions to take a DOMWrapperWorld* instead of a
      worldID. Also updated for changes to UserScript and UserStyleSheet.
      
      * page/UserScript.h:
      * page/UserStyleSheet.h: Changed not to hold a worldID, since it was
      never used.
      
      * page/UserScriptTypes.h:
      * page/UserStyleSheetTypes.h: Changed UserScriptMap and
      UserStyleSheetMap to use a RefPtr<DOMWrapperWorld> instead of a
      worldID as their key type.
      
      WebKit:
      
      * WebKit.xcodeproj/project.pbxproj: Added WebScriptWorld to the project.
      
      WebKit/mac:
      
      WebScriptWorld is the new object that represents a world.  The only
      place worldID is still used is in -[WebFrame
      _stringByEvaluatingJavaScriptInIsolatedWorld:WithGlobalObject:FromString:],
      but that will change soon.
      
      * WebKit.exp: Export WebScriptWorld.
      
      * WebView/WebFrame.mm:
      (-[WebFrame _stringByEvaluatingJavaScriptInIsolatedWorld:WithGlobalObject:FromString:]):
      Moved the bizarre world caching/creation logic that DRT depends on
      here from the findWorld function in ScriptController.cpp. Updated to
      use ScriptController::executeScriptInWorld instead of
      ScriptController::executeScriptInIsolatedWorld.
      (-[WebFrame _contextForWorld:]): Renamed from contextForWorldID:. Now
      takes a WebScriptWorld.
      
      * WebView/WebFramePrivate.h: Replaced contextForWorldID: with
      _contextForWorld:.
      
      * WebView/WebScriptWorld.h: Added.
      * WebView/WebScriptWorld.mm: Added.
      (-[WebScriptWorld initWithWorld:]): Store the passed-in world in our
      _private member.
      (-[WebScriptWorld init]): Create a new DOMWrapperWorld and pass it to
      -initWithWorld:.
      (-[WebScriptWorld dealloc]): Release _private.
      (+[WebScriptWorld standardWorld]): Returns a shared instance that
      represents WebCore's mainThreadNormalWorld().
      (+[WebScriptWorld world]): Returns a new instance.
      (core): Returns the DOMWrapperWorld for this WebScriptWorld.
      
      * WebView/WebScriptWorldInternal.h: Added.
      
      * WebView/WebView.mm:
      (+[WebView _addUserScriptToGroup:world:source:url:whitelist:blacklist:injectionTime:]):
      (+[WebView _addUserStyleSheetToGroup:world:source:url:whitelist:blacklist:]):
      (+[WebView _removeUserScriptFromGroup:world:url:]):
      (+[WebView _removeUserStyleSheetFromGroup:world:url:]):
      (+[WebView _removeUserScriptsFromGroup:world:]):
      (+[WebView _removeUserStyleSheetsFromGroup:world:]):
      * WebView/WebViewPrivate.h:
      Changed these functions to take a WebScriptWorld instead of a worldID.
      
      WebKit/win:
      
      WebScriptWorld is the new object that represents a world.  The only
      place worldID is still used is in
      IWebFramePrivate::stringByEvaluatingJavaScriptInIsolatedWorld, but
      that will change soon.
      
      * ForEachCoClass.h: Added WebScriptWorld.
      
      * Interfaces/IWebFramePrivate.idl: Replaced contextForWorldID with
      contextForWorld.
      
      * Interfaces/IWebScriptWorld.idl: Added.
      
      * Interfaces/IWebViewPrivate.idl: Changed the user script/stylesheet
      functions to take an IWebScriptWorld instead of a worldID.
      
      * Interfaces/WebKit.idl: Added WebScriptWorld.
      
      * WebFrame.cpp:
      (WebFrame::contextForWorld): Renamed from contextForWorldID. Now takes
      an IWebScriptWorld.
      (WebFrame::stringByEvaluatingJavaScriptInIsolatedWorld): Moved the
      bizarre world caching/creation logic that DRT depends on here from the
      findWorld function in ScriptController.cpp. Updated to use
      ScriptController::executeScriptInWorld instead of
      ScriptController::executeScriptInIsolatedWorld.
      
      * WebFrame.h: Replaced contextForWorldID with contextForWorld.
      
      * WebScriptWorld.cpp: Added.
      (WebScriptWorld::WebScriptWorld):
      (WebScriptWorld::~WebScriptWorld):
      (WebScriptWorld::createInstance):
      (WebScriptWorld::AddRef):
      (WebScriptWorld::Release):
      (WebScriptWorld::QueryInterface):
      Standard COM class implementations.
      
      (WebScriptWorld::standardWorld): Returns a shared instance that represents
      WebCore's mainThreadNormalWorld().
      
      * WebScriptWorld.h: Added.
      (WebScriptWorld::world): Simple getter.
      
      * WebKit.vcproj/Interfaces.vcproj: Added IWebScriptWorld.idl.
      
      * WebKit.vcproj/WebKit.vcproj: Added WebScriptWorld.
      
      * WebKitClassFactory.cpp: Added WebScriptWorld.
      
      * WebView.cpp:
      (WebView::addUserScriptToGroup):
      (WebView::addUserStyleSheetToGroup):
      (WebView::removeUserScriptFromGroup):
      (WebView::removeUserStyleSheetFromGroup):
      (WebView::removeUserScriptsFromGroup):
      (WebView::removeUserStyleSheetsFromGroup):
      * WebView.h:
      Changed these functions to take an IWebScriptWorld instead of a worldID.
      
      WebKitTools:
      
      * DumpRenderTree/mac/LayoutTestControllerMac.mm:
      (LayoutTestController::addUserScript):
      (LayoutTestController::addUserStyleSheet):
      * DumpRenderTree/win/LayoutTestControllerWin.cpp:
      (LayoutTestController::addUserScript):
      (LayoutTestController::addUserStyleSheet):
      Changed these functions to create a new WebJSWorld each time they're
      called and to pass that world to WebKit.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50907 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f6cbb76a
  2. 11 Nov, 2009 1 commit
    • barraclough@apple.com's avatar
      Simplify the ownership model for worlds - rather than having a pair of weak references · b8c62238
      barraclough@apple.com authored
      between DOMWrapperWorld and ScriptController/ScriptCachedFrameData, give the latter an
      ref pointer to the former.  This reduces complexity & cost of the caching entries in the
      back forward cache.
      
      Patch by Gavin Barraclough <barraclough@apple.com> on 2009-11-10
      Reviewed by Geoff Garen.
      
      * WebCore.base.exp:
      * bindings/js/JSDOMBinding.cpp:
      (WebCore::DOMWrapperWorld::~DOMWrapperWorld):
      * bindings/js/JSDOMBinding.h:
      (WebCore::DOMWrapperWorld::forgetDocument):
      * bindings/js/ScriptCachedFrameData.cpp:
      (WebCore::ScriptCachedFrameData::ScriptCachedFrameData):
      (WebCore::ScriptCachedFrameData::restore):
      (WebCore::ScriptCachedFrameData::clear):
      * bindings/js/ScriptCachedFrameData.h:
      * bindings/js/ScriptController.cpp:
      (WebCore::ScriptController::~ScriptController):
      (WebCore::ScriptController::clearWindowShell):
      (WebCore::ScriptController::initScript):
      (WebCore::ScriptController::updateDocument):
      * bindings/js/ScriptController.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50792 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b8c62238
  3. 10 Nov, 2009 1 commit
    • barraclough@apple.com's avatar
      Fix back/forwards cache with JSC isolated worlds. · ace5339c
      barraclough@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=31310
      <rdar://problem/7328111> Cached back navigation doesn't restore global object in extension isolated world
      
      Patch by Gavin Barraclough <barraclough@apple.com> on 2009-11-10
      Reviewed by Geoff Garen.
      
      Store the global object for all worlds, not just the normal world.
      Also maintain bidirectional weak references between the ScriptCachedFrameData and the DOMWrapperWorld,
      so we can forget global objects if a world goes away.
      
      * bindings/js/JSDOMBinding.cpp:
      (WebCore::DOMWrapperWorld::~DOMWrapperWorld):
      * bindings/js/JSDOMBinding.h:
      (WebCore::DOMWrapperWorld::rememberScriptCachedFrameData):
      (WebCore::DOMWrapperWorld::forgetScriptCachedFrameData):
      * bindings/js/ScriptCachedFrameData.cpp:
      (WebCore::ScriptCachedFrameData::ScriptCachedFrameData):
      (WebCore::ScriptCachedFrameData::forgetWorld):
      (WebCore::ScriptCachedFrameData::domWindow):
      (WebCore::ScriptCachedFrameData::restore):
      (WebCore::ScriptCachedFrameData::clear):
      * bindings/js/ScriptCachedFrameData.h:
      * bindings/js/ScriptController.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50767 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ace5339c
  4. 28 Oct, 2009 1 commit
    • steveblock@google.com's avatar
      Adds ScriptController::intializeThreading(), with both JSC and V8 implementations. · c1639276
      steveblock@google.com authored
      https://bugs.webkit.org/show_bug.cgi?id=30678
      
      Reviewed by Eric Seidel.
      
      This new method is used from common code, rather than calling JSC::initializeThreading() (or the V8 equivalent) directly.
      
      Build fix, no new tests required.
      
      * bindings/js/ScriptController.cpp: Modified.
      (WebCore::ScriptController::initializeThreading): Added.
      * bindings/js/ScriptController.h: Modified. Adds ScriptController::initializeThreading().
      * bindings/v8/ScriptController.cpp: Modified.
      (WebCore::ScriptController::initializeThreading): Added.
      * bindings/v8/ScriptController.h: Modified. Adds ScriptController::initializeThreading().
      * loader/icon/IconDatabase.cpp: Modified.
      (WebCore::iconDatabase): Call ScriptController::initializeThreading(), rather than JSC::initializeThreading().
      * storage/Database.cpp: Modified.
      (WebCore::Database::Database): Call ScriptController::initializeThreading(), rather than JSC::initializeThreading().
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50215 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c1639276
  5. 23 Oct, 2009 1 commit
    • barraclough@apple.com's avatar
      https://bugs.webkit.org/show_bug.cgi?id=30729 · 8616dbc0
      barraclough@apple.com authored
      Provide private API to request the global context for a specific world.
      Used to initialize parameters on the global object.
      
      Patch by Gavin Barraclough <barraclough@apple.com> on 2009-10-23
      Reviewed by Geoff Garen.
      
      WebCore: 
      
      * bindings/js/ScriptController.cpp:
      (WebCore::ScriptController::globalObject):
      * bindings/js/ScriptController.h:
      
      WebKit/mac: 
      
      * WebView/WebFramePrivate.h:
      * WebView/WebFrame.mm:
      (-[WebFrame contextForWorldID:]):
      
      WebKit/win: 
      
      * WebFrame.cpp:
      (WebFrame::contextForWorldID):
      * WebFrame.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50012 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8616dbc0
  6. 22 Oct, 2009 1 commit
    • barraclough@apple.com's avatar
      WebCore: https://bugs.webkit.org/show_bug.cgi?id=30696 · c53df831
      barraclough@apple.com authored
      Add support for IsolatedWorlds to JSC bindings.
      
      Patch by Gavin Barraclough <barraclough@apple.com> on 2009-10-16
      Reviewed by Sam Weinig & Geoff Garen.
      
      An IsolatedWorld is basically a parallel, separate copy of the window shells and DOM wrapper objects for
      a given document.  To support isolation this patch:
      
          * Adds support to the ScriptController to track multiple window shells, one per world.
          * Adds support to Document to support multiple separate wrapper-maps, one per world.
          * Replaces the single global DOM wrapper map (on the WebCoreJSClientData) with separate maps,
            stored on the (new) IsolatedWorld objects.
      
      In addition to supporting separate copies of these objects, two other features are supported:
      
          * It is necessary to track the current world on entry into JSC, so that within callbacks out to WebCore
            we can determine which world (and as such, set of DOM bindings) we should be operating on.
          * EventListeners & Callbacks are run in the world they were registered in.
            This requires the handler to retain a reference to the world.
      
      No new tests. (Enabled existing isolated world layout tests.)
      
      * WebCore.base.exp:
      * bindings/js/JSAbstractWorkerCustom.cpp:
      (WebCore::JSAbstractWorker::addEventListener):
      (WebCore::JSAbstractWorker::removeEventListener):
      * bindings/js/JSCallbackData.cpp:
      (WebCore::JSCallbackData::invokeCallback):
      * bindings/js/JSCallbackData.h:
      (WebCore::JSCallbackData::JSCallbackData):
      * bindings/js/JSCustomXPathNSResolver.cpp:
      (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
      * bindings/js/JSDOMApplicationCacheCustom.cpp:
      (WebCore::JSDOMApplicationCache::addEventListener):
      (WebCore::JSDOMApplicationCache::removeEventListener):
      * bindings/js/JSDOMBinding.cpp:
      (WebCore::removeWrappers):
      (WebCore::DOMObjectWrapperMap::get):
      (WebCore::DOMObjectWrapperMap::set):
      (WebCore::DOMObjectWrapperMap::remove):
      (WebCore::DOMObjectWrapperMap::take):
      (WebCore::IsolatedWorld::IsolatedWorld):
      (WebCore::IsolatedWorld::~IsolatedWorld):
      (WebCore::EnterIsolatedWorld::EnterIsolatedWorld):
      (WebCore::EnterIsolatedWorld::~EnterIsolatedWorld):
      (WebCore::JSGlobalDataWorldIterator::JSGlobalDataWorldIterator):
      (WebCore::JSGlobalDataWorldIterator::operator bool):
      (WebCore::JSGlobalDataWorldIterator::operator*):
      (WebCore::JSGlobalDataWorldIterator::operator->):
      (WebCore::JSGlobalDataWorldIterator::operator++):
      (WebCore::getCurrentWorld):
      (WebCore::getNormalWorld):
      (WebCore::commonNormalWorld):
      (WebCore::commonCurrentWorld):
      (WebCore::DOMObjectHashTableMap::mapFor):
      (WebCore::DOMObjectWrapperMap::mapFor):
      (WebCore::forgetDOMObject):
      (WebCore::getCachedDOMNodeWrapper):
      (WebCore::forgetDOMNode):
      (WebCore::cacheDOMNodeWrapper):
      (WebCore::forgetAllDOMNodesForDocument):
      (WebCore::forgetWorldOfDOMNodesForDocument):
      (WebCore::isObservableThroughDOM):
      (WebCore::markDOMNodesForDocument):
      (WebCore::markActiveObjectsForContext):
      (WebCore::takeWrappers):
      (WebCore::updateDOMNodeDocument):
      (WebCore::markDOMObjectWrapper):
      (WebCore::allowsAccessFromFrame):
      (WebCore::printErrorMessageForFrame):
      (WebCore::JSC_DebuggerCallFrame_evaluateInWorld):
      (WebCore::JSC_callInWorld):
      (WebCore::JSC_constructInWorld):
      (WebCore::JSC_evaluateInWorld):
      * bindings/js/JSDOMBinding.h:
      (WebCore::IsolatedWorld::rememberDocument):
      (WebCore::IsolatedWorld::forgetDocument):
      (WebCore::IsolatedWorld::rememberScriptController):
      (WebCore::IsolatedWorld::forgetScriptController):
      (WebCore::DOMObjectHashTableMap::~DOMObjectHashTableMap):
      (WebCore::DOMObjectHashTableMap::get):
      (WebCore::WebCoreJSClientData::WebCoreJSClientData):
      (WebCore::WebCoreJSClientData::currentWorld):
      (WebCore::WebCoreJSClientData::normalWorld):
      (WebCore::WebCoreJSClientData::rememberWorld):
      (WebCore::WebCoreJSClientData::forgetWorld):
      (WebCore::debuggerWorld):
      (WebCore::pluginWorld):
      * bindings/js/JSDOMGlobalObject.cpp:
      (WebCore::JSDOMGlobalObject::createJSAttributeEventListener):
      (WebCore::toJSDOMGlobalObject):
      * bindings/js/JSDOMGlobalObject.h:
      * bindings/js/JSDOMWindowBase.cpp:
      (WebCore::JSDOMWindowBase::printErrorMessage):
      (WebCore::JSDOMWindowBase::commonJSGlobalData):
      (WebCore::toJS):
      (WebCore::toJSDOMWindow):
      * bindings/js/JSDOMWindowBase.h:
      * bindings/js/JSDOMWindowCustom.cpp:
      (WebCore::createWindow):
      (WebCore::JSDOMWindow::open):
      (WebCore::JSDOMWindow::showModalDialog):
      (WebCore::JSDOMWindow::setTimeout):
      (WebCore::JSDOMWindow::setInterval):
      (WebCore::JSDOMWindow::addEventListener):
      (WebCore::JSDOMWindow::removeEventListener):
      * bindings/js/JSDOMWindowShell.cpp:
      (WebCore::toJS):
      (WebCore::toJSDOMWindowShell):
      * bindings/js/JSDOMWindowShell.h:
      * bindings/js/JSDesktopNotificationsCustom.cpp:
      (WebCore::JSNotification::addEventListener):
      (WebCore::):
      * bindings/js/JSEventListener.cpp:
      (WebCore::JSEventListener::JSEventListener):
      (WebCore::JSEventListener::handleEvent):
      (WebCore::JSEventListener::reportError):
      * bindings/js/JSEventListener.h:
      (WebCore::JSEventListener::create):
      * bindings/js/JSEventSourceCustom.cpp:
      (WebCore::JSEventSource::addEventListener):
      (WebCore::JSEventSource::removeEventListener):
      * bindings/js/JSEventTarget.cpp:
      (WebCore::toJS):
      * bindings/js/JSHTMLDocumentCustom.cpp:
      (WebCore::JSHTMLDocument::open):
      * bindings/js/JSHTMLFrameSetElementCustom.cpp:
      (WebCore::JSHTMLFrameSetElement::nameGetter):
      * bindings/js/JSInspectorBackendCustom.cpp:
      (WebCore::JSInspectorBackend::databaseForId):
      (WebCore::JSInspectorBackend::inspectedWindow):
      (WebCore::JSInspectorBackend::nodeForId):
      * bindings/js/JSLazyEventListener.cpp:
      (WebCore::JSLazyEventListener::JSLazyEventListener):
      (WebCore::JSLazyEventListener::parseCode):
      * bindings/js/JSLazyEventListener.h:
      (WebCore::JSLazyEventListener::create):
      * bindings/js/JSMessageChannelCustom.cpp:
      (WebCore::JSMessageChannel::markChildren):
      * bindings/js/JSMessagePortCustom.cpp:
      (WebCore::JSMessagePort::markChildren):
      (WebCore::JSMessagePort::addEventListener):
      (WebCore::JSMessagePort::removeEventListener):
      * bindings/js/JSNodeCustom.cpp:
      (WebCore::JSNode::addEventListener):
      (WebCore::JSNode::removeEventListener):
      (WebCore::JSNode::markChildren):
      * bindings/js/JSNodeFilterCondition.cpp:
      (WebCore::JSNodeFilterCondition::acceptNode):
      * bindings/js/JSQuarantinedObjectWrapper.cpp:
      (WebCore::JSQuarantinedObjectWrapper::construct):
      (WebCore::JSQuarantinedObjectWrapper::call):
      * bindings/js/JSSVGElementInstanceCustom.cpp:
      (WebCore::JSSVGElementInstance::addEventListener):
      (WebCore::JSSVGElementInstance::removeEventListener):
      * bindings/js/JSSharedWorkerCustom.cpp:
      (WebCore::JSSharedWorker::markChildren):
      * bindings/js/JSWebSocketCustom.cpp:
      (WebCore::JSWebSocket::addEventListener):
      (WebCore::JSWebSocket::removeEventListener):
      * bindings/js/JSWorkerContextCustom.cpp:
      (WebCore::JSWorkerContext::addEventListener):
      (WebCore::JSWorkerContext::removeEventListener):
      (WebCore::JSWorkerContext::setTimeout):
      (WebCore::JSWorkerContext::setInterval):
      * bindings/js/JSXMLHttpRequestConstructor.cpp:
      (WebCore::constructXMLHttpRequest):
      * bindings/js/JSXMLHttpRequestCustom.cpp:
      (WebCore::JSXMLHttpRequest::markChildren):
      (WebCore::JSXMLHttpRequest::addEventListener):
      (WebCore::JSXMLHttpRequest::removeEventListener):
      * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
      (WebCore::JSXMLHttpRequestUpload::markChildren):
      (WebCore::JSXMLHttpRequestUpload::addEventListener):
      (WebCore::JSXMLHttpRequestUpload::removeEventListener):
      * bindings/js/ScheduledAction.cpp:
      (WebCore::ScheduledAction::create):
      (WebCore::ScheduledAction::ScheduledAction):
      (WebCore::ScheduledAction::executeFunctionInContext):
      (WebCore::ScheduledAction::execute):
      * bindings/js/ScheduledAction.h:
      (WebCore::ScheduledAction::ScheduledAction):
      * bindings/js/ScriptCachedFrameData.cpp:
      (WebCore::ScriptCachedFrameData::ScriptCachedFrameData):
      (WebCore::ScriptCachedFrameData::restore):
      * bindings/js/ScriptController.cpp:
      (WebCore::ScriptController::~ScriptController):
      (WebCore::ScriptController::evaluateInWorld):
      (WebCore::ScriptController::evaluate):
      (WebCore::ScriptController::evaluateInIsolatedWorld):
      (WebCore::ScriptController::clearWindowShell):
      (WebCore::ScriptController::initScript):
      (WebCore::ScriptController::processingUserGestureEvent):
      (WebCore::ScriptController::attachDebugger):
      (WebCore::ScriptController::updateDocument):
      (WebCore::ScriptController::bindingRootObject):
      (WebCore::ScriptController::createRootObject):
      (WebCore::ScriptController::windowScriptNPObject):
      (WebCore::ScriptController::jsObjectForPluginElement):
      * bindings/js/ScriptController.h:
      (WebCore::ScriptController::windowShell):
      (WebCore::ScriptController::existingWindowShell):
      (WebCore::ScriptController::globalObject):
      (WebCore::ScriptController::forgetWorld):
      * bindings/js/ScriptControllerMac.mm:
      (WebCore::ScriptController::windowScriptObject):
      * bindings/js/ScriptEventListener.cpp:
      (WebCore::createAttributeEventListener):
      * bindings/js/ScriptFunctionCall.cpp:
      (WebCore::ScriptFunctionCall::call):
      (WebCore::ScriptFunctionCall::construct):
      * bindings/js/ScriptObjectQuarantine.cpp:
      (WebCore::getQuarantinedScriptObject):
      * bindings/js/ScriptState.cpp:
      (WebCore::scriptStateFromNode):
      (WebCore::scriptStateFromPage):
      * bindings/js/ScriptState.h:
      * bindings/js/WorkerScriptController.cpp:
      (WebCore::WorkerScriptController::WorkerScriptController):
      (WebCore::WorkerScriptController::evaluate):
      * bindings/objc/DOMInternal.mm:
      (-[WebScriptObject _initializeScriptDOMNodeImp]):
      * bindings/objc/WebScriptObject.mm:
      (-[WebScriptObject callWebScriptMethod:withArguments:]):
      (-[WebScriptObject evaluateWebScript:]):
      * bindings/scripts/CodeGeneratorJS.pm:
      * bridge/NP_jsobject.cpp:
      (_NPN_InvokeDefault):
      (_NPN_Invoke):
      (_NPN_Evaluate):
      (_NPN_Construct):
      * bridge/jni/jni_jsobject.mm:
      (JavaJSObject::call):
      (JavaJSObject::eval):
      * dom/Document.cpp:
      (WebCore::Document::createWrapperCache):
      * dom/Document.h:
      (WebCore::Document::wrapperCacheMap):
      (WebCore::Document::getWrapperCache):
      * inspector/InspectorController.cpp:
      (WebCore::InspectorController::startUserInitiatedProfiling):
      (WebCore::InspectorController::stopUserInitiatedProfiling):
      * inspector/JavaScriptCallFrame.cpp:
      (WebCore::JavaScriptCallFrame::evaluate):
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::dispatchWindowObjectAvailable):
      * platform/network/mac/AuthenticationMac.mm:
      * xml/XMLHttpRequest.cpp:
      (WebCore::XMLHttpRequest::XMLHttpRequest):
      (WebCore::XMLHttpRequest::dropProtection):
      * xml/XMLHttpRequest.h:
      (WebCore::XMLHttpRequest::create):
      
      WebKit/mac: https://bugs.webkit.org/show_bug.cgi?id=30696
      Update to incorporate support for IsolatedWorlds in JSC bindings.
      
      Patch by Gavin Barraclough <barraclough@apple.com> on 2009-10-16
      Reviewed by Sam Weinig & Geoff Garen.
      
      * WebView/WebFrame.mm:
      (-[WebFrame _attachScriptDebugger]):
      (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
      (-[WebFrame globalContext]):
      * WebView/WebScriptDebugDelegate.mm:
      (-[WebScriptCallFrame evaluateWebScript:]):
      * WebView/WebView.mm:
      (-[WebView aeDescByEvaluatingJavaScriptFromString:]):
      
      WebKit/win: https://bugs.webkit.org/show_bug.cgi?id=30696
      Update to incorporate support for IsolatedWorlds in JSC bindings.
      
      Patch by Gavin Barraclough <barraclough@apple.com> on 2009-10-22
      Reviewed by Sam Weinig & Geoff Garen.
      
      * Interfaces/IWebFramePrivate.idl:
      * WebFrame.cpp:
      (WebFrame::globalContext):
      (WebFrame::windowObjectCleared):
      (WebFrame::stringByEvaluatingJavaScriptInIsolatedWorld):
      * WebFrame.h:
      
      WebKitTools: https://bugs.webkit.org/show_bug.cgi?id=30696
      Enable isolated-worlds tests on mac.
      
      Patch by Gavin Barraclough <barraclough@apple.com> on 2009-10-22
      Reviewed by Sam Weinig & Geoff Garen.
      
      Add private interface for DRT to invoke execution in a given world.
      
      * DumpRenderTree/LayoutTestController.cpp:
      (evaluateScriptInIsolatedWorldCallback):
      (LayoutTestController::staticFunctions):
      * DumpRenderTree/LayoutTestController.h:
      * DumpRenderTree/mac/LayoutTestControllerMac.mm:
      (LayoutTestController::evaluateScriptInIsolatedWorld):
      * DumpRenderTree/win/LayoutTestControllerWin.cpp:
      (LayoutTestController::evaluateScriptInIsolatedWorld):
      
      LayoutTests: https://bugs.webkit.org/show_bug.cgi?id=30696
      Enable isolated-worlds tests on mac.
        * Update the results to switch from windows to unix line-endings.
        * Update all-window-prototypes.html to allow for properties on
          the global object with null prototypes (just skip over them).
      
      Patch by Gavin Barraclough <barraclough@apple.com> on 2009-10-19
      Reviewed by Sam Weinig & Geoff Garen.
      
      * http/tests/security/isolatedWorld/all-window-properties-expected.txt:
      * http/tests/security/isolatedWorld/all-window-prototypes-expected.txt:
      * http/tests/security/isolatedWorld/all-window-prototypes.html:
      * http/tests/security/isolatedWorld/body-properties-expected.txt:
      * http/tests/security/isolatedWorld/body-prototype-expected.txt:
      * http/tests/security/isolatedWorld/document-properties-expected.txt:
      * http/tests/security/isolatedWorld/document-prototype-expected.txt:
      * http/tests/security/isolatedWorld/global-variables-expected.txt:
      * http/tests/security/isolatedWorld/image-properties-expected.txt:
      * http/tests/security/isolatedWorld/image-prototype-expected.txt:
      * http/tests/security/isolatedWorld/location-properties-expected.txt:
      * http/tests/security/isolatedWorld/location-prototype-expected.txt:
      * http/tests/security/isolatedWorld/number-prototype-expected.txt:
      * http/tests/security/isolatedWorld/object-prototype-expected.txt:
      * http/tests/security/isolatedWorld/storage-properties-expected.txt:
      * http/tests/security/isolatedWorld/storage-prototype-expected.txt:
      * http/tests/security/isolatedWorld/string-prototype-expected.txt:
      * http/tests/security/isolatedWorld/window-properties-expected.txt:
      * platform/mac/Skipped:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49963 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c53df831
  7. 08 Oct, 2009 1 commit
    • abarth@webkit.org's avatar
      2009-10-08 Adam Barth <abarth@webkit.org> · fc80bad9
      abarth@webkit.org authored
              Reviewed by Eric Seidel.
      
              Move executeScript from FrameLoader to ScriptController
              https://bugs.webkit.org/show_bug.cgi?id=30200
      
              Update API call.
      
              * Api/qwebframe.cpp:
              (QWebFrame::evaluateJavaScript):
      2009-10-08  Adam Barth  <abarth@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Move executeScript from FrameLoader to ScriptController
              https://bugs.webkit.org/show_bug.cgi?id=30200
      
              Update API call.
      
              * webkit/webkitwebview.cpp:
              (webkit_web_view_execute_script):
      2009-10-08  Adam Barth  <abarth@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Move executeScript from FrameLoader to ScriptController
              https://bugs.webkit.org/show_bug.cgi?id=30200
      
              Update API call.
      
              * WebView.cpp:
              (WebView::stringByEvaluatingJavaScriptFromString):
      2009-10-08  Adam Barth  <abarth@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Move executeScript from FrameLoader to ScriptController
              https://bugs.webkit.org/show_bug.cgi?id=30200
      
              Update API call.
      
              * WebFrame.cpp:
              (wxWebFrame::RunScript):
      2009-10-08  Adam Barth  <abarth@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Move executeScript from FrameLoader to ScriptController
              https://bugs.webkit.org/show_bug.cgi?id=30200
      
              Update API call.
      
              * WebView/WebFrame.mm:
              (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
              * WebView/WebView.mm:
              (-[WebView aeDescByEvaluatingJavaScriptFromString:]):
      2009-10-08  Adam Barth  <abarth@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Move executeScript from FrameLoader to ScriptController
              https://bugs.webkit.org/show_bug.cgi?id=30200
      
              These methods have virtually no interaction with FrameLoader.  They
              really seem like they ought to belong to ScriptController.
      
              * WebCore.base.exp:
              * bindings/js/ScheduledAction.cpp:
              (WebCore::ScheduledAction::execute):
              * bindings/js/ScriptController.cpp:
              (WebCore::ScriptController::ScriptController):
              (WebCore::ScriptController::executeScript):
              (WebCore::ScriptController::executeIfJavaScriptURL):
              (WebCore::ScriptController::evaluate):
              * bindings/js/ScriptController.h:
              * bindings/v8/ScriptController.cpp:
              (WebCore::ScriptController::ScriptController):
              (WebCore::ScriptController::executeScript):
              (WebCore::ScriptController::executeIfJavaScriptURL):
              * bindings/v8/ScriptController.h:
              * dom/XMLTokenizer.cpp:
              (WebCore::XMLTokenizer::notifyFinished):
              * dom/XMLTokenizerLibxml2.cpp:
              (WebCore::XMLTokenizer::endElementNs):
              * dom/XMLTokenizerQt.cpp:
              (WebCore::XMLTokenizer::parseEndElement):
              * html/HTMLTokenizer.cpp:
              (WebCore::HTMLTokenizer::scriptExecution):
              * loader/FrameLoader.cpp:
              (WebCore::FrameLoader::changeLocation):
              (WebCore::FrameLoader::urlSelected):
              (WebCore::FrameLoader::requestFrame):
              (WebCore::FrameLoader::submitForm):
              (WebCore::FrameLoader::replaceDocument):
              * loader/FrameLoader.h:
              * plugins/PluginView.cpp:
              (WebCore::PluginView::performRequest):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49372 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fc80bad9
  8. 04 Sep, 2009 1 commit
    • hyatt@apple.com's avatar
      WebCore: https://bugs.webkit.org/show_bug.cgi?id=28890, make simple user script injection work. · 71960d78
      hyatt@apple.com authored
              
      Reviewed by Adam Roben.
      
      This patch adds new API for adding and removing user scripts from page groups.  User scripts
      are bundled together in isolated worlds (you can have multiple scripts together in the same
      world).
      
      Added userscripts/ directory for holding new tests (along with a simple test of script injection).
      
      * WebCore.base.exp:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.xcodeproj/project.pbxproj:
      * bindings/js/ScriptController.cpp:
      (WebCore::ScriptController::evaluateInIsolatedWorld):
      * bindings/js/ScriptController.h:
      * bindings/v8/ScriptController.cpp:
      (WebCore::ScriptController::evaluateInIsolatedWorld):
      * bindings/v8/ScriptController.h:
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::finishedParsing):
      (WebCore::FrameLoader::dispatchDocumentElementAvailable):
      * page/Frame.cpp:
      (WebCore::Frame::injectUserScripts):
      (WebCore::Frame::injectUserScriptsForWorld):
      * page/Frame.h:
      * page/PageGroup.cpp:
      (WebCore::PageGroup::~PageGroup):
      (WebCore::PageGroup::addUserScript):
      (WebCore::PageGroup::removeUserContentForWorld):
      (WebCore::PageGroup::removeAllUserContent):
      * page/PageGroup.h:
      (WebCore::PageGroup::userScripts):
      * page/UserScript.h: Added.
      (WebCore::UserScript::UserScript):
      (WebCore::UserScript::source):
      (WebCore::UserScript::url):
      (WebCore::UserScript::patterns):
      (WebCore::UserScript::worldID):
      (WebCore::UserScript::injectionTime):
      * page/UserScriptTypes.h: Added.
      (WebCore::):
      
      WebKit/mac: https://bugs.webkit.org/show_bug.cgi?id=28890, make simple user script injection work.
              
      Reviewed by Adam Roben.
      
      This patch adds new API for adding and removing user scripts from page groups.  User scripts
      are bundled together in isolated worlds (you can have multiple scripts together in the same
      world).
      
      Added userscripts/ directory for holding new tests (along with a simple test of script injection).
      
      * WebView/WebView.mm:
      (+[WebView _addUserScriptToGroup:source:url:worldID:patterns:injectionTime:]):
      (+[WebView _removeUserContentFromGroup:worldID:]):
      (+[WebView _removeAllUserContentFromGroup:]):
      * WebView/WebViewPrivate.h:
      
      LayoutTests: https://bugs.webkit.org/show_bug.cgi?id=28890, make simple user script injection work.
              
      Reviewed by Adam Roben.
      
      This patch adds new API for adding and removing user scripts from page groups.  User scripts
      are bundled together in isolated worlds (you can have multiple scripts together in the same
      world).
      
      Added userscripts/ directory for holding new tests (along with a simple test of script injection).
      
      * platform/mac/userscripts: Added.
      * platform/mac/userscripts/script-run-at-end-expected.txt: Added.
      * userscripts: Added.
      * userscripts/script-run-at-end.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48057 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      71960d78
  9. 19 Jun, 2009 1 commit
    • abarth@webkit.org's avatar
      WebCore: · 33c12c69
      abarth@webkit.org authored
      2009-06-18  Adam Barth  <abarth@webkit.org>
      
              Reviewed by Sam Weinig.
      
              https://bugs.webkit.org/show_bug.cgi?id=26199
      
              Added an experimental reflective XSS filter.  The filter is disabled by
              default.
      
              Test: http/tests/security/xssAuditor/script-tag.html
      
              * GNUmakefile.am:
              * WebCore.base.exp:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * bindings/js/ScriptController.cpp:
              (WebCore::ScriptController::ScriptController):
              (WebCore::ScriptController::evaluate):
              * bindings/js/ScriptController.h:
              (WebCore::ScriptController::xssAuditor):
              * bindings/js/ScriptEventListener.cpp:
              (WebCore::createAttributeEventListener):
              * dom/Tokenizer.h:
              (WebCore::Tokenizer::xssAuditor):
              (WebCore::Tokenizer::setXSSAuditor):
              (WebCore::Tokenizer::Tokenizer):
              * html/HTMLTokenizer.cpp:
              (WebCore::HTMLTokenizer::scriptHandler):
              * loader/FrameLoader.cpp:
              (WebCore::FrameLoader::begin):
              (WebCore::FrameLoader::requestObject):
              * page/Settings.cpp:
              (WebCore::Settings::Settings):
              (WebCore::Settings::setXSSAuditorEnabled):
              * page/Settings.h:
              (WebCore::Settings::xssAuditorEnabled):
              * page/XSSAuditor.cpp: Added.
              (WebCore::isControlCharacter):
              (WebCore::XSSAuditor::XSSAuditor):
              (WebCore::XSSAuditor::~XSSAuditor):
              (WebCore::XSSAuditor::canEvaluate):
              (WebCore::XSSAuditor::canCreateInlineEventListener):
              (WebCore::XSSAuditor::canLoadExternalScriptFromSrc):
              (WebCore::XSSAuditor::canLoadObject):
              (WebCore::XSSAuditor::decodeURL):
              (WebCore::XSSAuditor::findInRequest):
              * page/XSSAuditor.h: Added.
              (WebCore::XSSAuditor::isEnabled):
              (WebCore::XSSAuditor::setXSSAuditorEnabled):
      
      WebKit/mac:
      
      2009-06-18  Adam Barth  <abarth@webkit.org>
      
              Reviewed by Sam Weinig.
      
              https://bugs.webkit.org/show_bug.cgi?id=26199
      
              Added preference to enable the XSSAuditor.
      
              * WebView/WebPreferenceKeysPrivate.h:
              * WebView/WebPreferences.mm:
              (+[WebPreferences initialize]):
              (-[WebPreferences isXSSAuditorEnabled]):
              (-[WebPreferences setXSSAuditorEnabled:]):
              * WebView/WebPreferencesPrivate.h:
              * WebView/WebView.mm:
              (-[WebView _preferencesChangedNotification:]):
      
      WebKit/win:
      
      2009-06-18  Adam Barth  <abarth@webkit.org>
      
              Reviewed by Sam Weinig.
      
              https://bugs.webkit.org/show_bug.cgi?id=26199
      
              Added preference to enable the XSSAuditor.
      
              * Interfaces/IWebPreferencesPrivate.idl:
              * WebPreferenceKeysPrivate.h:
              * WebPreferences.cpp:
              (WebPreferences::initializeDefaultSettings):
              (WebPreferences::isXSSAuditorEnabled):
              (WebPreferences::setXSSAuditorEnabled):
              * WebPreferences.h:
              * WebView.cpp:
              (WebView::notifyPreferencesChanged):
      
      WebKitTools:
      
      2009-06-18  Adam Barth  <abarth@webkit.org>
      
              Reviewed by Sam Weinig.
      
              https://bugs.webkit.org/show_bug.cgi?id=26199
      
              Add support for testing the XSSAuditor.
      
              * DumpRenderTree/LayoutTestController.cpp:
              (setXSSAuditorEnabledCallback):
              (LayoutTestController::staticFunctions):
              * DumpRenderTree/LayoutTestController.h:
              * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
              (LayoutTestController::setXSSAuditorEnabled):
              * DumpRenderTree/mac/DumpRenderTree.mm:
              (resetWebViewToConsistentStateBeforeTesting):
              * DumpRenderTree/mac/LayoutTestControllerMac.mm:
              (LayoutTestController::setXSSAuditorEnabled):
              * DumpRenderTree/win/DumpRenderTree.cpp:
              (resetWebViewToConsistentStateBeforeTesting):
              * DumpRenderTree/win/LayoutTestControllerWin.cpp:
              (LayoutTestController::setXSSAuditorEnabled):
              (LayoutTestController::setPopupBlockingEnabled):
              * DumpRenderTree/wx/LayoutTestControllerWx.cpp:
              (LayoutTestController::setXSSAuditorEnabled):
      
      LayoutTests:
      
      2009-06-18  Adam Barth  <abarth@webkit.org>
      
              Reviewed by Sam Weinig.
      
              https://bugs.webkit.org/show_bug.cgi?id=26199
      
              Added a basic test for the XSSAuditor.
      
              * http/tests/security/xssAuditor/resources/echo-intertag.php: Added.
              * http/tests/security/xssAuditor/script-tag-expected.txt: Added.
              * http/tests/security/xssAuditor/script-tag.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44846 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      33c12c69
  10. 25 May, 2009 1 commit
    • andersca@apple.com's avatar
      WebCore: · 4ff9ebec
      andersca@apple.com authored
      2009-05-25  Anders Carlsson  <andersca@apple.com>
      
              Reviewed by Sam Weinig.
      
              - WebCore side of <rdar://problem/6914001>.
      
              Add a new m_allowPopupsFromPlugin flag.
              
              * bindings/js/ScriptController.cpp:
              (WebCore::ScriptController::ScriptController):
              (WebCore::ScriptController::processingUserGesture):
              * bindings/js/ScriptController.h:
              (WebCore::ScriptController::setAllowPopupsFromPlugin):
              (WebCore::ScriptController::allowPopupsFromPlugin):
      
      WebKit/mac:
      
      2009-05-25  Anders Carlsson  <andersca@apple.com>
      
              Reviewed by Sam Weinig.
      
              - WebKit side of <rdar://problem/6914001>.
      
              * Plugins/Hosted/NetscapePluginHostManager.h:
              * Plugins/Hosted/NetscapePluginHostManager.mm:
              (WebKit::NetscapePluginHostManager::didCreateWindow):
              Iterate over all plug-in hosts. If one is in full-screen mode, make sure to activate the
              WebKit app instead.
              
              * Plugins/Hosted/NetscapePluginHostProxy.h:
              (WebKit::NetscapePluginHostProxy::isMenuBarVisible):
              Add getter.
              
              * Plugins/Hosted/NetscapePluginHostProxy.mm:
              (WKPCEvaluate):
              Add allowPopups flag.
              
              * Plugins/Hosted/NetscapePluginInstanceProxy.h:
              * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
              (WebKit::NetscapePluginInstanceProxy::PluginRequest::PluginRequest):
              (WebKit::NetscapePluginInstanceProxy::PluginRequest::allowPopups):
              (WebKit::NetscapePluginInstanceProxy::loadURL):
              (WebKit::NetscapePluginInstanceProxy::evaluateJavaScript):
              (WebKit::NetscapePluginInstanceProxy::loadRequest):
              (WebKit::NetscapePluginInstanceProxy::evaluate):
              Use "allowPopups" instead of "userGesture".
              
              * Plugins/Hosted/WebKitPluginClient.defs:
              Add allowPopups argument to Evaluate.
              
              * Plugins/Hosted/WebKitPluginHostTypes.h:
              Use "allowPopups" instead of "userGesture".
      
              * WebCoreSupport/WebChromeClient.mm:
              (WebChromeClient::createWindow):
              Call didCreateWindow here.
              
              * WebCoreSupport/WebFrameLoaderClient.mm:
              (WebFrameLoaderClient::dispatchCreatePage):
              Ditto.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44136 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4ff9ebec
  11. 16 Apr, 2009 2 commits
    • ggaren@apple.com's avatar
      2009-04-16 Geoffrey Garen <ggaren@apple.com> · 13e3791d
      ggaren@apple.com authored
              Reviewed by Sam Weinig.
      
              More fix for https://bugs.webkit.org/show_bug.cgi?id=21260
              Unbounded memory growth when churning elements with anonymous event handler functions
              
              Some cleanup in event handling code.
      
              * bindings/js/JSDOMGlobalObject.cpp:
              * bindings/js/JSDOMGlobalObject.h: Removed findJSProtectedEventListener
              and findJSProtectedEventListener because they are now unused.
      
              * bindings/js/JSEventListener.cpp:
              * bindings/js/JSEventListener.h:
              (WebCore::JSEventListener::clearGlobalObject):
              * bindings/js/JSLazyEventListener.cpp:
              (WebCore::JSLazyEventListener::JSLazyEventListener):
              (WebCore::JSLazyEventListener::~JSLazyEventListener):
              (WebCore::JSLazyEventListener::globalObject):
              * bindings/js/JSLazyEventListener.h:
              (WebCore::JSLazyEventListener::clearGlobalObject): Nixed JSProtectedEventListener,
              and merged it with JSLazyEventListener, the only remaining event listener
              that still GC-protects its function and global object.
      
              * bindings/js/ScriptController.cpp:
              (WebCore::ScriptController::ScriptController):
              * bindings/js/ScriptController.h:
              (WebCore::ScriptController::setEventHandlerLineNumber):
              (WebCore::ScriptController::eventHandlerLineNumber): Renamed handlerLineno =>
              handlerLineNumber, because anything less would be uncivilized. Removed
              createInlineEventListener because it mostly did irrelevent work, so it
              just got in the way of understanding how event handler creation works.
      
              * dom/Document.cpp:
              (WebCore::Document::createEventListener):
              * dom/XMLTokenizerLibxml2.cpp:
              (WebCore::XMLTokenizer::startElementNs):
              * html/HTMLTokenizer.cpp:
              (WebCore::HTMLTokenizer::processToken): Ditto.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@42589 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      13e3791d
    • ggaren@apple.com's avatar
      2009-04-16 Geoffrey Garen <ggaren@apple.com> · cb77b977
      ggaren@apple.com authored
              Reviewed by Eric Seidel and Adam Roben.
      
              More fix for https://bugs.webkit.org/show_bug.cgi?id=21260
              Unbounded memory growth when churning elements with anonymous event handler functions
              
              Simplified some EventHandler creation code.
              
              Removed a pile of code whose sole purpose was to allow SVG event handlers
              to supply a parameter named "evt" instead of the normal "event", and
              replaced it with a single parameter to JSLazyEventListener's constructor
              specifying the parameter name to use.
      
              * bindings/js/JSDOMWindowBase.h:
              * bindings/js/JSLazyEventListener.cpp:
              (WebCore::JSLazyEventListener::JSLazyEventListener):
              (WebCore::JSLazyEventListener::parseCode):
              * bindings/js/JSLazyEventListener.h:
              (WebCore::JSLazyEventListener::create):
              * bindings/js/ScriptController.cpp:
              (WebCore::ScriptController::createInlineEventListener):
              * bindings/js/ScriptController.h:
              * dom/Document.cpp:
              (WebCore::Document::createEventListener):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@42579 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cb77b977
  12. 03 Apr, 2009 1 commit
    • weinig@apple.com's avatar
      WebCore: · be6430fb
      weinig@apple.com authored
      2009-04-03  Sam Weinig  <sam@webkit.org>
      
              Reviewed by Darin Adler.
      
              <rdar://problem/6330929>
              https://bugs.webkit.org/show_bug.cgi?id=21456
      
              Don't update the document pointer for all inactive windows on navigations.
              This change causes us to differ slightly from Firefox when accessing the
              document from within a closure tied to a navigated context, but as all
              browsers differ on this edge case, I don't foresee compatibility issues.
      
              Test: http/tests/security/cross-frame-access-document-direct.html
      
              * bindings/js/JSDOMWindowBase.cpp:
              (WebCore::JSDOMWindowBase::~JSDOMWindowBase):
              * bindings/js/ScriptController.cpp:
              (WebCore::ScriptController::clearWindowShell):
              (WebCore::ScriptController::initScript):
              (WebCore::ScriptController::updateDocument):
              * bindings/js/ScriptController.h:
      
      LayoutTests:
      
      2009-04-03  Sam Weinig  <sam@webkit.org>
      
              Reviewed by Darin Adler.
      
              Update tests for <rdar://problem/6330929>
              https://bugs.webkit.org/show_bug.cgi?id=21456
      
              * dom/xhtml/level2/html/HTMLFormElement10-expected.txt:
              * fast/dom/Window/dom-access-from-closure-iframe-expected.txt:
              * fast/dom/Window/dom-access-from-closure-window-expected.txt:
              * http/tests/security/cross-frame-access-document-direct-expected.txt: Added.
              * http/tests/security/cross-frame-access-document-direct.html: Added.
              * http/tests/security/resources/cross-frame-iframe-for-document-direct-test-victim.html: Added.
              * http/tests/security/resources/cross-frame-iframe-for-document-direct-test.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@42223 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      be6430fb
  13. 02 Feb, 2009 1 commit
    • andersca@apple.com's avatar
      WebCore: · 5491695f
      andersca@apple.com authored
      2009-02-02  Anders Carlsson  <andersca@apple.com>
      
              Reviewed by Sam Weinig.
      
              Add jsObjectForPluginElement to ScriptController, and have createScriptObjectForPluginElement call it.
              
              * WebCore.LP64.exp:
              * bindings/js/ScriptController.cpp:
              (WebCore::ScriptController::createScriptObjectForPluginElement):
              (WebCore::ScriptController::jsObjectForPluginElement):
              * bindings/js/ScriptController.h:
      
      WebKit/mac:
      
      2009-02-02  Anders Carlsson  <andersca@apple.com>
      
              Reviewed by Sam Weinig.
      
              Implement WKPCGetPluginElementObject.
              
              * Plugins/Hosted/NetscapePluginHostProxy.mm:
              (WKPCGetPluginElementNPObject):
              * Plugins/Hosted/NetscapePluginInstanceProxy.h:
              * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
              (WebKit::NetscapePluginInstanceProxy::getPluginElementNPObject):
              * Plugins/Hosted/WebKitPluginClient.defs:
              * Plugins/WebBaseNetscapePluginView.h:
              * Plugins/WebBaseNetscapePluginView.mm:
              (-[WebBaseNetscapePluginView WebCore::]):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40505 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5491695f
  14. 30 Jan, 2009 1 commit
    • ggaren@apple.com's avatar
      WebCore: · 78b4dc68
      ggaren@apple.com authored
      2009-01-30  Geoffrey Garen  <ggaren@apple.com>
      
              Reviewed by Darin Adler.
              
              More scaffolding for redirect tracking. No behavior change yet.
      
              * bindings/js/JSHTMLFormElementCustom.cpp:
              (WebCore::JSHTMLFormElement::submit): Added scaffolding necessary for
              redirect checking in a form submission through JS. (Currently, we
              just specify "no redirect.")
      
              * bindings/js/ScriptController.h:
              * bindings/js/ScriptController.cpp:
              (WebCore::ScriptController::processingUserGesture):
              (WebCore::ScriptController::processingUserGestureEvent):
              (WebCore::ScriptController::isJavaScriptAnchorNavigation): Refactored
              user gesture check to make it more clear.
      
              (WebCore::ScriptController::pageIsProcessingUserGesture): Added a helper
              for checking if there's a user gesture in any frame on the page (a more
              relaxed rule than our popup blocking rule, which requires the user
              gesture to occur in the frame that's executing JavaScript.)
      
              * html/HTMLFormElement.h:
              * html/HTMLFormElement.cpp:
              (WebCore::HTMLFormElement::submit): Added scaffolding necessary for
              redirect checking in a form submission through the DOM. (Currently, we
              just specify "no redirect.")
      
              * html/HTMLFormElement.idl: Made submit custom so it can participate
              in redirect checking.
      
              * loader/FrameLoader.h:
              * loader/FrameLoader.cpp:
              (WebCore::FormSubmission::FormSubmission): Clarified some names, and
              added a "lockHistory" parameter to form submissions, to match other
              navigations.
      
              (WebCore::FrameLoader::submitFormAgain):
              (WebCore::FrameLoader::submitForm): Use the lockHistory parameter.
      
              (WebCore::FrameLoader::userGestureHint): Refactored this function for
              clarity, and added a FIXME for a change I was too scared to make myself.
              (Really, we should just get rid of this function.)
      
              (WebCore::FrameLoader::loadFrameRequestWithFormAndValues): Refactored
              to pass a FrameLoadType to form posts, too, so they can participate in
              redirect tracking.
      
              (WebCore::FrameLoader::loadPostRequest):
              (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy):
              (WebCore::FrameLoader::loadItem): Use the lockHistory parameter.
      
      LayoutTests:
      
      2009-01-30  Geoffrey Garen  <ggaren@apple.com>
      
              Reviewed by Darin Adler.
      
              More redirect layout test work.
              
              Added tests (expected to fail) for form submission via JavaScript:
              
              * http/tests/history/redirect-js-form-submit-0-seconds-expected.txt: Added.
              * http/tests/history/redirect-js-form-submit-0-seconds.html: Added.
              * http/tests/history/redirect-js-form-submit-2-seconds-expected.txt: Added.
              * http/tests/history/redirect-js-form-submit-2-seconds.html: Added.
              * http/tests/history/redirect-js-form-submit-before-load-expected.txt: Added.
              * http/tests/history/redirect-js-form-submit-before-load.html: Added.
              
              Updated these tests to dump their back/forward lists, to check for
              back/forward regressions, and to use # instead of ? to communicate between
              URLs, since, to my surprise, form submissions can't use query strings.
      
              * http/tests/history/redirect-200-refresh-0-seconds-expected.txt:
              * http/tests/history/redirect-200-refresh-0-seconds.pl:
              * http/tests/history/redirect-200-refresh-2-seconds-expected.txt:
              * http/tests/history/redirect-200-refresh-2-seconds.pl:
              * http/tests/history/redirect-301-expected.txt:
              * http/tests/history/redirect-301.pl:
              * http/tests/history/redirect-302-expected.txt:
              * http/tests/history/redirect-302.pl:
              * http/tests/history/redirect-303-expected.txt:
              * http/tests/history/redirect-303.pl:
              * http/tests/history/redirect-307-expected.txt:
              * http/tests/history/redirect-307.pl:
              * http/tests/history/redirect-js-document-location-0-seconds-expected.txt:
              * http/tests/history/redirect-js-document-location-0-seconds.html:
              * http/tests/history/redirect-js-document-location-2-seconds-expected.txt:
              * http/tests/history/redirect-js-document-location-2-seconds.html:
              * http/tests/history/redirect-js-document-location-before-load-expected.txt:
              * http/tests/history/redirect-js-document-location-before-load.html:
              * http/tests/history/redirect-js-location-0-seconds-expected.txt:
              * http/tests/history/redirect-js-location-0-seconds.html:
              * http/tests/history/redirect-js-location-2-seconds-expected.txt:
              * http/tests/history/redirect-js-location-2-seconds.html:
              * http/tests/history/redirect-js-location-assign-0-seconds-expected.txt:
              * http/tests/history/redirect-js-location-assign-0-seconds.html:
              * http/tests/history/redirect-js-location-assign-2-seconds-expected.txt:
              * http/tests/history/redirect-js-location-assign-2-seconds.html:
              * http/tests/history/redirect-js-location-assign-before-load-expected.txt:
              * http/tests/history/redirect-js-location-assign-before-load.html:
              * http/tests/history/redirect-js-location-before-load-expected.txt:
              * http/tests/history/redirect-js-location-before-load.html:
              * http/tests/history/redirect-js-location-href-0-seconds-expected.txt:
              * http/tests/history/redirect-js-location-href-0-seconds.html:
              * http/tests/history/redirect-js-location-href-2-seconds-expected.txt:
              * http/tests/history/redirect-js-location-href-2-seconds.html:
              * http/tests/history/redirect-js-location-href-before-load-expected.txt:
              * http/tests/history/redirect-js-location-href-before-load.html:
              * http/tests/history/redirect-js-location-replace-0-seconds-expected.txt:
              * http/tests/history/redirect-js-location-replace-0-seconds.html:
              * http/tests/history/redirect-js-location-replace-2-seconds-expected.txt:
              * http/tests/history/redirect-js-location-replace-2-seconds.html:
              * http/tests/history/redirect-js-location-replace-before-load-expected.txt:
              * http/tests/history/redirect-js-location-replace-before-load.html:
              * http/tests/history/redirect-meta-refresh-0-seconds-expected.txt:
              * http/tests/history/redirect-meta-refresh-0-seconds.html:
              * http/tests/history/redirect-meta-refresh-2-seconds-expected.txt:
              * http/tests/history/redirect-meta-refresh-2-seconds.html:
              * http/tests/history/resources/redirect-target.html:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40424 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      78b4dc68
  15. 10 Jan, 2009 2 commits
    • abarth@webkit.org's avatar
      Revert 39779. · 6d1e5af6
      abarth@webkit.org authored
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@39780 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6d1e5af6
    • abarth@webkit.org's avatar
      WebCore: · 97ae7979
      abarth@webkit.org authored
      2009-01-10  Adam Barth  <abarth@webkit.org>
      
              Reviewed by Darin Adler.
      
              Fix https://bugs.webkit.org/show_bug.cgi?id=21456
      
              We shouldn't update the document pointer of inactive windows.  This
              behavior differs slightly from Firefox, I'd argue that this behavior is
              more correct (we both differ from IE).  The HTML 5 spec is a bit in flux
              on this point.
      
              Test: http/tests/security/xss-inactive-closure.html
      
              * bindings/js/JSDOMWindowBase.cpp:
              (WebCore::JSDOMWindowBase::~JSDOMWindowBase):
              * bindings/js/ScriptController.cpp:
              (WebCore::ScriptController::clearWindowShell):
              (WebCore::ScriptController::updateDocument):
              * bindings/js/ScriptController.h:
      
      LayoutTests:
      
      2009-01-10  Adam Barth  <abarth@webkit.org>
      
              Reviewed by Darin Adler.
      
              Test that we don't do goofy things with the document pointer after
              navigation.
      
              * fast/dom/Window/dom-access-from-closure-iframe-expected.txt:
              * fast/dom/Window/dom-access-from-closure-window-expected.txt:
              * http/tests/security/resources/childWithButton.html: Added.
              * http/tests/security/resources/xss-inactive-closure-child-2.html: Added.
              * http/tests/security/resources/xss-inactive-closure-child.html: Added.
              * http/tests/security/xss-inactive-closure-expected.txt: Added.
              * http/tests/security/xss-inactive-closure.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@39779 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      97ae7979
  16. 15 Dec, 2008 1 commit
    • cwzwarich@webkit.org's avatar
      2008-12-15 Cameron Zwarich <zwarich@apple.com> · f00db1fa
      cwzwarich@webkit.org authored
              Reviewed by Darin Adler.
      
              Bug 22562: REGRESSION (r37971): events not firing after going back in back/forward cache
              <https://bugs.webkit.org/show_bug.cgi?id=22562>
              <rdar://problem/6414593>
      
              Restore the Frame's DOMWindow to its previous value when going back in
              the back/forward cache. The fact that it was not getting set before may
              have always caused some subtle bugs with the back/forward cache, but
              after r37971, it causes no events to fire after restoring a page.
      
              Previously, ScriptController::clearScriptObjects() was calling
              clearPlatformScriptObjects(), which was not actually clearing any
              objects, only updating them to reflect some change in state. Since the
              window shell was not updated until after the call to clearScriptObjects(),
              this didn't actually make that much sense.
      
              We rename clearPlatformScriptObjects() to reflect its actual purpose and
              call it after the window shell has been updated rather than before.
      
              Unfortunately, there is no way to test this with a layout test because
              it involves the back/forward cache.
      
              * bindings/js/ScriptController.cpp:
              (WebCore::ScriptController::updatePlatformScriptObjects): Renamed from
              clearPlatformScriptObjects(), because the only nonempty implementation
              doesn't actually clear any objects, it updates them. Also made public.
              (WebCore::ScriptController::clearScriptObjects): Remove the call to
              clearPlatformScriptObjects().
              * bindings/js/ScriptController.h:
              * bindings/js/ScriptControllerMac.mm:
              (WebCore::ScriptController::updatePlatformScriptObjects):
              * history/CachedPage.cpp:
              (WebCore::CachedPage::domWindow): Added.
              * history/CachedPage.h:
              * loader/FrameLoader.cpp:
              (WebCore::FrameLoader::cancelAndClear): Added call to updatePlatformScriptObjects().
              (WebCore::FrameLoader::begin): Added call to updatePlatformScriptObjects().
              (WebCore::FrameLoader::open): Added call to updatePlatformScriptObjects().
              * page/Frame.cpp:
              (WebCore::Frame::setDOMWindow): Added.
              (WebCore::Frame::pageDestroyed): Added call to updatePlatformScriptObjects().
              * page/Frame.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@39306 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f00db1fa
  17. 09 Dec, 2008 1 commit
    • abarth@webkit.org's avatar
      2008-12-09 Adam Barth <abarth@webkit.org> · 24d63ef7
      abarth@webkit.org authored
              Reviewed by Sam Weinig.
      
              Add ScriptController::updateSecurityOrigin to notify the bindings
              that a document's securityOrigin has been updated.  This is used by
              V8 to update its security context.
      
              * bindings/js/ScriptController.cpp:
              (WebCore::ScriptController::updateSecurityOrigin):
              * bindings/js/ScriptController.h:
              * dom/Document.cpp:
              (WebCore::Document::setDomain):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@39163 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      24d63ef7
  18. 04 Dec, 2008 1 commit
    • ap@webkit.org's avatar
      2008-12-03 Dmitry Titov <dimich@chromium.org> · efccd59c
      ap@webkit.org authored
              Reviewed by Alexey Proskuryakov.
      
              Using ActiveDOMObject as base class for DOMTimer.
              https://bugs.webkit.org/show_bug.cgi?id=22620
      
              Using ActiveDOMObject simplifies the code because ActiveDOMObject
              is wired for stop/pause/resume on loading/unloading/caching the page etc
              so the timer-specific code that does the same can be removed.
              In addition, timers can be now paused/resumed 'in place' which
              makes it unnecessary to 'serialize' them into special PausedTimeouts
              instance, so pause/resumeTimeouts implementation in JSDOMWindowBase can also be removed.
              Also, moving TimeoutMap from JSDOMWindowBase to Document matches lifetime
              of timeouts and makes it possible to not roundtrip them via PausedTimeouts 
              every time when JSDOMWindow wrapper is destroyed while the page is in the b/f cache.
      
              Timeouts are now paused with other ActiveDOMObjects:
              - before creating CachedPage in FrameLoader::commitProvisionalLoad()
              - in JavaScriptDebugServer::setJavaScriptPaused
              - during modal UI operations in Chrome::*
              this is equivalent to previous usage of JSDOMWindowBase::pauseTimeouts()
      
              Timeouts are stopped to prevent future firing from:
              - FrameLoader::clear()
              - FrameLoader::frameDetached()
              this is equivalent to previous usage of JSDOMWindowBase::clearAllTimeouts()
      
              This is also one of the steps to having timers in Workers. See the plan of
              the next steps in the bug above.
      
              * bindings/js/DOMTimer.cpp:
              (WebCore::DOMTimer::DOMTimer):
              (WebCore::DOMTimer::fired):
              (WebCore::DOMTimer::hasPendingActivity):
              (WebCore::DOMTimer::contextDestroyed):
              (WebCore::DOMTimer::stop):
              (WebCore::DOMTimer::suspend):
              (WebCore::DOMTimer::resume):
              (WebCore::DOMTimer::canSuspend): Implemented ActiveDOMObject methods.
      
              * bindings/js/DOMTimer.h:
              * bindings/js/JSDOMBinding.cpp: ActiveDOMObject can have no JS wrapper
              (WebCore::markActiveObjectsForContext): 
      
              * bindings/js/JSDOMWindowBase.cpp:
              (WebCore::JSDOMWindowBase::~JSDOMWindowBase):
              (WebCore::JSDOMWindowBase::clear):
              (WebCore::JSDOMWindowBase::installTimeout):
              (WebCore::JSDOMWindowBase::removeTimeout):
              (WebCore::JSDOMWindowBase::timerFired):
              (WebCore::JSDOMWindowBase::disconnectFrame):
              * bindings/js/JSDOMWindowBase.h:
              * bindings/js/ScriptController.cpp:
              * bindings/js/ScriptController.h:
      
              * dom/Document.cpp: Document now holds a hash map id->timeout
              (WebCore::Document::addTimeout):
              (WebCore::Document::removeTimeout):
              (WebCore::Document::findTimeout):
              * dom/Document.h:
              * history/CachedPage.cpp:
              (WebCore::CachedPage::CachedPage):
              (WebCore::CachedPage::restore):
              (WebCore::CachedPage::clear):
              * history/CachedPage.h:
              * inspector/JavaScriptDebugServer.cpp:
              (WebCore::JavaScriptDebugServer::~JavaScriptDebugServer):
              (WebCore::JavaScriptDebugServer::setJavaScriptPaused):
              * inspector/JavaScriptDebugServer.h:
      
              * loader/FrameLoader.cpp:
              (WebCore::FrameLoader::commitProvisionalLoad): 
              removed clearAllTimeouts since all ActiveDOMObjects will be stopped in FrameLoader::clear();
              I don't see how the old comment can be correct - the code in the same method proceeds to invoke 'onunload'
              and then calls into client which can be external code and can cause any active object created in onunload
              to fire. We can stop them all before firing onunload but it does not make a lot of sense.
              I have a test to go with the next patch which verifies that timers set in onunload do not fire.
      
              (WebCore::FrameLoader::open):
              * page/Chrome.cpp:
              (WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer):
              (WebCore::PageGroupLoadDeferrer::~PageGroupLoadDeferrer):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@38985 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      efccd59c
  19. 25 Nov, 2008 1 commit
  20. 24 Nov, 2008 1 commit
    • darin@chromium.org's avatar
      2008-11-24 Darin Fisher <darin@chromium.org> · 6b41247a
      darin@chromium.org authored
              Reviewed by Sam Weinig.
      
              https://bugs.webkit.org/show_bug.cgi?id=22448
              Create an abstraction for JSC::SourceCode
      
              * WebCore.vcproj/WebCore.vcproj:
              * bindings/js/CachedScriptSourceProvider.h:
              * bindings/js/ScriptController.cpp:
              (WebCore::ScriptController::evaluate):
              * bindings/js/ScriptController.h:
              * bindings/js/ScriptSourceCode.h: Added.
              (WebCore::ScriptSourceCode::ScriptSourceCode):
              (WebCore::ScriptSourceCode::length):
              (WebCore::ScriptSourceCode::jsSourceCode):
              * bindings/js/WorkerScriptController.cpp:
              (WebCore::Workevn ScriptController::evaluate):
              * bindings/js/WorkerScriptController.h:
              * dom/ScriptElement.cpp:
              (WebCore::ScriptElement::insertedIntoDocument):
              (WebCore::ScriptElement::childrenChanged):
              (WebCore::ScriptElementData::evaluateScript):
              (WebCore::ScriptElementData::notifyFinished):
              * dom/ScriptElement.h:
              * dom/WorkerThread.cpp:
              (WebCore::WorkerThread::workerThread):
              * dom/WorkerThread.h:
              * dom/XMLTokenizer.cpp:
              (WebCore::XMLTokenizer::notifyFinished):
              * dom/XMLTokenizerLibxml2.cpp:
              (WebCore::XMLTokenizer::endElementNs):
              * dom/XMLTokenizerQt.cpp:
              (WebCore::XMLTokenizer::parseEndElement):
              * html/HTMLTokenizer.cpp:
              (WebCore::HTMLTokenizer::scriptHandler):
              (WebCore::HTMLTokenizer::scriptExecution):
              (WebCore::HTMLTokenizer::notifyFinished):
              * html/HTMLTokenizer.h:
              * loader/FrameLoader.cpp:
              (WebCore::FrameLoader::executeScript):
              * loader/FrameLoader.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@38729 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6b41247a
  21. 20 Nov, 2008 1 commit
    • weinig@apple.com's avatar
      2008-11-20 Sam Weinig <sam@webkit.org> · 79099007
      weinig@apple.com authored
              Reviewed by Geoffrey Garen.
      
              First step in https://bugs.webkit.org/show_bug.cgi?id=22394
              Be more eager in destroying script decoded data
      
              Pass data to be used in script execution around as JSC::SourceCode instead
              of a source, url, and starting line.
      
              * bindings/js/ScriptController.cpp:
              (WebCore::ScriptController::evaluate):
              * bindings/js/ScriptController.h:
              * bindings/js/StringSourceProvider.h:
              (WebCore::makeSource):
              * bindings/js/WorkerScriptController.cpp:
              (WebCore::WorkerScriptController::evaluate):
              * bindings/js/WorkerScriptController.h:
              * dom/ScriptElement.cpp:
              (WebCore::ScriptElement::insertedIntoDocument):
              (WebCore::ScriptElement::childrenChanged):
              (WebCore::ScriptElementData::evaluateScript):
              (WebCore::ScriptElementData::notifyFinished):
              * dom/ScriptElement.h:
              * dom/WorkerThread.cpp:
              (WebCore::WorkerThread::workerThread):
              * dom/XMLTokenizer.cpp:
              (WebCore::XMLTokenizer::notifyFinished):
              * dom/XMLTokenizerLibxml2.cpp:
              (WebCore::XMLTokenizer::endElementNs):
              * dom/XMLTokenizerQt.cpp:
              (WebCore::XMLTokenizer::parseEndElement):
              * html/HTMLTokenizer.cpp:
              (WebCore::HTMLTokenizer::scriptHandler):
              (WebCore::HTMLTokenizer::scriptExecution):
              (WebCore::HTMLTokenizer::notifyFinished):
              * html/HTMLTokenizer.h:
              * loader/FrameLoader.cpp:
              (WebCore::FrameLoader::executeScript):
              * loader/FrameLoader.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@38654 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      79099007
  22. 19 Nov, 2008 1 commit
    • darin@chromium.org's avatar
      2008-11-18 Darin Fisher <darin@chromium.org> · cd84840e
      darin@chromium.org authored
              Reviewed by Geoff Garen.
      
              https://bugs.webkit.org/show_bug.cgi?id=22345
              Define ScriptValue as a thin container for a JSC::Value*.
      
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * bindings/js/ScheduledAction.cpp:
              * bindings/js/ScriptController.cpp:
              (WebCore::ScriptController::evaluate):
              * bindings/js/ScriptController.h:
              * bindings/js/ScriptValue.cpp: Added.
              (WebCore::ScriptValue::getString):
              * bindings/js/ScriptValue.h: Added.
              (WebCore::ScriptValue::ScriptValue):
              (WebCore::ScriptValue::jsValue):
              * dom/ScriptElement.cpp:
              * dom/XMLTokenizer.cpp:
              * dom/XMLTokenizerLibxml2.cpp:
              * html/HTMLTokenizer.cpp:
              * loader/FrameLoader.cpp:
              (WebCore::FrameLoader::executeIfJavaScriptURL):
              (WebCore::FrameLoader::executeScript):
              * loader/FrameLoader.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@38610 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cd84840e
  23. 05 Nov, 2008 1 commit
    • 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
  24. 30 Oct, 2008 2 commits
    • ap@webkit.org's avatar
      Finish landing the previous renaming,... · 5f5cd22a
      ap@webkit.org authored
      Finish landing the previous renaming, createInlineEventHandler->createInlineEventListener (the files remained unsaved in Xcode).
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37994 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5f5cd22a
    • ap@webkit.org's avatar
      Reviewed by Maciej Stachowiak. · 771c2654
      ap@webkit.org authored
              Rename "attachedToEventTargetNode" to "isInline".
      
              Inline (onXXX) attributes are used not just with event target nodes, but also with Window,
              XMLHttpRequest, MessagePort et al.
      
              Also renamed createHTMLEventHandler() (which was a leftover from earlier isHTMLEvent ->
              attachedToEventTargetNode rename made for SVG) to createInlineEventListener().
              And also renamed EventTargetNode, Document and Window "eventListenerForType" methods to
              "inlineEventListenerForType", as they work with inline listeners.
      
              * bindings/js/JSDOMApplicationCacheCustom.cpp:
              (WebCore::JSDOMApplicationCache::addEventListener):
              (WebCore::JSDOMApplicationCache::removeEventListener):
              * bindings/js/JSMessagePortCustom.cpp:
              (WebCore::JSMessagePort::setOnmessage):
              (WebCore::JSMessagePort::setOnclose):
              * bindings/js/JSXMLHttpRequestCustom.cpp:
              (WebCore::JSXMLHttpRequest::addEventListener):
              (WebCore::JSXMLHttpRequest::removeEventListener):
              * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
              (WebCore::JSXMLHttpRequestUpload::addEventListener):
              (WebCore::JSXMLHttpRequestUpload::removeEventListener):
              Pass a correct value for this argument - callers used to be confused, because they didn't
              consider themselves event target nodes. This doesn't affect behavior however, as the only
              difference between inline and non-inline event handlers is that the former treat
              "return false" as "event.preventDefault()", which is not important to any of these objects.
      
              * bindings/js/JSEventListener.cpp: (WebCore::JSLazyEventListener::parseCode):
              Assert that isInline is true instead of checking its value, as the constructor of this class
              always sets it to true.
      
              * bindings/js/JSDOMWindowBase.cpp:
              (WebCore::JSDOMWindowBase::~JSDOMWindowBase):
              (WebCore::JSDOMWindowBase::findJSEventListener):
              (WebCore::JSDOMWindowBase::findOrCreateJSEventListener):
              (WebCore::JSDOMWindowBase::findJSUnprotectedEventListener):
              (WebCore::JSDOMWindowBase::findOrCreateJSUnprotectedEventListener):
              (WebCore::JSDOMWindowBase::jsInlineEventListeners):
              (WebCore::JSDOMWindowBase::jsUnprotectedInlineEventListeners):
              * bindings/js/JSDOMWindowBase.h:
              * bindings/js/JSEventListener.cpp:
              (WebCore::JSAbstractEventListener::handleEvent):
              (WebCore::JSAbstractEventListener::isInline):
              (WebCore::JSUnprotectedEventListener::JSUnprotectedEventListener):
              (WebCore::JSUnprotectedEventListener::~JSUnprotectedEventListener):
              (WebCore::JSEventListener::JSEventListener):
              (WebCore::JSEventListener::~JSEventListener):
              (WebCore::JSLazyEventListener::parseCode):
              * bindings/js/JSEventListener.h:
              (WebCore::JSAbstractEventListener::JSAbstractEventListener):
              (WebCore::JSUnprotectedEventListener::create):
              (WebCore::JSEventListener::create):
              * bindings/js/ScriptController.cpp:
              (WebCore::ScriptController::createInlineEventHandler):
              * bindings/js/ScriptController.h:
              * dom/Document.cpp:
              (WebCore::Document::setWindowInlineEventListenerForType):
              (WebCore::Document::windowInlineEventListenerForType):
              (WebCore::Document::removeWindowInlineEventListenerForType):
              (WebCore::Document::createEventListener):
              (WebCore::Document::setWindowInlineEventListenerForTypeAndAttribute):
              * dom/Document.h:
              * dom/EventListener.h:
              (WebCore::EventListener::isInline):
              * dom/EventTargetNode.cpp:
              (WebCore::EventTargetNode::removeInlineEventListenerForType):
              (WebCore::EventTargetNode::setInlineEventListenerForType):
              (WebCore::EventTargetNode::setInlineEventListenerForTypeAndAttribute):
              (WebCore::EventTargetNode::inlineEventListenerForType):
              (WebCore::EventTargetNode::on*): (many methods)
              (WebCore::EventTargetNode::setOn*): (many methods)
              * dom/EventTargetNode.h:
              * editing/ReplaceSelectionCommand.cpp:
              (WebCore::ReplacementFragment::ReplacementFragment):
              * html/HTMLBodyElement.cpp:
              (WebCore::HTMLBodyElement::parseMappedAttribute):
              * html/HTMLButtonElement.cpp:
              (WebCore::HTMLButtonElement::parseMappedAttribute):
              * html/HTMLElement.cpp:
              (WebCore::HTMLElement::parseMappedAttribute):
              * html/HTMLFormElement.cpp:
              (WebCore::HTMLFormElement::parseMappedAttribute):
              * html/HTMLFrameElementBase.cpp:
              (WebCore::HTMLFrameElementBase::parseMappedAttribute):
              * html/HTMLFrameSetElement.cpp:
              (WebCore::HTMLFrameSetElement::parseMappedAttribute):
              * html/HTMLImageElement.cpp:
              (WebCore::HTMLImageElement::parseMappedAttribute):
              * html/HTMLInputElement.cpp:
              (WebCore::HTMLInputElement::parseMappedAttribute):
              * html/HTMLObjectElement.cpp:
              (WebCore::HTMLObjectElement::parseMappedAttribute):
              * html/HTMLScriptElement.cpp:
              (WebCore::HTMLScriptElement::parseMappedAttribute):
              * html/HTMLSelectElement.cpp:
              (WebCore::HTMLSelectElement::parseMappedAttribute):
              * html/HTMLTextAreaElement.cpp:
              (WebCore::HTMLTextAreaElement::parseMappedAttribute):
              * page/AccessibilityRenderObject.cpp:
              (WebCore::AccessibilityRenderObject::mouseButtonListener):
              * page/DOMWindow.cpp:
              (WebCore::DOMWindow::setInlineEventListenerForType):
              (WebCore::DOMWindow::inlineEventListenerForType):
              (WebCore::DOMWindow::on*): (many methods)
              (WebCore::DOMWindow::setOn*): (many methods)
              * page/DOMWindow.h:
              * svg/SVGElement.cpp:
              (WebCore::SVGElement::parseMappedAttribute):
              * svg/SVGElementInstance.cpp:
              (WebCore::SVGElementInstance::on*): (many methods)
              (WebCore::SVGElementInstance::setOn*): (many methods)
              * svg/SVGSVGElement.cpp:
              (WebCore::SVGSVGElement::parseMappedAttribute):
              Rename things, as described above.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37993 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      771c2654
  25. 24 Oct, 2008 1 commit
    • darin@apple.com's avatar
      JavaScriptCore: · 44331f8b
      darin@apple.com authored
      2008-10-24  Darin Adler  <darin@apple.com>
      
              - finish rolling out https://bugs.webkit.org/show_bug.cgi?id=21732
      
              * API/APICast.h:
              * API/JSCallbackConstructor.h:
              * API/JSCallbackFunction.cpp:
              * API/JSCallbackFunction.h:
              * API/JSCallbackObject.h:
              * API/JSCallbackObjectFunctions.h:
              * API/JSContextRef.cpp:
              * API/JSObjectRef.cpp:
              * API/JSValueRef.cpp:
              * VM/CTI.cpp:
              * VM/CTI.h:
              * VM/CodeBlock.cpp:
              * VM/CodeBlock.h:
              * VM/CodeGenerator.cpp:
              * VM/CodeGenerator.h:
              * VM/ExceptionHelpers.cpp:
              * VM/ExceptionHelpers.h:
              * VM/JSPropertyNameIterator.cpp:
              * VM/JSPropertyNameIterator.h:
              * VM/Machine.cpp:
              * VM/Machine.h:
              * VM/Register.h:
              * kjs/ArgList.cpp:
              * kjs/ArgList.h:
              * kjs/Arguments.cpp:
              * kjs/Arguments.h:
              * kjs/ArrayConstructor.cpp:
              * kjs/ArrayPrototype.cpp:
              * kjs/BooleanConstructor.cpp:
              * kjs/BooleanConstructor.h:
              * kjs/BooleanObject.h:
              * kjs/BooleanPrototype.cpp:
              * kjs/CallData.cpp:
              * kjs/CallData.h:
              * kjs/ConstructData.cpp:
              * kjs/ConstructData.h:
              * kjs/DateConstructor.cpp:
              * kjs/DateInstance.h:
              * kjs/DatePrototype.cpp:
              * kjs/DatePrototype.h:
              * kjs/DebuggerCallFrame.cpp:
              * kjs/DebuggerCallFrame.h:
              * kjs/ErrorConstructor.cpp:
              * kjs/ErrorPrototype.cpp:
              * kjs/ExecState.cpp:
              * kjs/ExecState.h:
              * kjs/FunctionConstructor.cpp:
              * kjs/FunctionPrototype.cpp:
              * kjs/FunctionPrototype.h:
              * kjs/GetterSetter.cpp:
              * kjs/GetterSetter.h:
              * kjs/InternalFunction.h:
              * kjs/JSActivation.cpp:
              * kjs/JSActivation.h:
              * kjs/JSArray.cpp:
              * kjs/JSArray.h:
              * kjs/JSCell.cpp:
              * kjs/JSCell.h:
              * kjs/JSFunction.cpp:
              * kjs/JSFunction.h:
              * kjs/JSGlobalData.h:
              * kjs/JSGlobalObject.cpp:
              * kjs/JSGlobalObject.h:
              * kjs/JSGlobalObjectFunctions.cpp:
              * kjs/JSGlobalObjectFunctions.h:
              * kjs/JSImmediate.cpp:
              * kjs/JSImmediate.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/JSValue.h:
              * kjs/JSVariableObject.h:
              * kjs/JSWrapperObject.h:
              * kjs/MathObject.cpp:
              * kjs/MathObject.h:
              * kjs/NativeErrorConstructor.cpp:
              * kjs/NumberConstructor.cpp:
              * kjs/NumberConstructor.h:
              * kjs/NumberObject.cpp:
              * kjs/NumberObject.h:
              * kjs/NumberPrototype.cpp:
              * kjs/ObjectConstructor.cpp:
              * kjs/ObjectPrototype.cpp:
              * kjs/ObjectPrototype.h:
              * kjs/PropertyMap.h:
              * kjs/PropertySlot.cpp:
              * kjs/PropertySlot.h:
              * kjs/RegExpConstructor.cpp:
              * kjs/RegExpConstructor.h:
              * kjs/RegExpMatchesArray.h:
              * kjs/RegExpObject.cpp:
              * kjs/RegExpObject.h:
              * kjs/RegExpPrototype.cpp:
              * kjs/Shell.cpp:
              * kjs/StringConstructor.cpp:
              * kjs/StringObject.cpp:
              * kjs/StringObject.h:
              * kjs/StringObjectThatMasqueradesAsUndefined.h:
              * kjs/StringPrototype.cpp:
              * kjs/StructureID.cpp:
              * kjs/StructureID.h:
              * kjs/collector.cpp:
              * kjs/collector.h:
              * kjs/completion.h:
              * kjs/grammar.y:
              * kjs/interpreter.cpp:
              * kjs/interpreter.h:
              * kjs/lookup.cpp:
              * kjs/lookup.h:
              * kjs/nodes.h:
              * kjs/operations.cpp:
              * kjs/operations.h:
              * kjs/protect.h:
              * profiler/ProfileGenerator.cpp:
              * profiler/Profiler.cpp:
              * profiler/Profiler.h:
              Use JSValue* instead of JSValuePtr.
      
      JavaScriptGlue:
      
      2008-10-24  Darin Adler  <darin@apple.com>
      
              - finish rolling out https://bugs.webkit.org/show_bug.cgi?id=21732
      
              * JSObject.cpp:
              (nativeCallFunction):
              * JSUtils.cpp:
              (KJSValueToJSObject):
              (JSObjectKJSValue):
              (KJSValueToCFTypeInternal):
              (KJSValueToCFType):
              * JSUtils.h:
              * JSValueWrapper.cpp:
              (JSValueWrapper::JSValueWrapper):
              (JSValueWrapper::GetValue):
              (JSValueWrapper::JSObjectCopyProperty):
              (JSValueWrapper::JSObjectSetProperty):
              (JSValueWrapper::JSObjectCallFunction):
              * JSValueWrapper.h:
              * UserObjectImp.cpp:
              (UserObjectImp::callAsFunction):
              (UserObjectImp::userObjectGetter):
              (UserObjectImp::getOwnPropertySlot):
              (UserObjectImp::put):
              (UserObjectImp::toPrimitive):
              * UserObjectImp.h:
              (UserObjectImp::createStructureID):
              Use JSValue* instead of JSValuePtr.
      
      WebCore:
      
      2008-10-24  Darin Adler  <darin@apple.com>
      
              - finish rolling out https://bugs.webkit.org/show_bug.cgi?id=21732
      
              * bindings/js/JSAttrCustom.cpp:
              * bindings/js/JSCSSRuleCustom.cpp:
              * bindings/js/JSCSSStyleDeclarationCustom.cpp:
              * bindings/js/JSCSSValueCustom.cpp:
              * bindings/js/JSCanvasPixelArrayCustom.h:
              * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
              * bindings/js/JSClipboardCustom.cpp:
              * bindings/js/JSConsoleCustom.cpp:
              * bindings/js/JSCustomSQLStatementCallback.cpp:
              * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
              * bindings/js/JSCustomSQLTransactionCallback.cpp:
              * bindings/js/JSCustomSQLTransactionErrorCallback.cpp:
              * bindings/js/JSCustomVoidCallback.cpp:
              * bindings/js/JSCustomVoidCallback.h:
              * bindings/js/JSCustomXPathNSResolver.cpp:
              * bindings/js/JSCustomXPathNSResolver.h:
              * bindings/js/JSDOMApplicationCacheCustom.cpp:
              * bindings/js/JSDOMBinding.cpp:
              * bindings/js/JSDOMBinding.h:
              * bindings/js/JSDOMWindowBase.cpp:
              * bindings/js/JSDOMWindowBase.h:
              * bindings/js/JSDOMWindowCustom.cpp:
              * bindings/js/JSDOMWindowCustom.h:
              * bindings/js/JSDOMWindowShell.cpp:
              * bindings/js/JSDOMWindowShell.h:
              * bindings/js/JSDatabaseCustom.cpp:
              * bindings/js/JSDedicatedWorkerCustom.cpp:
              * bindings/js/JSDocumentCustom.cpp:
              * bindings/js/JSElementCustom.cpp:
              * bindings/js/JSEventCustom.cpp:
              * bindings/js/JSEventListener.cpp:
              * bindings/js/JSEventTarget.cpp:
              * bindings/js/JSEventTarget.h:
              * bindings/js/JSEventTargetBase.h:
              * bindings/js/JSEventTargetNodeCustom.cpp:
              * bindings/js/JSHTMLAllCollection.h:
              * bindings/js/JSHTMLAppletElementCustom.cpp:
              * bindings/js/JSHTMLCollectionCustom.cpp:
              * bindings/js/JSHTMLDocumentCustom.cpp:
              * bindings/js/JSHTMLEmbedElementCustom.cpp:
              * bindings/js/JSHTMLFormElementCustom.cpp:
              * bindings/js/JSHTMLFrameElementCustom.cpp:
              * bindings/js/JSHTMLFrameSetElementCustom.cpp:
              * bindings/js/JSHTMLIFrameElementCustom.cpp:
              * bindings/js/JSHTMLInputElementCustom.cpp:
              * bindings/js/JSHTMLObjectElementCustom.cpp:
              * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
              * bindings/js/JSHTMLSelectElementCustom.cpp:
              * bindings/js/JSHTMLSelectElementCustom.h:
              * bindings/js/JSHistoryCustom.cpp:
              * bindings/js/JSImageDataCustom.cpp:
              * bindings/js/JSInspectedObjectWrapper.cpp:
              * bindings/js/JSInspectedObjectWrapper.h:
              * bindings/js/JSInspectorCallbackWrapper.cpp:
              * bindings/js/JSInspectorCallbackWrapper.h:
              * bindings/js/JSJavaScriptCallFrameCustom.cpp:
              * bindings/js/JSLocationCustom.cpp:
              * bindings/js/JSMessagePortCustom.cpp:
              * bindings/js/JSMimeTypeArrayCustom.cpp:
              * bindings/js/JSNamedNodeMapCustom.cpp:
              * bindings/js/JSNamedNodesCollection.cpp:
              * bindings/js/JSNamedNodesCollection.h:
              * bindings/js/JSNavigatorCustom.cpp:
              * bindings/js/JSNodeCustom.cpp:
              * bindings/js/JSNodeFilterCondition.cpp:
              * bindings/js/JSNodeFilterCondition.h:
              * bindings/js/JSNodeFilterCustom.cpp:
              * bindings/js/JSNodeIteratorCustom.cpp:
              * bindings/js/JSNodeListCustom.cpp:
              * bindings/js/JSPluginArrayCustom.cpp:
              * bindings/js/JSPluginCustom.cpp:
              * bindings/js/JSPluginElementFunctions.cpp:
              * bindings/js/JSPluginElementFunctions.h:
              * bindings/js/JSQuarantinedObjectWrapper.cpp:
              * bindings/js/JSQuarantinedObjectWrapper.h:
              * bindings/js/JSRGBColor.cpp:
              * bindings/js/JSRGBColor.h:
              * bindings/js/JSSQLResultSetRowListCustom.cpp:
              * bindings/js/JSSQLTransactionCustom.cpp:
              * bindings/js/JSSVGElementInstanceCustom.cpp:
              * bindings/js/JSSVGLengthCustom.cpp:
              * bindings/js/JSSVGMatrixCustom.cpp:
              * bindings/js/JSSVGPathSegCustom.cpp:
              * bindings/js/JSSVGPathSegListCustom.cpp:
              * 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/JSXMLHttpRequestCustom.cpp:
              * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
              * bindings/js/JSXSLTProcessorCustom.cpp:
              * bindings/js/ScheduledAction.cpp:
              * bindings/js/ScheduledAction.h:
              * bindings/js/ScriptController.cpp:
              * bindings/js/ScriptController.h:
              * bindings/objc/WebScriptObject.mm:
              * bindings/objc/WebScriptObjectPrivate.h:
              * bindings/scripts/CodeGeneratorJS.pm:
              * bridge/NP_jsobject.cpp:
              * 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_instance.cpp:
              * bridge/jni/jni_instance.h:
              * bridge/jni/jni_jsobject.h:
              * bridge/jni/jni_jsobject.mm:
              * bridge/jni/jni_objc.mm:
              * bridge/jni/jni_runtime.cpp:
              * bridge/jni/jni_runtime.h:
              * bridge/jni/jni_utility.cpp:
              * bridge/jni/jni_utility.h:
              * 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:
              * 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/testqtbindings.cpp:
              * inspector/JavaScriptCallFrame.cpp:
              * inspector/JavaScriptCallFrame.h:
              * inspector/JavaScriptProfile.cpp:
              * inspector/JavaScriptProfile.h:
              * inspector/JavaScriptProfileNode.cpp:
              * inspector/JavaScriptProfileNode.h:
              * loader/FrameLoader.cpp:
              * loader/FrameLoader.h:
              * page/Console.cpp:
              * page/Console.h:
              * plugins/MimeTypeArray.h:
              * plugins/Plugin.h:
              * plugins/PluginArray.h:
              * plugins/PluginView.cpp:
              * xml/XMLHttpRequest.cpp:
              Use JSValue* instead of JSValuePtr.
      
      WebKit/mac:
      
      2008-10-24  Darin Adler  <darin@apple.com>
      
              - finish rolling out https://bugs.webkit.org/show_bug.cgi?id=21732
      
              * WebView/WebFrame.mm:
              (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
              * WebView/WebScriptDebugDelegate.mm:
              (-[WebScriptCallFrame _convertValueToObjcValue:]):
              (-[WebScriptCallFrame exception]):
              (-[WebScriptCallFrame evaluateWebScript:]):
              * WebView/WebView.mm:
              (aeDescFromJSValue):
              (-[WebView aeDescByEvaluatingJavaScriptFromString:]):
              Use JSValue* instead of JSValuePtr.
      
      WebKit/qt:
      
      2008-10-24  Darin Adler  <darin@apple.com>
      
              - finish rolling out https://bugs.webkit.org/show_bug.cgi?id=21732
      
              * Api/qwebframe.cpp:
              (QWebFrame::evaluateJavaScript): Use JSValue* instead of JSValuePtr.
      
      WebKit/win:
      
      2008-10-24  Darin Adler  <darin@apple.com>
      
              - finish rolling out https://bugs.webkit.org/show_bug.cgi?id=21732
      
              * WebScriptCallFrame.cpp:
              (WebScriptCallFrame::jsValueToString):
              (WebScriptCallFrame::stringByEvaluatingJavaScriptFromString):
              (WebScriptCallFrame::valueForVariable):
              (WebScriptCallFrame::valueByEvaluatingJavaScriptFromString):
              * WebScriptCallFrame.h:
              * WebView.cpp:
              (WebView::stringByEvaluatingJavaScriptFromString):
              Use JSValue* instead of JSValuePtr.
      
      WebKit/wx:
      
      2008-10-24  Darin Adler  <darin@apple.com>
      
              - finish rolling out https://bugs.webkit.org/show_bug.cgi?id=21732
      
              * WebFrame.cpp: (wxWebFrame::RunScript): Use JSValue* instead of JSValuePtr.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37845 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      44331f8b
  26. 20 Oct, 2008 1 commit
    • ap@webkit.org's avatar
      Reviewed by Darin Adler. · 0d0f7735
      ap@webkit.org authored
              https://bugs.webkit.org/show_bug.cgi?id=21750
              Eliminate the notion of "temporary events"
      
              We mark some events as temporary when dispatching, for the sole reason of
              manually calling forgetDOMObject when done dispatching.
      
              There doesn't seem to be any reason to call it manually, as JSEvent destructor
              will do this automatically right away.
      
              * bindings/js/ScriptController.cpp:
              * bindings/js/ScriptController.h:
              Removed ScriptController::finishedWithEvent(), which was called after dispatching
              a temporary event.
      
              * dom/ContainerNode.cpp:
              (WebCore::dispatchChildInsertionEvents):
              (WebCore::dispatchChildRemovalEvents):
              * dom/EventTarget.h:
              * dom/EventTargetNode.cpp:
              (WebCore::EventTargetNode::dispatchEvent):
              (WebCore::EventTargetNode::dispatchGenericEvent):
              (WebCore::EventTargetNode::dispatchSubtreeModifiedEvent):
              (WebCore::EventTargetNode::dispatchWindowEvent):
              (WebCore::EventTargetNode::dispatchUIEvent):
              (WebCore::EventTargetNode::dispatchKeyEvent):
              (WebCore::EventTargetNode::dispatchMouseEvent):
              (WebCore::EventTargetNode::dispatchWheelEvent):
              (WebCore::EventTargetNode::dispatchWebKitAnimationEvent):
              (WebCore::EventTargetNode::dispatchWebKitTransitionEvent):
              (WebCore::EventTargetNode::dispatchEventForType):
              (WebCore::EventTargetNode::dispatchProgressEvent):
              (WebCore::EventTargetNode::dispatchStorageEvent):
              * dom/EventTargetNode.h:
              * dom/MessagePort.cpp:
              (WebCore::MessagePort::dispatchMessages):
              (WebCore::MessagePort::dispatchCloseEvent):
              (WebCore::MessagePort::dispatchEvent):
              * dom/MessagePort.h:
              * editing/Editor.cpp:
              (WebCore::Editor::dispatchCPPEvent):
              (WebCore::dispatchEditableContentChangedEvents):
              * editing/ReplaceSelectionCommand.cpp:
              (WebCore::ReplacementFragment::ReplacementFragment):
              * editing/TypingCommand.cpp:
              (WebCore::TypingCommand::insertText):
              * loader/appcache/DOMApplicationCache.cpp:
              (WebCore::DOMApplicationCache::dispatchEvent):
              (WebCore::DOMApplicationCache::callListener):
              * loader/appcache/DOMApplicationCache.h:
              * page/EventHandler.cpp:
              (WebCore::EventHandler::dispatchDragEvent):
              (WebCore::EventHandler::keyEvent):
              (WebCore::EventHandler::handleTextInputEvent):
              * page/FrameView.cpp:
              (WebCore::FrameView::scheduleEvent):
              (WebCore::FrameView::updateOverflowStatus):
              (WebCore::FrameView::dispatchScheduledEvents):
              * page/FrameView.h:
              * rendering/RenderLayer.cpp:
              (WebCore::RenderLayer::scrollToOffset):
              (WebCore::RenderLayer::updateOverflowStatus):
              * svg/SVGElement.cpp:
              (WebCore::SVGElement::sendSVGLoadEventIfPossible):
              * svg/SVGElementInstance.cpp:
              (WebCore::SVGElementInstance::dispatchEvent):
              * svg/SVGElementInstance.h:
              * xml/XMLHttpRequest.cpp:
              (WebCore::XMLHttpRequest::dispatchEvent):
              (WebCore::XMLHttpRequest::dispatchReadyStateChangeEvent):
              (WebCore::XMLHttpRequest::dispatchXMLHttpRequestProgressEvent):
              * xml/XMLHttpRequest.h:
              * xml/XMLHttpRequestUpload.cpp:
              (WebCore::XMLHttpRequestUpload::dispatchEvent):
              (WebCore::XMLHttpRequestUpload::dispatchXMLHttpRequestProgressEvent):
              * xml/XMLHttpRequestUpload.h:
              Don't pass the tempEvent boolean around.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37718 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0d0f7735
  27. 19 Oct, 2008 1 commit
    • darin@apple.com's avatar
      JavaScriptCore: · 989a6f84
      darin@apple.com authored
      2008-10-19  Darin Adler  <darin@apple.com>
      
              Reviewed by Oliver Hunt.
      
              - next step of https://bugs.webkit.org/show_bug.cgi?id=21732
                improve performance by eliminating JSValue as a base class for JSCell
      
              Remove most uses of JSValue, which will be removed in a future patch.
      
              * VM/Machine.cpp:
              (JSC::fastToUInt32): Call toUInt32SlowCase function; no longer a member
              of JSValue.
              * kjs/JSNumberCell.h:
              (JSC::JSNumberCell::toInt32): Ditto.
              (JSC::JSNumberCell::toUInt32): Ditto.
      
              * kjs/JSValue.cpp:
              (JSC::toInt32SlowCase): Made a non-member function.
              (JSC::JSValue::toInt32SlowCase): Changed to call non-member function.
              (JSC::toUInt32SlowCase): More of the same.
              (JSC::JSValue::toUInt32SlowCase): Ditto.
      
              * kjs/JSValue.h: Moved static member function so they are no longer
              member functions at all.
      
              * VM/CTI.h: Removed forward declaration of JSValue.
              * VM/ExceptionHelpers.h: Ditto.
              * kjs/CallData.h: Ditto.
              * kjs/ConstructData.h: Ditto.
              * kjs/JSGlobalObjectFunctions.h: Ditto.
              * kjs/PropertyMap.h: Ditto.
              * kjs/StructureID.h: Ditto.
              * kjs/collector.h: Ditto.
              * kjs/completion.h: Ditto.
      
              * kjs/grammar.y:
              (JSC::makeBitwiseNotNode): Call new non-member toInt32 function.
              (JSC::makeLeftShiftNode): More of the same.
              (JSC::makeRightShiftNode): Ditto.
      
              * kjs/protect.h: Added a specialization for ProtectedPtr<JSValuePtr>
              so this can be used with JSValuePtr.
      
      JavaScriptGlue:
      
      2008-10-19  Darin Adler  <darin@apple.com>
      
              Reviewed by Oliver Hunt.
      
              - next step of https://bugs.webkit.org/show_bug.cgi?id=21732
                improve performance by eliminating JSValue as a base class for JSCell
      
              Remove most uses of JSValue, which will be removed in a future patch.
      
              * JSValueWrapper.h: Use JSValuePtr instead of JSValue*.
      
      WebCore:
      
      2008-10-19  Darin Adler  <darin@apple.com>
      
              Reviewed by Oliver Hunt.
      
              - next step of https://bugs.webkit.org/show_bug.cgi?id=21732
                improve performance by eliminating JSValue as a base class for JSCell
      
              Remove most uses of JSValue, which will be removed in a future patch.
      
              * bindings/js/JSCustomXPathNSResolver.h: Removed declaration of JSValue
              and used JSValuePtr instead.
              * bindings/js/JSEventTarget.h: Ditto.
              * bindings/js/JSNodeFilterCondition.h: Ditto.
              * bindings/js/ScheduledAction.h: Ditto.
              * bindings/js/ScriptController.h: Ditto.
              * bindings/objc/WebScriptObjectPrivate.h: Ditto.
              * bridge/c/c_utility.h: Ditto.
              * bridge/jni/jni_jsobject.h: Ditto.
              * bridge/jni/jni_utility.h: Ditto.
              * bridge/objc/WebScriptObject.h: Ditto.
              * dom/Traversal.h: Ditto.
              * inspector/InspectorController.cpp: Ditto.
              * inspector/JavaScriptProfile.h: Ditto.
              * inspector/JavaScriptProfileNode.h: Ditto.
              * loader/FrameLoader.h: Ditto.
              * page/Console.h: Ditto.
              * plugins/MimeTypeArray.h: Ditto.
              * plugins/Plugin.h: Ditto.
              * plugins/PluginArray.h: Ditto.
              * plugins/PluginView.cpp:
              (WebCore::getString): Ditto.
              (WebCore::PluginView::performRequest): Ditto.
              * plugins/gtk/PluginViewGtk.cpp: Ditto.
              * plugins/qt/PluginViewQt.cpp: Ditto.
              * plugins/win/PluginViewWin.cpp: Ditto.
      
              * bridge/qt/qt_class.cpp:
              (JSC::Bindings::QtClass::fallbackObject): Use JSValuePtr and JSObject*
              instead of JSValue*.
              * bridge/qt/qt_class.h: Ditto.
              * bridge/qt/qt_instance.cpp:
              (JSC::Bindings::QtInstance::mark): Ditto.
              (JSC::Bindings::QtInstance::invokeMethod): Ditto.
              (JSC::Bindings::QtInstance::defaultValue): Ditto.
              (JSC::Bindings::QtInstance::stringValue): Ditto.
              (JSC::Bindings::QtInstance::numberValue): Ditto.
              (JSC::Bindings::QtInstance::booleanValue): Ditto.
              (JSC::Bindings::QtInstance::valueOf): Ditto.
              (JSC::Bindings::QtField::valueFromInstance): Ditto.
              (JSC::Bindings::QtField::setValueToInstance): Ditto.
              * bridge/qt/qt_instance.h: Ditto.
              * bridge/qt/qt_runtime.cpp: Ditto.
              (JSC::Bindings::valueRealType): Ditto.
              (JSC::Bindings::convertValueToQVariant): Ditto.
              (JSC::Bindings::convertQVariantToValue): Ditto.
              (JSC::Bindings::findMethodIndex): Ditto.
              (JSC::Bindings::QtRuntimeMetaMethod::call): Ditto.
              (JSC::Bindings::QtRuntimeMetaMethod::lengthGetter): Ditto.
              (JSC::Bindings::QtRuntimeMetaMethod::connectGetter): Ditto.
              (JSC::Bindings::QtRuntimeMetaMethod::disconnectGetter): Ditto.
              (JSC::Bindings::QtRuntimeConnectionMethod::call): Ditto.
              (JSC::Bindings::QtRuntimeConnectionMethod::lengthGetter): Ditto.
              (JSC::Bindings::QtArray::setValueAt): Ditto.
              (JSC::Bindings::QtArray::valueAt): Ditto.
              * bridge/qt/qt_runtime.h: Ditto.
      
              * bridge/testqtbindings.cpp:
              (main): Use JSValuePtr.
      
      WebKit/mac:
      
      2008-10-19  Darin Adler  <darin@apple.com>
      
              Reviewed by Oliver Hunt.
      
              - next step of https://bugs.webkit.org/show_bug.cgi?id=21732
                improve performance by eliminating JSValue as a base class for JSCell
      
              Remove most uses of JSValue, which will be removed in a future patch.
      
              * WebView/WebFrame.mm:
              (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
              Use JSValuePtr instead of JSValue.
              * WebView/WebScriptDebugger.h: Removed declaration of JSValue.
      
      WebKit/qt:
      
      2008-10-19  Darin Adler  <darin@apple.com>
      
              Reviewed by Oliver Hunt.
      
              - next step of https://bugs.webkit.org/show_bug.cgi?id=21732
                improve performance by eliminating JSValue as a base class for JSCell
      
              Remove most uses of JSValue, which will be removed in a future patch.
      
              * Api/qwebframe.cpp:
              (QWebFrame::evaluateJavaScript): Use JSValuePtr.
      
      WebKit/win:
      
      2008-10-19  Darin Adler  <darin@apple.com>
      
              Reviewed by Oliver Hunt.
      
              - next step of https://bugs.webkit.org/show_bug.cgi?id=21732
                improve performance by eliminating JSValue as a base class for JSCell
      
              Remove most uses of JSValue, which will be removed in a future patch.
      
              * WebScriptCallFrame.cpp:
              (WebScriptCallFrame::jsValueToString): Use JSValuePtr.
              (WebScriptCallFrame::stringByEvaluatingJavaScriptFromString): Ditto.
              (WebScriptCallFrame::valueForVariable): Put more code inside and ifdef.
              (WebScriptCallFrame::valueByEvaluatingJavaScriptFromString): Ditto.
              * WebScriptCallFrame.h: Use JSValuePtr.
      
              * WebView.cpp:
              (WebView::stringByEvaluatingJavaScriptFromString): Use JSValuePtr.
      
      WebKit/wx:
      
      2008-10-19  Darin Adler  <darin@apple.com>
      
              Reviewed by Oliver Hunt.
      
              - next step of https://bugs.webkit.org/show_bug.cgi?id=21732
                improve performance by eliminating JSValue as a base class for JSCell
      
              Remove most uses of JSValue, which will be removed in a future patch.
      
              * WebFrame.cpp:
              (wxWebFrame::RunScript): Use JSValuePtr.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37706 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      989a6f84
  28. 18 Oct, 2008 1 commit
    • darin@apple.com's avatar
      JavaScriptCore: · 67c6c018
      darin@apple.com authored
      2008-10-18  Darin Adler  <darin@apple.com>
      
              Reviewed by Cameron Zwarich.
      
              - next step on https://bugs.webkit.org/show_bug.cgi?id=21732
                improve performance by eliminating JSValue as a base class for JSCell
      
              Use JSValuePtr everywhere instead of JSValue*. In the future, we'll be
              changing JSValuePtr to be a class, and then eventually renaming it
              to JSValue once that's done.
      
              * JavaScriptCore.exp: Update entry points, since some now take JSValue*
              instead of const JSValue*.
      
              * API/APICast.h:
              * API/JSCallbackConstructor.h:
              * API/JSCallbackFunction.cpp:
              * API/JSCallbackFunction.h:
              * API/JSCallbackObject.h:
              * API/JSCallbackObjectFunctions.h:
              * API/JSContextRef.cpp:
              * API/JSObjectRef.cpp:
              * API/JSValueRef.cpp:
              * VM/CTI.cpp:
              * VM/CTI.h:
              * VM/CodeBlock.cpp:
              * VM/CodeBlock.h:
              * VM/CodeGenerator.cpp:
              * VM/CodeGenerator.h:
              * VM/ExceptionHelpers.cpp:
              * VM/ExceptionHelpers.h:
              * VM/JSPropertyNameIterator.cpp:
              * VM/JSPropertyNameIterator.h:
              * VM/Machine.cpp:
              * VM/Machine.h:
              * VM/Register.h:
              * kjs/ArgList.cpp:
              * kjs/ArgList.h:
              * kjs/Arguments.cpp:
              * kjs/Arguments.h:
              * kjs/ArrayConstructor.cpp:
              * kjs/ArrayPrototype.cpp:
              * kjs/BooleanConstructor.cpp:
              * kjs/BooleanConstructor.h:
              * kjs/BooleanObject.h:
              * kjs/BooleanPrototype.cpp:
              * kjs/CallData.cpp:
              * kjs/CallData.h:
              * kjs/ConstructData.cpp:
              * kjs/ConstructData.h:
              * kjs/DateConstructor.cpp:
              * kjs/DateInstance.h:
              * kjs/DatePrototype.cpp:
              * kjs/DebuggerCallFrame.cpp:
              * kjs/DebuggerCallFrame.h:
              * kjs/ErrorConstructor.cpp:
              * kjs/ErrorPrototype.cpp:
              * kjs/ExecState.cpp:
              * kjs/ExecState.h:
              * kjs/FunctionConstructor.cpp:
              * kjs/FunctionPrototype.cpp:
              * kjs/GetterSetter.cpp:
              * kjs/GetterSetter.h:
              * kjs/InternalFunction.h:
              * kjs/JSActivation.cpp:
              * kjs/JSActivation.h:
              * kjs/JSArray.cpp:
              * kjs/JSArray.h:
              * kjs/JSCell.cpp:
              * kjs/JSCell.h:
              * kjs/JSFunction.cpp:
              * kjs/JSFunction.h:
              * kjs/JSGlobalData.h:
              * kjs/JSGlobalObject.cpp:
              * kjs/JSGlobalObject.h:
              * kjs/JSGlobalObjectFunctions.cpp:
              * kjs/JSGlobalObjectFunctions.h:
              * kjs/JSImmediate.cpp:
              * kjs/JSImmediate.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/JSValue.h:
              * kjs/JSVariableObject.h:
              * kjs/JSWrapperObject.h:
              * kjs/MathObject.cpp:
              * kjs/NativeErrorConstructor.cpp:
              * kjs/NumberConstructor.cpp:
              * kjs/NumberConstructor.h:
              * kjs/NumberObject.cpp:
              * kjs/NumberObject.h:
              * kjs/NumberPrototype.cpp:
              * kjs/ObjectConstructor.cpp:
              * kjs/ObjectPrototype.cpp:
              * kjs/ObjectPrototype.h:
              * kjs/PropertyMap.h:
              * kjs/PropertySlot.cpp:
              * kjs/PropertySlot.h:
              * kjs/RegExpConstructor.cpp:
              * kjs/RegExpConstructor.h:
              * kjs/RegExpMatchesArray.h:
              * kjs/RegExpObject.cpp:
              * kjs/RegExpObject.h:
              * kjs/RegExpPrototype.cpp:
              * kjs/Shell.cpp:
              * kjs/StringConstructor.cpp:
              * kjs/StringObject.cpp:
              * kjs/StringObject.h:
              * kjs/StringObjectThatMasqueradesAsUndefined.h:
              * kjs/StringPrototype.cpp:
              * kjs/StructureID.cpp:
              * kjs/StructureID.h:
              * kjs/collector.cpp:
              * kjs/collector.h:
              * kjs/completion.h:
              * kjs/grammar.y:
              * kjs/interpreter.cpp:
              * kjs/interpreter.h:
              * kjs/lookup.cpp:
              * kjs/lookup.h:
              * kjs/nodes.h:
              * kjs/operations.cpp:
              * kjs/operations.h:
              * kjs/protect.h:
              * profiler/ProfileGenerator.cpp:
              Replace JSValue* with JSValuePtr.
      
      JavaScriptGlue:
      
      2008-10-18  Darin Adler  <darin@apple.com>
      
              Reviewed by Cameron Zwarich.
      
              - next step on https://bugs.webkit.org/show_bug.cgi?id=21732
                improve performance by eliminating JSValue as a base class for JSCell
      
              Use JSValuePtr everywhere instead of JSValue*. In the future, we'll be
              changing JSValuePtr to be a class, and then eventually renaming it
              to JSValue once that's done.
      
              * JSObject.cpp:
              * JSValueWrapper.cpp:
              * UserObjectImp.cpp:
              * UserObjectImp.h:
              Replace JSValue* with JSValuePtr.
      
      WebCore:
      
      2008-10-18  Darin Adler  <darin@apple.com>
      
              Reviewed by Cameron Zwarich.
      
              - next step on https://bugs.webkit.org/show_bug.cgi?id=21732
                improve performance by eliminating JSValue as a base class for JSCell
      
              Use JSValuePtr everywhere instead of JSValue*. In the future, we'll be
              changing JSValuePtr to be a class, and then eventually renaming it
              to JSValue once that's done.
      
              * bindings/js/JSAttrCustom.cpp:
              * bindings/js/JSCSSRuleCustom.cpp:
              * bindings/js/JSCSSStyleDeclarationCustom.cpp:
              * bindings/js/JSCSSValueCustom.cpp:
              * bindings/js/JSCanvasPixelArrayCustom.h:
              * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
              * bindings/js/JSClipboardCustom.cpp:
              * bindings/js/JSConsoleCustom.cpp:
              * bindings/js/JSCustomSQLStatementCallback.cpp:
              * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
              * bindings/js/JSCustomSQLTransactionCallback.cpp:
              * bindings/js/JSCustomSQLTransactionErrorCallback.cpp:
              * bindings/js/JSCustomVoidCallback.cpp:
              * bindings/js/JSCustomVoidCallback.h:
              * bindings/js/JSCustomXPathNSResolver.cpp:
              * bindings/js/JSDOMApplicationCacheCustom.cpp:
              * bindings/js/JSDOMBinding.cpp:
              * bindings/js/JSDOMBinding.h:
              * bindings/js/JSDOMWindowBase.cpp:
              * bindings/js/JSDOMWindowBase.h:
              * bindings/js/JSDOMWindowCustom.cpp:
              * bindings/js/JSDOMWindowCustom.h:
              * bindings/js/JSDOMWindowShell.cpp:
              * bindings/js/JSDOMWindowShell.h:
              * bindings/js/JSDatabaseCustom.cpp:
              * bindings/js/JSDocumentCustom.cpp:
              * bindings/js/JSElementCustom.cpp:
              * bindings/js/JSEventCustom.cpp:
              * bindings/js/JSEventListener.cpp:
              * bindings/js/JSEventTarget.cpp:
              * bindings/js/JSEventTargetBase.h:
              * bindings/js/JSEventTargetNodeCustom.cpp:
              * bindings/js/JSHTMLAllCollection.h:
              * bindings/js/JSHTMLAppletElementCustom.cpp:
              * bindings/js/JSHTMLCollectionCustom.cpp:
              * bindings/js/JSHTMLDocumentCustom.cpp:
              * bindings/js/JSHTMLEmbedElementCustom.cpp:
              * bindings/js/JSHTMLFormElementCustom.cpp:
              * bindings/js/JSHTMLFrameElementCustom.cpp:
              * bindings/js/JSHTMLFrameSetElementCustom.cpp:
              * bindings/js/JSHTMLIFrameElementCustom.cpp:
              * bindings/js/JSHTMLInputElementCustom.cpp:
              * bindings/js/JSHTMLObjectElementCustom.cpp:
              * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
              * bindings/js/JSHTMLSelectElementCustom.cpp:
              * bindings/js/JSHTMLSelectElementCustom.h:
              * bindings/js/JSHistoryCustom.cpp:
              * bindings/js/JSImageDataCustom.cpp:
              * bindings/js/JSInspectedObjectWrapper.cpp:
              * bindings/js/JSInspectedObjectWrapper.h:
              * bindings/js/JSInspectorCallbackWrapper.cpp:
              * bindings/js/JSInspectorCallbackWrapper.h:
              * bindings/js/JSJavaScriptCallFrameCustom.cpp:
              * bindings/js/JSLocationCustom.cpp:
              * bindings/js/JSMessagePortCustom.cpp:
              * bindings/js/JSMimeTypeArrayCustom.cpp:
              * bindings/js/JSNamedNodeMapCustom.cpp:
              * bindings/js/JSNamedNodesCollection.cpp:
              * bindings/js/JSNamedNodesCollection.h:
              * bindings/js/JSNavigatorCustom.cpp:
              * bindings/js/JSNodeCustom.cpp:
              * bindings/js/JSNodeFilterCondition.cpp:
              * bindings/js/JSNodeFilterCustom.cpp:
              * bindings/js/JSNodeIteratorCustom.cpp:
              * bindings/js/JSNodeListCustom.cpp:
              * bindings/js/JSPluginArrayCustom.cpp:
              * bindings/js/JSPluginCustom.cpp:
              * bindings/js/JSPluginElementFunctions.cpp:
              * bindings/js/JSPluginElementFunctions.h:
              * bindings/js/JSQuarantinedObjectWrapper.cpp:
              * bindings/js/JSQuarantinedObjectWrapper.h:
              * bindings/js/JSRGBColor.cpp:
              * bindings/js/JSRGBColor.h:
              * bindings/js/JSSQLResultSetRowListCustom.cpp:
              * bindings/js/JSSQLTransactionCustom.cpp:
              * bindings/js/JSSVGElementInstanceCustom.cpp:
              * bindings/js/JSSVGLengthCustom.cpp:
              * bindings/js/JSSVGMatrixCustom.cpp:
              * bindings/js/JSSVGPathSegCustom.cpp:
              * bindings/js/JSSVGPathSegListCustom.cpp:
              * 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/JSXMLHttpRequestCustom.cpp:
              * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
              * bindings/js/JSXSLTProcessorCustom.cpp:
              * bindings/js/ScheduledAction.cpp:
              * 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_instance.cpp:
              * bridge/c/c_instance.h:
              * bridge/c/c_runtime.cpp:
              * bridge/c/c_runtime.h:
              * bridge/c/c_utility.cpp:
              * bridge/jni/jni_instance.cpp:
              * bridge/jni/jni_instance.h:
              * bridge/jni/jni_jsobject.mm:
              * bridge/jni/jni_objc.mm:
              * bridge/jni/jni_runtime.cpp:
              * bridge/jni/jni_runtime.h:
              * bridge/jni/jni_utility.cpp:
              * 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/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:
              * inspector/JavaScriptCallFrame.cpp:
              * inspector/JavaScriptCallFrame.h:
              * inspector/JavaScriptProfile.cpp:
              * inspector/JavaScriptProfileNode.cpp:
              * loader/FrameLoader.cpp:
              * loader/FrameLoader.h:
              * page/Console.cpp:
              * page/Console.h:
              * plugins/MimeTypeArray.h:
              * plugins/Plugin.h:
              * plugins/PluginArray.h:
              * xml/XMLHttpRequest.cpp:
              Replace JSValue* with JSValuePtr.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37684 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      67c6c018
  29. 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
  30. 28 Aug, 2008 1 commit
    • eric@webkit.org's avatar
      Reviewed by Darin and Alexey. · 70b099f1
      eric@webkit.org authored
              Close a leak of PausedTimeouts if the JavaScriptDebugServer was destroyed
              with timeouts paused.
              https://bugs.webkit.org/show_bug.cgi?id=20469
      
              I attempted to clean up the memory management of PausedTimeouts, I'm not
              sure the solution I came up with is "cleaner", but it's in some ways
              "safer", since it no longer uses raw pointers and manual new/delete.
      
              This also now prevents CachedPage from needlessly creating Window
              objects when caching pages which didn't already have one. :)
      
              I also made Chrome.cpp no longer depend on the JavaScript bindings
              (aka JSDOMWindowBase.h), since there was no real reason for it to.
      
              * bindings/js/JSDOMWindowBase.cpp:
              (WebCore::JSDOMWindowBase::pauseTimeouts):
              (WebCore::JSDOMWindowBase::resumeTimeouts):
              * bindings/js/JSDOMWindowBase.h:
              * bindings/js/ScriptController.cpp:
              (WebCore::ScriptController::pauseTimeouts):
              (WebCore::ScriptController::resumeTimeouts):
              * bindings/js/ScriptController.h:
              * history/CachedPage.cpp:
              (WebCore::CachedPage::CachedPage):
              (WebCore::CachedPage::restore):
              * page/Chrome.cpp:
              (WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer):
              (WebCore::PageGroupLoadDeferrer::~PageGroupLoadDeferrer):
              * page/JavaScriptDebugServer.cpp:
              (WebCore::JavaScriptDebugServer::~JavaScriptDebugServer):
              (WebCore::JavaScriptDebugServer::setJavaScriptPaused):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@35964 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      70b099f1
  31. 06 Aug, 2008 2 commits
    • eric@webkit.org's avatar
      Build fix only, no review. · e8c419f7
      eric@webkit.org authored
              Attempt to fix the Linux and --no-svg builds.
      
              * bindings/js/ScriptController.h: wrap RetainPtr include in PLATFORM(MAC)
              * css/CSSComputedStyleDeclaration.cpp:
              (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): add missing CSSProperties to switch
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@35591 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e8c419f7
    • eric@webkit.org's avatar
      Reviewed by Cameron Zwarich. · 0683d949
      eric@webkit.org authored
              Move more methods from Frame into ScriptController
              https://bugs.webkit.org/show_bug.cgi?id=20294
      
              Finally finish more of the work which Darin started long ago
              Move a few more Frame methods into ScriptController.
              I also took this opportunity to clean up some of the plugin
              code as well, and moved some of that into ScriptController.
      
              I removed Frame::clearScriptController() and ScriptController::clear() is now clearWindowShell()
      
              No functional changes, thus no test cases.
      
              * GNUmakefile.am:
              * WebCore.NPAPI.exp:
              * WebCore.base.exp:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * bindings/js/ScriptController.cpp:
              (WebCore::ScriptController::ScriptController):
              (WebCore::ScriptController::~ScriptController):
              (WebCore::ScriptController::bindingRootObject):
              (WebCore::ScriptController::createRootObject):
              (WebCore::ScriptController::windowScriptNPObject):
              (WebCore::ScriptController::createScriptObjectForPluginElement): New method.
              (WebCore::ScriptController::clearPlatformScriptObjects):
              (WebCore::ScriptController::disconnectPlatformScriptObjects):
              (WebCore::ScriptController::cleanupScriptObjectsForPlugin):
              (WebCore::ScriptController::clearScriptObjects):
              * bindings/js/ScriptController.h:
              (WebCore::ScriptController::sourceURL):
              (WebCore::ScriptController::clearFormerWindow):
              * bindings/js/ScriptControllerGtk.cpp: Copied from WebCore/page/gtk/FrameGtk.cpp.
              (WebCore::Frame::createScriptInstanceForWidget):
              * bindings/js/ScriptControllerMac.mm: Added.
              (WebCore::ScriptController::createScriptInstanceForWidget):
              (WebCore::ScriptController::windowScriptObject):
              (WebCore::ScriptController::clearPlatformScriptObjects):
              (WebCore::ScriptController::disconnectPlatformScriptObjects):
              (WebCore::updateRenderingForBindings):
              (WebCore::ScriptController::initJavaJSBindings):
              * bindings/js/ScriptControllerQt.cpp: Copied from WebCore/page/gtk/FrameGtk.cpp.
              (WebCore::ScriptController::createScriptInstanceForWidget):
              * bindings/js/ScriptControllerWin.cpp: Copied from WebCore/svg/graphics/cg/SVGResourceMaskerCg.cpp.
              (WebCore::ScriptController::createScriptInstanceForWidget):
              * bindings/objc/DOM.mm:
              (-[DOMNode KJS::Bindings::]):
              * bindings/objc/DOMInternal.mm:
              (-[WebScriptObject _initializeScriptDOMNodeImp]):
              * bridge/jni/jni_jsobject.mm:
              (createRootObject):
              * html/HTMLAppletElement.cpp:
              (WebCore::HTMLAppletElement::renderWidgetForJSBindings):
              * html/HTMLAppletElement.h:
              * html/HTMLEmbedElement.cpp:
              (WebCore::findWidgetRenderer):
              (WebCore::HTMLEmbedElement::renderWidgetForJSBindings):
              * html/HTMLEmbedElement.h:
              * html/HTMLObjectElement.cpp:
              (WebCore::HTMLObjectElement::~HTMLObjectElement):
              (WebCore::HTMLObjectElement::renderWidgetForJSBindings):
              (WebCore::HTMLObjectElement::detach):
              * html/HTMLObjectElement.h:
              * html/HTMLPlugInElement.cpp:
              (WebCore::HTMLPlugInElement::~HTMLPlugInElement):
              (WebCore::HTMLPlugInElement::detach):
              (WebCore::HTMLPlugInElement::getInstance):
              (WebCore::HTMLPlugInElement::parseMappedAttribute):
              (WebCore::HTMLPlugInElement::getNPObject):
              * html/HTMLPlugInElement.h:
              * loader/FrameLoader.cpp:
              (WebCore::FrameLoader::clear):
              * page/Frame.cpp:
              (WebCore::Frame::Frame):
              (WebCore::Frame::~Frame):
              (WebCore::Frame::pageDestroyed):
              (WebCore::FramePrivate::FramePrivate):
              * page/Frame.h:
              * page/FramePrivate.h:
              * page/gtk/FrameGtk.cpp:
              * page/mac/FrameMac.mm:
              * page/qt/FrameQt.cpp:
              * page/win/FrameWin.cpp:
              (WebCore::computePageRectsForFrame):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@35590 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0683d949
  32. 07 Jul, 2008 1 commit
    • darin@apple.com's avatar
      2008-07-07 Darin Adler <darin@apple.com> · d006497c
      darin@apple.com authored
              Reviewed by Mark Rowe.
      
              - fix <rdar://problem/6020441> REGRESSION: Layers on NWA.com render ugly
      
              The old version of the OpenCube QuickMenu library used on this site still has code
              that detects Netscape 4 by checking appVersion to see if it has the substring "4."
              in it. We decided to special-case the filename of the script and tweak the appVersion
              for files with that name.
      
              * bindings/js/ScriptController.cpp:
              (WebCore::ScriptController::ScriptController): Replace m_processingInlineCode with
              m_sourceURL. Use false instead of 0 to initialize a boolean.
              (WebCore::ScriptController::evaluate): Call argument sourceURL, not filename.
              Store current sourceURL in m_sourceURL. This fixes a mistake in the code that
              maintained the value of m_processingInlineCode, since the old code set it to
              false rather than restoring it. Renamed a local variable named sourceURL to
              exceptionSourceURL for clarity.
              (WebCore::ScriptController::processingUserGesture): Code that formerly used
              m_processingInlineCode to detect that it was evaluating code with no URL now
              uses m_sourceURL to do the same check.
      
              * bindings/js/ScriptController.h: Renamed filename argument to sourceURL; it has always
              been a URL, not a file path. Added a public sourceURL function and m_sourceURL and
              removed m_processingInlineCode.
      
              * page/Navigator.cpp:
              (WebCore::shouldHideFourDot): Added. Returns true if the currently running script has
              a source URL ending in "/dqm_script.js" and if the settings say we should do
              site-specific quirks (really JavaScript-library-specific in this case).
              (WebCore::Navigator::appVersion): Replace "4." with "4_" if shouldHideFourDot is true.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@35050 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d006497c
  33. 15 Jun, 2008 2 commits
    • weinig@apple.com's avatar
      2008-06-15 Sam Weinig <sam@webkit.org> · a917395f
      weinig@apple.com authored
              Reviewed by Darin Adler.
      
              Remove outdated comment.
      
              * bindings/js/ScriptController.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34588 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a917395f
    • darin@apple.com's avatar
      WebCore: · 92aaa2a0
      darin@apple.com authored
      2008-06-14  Darin Adler  <darin@apple.com>
      
              Rubber stamped by Sam.
      
              - new names for kjs_binding.h and kjs_proxy.h
      
              * GNUmakefile.am:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * WebCoreSources.bkl:
              * bindings/js/JSAudioConstructor.h:
              * bindings/js/JSCustomSQLStatementCallback.cpp:
              * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
              * bindings/js/JSCustomSQLTransactionCallback.cpp:
              * bindings/js/JSCustomSQLTransactionErrorCallback.cpp:
              * bindings/js/JSCustomVoidCallback.cpp:
              * bindings/js/JSCustomXPathNSResolver.cpp:
              * bindings/js/JSDOMBinding.cpp: Copied from WebCore/bindings/js/kjs_binding.cpp.
              * bindings/js/JSDOMBinding.h: Copied from WebCore/bindings/js/kjs_binding.h.
              * bindings/js/JSDOMWindowBase.cpp:
              * bindings/js/JSDOMWindowBase.h:
              * bindings/js/JSDOMWindowCustom.cpp:
              * bindings/js/JSDOMWindowShell.cpp:
              * bindings/js/JSDOMWindowShell.h:
              * bindings/js/JSDocumentCustom.cpp:
              * bindings/js/JSHTMLCollectionCustom.cpp:
              * bindings/js/JSHTMLFrameElementCustom.cpp:
              * bindings/js/JSHTMLFrameSetElementCustom.cpp:
              * bindings/js/JSHTMLIFrameElementCustom.cpp:
              * bindings/js/JSHTMLInputElementBase.h:
              * bindings/js/JSHTMLOptionElementConstructor.h:
              * bindings/js/JSImageConstructor.h:
              * bindings/js/JSLocationCustom.cpp:
              * bindings/js/JSNamedNodeMapCustom.cpp:
              * bindings/js/JSNamedNodesCollection.h:
              * bindings/js/JSNodeFilterCondition.cpp:
              * bindings/js/JSNodeFilterCustom.cpp:
              * bindings/js/JSRGBColor.h:
              * bindings/js/JSSVGPathSegCustom.cpp:
              * bindings/js/JSXMLHttpRequestConstructor.h:
              * bindings/js/JSXSLTProcessorConstructor.h:
              * bindings/js/JSXSLTProcessorCustom.cpp:
              * bindings/js/ScheduledAction.cpp:
              (WebCore::ScheduledAction::execute):
              * bindings/js/ScriptController.cpp: Copied from WebCore/bindings/js/kjs_proxy.cpp.
              * bindings/js/ScriptController.h: Copied from WebCore/bindings/js/kjs_proxy.h.
              * bindings/js/kjs_binding.cpp: Removed.
              * bindings/js/kjs_binding.h: Removed.
              * bindings/js/kjs_events.cpp:
              (WebCore::JSAbstractEventListener::handleEvent):
              * bindings/js/kjs_html.cpp:
              * bindings/js/kjs_html.h:
              * bindings/js/kjs_proxy.cpp: Removed.
              * bindings/js/kjs_proxy.h: Removed.
              * bindings/objc/DOMInternal.mm:
              * bindings/scripts/CodeGeneratorJS.pm:
              * bridge/jni/jni_jsobject.mm:
              * dom/Document.cpp:
              * dom/EventTarget.cpp:
              * dom/Node.cpp:
              * dom/XMLTokenizer.cpp:
              (WebCore::XMLTokenizer::startElementNs):
              * history/CachedPage.cpp:
              (WebCore::CachedPage::CachedPage):
              (WebCore::CachedPage::restore):
              * html/HTMLPlugInElement.cpp:
              * html/HTMLScriptElement.cpp:
              * html/HTMLTokenizer.cpp:
              (WebCore::HTMLTokenizer::processToken):
              * loader/FrameLoader.cpp:
              (WebCore::FrameLoader::executeScript):
              * page/Frame.cpp:
              (WebCore::Frame::scriptProxy):
              * page/Frame.h:
              * page/FramePrivate.h:
              * page/InspectorController.cpp:
              * page/JavaScriptDebugServer.cpp:
              * page/JavaScriptProfileNode.cpp:
              * page/Page.cpp:
              * page/gtk/FrameGtk.cpp:
              * page/mac/FrameMac.mm:
              * page/qt/FrameQt.cpp:
              * page/win/FrameWin.cpp:
              * plugins/PluginView.cpp:
              (WebCore::getString):
              * plugins/gtk/PluginViewGtk.cpp:
              * plugins/qt/PluginViewQt.cpp:
              * plugins/win/PluginViewWin.cpp:
              * svg/SVGDocumentExtensions.cpp:
              * xml/XMLHttpRequest.cpp:
      
      WebKit/gtk:
      
      2008-06-14  Darin Adler  <darin@apple.com>
      
              Rubber stamped by Sam.
      
              - new names for kjs_binding.h and kjs_proxy.h
      
              * WebCoreSupport/FrameLoaderClientGtk.cpp:
              * webkit/webkitwebframe.cpp:
      
      WebKit/mac:
      
      2008-06-14  Darin Adler  <darin@apple.com>
      
              Rubber stamped by Sam.
      
              - new names for kjs_binding.h and kjs_proxy.h
      
              * WebView/WebFrame.mm:
              * WebView/WebScriptDebugDelegate.mm:
              * WebView/WebView.mm:
      
      WebKit/qt:
      
      2008-06-14  Darin Adler  <darin@apple.com>
      
              Rubber stamped by Sam.
      
              - new names for kjs_binding.h and kjs_proxy.h
      
              * Api/qwebframe.cpp:
              (QWebFrame::evaluateJavaScript):
              * WebKit_pch.h:
      
      WebKit/win:
      
      2008-06-14  Darin Adler  <darin@apple.com>
      
              Rubber stamped by Sam.
      
              - new names for kjs_binding.h and kjs_proxy.h
      
              * WebFrame.cpp:
      
      WebKit/wx:
      
      2008-06-14  Darin Adler  <darin@apple.com>
      
              Rubber stamped by Sam.
      
              - new names for kjs_binding.h and kjs_proxy.h
      
              * WebView.cpp:
      
      WebKitTools:
      
      2008-06-14  Darin Adler  <darin@apple.com>
      
              * Scripts/do-webcore-rename: Moved planned renames into a separate hash
              from the actual renames. Removed many renames that are either done or
              no longer planned.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34561 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      92aaa2a0
  34. 07 Jun, 2008 1 commit
    • darin@apple.com's avatar
      WebCore: · 642f5008
      darin@apple.com authored
      2008-06-07  Darin Adler  <darin@apple.com>
      
              Reviewed by Mitz.
      
              - work on https://bugs.webkit.org/show_bug.cgi?id=17257
                start ref counts at 1 instead of 0 for speed
      
              * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
              (WebCore::toHTMLCanvasStyle):
              * bindings/js/JSDOMWindowBase.cpp:
              (WebCore::JSDOMWindowBase::findOrCreateJSEventListener):
              (WebCore::JSDOMWindowBase::findOrCreateJSUnprotectedEventListener):
              * bindings/js/JSNodeFilterCondition.h:
              (WebCore::JSNodeFilterCondition::create):
              * bindings/js/JSNodeFilterCustom.cpp:
              (WebCore::toNodeFilter):
              * bindings/js/JSSVGLazyEventListener.h:
              (WebCore::JSSVGLazyEventListener::create):
              * bindings/js/JSSVGMatrixCustom.cpp:
              (WebCore::JSSVGMatrix::multiply):
              (WebCore::JSSVGMatrix::inverse):
              (WebCore::JSSVGMatrix::translate):
              (WebCore::JSSVGMatrix::scale):
              (WebCore::JSSVGMatrix::scaleNonUniform):
              (WebCore::JSSVGMatrix::rotate):
              (WebCore::JSSVGMatrix::rotateFromVector):
              (WebCore::JSSVGMatrix::flipX):
              (WebCore::JSSVGMatrix::flipY):
              (WebCore::JSSVGMatrix::skewX):
              (WebCore::JSSVGMatrix::skewY):
              * bindings/js/JSSVGPODTypeWrapper.h:
              (WebCore::JSSVGPODTypeWrapperCreatorReadWrite::create):
              (WebCore::JSSVGPODTypeWrapperCreatorReadWrite::JSSVGPODTypeWrapperCreatorReadWrite):
              (WebCore::JSSVGPODTypeWrapperCreatorReadOnly::create):
              (WebCore::JSSVGPODTypeWrapperCreatorReadOnly::JSSVGPODTypeWrapperCreatorReadOnly):
              (WebCore::JSSVGPODTypeWrapperCreatorForList::create):
              (WebCore::JSSVGPODTypeWrapperCreatorForList::JSSVGPODTypeWrapperCreatorForList):
              (WebCore::JSSVGPODTypeWrapperCache::lookupOrCreateWrapper):
              (WebCore::JSSVGPODTypeWrapperCache::forgetWrapper):
              * bindings/js/JSSVGPointListCustom.cpp:
              (WebCore::commonExit):
              (WebCore::commonExitReadOnly):
              (WebCore::JSSVGPointList::initialize):
              (WebCore::JSSVGPointList::getItem):
              (WebCore::JSSVGPointList::insertItemBefore):
              (WebCore::JSSVGPointList::replaceItem):
              (WebCore::JSSVGPointList::removeItem):
              (WebCore::JSSVGPointList::appendItem):
              * bindings/js/JSSVGTransformListCustom.cpp:
              (WebCore::JSSVGTransformList::initialize):
              (WebCore::JSSVGTransformList::getItem):
              (WebCore::JSSVGTransformList::insertItemBefore):
              (WebCore::JSSVGTransformList::replaceItem):
              (WebCore::JSSVGTransformList::removeItem):
              (WebCore::JSSVGTransformList::appendItem):
              * bindings/js/kjs_binding.cpp:
              (WebCore::setDOMException):
              * bindings/js/kjs_events.h:
              (WebCore::JSUnprotectedEventListener::create):
              (WebCore::JSEventListener::create):
              (WebCore::JSLazyEventListener::create):
              * bindings/js/kjs_proxy.cpp:
              (WebCore::KJSProxy::createHTMLEventHandler):
              (WebCore::KJSProxy::createSVGEventHandler):
              * bindings/objc/DOM.mm:
              (WebCore::ObjCNodeFilterCondition::create):
              (WebCore::ObjCNodeFilterCondition::ObjCNodeFilterCondition):
              (WebCore::ObjCNodeFilterCondition::acceptNode):
              (-[DOMDocument createNodeIterator:whatToShow:filter:expandEntityReferences:]):
              (-[DOMDocument createTreeWalker:whatToShow:filter:expandEntityReferences:]):
              * bindings/scripts/CodeGeneratorJS.pm:
              * css/CSSComputedStyleDeclaration.cpp:
              (WebCore::valueForNinePieceImage):
              (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
              * css/CSSFontFace.h:
              (WebCore::CSSFontFace::create):
              (WebCore::CSSFontFace::CSSFontFace):
              * css/CSSFontSelector.cpp:
              (WebCore::CSSFontSelector::addFontFaceRule):
              * css/CSSParser.cpp:
              (WebCore::CSSParser::parseDashboardRegions):
              (WebCore::CSSParser::parseCounterContent):
              (WebCore::CSSParser::parseShape):
              (WebCore::BorderImageParseContext::commitBorderImage):
              * css/CSSSegmentedFontFace.cpp:
              (WebCore::CSSSegmentedFontFace::CSSSegmentedFontFace):
              * css/CSSSegmentedFontFace.h:
              (WebCore::CSSSegmentedFontFace::create):
              * css/Counter.h:
              (WebCore::Counter::create):
              (WebCore::Counter::Counter):
              * css/DashboardRegion.h:
              (WebCore::DashboardRegion::create):
              (WebCore::DashboardRegion::DashboardRegion):
              * css/Rect.h:
              (WebCore::Rect::create):
              (WebCore::Rect::Rect):
              * dom/ChildNodeList.h:
              (WebCore::ChildNodeList::create):
              * dom/ClassNodeList.h:
              (WebCore::ClassNodeList::create):
              * dom/Clipboard.h:
              * dom/DOMCoreException.h:
              (WebCore::DOMCoreException::create):
              * dom/DOMImplementation.cpp:
              (WebCore::DOMImplementation::instance):
              * dom/DOMImplementation.h:
              (WebCore::DOMImplementation::DOMImplementation):
              * dom/Document.cpp:
              (WebCore::Document::addWindowEventListener):
              (WebCore::Document::removeWindowEventListener):
              (WebCore::Document::setDecoder):
              (WebCore::Document::images):
              (WebCore::Document::applets):
              (WebCore::Document::embeds):
              (WebCore::Document::plugins):
              (WebCore::Document::objects):
              (WebCore::Document::scripts):
              (WebCore::Document::links):
              (WebCore::Document::forms):
              (WebCore::Document::anchors):
              (WebCore::Document::all):
              (WebCore::Document::windowNamedItems):
              (WebCore::Document::documentNamedItems):
              * dom/Document.h:
              * dom/DynamicNodeList.h:
              * dom/EventException.h:
              (WebCore::EventException::create):
              (WebCore::EventException::EventException):
              * dom/EventListener.h:
              * dom/EventTarget.cpp:
              (WebCore::EventTarget::addEventListener):
              (WebCore::EventTarget::removeEventListener):
              * dom/ExceptionBase.cpp:
              (WebCore::ExceptionBase::ExceptionBase):
              * dom/ExceptionBase.h:
              * dom/NameNodeList.h:
              (WebCore::NameNodeList::create):
              * dom/Node.cpp:
              (WebCore::Node::childNodes):
              (WebCore::Node::getElementsByTagNameNS):
              (WebCore::Node::getElementsByName):
              (WebCore::Node::getElementsByClassName):
              (WebCore::Node::querySelectorAll):
              * dom/NodeFilterCondition.h:
              * dom/NodeList.h:
              * dom/RangeException.h:
              (WebCore::RangeException::create):
              (WebCore::RangeException::RangeException):
              * dom/RegisteredEventListener.h:
              (WebCore::RegisteredEventListener::create):
              * dom/SelectorNodeList.cpp:
              (WebCore::createSelectorNodeList):
              * dom/SelectorNodeList.h:
              * dom/StaticNodeList.cpp:
              (WebCore::StaticNodeList::StaticNodeList):
              * dom/StaticNodeList.h:
              (WebCore::StaticNodeList::adopt):
              * dom/TagNodeList.h:
              (WebCore::TagNodeList::create):
              * history/HistoryItem.cpp:
              (WebCore::defaultNotifyHistoryItemChanged):
              (WebCore::HistoryItem::HistoryItem):
              (WebCore::HistoryItem::copy):
              * history/HistoryItem.h:
              (WebCore::HistoryItem::create):
              * html/CanvasGradient.h:
              * html/CanvasPattern.cpp:
              (WebCore::CanvasPattern::CanvasPattern):
              * html/CanvasPattern.h:
              (WebCore::CanvasPattern::create):
              * html/CanvasRenderingContext2D.cpp:
              (WebCore::CanvasRenderingContext2D::State::State):
              (WebCore::CanvasRenderingContext2D::setStrokeColor):
              (WebCore::CanvasRenderingContext2D::setFillColor):
              (WebCore::CanvasRenderingContext2D::createPattern):
              * html/CanvasStyle.cpp:
              (WebCore::CanvasStyle::CanvasStyle):
              * html/CanvasStyle.h:
              (WebCore::CanvasStyle::create):
              * html/HTMLCollection.cpp:
              (WebCore::HTMLCollection::HTMLCollection):
              (WebCore::HTMLCollection::create):
              * html/HTMLCollection.h:
              * html/HTMLElement.cpp:
              (WebCore::HTMLElement::children):
              * html/HTMLFormCollection.cpp:
              (WebCore::HTMLFormCollection::create):
              * html/HTMLFormCollection.h:
              * html/HTMLFormElement.cpp:
              (WebCore::HTMLFormElement::elements):
              * html/HTMLMapElement.cpp:
              (WebCore::HTMLMapElement::areas):
              * html/HTMLMediaElement.cpp:
              (WebCore::HTMLMediaElement::load):
              (WebCore::HTMLMediaElement::mediaPlayerNetworkStateChanged):
              (WebCore::HTMLMediaElement::willSaveToCache):
              * html/HTMLNameCollection.h:
              (WebCore::HTMLNameCollection::create):
              * html/HTMLOptionsCollection.cpp:
              (WebCore::HTMLOptionsCollection::create):
              * html/HTMLOptionsCollection.h:
              * html/HTMLSelectElement.cpp:
              (WebCore::HTMLSelectElement::options):
              * html/HTMLTableElement.cpp:
              (WebCore::HTMLTableElement::rows):
              (WebCore::HTMLTableElement::tBodies):
              * html/HTMLTableRowElement.cpp:
              (WebCore::HTMLTableRowElement::cells):
              * html/HTMLTableRowsCollection.cpp:
              (WebCore::HTMLTableRowsCollection::HTMLTableRowsCollection):
              (WebCore::HTMLTableRowsCollection::create):
              * html/HTMLTableRowsCollection.h:
              * html/HTMLTableSectionElement.cpp:
              (WebCore::HTMLTableSectionElement::rows):
              * html/MediaError.h:
              (WebCore::MediaError::create):
              (WebCore::MediaError::MediaError):
              * loader/CachedCSSStyleSheet.cpp:
              (WebCore::CachedCSSStyleSheet::CachedCSSStyleSheet):
              * loader/CachedFont.cpp:
              (WebCore::CachedFont::ensureSVGFontData):
              * loader/CachedXSLStyleSheet.cpp:
              (WebCore::CachedXSLStyleSheet::CachedXSLStyleSheet):
              * loader/FrameLoader.cpp:
              (WebCore::FrameLoader::write):
              (WebCore::FrameLoader::createHistoryItem):
              * loader/ImageDocument.cpp:
              (WebCore::ImageEventListener::create):
              (WebCore::ImageEventListener::ImageEventListener):
              (WebCore::ImageDocument::createDocumentStructure):
              * loader/TextResourceDecoder.h:
              (WebCore::TextResourceDecoder::create):
              * page/Page.cpp:
              (WebCore::Page::userStyleSheet):
              * svg/SVGException.h:
              (WebCore::SVGException::create):
              (WebCore::SVGException::SVGException):
              * svg/animation/SVGSMILElement.cpp:
              (WebCore::ConditionEventListener::create):
              (WebCore::ConditionEventListener::ConditionEventListener):
              (WebCore::SVGSMILElement::connectConditions):
              * xml/XMLHttpRequest.cpp:
              (WebCore::XMLHttpRequest::didReceiveData):
              * xml/XMLHttpRequestException.h:
              (WebCore::XMLHttpRequestException::create):
              (WebCore::XMLHttpRequestException::XMLHttpRequestException):
              * xml/XPathException.h:
              (WebCore::XPathException::create):
              (WebCore::XPathException::XPathException):
              * xml/XPathResult.cpp:
              (WebCore::InvalidatingEventListener::create):
              (WebCore::InvalidatingEventListener::InvalidatingEventListener):
              (WebCore::XPathResult::XPathResult):
              * xml/XSLTProcessor.cpp:
              (WebCore::XSLTProcessor::createDocumentFromSource):
      
      WebKit/mac:
      
      2008-06-07  Darin Adler  <darin@apple.com>
      
              Reviewed by Mitz.
      
              - work on https://bugs.webkit.org/show_bug.cgi?id=17257
                start ref counts at 1 instead of 0 for speed
      
              * History/WebHistoryItem.mm:
              (-[WebHistoryItem init]):
              (-[WebHistoryItem initWithURLString:title:lastVisitedTimeInterval:]):
              (-[WebHistoryItem initWithURL:target:parent:title:]):
              (-[WebHistoryItem initWithURLString:title:displayTitle:lastVisitedTimeInterval:]):
              * WebView/WebView.mm:
              (+[WebView _decodeData:]):
      
      WebKit/win:
      
      2008-06-07  Darin Adler  <darin@apple.com>
      
              Reviewed by Mitz.
      
              - work on https://bugs.webkit.org/show_bug.cgi?id=17257
                start ref counts at 1 instead of 0 for speed
      
              * WebHistoryItem.cpp:
              (WebHistoryItem::createInstance):
              (WebHistoryItem::initFromDictionaryRepresentation):
              (WebHistoryItem::initWithURLString):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34432 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      642f5008
  35. 30 May, 2008 1 commit
    • mjs@apple.com's avatar
      2008-05-30 Maciej Stachowiak <mjs@apple.com> · 94872a04
      mjs@apple.com authored
              Reviewed by Oliver (earlier version reviewed by Alexey).
      
              - speculative fix for "REGRESSION(r34143?): Frequent crash while browsing"
              https://bugs.webkit.org/show_bug.cgi?id=19285
              
              ("This Time for Sure" Edition)
      
              I'm pretty sure this fixes it but I have not been able to
              reproduce and am unsure if my theory of the bug is right.
      
              I belive the bug was because JSDOMWindowBase accessed
              JSDOMWindowShell in its destructor to remove itself from a
              hashtable, but GC destructor order is not guaranteed, so the
              hashtable may have been freed already. This patch changes things
              so that a non-GC object (the KJSProxy) does the tracking of live
              window objects for a frame. JSDOMWindowBase can null check the frame
              pointer to verify if it is still good.
              
              In addition, we must create a similar setup between DOMWindow and
              Frame; since the DOMWindow of a given frame can now change over
              time, we must ensure that the Frame disconnects every live
              DOMWindow when destroyed, not just the last.
      
              * bindings/js/JSDOMWindowBase.cpp:
              (WebCore::JSDOMWindowBase::~JSDOMWindowBase):
              * bindings/js/JSDOMWindowShell.cpp:
              (WebCore::JSDOMWindowShell::JSDOMWindowShell):
              * bindings/js/JSDOMWindowShell.h:
              (WebCore::JSDOMWindowShell::setWindow):
              * bindings/js/kjs_proxy.cpp:
              (WebCore::KJSProxy::clear):
              (WebCore::KJSProxy::initScript):
              (WebCore::KJSProxy::updateDocument):
              * bindings/js/kjs_proxy.h:
              (WebCore::KJSProxy::clearFormerWindow):
              * page/DOMWindow.cpp:
              (WebCore::DOMWindow::~DOMWindow):
              * page/Frame.cpp:
              (WebCore::Frame::~Frame):
              (WebCore::Frame::setDocument):
              (WebCore::Frame::clearDOMWindow):
              (WebCore::Frame::clearFormerDOMWindow):
              * page/Frame.h:
              * page/FramePrivate.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34271 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      94872a04