1. 18 Dec, 2012 1 commit
    • commit-queue@webkit.org's avatar
      EventSource should support CORS · 2df44228
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=61862
      
      Patch by Per-Erik Brodin <per-erik.brodin@ericsson.com> on 2012-12-18
      Reviewed by Alexey Proskuryakov.
      
      Source/WebCore:
      
      Enabled CORS in EventSource with optional constructor argument to
      indicate whether credentials should be included or not, as per the spec.
      Added didFailAccessControlCheck to ThreadableLoaderClient to be able to
      properly distinguish CORS failures from other errors.
      
      Tests: http/tests/eventsource/eventsource-cors-basic.html
             http/tests/eventsource/eventsource-cors-no-server.html
             http/tests/eventsource/eventsource-cors-with-credentials.html
      
      * loader/DocumentThreadableLoader.cpp:
      (WebCore::DocumentThreadableLoader::makeSimpleCrossOriginAccessRequest):
      (WebCore::DocumentThreadableLoader::didReceiveResponse):
      (WebCore::DocumentThreadableLoader::preflightFailure):
      * loader/ThreadableLoaderClient.h:
      (WebCore::ThreadableLoaderClient::didFailAccessControlCheck):
      * loader/ThreadableLoaderClientWrapper.h:
      (WebCore::ThreadableLoaderClientWrapper::didFailAccessControlCheck):
      (ThreadableLoaderClientWrapper):
      * loader/WorkerThreadableLoader.cpp:
      (WebCore::workerContextDidFailAccessControlCheck):
      (WebCore):
      (WebCore::WorkerThreadableLoader::MainThreadBridge::didFailAccessControlCheck):
      * loader/WorkerThreadableLoader.h:
      (MainThreadBridge):
      * page/EventSource.cpp:
      (WebCore::EventSource::EventSource):
      (WebCore::EventSource::create):
      (WebCore::EventSource::connect):
      (WebCore::EventSource::withCredentials):
      (WebCore):
      (WebCore::EventSource::didReceiveResponse):
      (WebCore::EventSource::didFailAccessControlCheck):
      (WebCore::EventSource::didFailRedirectCheck):
      (WebCore::EventSource::abortConnectionAttempt):
      (WebCore::EventSource::parseEventStreamLine):
      (WebCore::EventSource::createMessageEvent):
      * page/EventSource.h:
      (WebCore):
      (EventSource):
      (WebCore::EventSource::refEventTarget):
      (WebCore::EventSource::derefEventTarget):
      * page/EventSource.idl:
      
      LayoutTests:
      
      Added new CORS tests for EventSource. Modified existing test to verify
      that the new constructor argument can be passed to the constructor.
      
      * fast/eventsource/eventsource-constructor-expected.txt:
      * fast/eventsource/eventsource-constructor.html:
      * fast/js/constructor-length.html:
      * http/tests/eventsource/eventsource-cors-basic-expected.txt: Added.
      * http/tests/eventsource/eventsource-cors-basic.html: Added.
      * http/tests/eventsource/eventsource-cors-no-server-expected.txt: Added.
      * http/tests/eventsource/eventsource-cors-no-server.html: Added.
      * http/tests/eventsource/eventsource-cors-with-credentials-expected.txt: Added.
      * http/tests/eventsource/eventsource-cors-with-credentials.html: Added.
      * http/tests/eventsource/resources/es-cors-basic.php: Added.
      * http/tests/eventsource/resources/es-cors-credentials.php: Added.
      * platform/blackberry/fast/js/constructor-length-expected.txt:
      * platform/chromium/fast/js/constructor-length-expected.txt:
      * platform/gtk/fast/js/constructor-length-expected.txt:
      * platform/mac/fast/js/constructor-length-expected.txt:
      * platform/qt/fast/js/constructor-length-expected.txt:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138083 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2df44228
  2. 21 Dec, 2011 1 commit
    • commit-queue@webkit.org's avatar
      Discard event data not followed by an empty line before eof when parsing an event-stream · 7877ad0b
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=68833
      
      Patch by Per-Erik Brodin <per-erik.brodin@ericsson.com> on 2011-12-21
      Reviewed by Alexey Proskuryakov.
      
      Source/WebCore:
      
      Test: http/tests/eventsource/eventsource-eof.html
      
      * page/EventSource.cpp:
      (WebCore::EventSource::didFinishLoading):
      (WebCore::EventSource::parseEventStreamLine):
      * page/EventSource.h:
      
      LayoutTests:
      
      * http/tests/eventsource/eventsource-eof-expected.txt: Added.
      * http/tests/eventsource/eventsource-eof.html: Added.
      * http/tests/eventsource/eventsource-reconnect-expected.txt: Updated.
      * http/tests/eventsource/eventsource-reconnect.html: Added lastEventId check.
      * http/tests/eventsource/resources/es-eof.php: Added.
      * http/tests/eventsource/resources/reconnect.php: Added data to be discarded.
      * http/tests/eventsource/resources/response-content-type-charset.php: Added empty line before eof.
      * http/tests/eventsource/resources/simple-event-stream.asis: Added empty line before eof.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103474 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7877ad0b
  3. 25 Oct, 2011 1 commit
    • abarth@webkit.org's avatar
      EventTarget.h shouldn't need to know about every feature and ifdef · 8233b467
      abarth@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=70659
      
      Reviewed by Darin Adler.
      
      Source/WebCore: 
      
      This patch follows the approach of Event.h and introduces an
      interfaceName virtual function that returns the name of the DOM
      interface for the concrete type of the object.  This function lets us
      remove a large number of fake dynamic casts.
      
      * CMakeLists.txt:
      * CodeGenerators.pri:
      * DerivedSources.make:
      * GNUmakefile.am:
      * WebCore.gyp/WebCore.gyp:
      * WebCore.gyp/scripts/action_makenames.py:
          - Teach action_makenames how to handle the new "in" file.
      * WebCore.gypi:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.xcodeproj/project.pbxproj:
      * bindings/js/JSEventTarget.cpp:
      (WebCore::toJS):
          - Use the new autogenerated macro to remove a large amount of
            feature-specific code.
      * bindings/js/WorkerScriptController.cpp:
      (WebCore::WorkerScriptController::initScript):
      * bindings/objc/DOM.mm:
      (kit):
          - The SVGElementInstance branch was never taken previously because
            SVGElementInstance::toNode returns a non-NULL value. This code
            was introduced in http://trac.webkit.org/changeset/42618 and
            doesn't appear to have ever worked as the author intended.
      * bindings/v8/V8DOMWrapper.cpp:
      (WebCore::V8DOMWrapper::convertEventTargetToV8Object):
          - Use the new autogenerated macro to remove a large amount of
            feature-specific code.
      * dom/EventNames.cpp:
      (WebCore::EventNames::EventNames):
      * dom/EventNames.h:
      * dom/EventTarget.cpp:
      * dom/EventTarget.h:
      * dom/EventTargetFactory.in: Added.
          - Add a new "in" file that lists all the EventTargets.
      * dom/LocalMediaStream.cpp:
      (WebCore::LocalMediaStream::interfaceName):
      * dom/LocalMediaStream.h:
      * dom/MediaStream.cpp:
      (WebCore::MediaStream::interfaceName):
      * dom/MediaStream.h:
      * dom/MessagePort.cpp:
      (WebCore::MessagePort::interfaceName):
      * dom/MessagePort.h:
      * dom/Node.cpp:
      (WebCore::Node::toNode):
      (WebCore::Node::interfaceName):
      * dom/Node.h:
      * dom/make_event_factory.pl:
          - Generalize make_event_factory.pl to be able to generate
            interfaces for different namespaces.
      * fileapi/FileReader.cpp:
      (WebCore::FileReader::interfaceName):
      * fileapi/FileReader.h:
      * fileapi/FileWriter.cpp:
      (WebCore::FileWriter::interfaceName):
      * fileapi/FileWriter.h:
      * loader/appcache/DOMApplicationCache.cpp:
      (WebCore::DOMApplicationCache::interfaceName):
      * loader/appcache/DOMApplicationCache.h:
      * notifications/Notification.cpp:
      (WebCore::Notification::interfaceName):
      * notifications/Notification.h:
      (WebCore::Notification::scriptExecutionContext):
      * p2p/PeerConnection.cpp:
      (WebCore::PeerConnection::interfaceName):
      * p2p/PeerConnection.h:
      * page/DOMWindow.cpp:
      (WebCore::DOMWindow::interfaceName):
      (WebCore::DOMWindow::toDOMWindow):
      * page/DOMWindow.h:
      * page/EventSource.cpp:
      (WebCore::EventSource::interfaceName):
      * page/EventSource.h:
      * storage/IDBDatabase.cpp:
      (WebCore::IDBDatabase::interfaceName):
      * storage/IDBDatabase.h:
      * storage/IDBRequest.cpp:
      (WebCore::IDBRequest::interfaceName):
      * storage/IDBRequest.h:
      * storage/IDBTransaction.cpp:
      (WebCore::IDBTransaction::interfaceName):
      * storage/IDBTransaction.h:
      * storage/IDBVersionChangeRequest.cpp:
      (WebCore::IDBVersionChangeRequest::interfaceName):
      * storage/IDBVersionChangeRequest.h:
      * svg/SVGElementInstance.cpp:
      (WebCore::SVGElementInstance::interfaceName):
      * svg/SVGElementInstance.h:
      (WebCore::SVGElementInstance::toNode):
      * webaudio/AudioContext.cpp:
      (WebCore::AudioContext::interfaceName):
      (WebCore::AudioContext::scriptExecutionContext):
      * webaudio/AudioContext.h:
      * webaudio/JavaScriptAudioNode.cpp:
      (WebCore::JavaScriptAudioNode::interfaceName):
      * webaudio/JavaScriptAudioNode.h:
      * websockets/WebSocket.cpp:
      (WebCore::WebSocket::interfaceName):
      * websockets/WebSocket.h:
      * workers/DedicatedWorkerContext.cpp:
      (WebCore::DedicatedWorkerContext::interfaceName):
      * workers/DedicatedWorkerContext.h:
      * workers/DefaultSharedWorkerRepository.cpp:
      (WebCore::SharedWorkerConnectTask::performTask):
      * workers/SharedWorker.cpp:
      (WebCore::SharedWorker::interfaceName):
      * workers/SharedWorker.h:
      * workers/SharedWorkerContext.cpp:
      (WebCore::SharedWorkerContext::interfaceName):
      * workers/SharedWorkerContext.h:
      * workers/Worker.cpp:
      (WebCore::Worker::interfaceName):
      * workers/Worker.h:
      * xml/XMLHttpRequest.cpp:
      (WebCore::XMLHttpRequest::interfaceName):
      * xml/XMLHttpRequest.h:
      * xml/XMLHttpRequestUpload.cpp:
      (WebCore::XMLHttpRequestUpload::interfaceName):
      * xml/XMLHttpRequestUpload.h:
      
      Source/WebKit/chromium: 
      
      This cast isn't needed because dispatchEvent is a virtual function.
      
      * src/WebSharedWorkerImpl.cpp:
      (WebKit::WebSharedWorkerImpl::connectTask):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@98388 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8233b467
  4. 12 Oct, 2011 1 commit
    • abarth@webkit.org's avatar
      Moving ScriptExecutionContext to the front of the argument list for · 88b63614
      abarth@webkit.org authored
      IDL constructors that use ConstructorWith=ScriptExecutionContext.
      https://bugs.webkit.org/show_bug.cgi?id=69799
      
      Patch by Anna Cavender <annacc@chromium.org> on 2011-10-12
      Reviewed by Adam Barth.
      
      Tests:
      - http/tests/eventsource/* (for EventSource)
      - fast/filesystem/* (for Worker)
      
      * bindings/js/JSEventSourceCustom.cpp:
      (WebCore::JSEventSourceConstructor::constructJSEventSource):
      * bindings/js/JSWorkerCustom.cpp:
      (WebCore::JSWorkerConstructor::constructJSWorker):
      * bindings/scripts/CodeGeneratorV8.pm:
      (GenerateConstructorCallback):
      * bindings/scripts/test/V8/V8TestInterface.cpp:
      (WebCore::V8TestInterface::constructorCallback):
      * page/EventSource.cpp:
      (WebCore::EventSource::create):
      * page/EventSource.h:
      * workers/Worker.cpp:
      (WebCore::Worker::create):
      * workers/Worker.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@97287 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      88b63614
  5. 19 Sep, 2011 1 commit
    • abarth@webkit.org's avatar
      Always enable ENABLE(EVENTSOURCE) · ff5a5ea0
      abarth@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=68414
      
      Reviewed by Eric Seidel.
      
      .:
      
      * Source/cmake/OptionsEfl.cmake:
      * Source/cmake/OptionsWinCE.cmake:
      * Source/cmakeconfig.h.cmake:
      * configure.ac:
      
      Source/JavaScriptCore:
      
      * Configurations/FeatureDefines.xcconfig:
      
      Source/WebCore:
      
      EventSource seems to be here to stay.  This patch makes WebKit more
      hackable by removing this ENABLE macro, as discussed on webkit-dev.
      
      * Configurations/FeatureDefines.xcconfig:
      * GNUmakefile.am:
      * bindings/cpp/WebDOMEventTarget.cpp:
      (toWebKit):
      * bindings/js/JSDOMWindowCustom.cpp:
      (WebCore::JSDOMWindow::eventSource):
      * bindings/js/JSEventSourceCustom.cpp:
      * bindings/js/JSEventTarget.cpp:
      (WebCore::toJS):
      (WebCore::toEventTarget):
      * bindings/js/JSWorkerContextCustom.cpp:
      (WebCore::JSWorkerContext::eventSource):
      * bindings/v8/V8DOMWrapper.cpp:
      (WebCore::V8DOMWrapper::convertEventTargetToV8Object):
      * features.pri:
      * page/DOMWindow.idl:
      * page/EventSource.cpp:
      * page/EventSource.h:
      * page/EventSource.idl:
      * workers/WorkerContext.idl:
      
      Source/WebKit/chromium:
      
      * features.gypi:
      
      Source/WebKit/mac:
      
      * Configurations/FeatureDefines.xcconfig:
      
      Source/WebKit2:
      
      * Configurations/FeatureDefines.xcconfig:
      
      Tools:
      
      * Scripts/build-webkit:
      
      WebKitLibraries:
      
      * win/tools/vsprops/FeatureDefines.vsprops:
      * win/tools/vsprops/FeatureDefinesCairo.vsprops:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95501 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ff5a5ea0
  6. 31 Aug, 2011 1 commit
    • ap@apple.com's avatar
      http/tests/eventsource/workers/eventsource-simple.html is a flaky crash because of · c4a2a8cb
      ap@apple.com authored
      eventsource-status-error-iframe-crash.html
      https://bugs.webkit.org/show_bug.cgi?id=61523
      
      Reviewed by Nate Chapin.
      
      Source/WebCore:
      
      The problem here was that canceling EventSource during frame removal erroneously resulted
      in event dispatch, and event handler re-entered frame destruction code.
      
      * page/EventSource.h: Renamed endRequest() to networkRequestEnded(), because this method
      doesn't end request. It implements "reestablish the connection" or "fail the connection"
      algotithms from the spec, depending on current state.
      Removed m_failSilently, since we can make this decision with existing data, and want to
      fail silently by default (e.g. when detaching a frame cancels all loads).
      
      * page/EventSource.cpp:
      (WebCore::EventSource::EventSource): Don't initialize m_failSilently.
      (WebCore::EventSource::~EventSource): Assert taht we are in a correct state.
      (WebCore::EventSource::connect): Ditto.
      (WebCore::EventSource::networkRequestEnded): Moved errorevent dispatch elsewhere.
      (WebCore::EventSource::scheduleReconnect): Error event should always be queued when
      reconnecting; firing it synchronously after starting m_reconnectTimer implements that.
      (WebCore::EventSource::reconnectTimerFired): Assert that state is correct (the timer is
      stopped if EventSource is stopped while waiting on the timer).
      (WebCore::EventSource::close): Don't set m_state before calling cancel() - it will indirectly
      call didFail(), which asserts that EventSource is not stopped yet.
      (WebCore::EventSource::didReceiveResponse): Explicitly dispatch an error event, since it
      is no longer dispatched when canceling, and canceling is the only way to stop a ThreadableLoader.
      Removed a special case for 2xx responses, since it's no longer in the spec.
      (WebCore::EventSource::didReceiveData): Assert that state is correct.
      (WebCore::EventSource::didFinishLoading): Don't set state to CONNECTING after parsing remaining
      response bytes - that may well result in dispatching an event whose handler calls close().
      (WebCore::EventSource::didFail): It's simple now - we always reconnect unless the request
      got canceled.
      (WebCore::EventSource::didFailRedirectCheck): Dispatch error event explicitly, as we are
      not going to attempt reconnecting.
      
      LayoutTests:
      
      * http/tests/eventsource/eventsource-status-code-states-expected.txt:
      * http/tests/eventsource/eventsource-status-code-states.html:
      2xx responses are no longer different from any other failures.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94242 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c4a2a8cb
  7. 16 Jun, 2011 3 commits
    • pfeldman@chromium.org's avatar
      2011-06-16 Vsevolod Vlasov <vsevik@chromium.org> · c2baad00
      pfeldman@chromium.org authored
              Reviewed by Pavel Feldman.
      
              Web Inspector: Cache XHR content in backend, do not use initialContentSet for XHRs.
              https://bugs.webkit.org/show_bug.cgi?id=61205
      
              Added inspector backend cache for XHR content.
      
              * http/tests/inspector/network/network-xhr-async-expected.txt: Added.
              * http/tests/inspector/network/network-xhr-async.html: Added.
              * http/tests/inspector/network/network-xhr-sync-expected.txt: Added.
              * http/tests/inspector/network/network-xhr-sync.html: Added.
      2011-06-16  Vsevolod Vlasov  <vsevik@chromium.org>
      
              Reviewed by Pavel Feldman.
      
              Web Inspector: Cache XHR content in backend, do not use initialContentSet for XHRs.
              https://bugs.webkit.org/show_bug.cgi?id=61205
      
              Added inspector backend cache for XHR content.
      
              Tests: http/tests/inspector/network/network-xhr-async.html
                     http/tests/inspector/network/network-xhr-sync.html
      
              * CMakeLists.txt:
              * GNUmakefile.list.am:
              * WebCore.gypi:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * fileapi/FileReaderLoader.cpp:
              (WebCore::FileReaderLoader::didReceiveResponse):
              * fileapi/FileReaderLoader.h:
              * inspector/Inspector.json:
              * inspector/InspectorInstrumentation.cpp:
              (WebCore::InspectorInstrumentation::didReceiveXHRResponseImpl):
              (WebCore::InspectorInstrumentation::willLoadXHRSynchronouslyImpl):
              (WebCore::InspectorInstrumentation::didLoadXHRSynchronouslyImpl):
              (WebCore::InspectorInstrumentation::didCommitLoadImpl):
              * inspector/InspectorInstrumentation.h:
              (WebCore::InspectorInstrumentation::didReceiveXHRResponse):
              (WebCore::InspectorInstrumentation::willLoadXHRSynchronously):
              (WebCore::InspectorInstrumentation::didLoadXHRSynchronously):
              * inspector/InspectorResourceAgent.cpp:
              (WebCore::InspectorResourceAgent::willSendRequest):
              (WebCore::InspectorResourceAgent::didReceiveResponse):
              (WebCore::InspectorResourceAgent::setInitialXHRContent):
              (WebCore::InspectorResourceAgent::didReceiveXHRResponse):
              (WebCore::InspectorResourceAgent::willLoadXHRSynchronously):
              (WebCore::InspectorResourceAgent::didLoadXHRSynchronously):
              (WebCore::InspectorResourceAgent::getResourceContent):
              (WebCore::InspectorResourceAgent::mainFrameNavigated):
              (WebCore::InspectorResourceAgent::InspectorResourceAgent):
              * inspector/InspectorResourceAgent.h:
              * inspector/NetworkResourcesData.cpp: Added.
              (WebCore::NetworkResourcesData::ResourceData::ResourceData):
              (WebCore::NetworkResourcesData::ResourceData::content):
              (WebCore::NetworkResourcesData::ResourceData::appendContent):
              (WebCore::NetworkResourcesData::ResourceData::purgeContent):
              (WebCore::NetworkResourcesData::NetworkResourcesData):
              (WebCore::NetworkResourcesData::~NetworkResourcesData):
              (WebCore::NetworkResourcesData::resourceCreated):
              (WebCore::NetworkResourcesData::responseReceived):
              (WebCore::NetworkResourcesData::didReceiveXHRResponse):
              (WebCore::NetworkResourcesData::addResourceContent):
              (WebCore::NetworkResourcesData::isXHR):
              (WebCore::NetworkResourcesData::data):
              (WebCore::NetworkResourcesData::clear):
              (WebCore::NetworkResourcesData::ensureNoDataForIdentifier):
              (WebCore::NetworkResourcesData::ensureFreeSpace):
              * inspector/NetworkResourcesData.h: Added.
              (WebCore::NetworkResourcesData::ResourceData::identifier):
              (WebCore::NetworkResourcesData::ResourceData::loaderId):
              (WebCore::NetworkResourcesData::ResourceData::frameId):
              (WebCore::NetworkResourcesData::ResourceData::setFrameId):
              (WebCore::NetworkResourcesData::ResourceData::url):
              (WebCore::NetworkResourcesData::ResourceData::setUrl):
              (WebCore::NetworkResourcesData::ResourceData::isXHR):
              (WebCore::NetworkResourcesData::ResourceData::setIsXHR):
              (WebCore::NetworkResourcesData::ResourceData::hasContent):
              (WebCore::NetworkResourcesData::ResourceData::isContentPurged):
              (WebCore::NetworkResourcesData::ResourceData::setIsContentPurged):
              * inspector/front-end/NetworkManager.js:
              (WebInspector.NetworkManager.prototype.requestContent):
              (WebInspector.NetworkDispatcher.prototype._appendRedirect):
              * inspector/front-end/NetworkPanel.js:
              (WebInspector.NetworkPanel.prototype._appendResource):
              (WebInspector.NetworkPanel.prototype._frameNavigated):
              * loader/DocumentThreadableLoader.cpp:
              (WebCore::DocumentThreadableLoader::didReceiveResponse):
              (WebCore::DocumentThreadableLoader::receivedCancellation):
              (WebCore::DocumentThreadableLoader::loadRequest):
              * loader/DocumentThreadableLoader.h:
              * loader/ThreadableLoaderClient.h:
              (WebCore::ThreadableLoaderClient::didReceiveResponse):
              (WebCore::ThreadableLoaderClient::didReceiveAuthenticationCancellation):
              * loader/ThreadableLoaderClientWrapper.h:
              (WebCore::ThreadableLoaderClientWrapper::didReceiveResponse):
              (WebCore::ThreadableLoaderClientWrapper::didReceiveAuthenticationCancellation):
              * loader/WorkerThreadableLoader.cpp:
              (WebCore::workerContextDidReceiveResponse):
              (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveResponse):
              (WebCore::workerContextDidReceiveAuthenticationCancellation):
              (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveAuthenticationCancellation):
              * loader/WorkerThreadableLoader.h:
              * notifications/Notification.cpp:
              (WebCore::Notification::didReceiveResponse):
              (WebCore::Notification::didReceiveAuthenticationCancellation):
              * notifications/Notification.h:
              * page/EventSource.cpp:
              (WebCore::EventSource::didReceiveResponse):
              * page/EventSource.h:
              * workers/WorkerScriptLoader.cpp:
              (WebCore::WorkerScriptLoader::didReceiveResponse):
              (WebCore::WorkerScriptLoader::didReceiveAuthenticationCancellation):
              * workers/WorkerScriptLoader.h:
              * xml/XMLHttpRequest.cpp:
              (WebCore::XMLHttpRequest::createRequest):
              (WebCore::XMLHttpRequest::didReceiveResponse):
              (WebCore::XMLHttpRequest::didReceiveAuthenticationCancellation):
              * xml/XMLHttpRequest.h:
      2011-06-16  Vsevolod Vlasov  <vsevik@chromium.org>
      
              Reviewed by Pavel Feldman.
      
              Web Inspector: Cache XHR content in backend, do not use initialContentSet for XHRs.
              https://bugs.webkit.org/show_bug.cgi?id=61205
      
              Added inspector backend cache for XHR content.
      
              * src/AssociatedURLLoader.cpp:
              (WebKit::AssociatedURLLoader::ClientAdapter::didReceiveResponse):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@89036 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c2baad00
    • yurys@chromium.org's avatar
      2011-06-16 Sheriff Bot <webkit.review.bot@gmail.com> · ba79ffed
      yurys@chromium.org authored
              Unreviewed, rolling out r89025.
              http://trac.webkit.org/changeset/89025
              https://bugs.webkit.org/show_bug.cgi?id=62799
      
              "Some layout tests fail" (Requested by yurys on #webkit).
      
              * http/tests/inspector/network/network-xhr-async-expected.txt: Removed.
              * http/tests/inspector/network/network-xhr-async.html: Removed.
              * http/tests/inspector/network/network-xhr-sync-expected.txt: Removed.
              * http/tests/inspector/network/network-xhr-sync.html: Removed.
      2011-06-16  Sheriff Bot  <webkit.review.bot@gmail.com>
      
              Unreviewed, rolling out r89025.
              http://trac.webkit.org/changeset/89025
              https://bugs.webkit.org/show_bug.cgi?id=62799
      
              "Some layout tests fail" (Requested by yurys on #webkit).
      
              * CMakeLists.txt:
              * GNUmakefile.list.am:
              * WebCore.gypi:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * fileapi/FileReaderLoader.cpp:
              (WebCore::FileReaderLoader::didReceiveResponse):
              * fileapi/FileReaderLoader.h:
              * inspector/Inspector.json:
              * inspector/InspectorInstrumentation.cpp:
              (WebCore::InspectorInstrumentation::didCommitLoadImpl):
              * inspector/InspectorInstrumentation.h:
              * inspector/InspectorResourceAgent.cpp:
              (WebCore::InspectorResourceAgent::willSendRequest):
              (WebCore::InspectorResourceAgent::didReceiveResponse):
              (WebCore::InspectorResourceAgent::setInitialXHRContent):
              (WebCore::InspectorResourceAgent::InspectorResourceAgent):
              * inspector/InspectorResourceAgent.h:
              * inspector/NetworkResourcesData.cpp: Removed.
              * inspector/NetworkResourcesData.h: Removed.
              * inspector/front-end/NetworkManager.js:
              (WebInspector.NetworkManager.prototype.requestContent):
              (WebInspector.NetworkDispatcher.prototype._appendRedirect):
              * inspector/front-end/NetworkPanel.js:
              (WebInspector.NetworkPanel.prototype._appendResource):
              (WebInspector.NetworkPanel.prototype._frameNavigated):
              * loader/DocumentThreadableLoader.cpp:
              (WebCore::DocumentThreadableLoader::didReceiveResponse):
              (WebCore::DocumentThreadableLoader::receivedCancellation):
              (WebCore::DocumentThreadableLoader::loadRequest):
              * loader/DocumentThreadableLoader.h:
              * loader/ThreadableLoaderClient.h:
              (WebCore::ThreadableLoaderClient::didReceiveResponse):
              (WebCore::ThreadableLoaderClient::didReceiveAuthenticationCancellation):
              * loader/ThreadableLoaderClientWrapper.h:
              (WebCore::ThreadableLoaderClientWrapper::didReceiveResponse):
              (WebCore::ThreadableLoaderClientWrapper::didReceiveAuthenticationCancellation):
              * loader/WorkerThreadableLoader.cpp:
              (WebCore::workerContextDidReceiveResponse):
              (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveResponse):
              (WebCore::workerContextDidReceiveAuthenticationCancellation):
              (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveAuthenticationCancellation):
              * loader/WorkerThreadableLoader.h:
              * notifications/Notification.cpp:
              (WebCore::Notification::didReceiveResponse):
              (WebCore::Notification::didReceiveAuthenticationCancellation):
              * notifications/Notification.h:
              * page/EventSource.cpp:
              (WebCore::EventSource::didReceiveResponse):
              * page/EventSource.h:
              * workers/WorkerScriptLoader.cpp:
              (WebCore::WorkerScriptLoader::didReceiveResponse):
              (WebCore::WorkerScriptLoader::didReceiveAuthenticationCancellation):
              * workers/WorkerScriptLoader.h:
              * xml/XMLHttpRequest.cpp:
              (WebCore::XMLHttpRequest::createRequest):
              (WebCore::XMLHttpRequest::didReceiveResponse):
              (WebCore::XMLHttpRequest::didReceiveAuthenticationCancellation):
              * xml/XMLHttpRequest.h:
      2011-06-16  Sheriff Bot  <webkit.review.bot@gmail.com>
      
              Unreviewed, rolling out r89025.
              http://trac.webkit.org/changeset/89025
              https://bugs.webkit.org/show_bug.cgi?id=62799
      
              "Some layout tests fail" (Requested by yurys on #webkit).
      
              * src/AssociatedURLLoader.cpp:
              (WebKit::AssociatedURLLoader::ClientAdapter::didReceiveResponse):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@89027 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ba79ffed
    • yurys@chromium.org's avatar
      2011-06-16 Vsevolod Vlasov <vsevik@chromium.org> · d9c634c2
      yurys@chromium.org authored
              Reviewed by Yury Semikhatsky.
      
              Web Inspector: Cache XHR content in backend, do not use initialContentSet for XHRs.
              https://bugs.webkit.org/show_bug.cgi?id=61205
      
              Added inspector backend cache for XHR content.
      
              * http/tests/inspector/network/network-xhr-async-expected.txt: Added.
              * http/tests/inspector/network/network-xhr-async.html: Added.
              * http/tests/inspector/network/network-xhr-sync-expected.txt: Added.
              * http/tests/inspector/network/network-xhr-sync.html: Added.
      2011-06-16  Vsevolod Vlasov  <vsevik@chromium.org>
      
              Reviewed by Yury Semikhatsky.
      
              Web Inspector: Cache XHR content in backend, do not use initialContentSet for XHRs.
              https://bugs.webkit.org/show_bug.cgi?id=61205
      
              Added inspector backend cache for XHR content.
      
              Tests: http/tests/inspector/network/network-xhr-async.html
                     http/tests/inspector/network/network-xhr-sync.html
      
              * CMakeLists.txt:
              * GNUmakefile.list.am:
              * WebCore.gypi:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * fileapi/FileReaderLoader.cpp:
              (WebCore::FileReaderLoader::didReceiveResponse):
              * fileapi/FileReaderLoader.h:
              * inspector/Inspector.json:
              * inspector/InspectorInstrumentation.cpp:
              (WebCore::InspectorInstrumentation::didReceiveXHRResponseImpl):
              (WebCore::InspectorInstrumentation::willLoadXHRSynchronouslyImpl):
              (WebCore::InspectorInstrumentation::didLoadXHRSynchronouslyImpl):
              (WebCore::InspectorInstrumentation::didCommitLoadImpl):
              * inspector/InspectorInstrumentation.h:
              (WebCore::InspectorInstrumentation::didReceiveXHRResponse):
              (WebCore::InspectorInstrumentation::willLoadXHRSynchronously):
              (WebCore::InspectorInstrumentation::didLoadXHRSynchronously):
              * inspector/InspectorResourceAgent.cpp:
              (WebCore::InspectorResourceAgent::willSendRequest):
              (WebCore::InspectorResourceAgent::didReceiveResponse):
              (WebCore::InspectorResourceAgent::setInitialXHRContent):
              (WebCore::InspectorResourceAgent::didReceiveXHRResponse):
              (WebCore::InspectorResourceAgent::willLoadXHRSynchronously):
              (WebCore::InspectorResourceAgent::didLoadXHRSynchronously):
              (WebCore::InspectorResourceAgent::getResourceContent):
              (WebCore::InspectorResourceAgent::mainFrameNavigated):
              (WebCore::InspectorResourceAgent::InspectorResourceAgent):
              * inspector/InspectorResourceAgent.h:
              * inspector/NetworkResourcesData.cpp: Added.
              (WebCore::NetworkResourcesData::ResourceData::ResourceData):
              (WebCore::NetworkResourcesData::ResourceData::content):
              (WebCore::NetworkResourcesData::ResourceData::appendContent):
              (WebCore::NetworkResourcesData::ResourceData::purgeContent):
              (WebCore::NetworkResourcesData::NetworkResourcesData):
              (WebCore::NetworkResourcesData::~NetworkResourcesData):
              (WebCore::NetworkResourcesData::resourceCreated):
              (WebCore::NetworkResourcesData::responseReceived):
              (WebCore::NetworkResourcesData::didReceiveXHRResponse):
              (WebCore::NetworkResourcesData::addResourceContent):
              (WebCore::NetworkResourcesData::isXHR):
              (WebCore::NetworkResourcesData::data):
              (WebCore::NetworkResourcesData::clear):
              (WebCore::NetworkResourcesData::ensureFreeSpace):
              * inspector/NetworkResourcesData.h: Added.
              (WebCore::NetworkResourcesData::ResourceData::identifier):
              (WebCore::NetworkResourcesData::ResourceData::loaderId):
              (WebCore::NetworkResourcesData::ResourceData::frameId):
              (WebCore::NetworkResourcesData::ResourceData::setFrameId):
              (WebCore::NetworkResourcesData::ResourceData::url):
              (WebCore::NetworkResourcesData::ResourceData::setUrl):
              (WebCore::NetworkResourcesData::ResourceData::isXHR):
              (WebCore::NetworkResourcesData::ResourceData::setIsXHR):
              (WebCore::NetworkResourcesData::ResourceData::hasContent):
              (WebCore::NetworkResourcesData::ResourceData::isContentPurged):
              (WebCore::NetworkResourcesData::ResourceData::setIsContentPurged):
              * inspector/front-end/NetworkManager.js:
              (WebInspector.NetworkManager.prototype.requestContent):
              (WebInspector.NetworkDispatcher.prototype._appendRedirect):
              * inspector/front-end/NetworkPanel.js:
              (WebInspector.NetworkPanel.prototype._appendResource):
              (WebInspector.NetworkPanel.prototype._frameNavigated):
              * loader/DocumentThreadableLoader.cpp:
              (WebCore::DocumentThreadableLoader::didReceiveResponse):
              (WebCore::DocumentThreadableLoader::receivedCancellation):
              (WebCore::DocumentThreadableLoader::loadRequest):
              * loader/DocumentThreadableLoader.h:
              * loader/ThreadableLoaderClient.h:
              (WebCore::ThreadableLoaderClient::didReceiveResponse):
              (WebCore::ThreadableLoaderClient::didReceiveAuthenticationCancellation):
              * loader/ThreadableLoaderClientWrapper.h:
              (WebCore::ThreadableLoaderClientWrapper::didReceiveResponse):
              (WebCore::ThreadableLoaderClientWrapper::didReceiveAuthenticationCancellation):
              * loader/WorkerThreadableLoader.cpp:
              (WebCore::workerContextDidReceiveResponse):
              (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveResponse):
              (WebCore::workerContextDidReceiveAuthenticationCancellation):
              (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveAuthenticationCancellation):
              * loader/WorkerThreadableLoader.h:
              * notifications/Notification.cpp:
              (WebCore::Notification::didReceiveResponse):
              (WebCore::Notification::didReceiveAuthenticationCancellation):
              * notifications/Notification.h:
              * page/EventSource.cpp:
              (WebCore::EventSource::didReceiveResponse):
              * page/EventSource.h:
              * workers/WorkerScriptLoader.cpp:
              (WebCore::WorkerScriptLoader::didReceiveResponse):
              (WebCore::WorkerScriptLoader::didReceiveAuthenticationCancellation):
              * workers/WorkerScriptLoader.h:
              * xml/XMLHttpRequest.cpp:
              (WebCore::XMLHttpRequest::createRequest):
              (WebCore::XMLHttpRequest::didReceiveResponse):
              (WebCore::XMLHttpRequest::didReceiveAuthenticationCancellation):
              * xml/XMLHttpRequest.h:
      2011-06-16  Vsevolod Vlasov  <vsevik@chromium.org>
      
              Reviewed by Yury Semikhatsky.
      
              Web Inspector: Cache XHR content in backend, do not use initialContentSet for XHRs.
              https://bugs.webkit.org/show_bug.cgi?id=61205
      
              Added inspector backend cache for XHR content.
      
              * src/AssociatedURLLoader.cpp:
              (WebKit::AssociatedURLLoader::ClientAdapter::didReceiveResponse):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@89025 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d9c634c2
  8. 15 Jun, 2011 2 commits
    • caseq@chromium.org's avatar
      2011-06-15 Andrey Kosyakov < caseq@chromium.org> · 3b494996
      caseq@chromium.org authored
             Unreviewed, rolled out r88937 (broke build on mac)
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@88943 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3b494996
    • commit-queue@webkit.org's avatar
      2011-06-15 Vsevolod Vlasov <vsevik@chromium.org> · ba15f8da
      commit-queue@webkit.org authored
              Reviewed by Pavel Feldman.
      
              Web Inspector: Cache XHR content in backend, do not use initialContentSet for XHRs.
              https://bugs.webkit.org/show_bug.cgi?id=61205
      
              Added inspector backend cache for XHR content.
      
              * http/tests/inspector/network/network-xhr-async-expected.txt: Added.
              * http/tests/inspector/network/network-xhr-async.html: Added.
              * http/tests/inspector/network/network-xhr-sync-expected.txt: Added.
              * http/tests/inspector/network/network-xhr-sync.html: Added.
      2011-06-15  Vsevolod Vlasov  <vsevik@chromium.org>
      
              Reviewed by Pavel Feldman.
      
              Web Inspector: Cache XHR content in backend, do not use initialContentSet for XHRs.
              https://bugs.webkit.org/show_bug.cgi?id=61205
      
              Added inspector backend cache for XHR content.
      
              Tests: http/tests/inspector/network/network-xhr-async.html
                     http/tests/inspector/network/network-xhr-sync.html
      
              * CMakeLists.txt:
              * GNUmakefile.list.am:
              * WebCore.gypi:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * fileapi/FileReaderLoader.cpp:
              (WebCore::FileReaderLoader::didReceiveResponse):
              * fileapi/FileReaderLoader.h:
              * inspector/Inspector.json:
              * inspector/InspectorInstrumentation.cpp:
              (WebCore::InspectorInstrumentation::didReceiveXHRResponseImpl):
              (WebCore::InspectorInstrumentation::willLoadXHRSynchronouslyImpl):
              (WebCore::InspectorInstrumentation::didLoadXHRSynchronouslyImpl):
              (WebCore::InspectorInstrumentation::didCommitLoadImpl):
              * inspector/InspectorInstrumentation.h:
              (WebCore::InspectorInstrumentation::didReceiveXHRResponse):
              (WebCore::InspectorInstrumentation::willLoadXHRSynchronously):
              (WebCore::InspectorInstrumentation::didLoadXHRSynchronously):
              * inspector/InspectorResourceAgent.cpp:
              (WebCore::InspectorResourceAgent::willSendRequest):
              (WebCore::InspectorResourceAgent::didReceiveResponse):
              (WebCore::InspectorResourceAgent::setInitialXHRContent):
              (WebCore::InspectorResourceAgent::didReceiveXHRResponse):
              (WebCore::InspectorResourceAgent::willLoadXHRSynchronously):
              (WebCore::InspectorResourceAgent::didLoadXHRSynchronously):
              (WebCore::InspectorResourceAgent::getResourceContent):
              (WebCore::InspectorResourceAgent::mainFrameNavigated):
              (WebCore::InspectorResourceAgent::InspectorResourceAgent):
              * inspector/InspectorResourceAgent.h:
              * inspector/NetworkResourcesData.cpp: Added.
              (WebCore::NetworkResourcesData::ResourceData::ResourceData):
              (WebCore::NetworkResourcesData::ResourceData::content):
              (WebCore::NetworkResourcesData::ResourceData::appendContent):
              (WebCore::NetworkResourcesData::ResourceData::purgeContent):
              (WebCore::NetworkResourcesData::NetworkResourcesData):
              (WebCore::NetworkResourcesData::~NetworkResourcesData):
              (WebCore::NetworkResourcesData::resourceCreated):
              (WebCore::NetworkResourcesData::responseReceived):
              (WebCore::NetworkResourcesData::didReceiveXHRResponse):
              (WebCore::NetworkResourcesData::addResourceContent):
              (WebCore::NetworkResourcesData::isXHR):
              (WebCore::NetworkResourcesData::data):
              (WebCore::NetworkResourcesData::clear):
              (WebCore::NetworkResourcesData::ensureFreeSpace):
              * inspector/NetworkResourcesData.h: Added.
              (WebCore::NetworkResourcesData::ResourceData::identifier):
              (WebCore::NetworkResourcesData::ResourceData::loaderId):
              (WebCore::NetworkResourcesData::ResourceData::frameId):
              (WebCore::NetworkResourcesData::ResourceData::setFrameId):
              (WebCore::NetworkResourcesData::ResourceData::url):
              (WebCore::NetworkResourcesData::ResourceData::setUrl):
              (WebCore::NetworkResourcesData::ResourceData::isXHR):
              (WebCore::NetworkResourcesData::ResourceData::setIsXHR):
              (WebCore::NetworkResourcesData::ResourceData::hasContent):
              (WebCore::NetworkResourcesData::ResourceData::isContentPurged):
              (WebCore::NetworkResourcesData::ResourceData::setIsContentPurged):
              * inspector/front-end/NetworkManager.js:
              (WebInspector.NetworkManager.prototype.requestContent):
              (WebInspector.NetworkDispatcher.prototype._appendRedirect):
              * inspector/front-end/NetworkPanel.js:
              (WebInspector.NetworkPanel.prototype._appendResource):
              (WebInspector.NetworkPanel.prototype._frameNavigated):
              * loader/DocumentThreadableLoader.cpp:
              (WebCore::DocumentThreadableLoader::didReceiveResponse):
              (WebCore::DocumentThreadableLoader::receivedCancellation):
              (WebCore::DocumentThreadableLoader::loadRequest):
              * loader/DocumentThreadableLoader.h:
              * loader/ThreadableLoaderClient.h:
              (WebCore::ThreadableLoaderClient::didReceiveResponse):
              (WebCore::ThreadableLoaderClient::didReceiveAuthenticationCancellation):
              * loader/ThreadableLoaderClientWrapper.h:
              (WebCore::ThreadableLoaderClientWrapper::didReceiveResponse):
              (WebCore::ThreadableLoaderClientWrapper::didReceiveAuthenticationCancellation):
              * loader/WorkerThreadableLoader.cpp:
              (WebCore::workerContextDidReceiveResponse):
              (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveResponse):
              (WebCore::workerContextDidReceiveAuthenticationCancellation):
              (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveAuthenticationCancellation):
              * loader/WorkerThreadableLoader.h:
              * notifications/Notification.cpp:
              (WebCore::Notification::didReceiveResponse):
              (WebCore::Notification::didReceiveAuthenticationCancellation):
              * notifications/Notification.h:
              * page/EventSource.cpp:
              (WebCore::EventSource::didReceiveResponse):
              * page/EventSource.h:
              * xml/XMLHttpRequest.cpp:
              (WebCore::XMLHttpRequest::createRequest):
              (WebCore::XMLHttpRequest::didReceiveResponse):
              (WebCore::XMLHttpRequest::didReceiveAuthenticationCancellation):
              * xml/XMLHttpRequest.h:
      2011-06-15  Vsevolod Vlasov  <vsevik@chromium.org>
      
              Reviewed by Pavel Feldman.
      
              Web Inspector: Cache XHR content in backend, do not use initialContentSet for XHRs.
              https://bugs.webkit.org/show_bug.cgi?id=61205
      
              Added inspector backend cache for XHR content.
      
              * src/AssociatedURLLoader.cpp:
              (WebKit::AssociatedURLLoader::ClientAdapter::didReceiveResponse):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@88937 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ba15f8da
  9. 16 Feb, 2011 1 commit
    • commit-queue@webkit.org's avatar
      2011-02-16 Bill Budge <bbudge@chromium.org> · 7c4021cc
      commit-queue@webkit.org authored
              Reviewed by David Levin.
      
              Need didReceiveCachedMetadata, and finishTime for didFinishLoading exposed in ThreadableLoaderClient
              https://bugs.webkit.org/show_bug.cgi?id=54313
      
              No tests needed, exposes no new functionality
      
              * fileapi/FileReaderLoader.cpp:
              (WebCore::FileReaderLoader::didFinishLoading):
              * fileapi/FileReaderLoader.h:
              * loader/DocumentThreadableLoader.cpp:
              (WebCore::DocumentThreadableLoader::setDefersLoading):
              (WebCore::DocumentThreadableLoader::didReceiveCachedMetadata):
              (WebCore::DocumentThreadableLoader::didFinishLoading):
              (WebCore::DocumentThreadableLoader::loadRequest):
              * loader/DocumentThreadableLoader.h:
              * loader/ThreadableLoaderClient.h:
              (WebCore::ThreadableLoaderClient::didReceiveData):
              (WebCore::ThreadableLoaderClient::didReceiveCachedMetadata):
              (WebCore::ThreadableLoaderClient::didFinishLoading):
              * loader/ThreadableLoaderClientWrapper.h:
              (WebCore::ThreadableLoaderClientWrapper::didReceiveData):
              (WebCore::ThreadableLoaderClientWrapper::didReceiveCachedMetadata):
              (WebCore::ThreadableLoaderClientWrapper::didFinishLoading):
              * loader/WorkerThreadableLoader.cpp:
              (WebCore::workerContextDidReceiveCachedMetadata):
              (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveCachedMetadata):
              (WebCore::workerContextDidFinishLoading):
              (WebCore::WorkerThreadableLoader::MainThreadBridge::didFinishLoading):
              * loader/WorkerThreadableLoader.h:
              * notifications/Notification.cpp:
              (WebCore::Notification::didFinishLoading):
              * notifications/Notification.h:
              * page/EventSource.cpp:
              (WebCore::EventSource::didFinishLoading):
              * page/EventSource.h:
              * workers/WorkerScriptLoader.cpp:
              (WebCore::WorkerScriptLoader::didFinishLoading):
              * workers/WorkerScriptLoader.h:
              * xml/XMLHttpRequest.cpp:
              (WebCore::XMLHttpRequest::didFinishLoading):
              * xml/XMLHttpRequest.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@78782 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7c4021cc
  10. 20 Jan, 2011 1 commit
    • ossy@webkit.org's avatar
      Refactoring of the custom allocation framework · 95c1bc42
      ossy@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=49897
      
      Patch by Zoltan Horvath <zoltan@webkit.org> on 2011-01-20
      Reviewed by Csaba Osztrogonác.
      
      Source/JavaScriptCore:
      
      Inheriting from FastAllocBase can result in objects getting larger (bug #33896, #46589).
      The modification replaces Noncopyable and FastAllocBase classes and these inherits with their
      equivalent macro implementation at the necessary places.
      
      * wtf/FastAllocBase.h: Turn FastAllocBase's implementation into a macro.
      
      Source/WebCore:
      
      Inheriting from FastAllocBase can result in objects getting larger (bug #33896, #46589).
      The modification replaces Noncopyable and FastAllocBase classes and these inherits with their
      equivalent macro implementation at the necessary places.
      
      Source/WebKit:
      
      Inheriting from FastAllocBase can result in objects getting larger (bug #33896, #46589).
      The modification replaces Noncopyable and FastAllocBase classes and these inherits with their
      equivalent macro implementation at the necessary places.
      
      Source/WebKit2:
      
      Inheriting from FastAllocBase can result in objects getting larger (bug #33896, #46589).
      The modification replaces Noncopyable and FastAllocBase classes and these inherits with their
      equivalent macro implementation at the necessary places.
      
      Tools:
      
      Inheriting from FastAllocBase can result in objects getting larger (bug #33896, #46589).
      The modification replaces Noncopyable and FastAllocBase classes and these inherits with their
      equivalent macro implementation at the necessary places.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76248 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      95c1bc42
  11. 08 Jan, 2011 1 commit
  12. 07 Jul, 2010 1 commit
    • darin@apple.com's avatar
      2010-07-07 Darin Adler <darin@apple.com> · bb381c75
      darin@apple.com authored
              Reviewed by Adam Barth.
      
              Turn on adoptRef assertion for RefCounted
              https://bugs.webkit.org/show_bug.cgi?id=41547
      
              * wtf/CrossThreadRefCounted.h: Fixed include style. Includes of other
              WTF headers should use "" includes; consistent in most WTF headers.
              Added a call to relaxAdoptionRequirement.
      
              * wtf/RefCounted.h: Fixed include style. Removed LOOSE_REF_COUNTED.
              Added relaxAdoptionRequirement.
      2010-07-07  Darin Adler  <darin@apple.com>
      
              Reviewed by Adam Barth.
      
              Turn on adoptRef assertion for RefCounted
              https://bugs.webkit.org/show_bug.cgi?id=41547
      
              The WebCore part of this fixes all the assertions I saw in testing.
      
              * html/FileReader.cpp:
              (WebCore::FileReader::readAsBinaryString): Added null checks.
              Callers from JavaScript can pass the wrong type, which becomes null.
              (WebCore::FileReader::readAsText): Ditto.
              (WebCore::FileReader::readAsDataURL): Ditto.
      
              * html/FileStreamClient.h: Removed unneeded include.
      
              * html/FileStreamProxy.cpp:
              (WebCore::FileStreamProxy::FileStreamProxy): Made inline and moved
              some of the code, including the ref, into the create function.
              (WebCore::FileStreamProxy::create): Moved some of the code from
              the constructor here. It's safe to ref once the object has been
              created and adopted.
      
              * html/FileStreamProxy.h: Changed create function to no longer be
              inlined. Also removed an unneeded include.
      
              * page/EventSource.cpp:
              (WebCore::EventSource::EventSource): Made inline, changed arguments
              and moved code that involves the need to ref this object into the
              create function. Also moved failure handling out there since it's
              cleaner to have a function that fails than a constructor. For
              example, the function can return 0.
              (WebCore::EventSource::create): Moved some of the code from the
              constructor here.
      
              * page/EventSource.h: Removed unneeded includes. Made the
              creation function non-inline. Changed the arguments to the constructor.
      
              * storage/StorageAreaSync.cpp:
              (WebCore::StorageAreaSync::StorageAreaSync): Made inline. Moved
              code that requires ref'ing this object out to the create function.
              (WebCore::StorageAreaSync::create): Moved some of the code from the
              constructor here.
      
              * storage/StorageAreaSync.h: Removed unneeded includes. Changed
              the type of one of the constructor arguments from String to
              const String&.
      
              * workers/SharedWorker.cpp:
              (WebCore::SharedWorker::SharedWorker): Made inline. Moved most of
              the setup code out of here into the create function.
              (WebCore::SharedWorker::create): Moved the code here.
      
              * workers/SharedWorker.h: Removed unneeded includes. Made the
              create function non-inline. Marked the toSharedWorker override private
              to catch people doing an unnecessary virtual function call if they
              already have a SharedWorker*.
      
              * workers/Worker.cpp:
              (WebCore::Worker::Worker): Made inline. Moved most of the setup code
              out of here into the create function.
              (WebCore::Worker::create): Moved the code here.
      
              * workers/Worker.h: Made the create function non-inline. Changed
              the arguments to the constructor.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@62696 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bb381c75
  13. 06 Jan, 2010 1 commit
  14. 29 Nov, 2009 1 commit
    • dbates@webkit.org's avatar
      2009-11-29 Daniel Bates <dbates@webkit.org> · e88d68df
      dbates@webkit.org authored
              Reviewed by Eric Seidel.
      
              https://bugs.webkit.org/show_bug.cgi?id=31969
      
              Removes unnecessary #include files.
      
              No functionality was changed. So, no new tests.
      
              * css/CSSComputedStyleDeclaration.cpp: Removed include CachedImage.h, and
              Pair.h
              * css/CSSCursorImageValue.cpp: Removed include RenderStyle.h
              * css/CSSFontFaceSrcValue.cpp: Removed include Node.h
              * css/CSSFontSelector.cpp: Removed include NodeList.h
              * css/CSSGradientValue.cpp: Removed include GraphicsContext.h, ImageBuffer.h
              * css/CSSImageValue.cpp: Removed include RenderStyle.h
              * css/CSSImportRule.cpp: Removed include MediaList.h
              * css/CSSMutableStyleDeclaration.cpp: Removed include CSSProperty.h
              * css/CSSRule.cpp: Removed include CSSStyleSheet.h
              * css/CSSStyleSelector.cpp: Removed include CSSFontFace.h,
              CSSFontFaceSource.h, and CSSProperty.h
              * page/EventSource.h: Removed include EventListener.h
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51473 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e88d68df
  15. 23 Sep, 2009 1 commit
    • ggaren@apple.com's avatar
      JavaScriptCore: Added the ability to swap vectors with inline capacities, so you can · 521f64b8
      ggaren@apple.com authored
      store a vector with inline capacity in a hash table.
      
      Patch by Geoffrey Garen <ggaren@apple.com> on 2009-09-23
      Reviewed by Sam Weinig.
      
      * wtf/Vector.h:
      (WTF::swap):
      (WTF::VectorBuffer::swap):
      
      WebCore: Bring a little sanity to this crazy EventTarget world of ours
      https://bugs.webkit.org/show_bug.cgi?id=29701
      
      Patch by Geoffrey Garen <ggaren@apple.com> on 2009-09-23
      Reviewed by Sam Weinig.
      
      Lots of EventTarget refactoring to achieve a single shared implementation
      that fixes some of the performance and correctness bugs of the many individual
      implementations, and makes reasoning about EventTargets and EventListeners
      much easier.
              
      The basic design is this:
          - EventTarget manages a set of EventListeners.
          - onXXX EventListener attributes forward to standard EventTarget APIs.
          - Since the onXXX code is repetitive, it is usually done with macros
            of the form DEFINE_ATTRIBUTE_EVENT_LISTENER(attributeName).
          - EventTarget provides a shared implementation of dispatchEvent,
            which subclasses with special event dispatch rules, like Node, override.
          - To support Node, which lazily instantiates its EventTarget data,
            EventTarget has no data members, and instead makes a virtual call
            to get its data from wherever its subclass chose to store it.
                    
      Code that used to call dispatchEvent, passing an ExceptionCode paratmeter,
      even though no exception could be thrown, has been changed not to do so,
      to improve clarity and performance.
              
      Code that used to call a special dispatchXXXEvent function, which just
      turned around and called dispatchEvent, has been changed to call
      dispatchEvent, to improve clarity and performance.
      
      * WebCore.base.exp:
      * WebCore.xcodeproj/project.pbxproj: Another day in the life of a WebKit
      engineer.
      
      * bindings/js/JSDOMBinding.cpp:
      (WebCore::isObservableThroughDOM): Updated for Node API change. Added
      "is not in the document but is firing event listeners" as a condition
      that makes a Node observable in the DOM, so that event listeners firing
      on removed nodes are not destroyed midstream. (This was a long-standing
      bug that was somewhat hidden by the old implementation's habit of
      copying the RegisteredEventListener vector before firing events, which
      would keep almost all the relevant objects from being destroyed.)
      
      * bindings/js/JSEventListener.cpp:
      (WebCore::JSEventListener::handleEvent): Removed the isWindowEvent flag
      because it was one of the most elaborately planned no-ops in the history
      of software crime, and one of the reasons clients thought they needed more
      than one dispatchEvent function even though they didn't.
      * bindings/js/JSEventListener.h:
      
      * bindings/js/JSDOMWindowCustom.cpp:
      (WebCore::JSDOMWindow::markChildren):
      (WebCore::JSMessagePort::markChildren):
      * bindings/js/JSNodeCustom.cpp:
      (WebCore::JSNode::markChildren):
      * bindings/js/JSAbstractWorkerCustom.cpp:
      * bindings/js/JSDOMApplicationCacheCustom.cpp:
      * bindings/js/JSDedicatedWorkerContextCustom.cpp:
      * bindings/js/JSEventSourceCustom.cpp:
      * bindings/js/JSMessagePortCustom.cpp:
      * bindings/js/JSSharedWorkerContextCustom.cpp: Removed.
      * bindings/js/JSWebSocketCustom.cpp:
      * bindings/js/JSWorkerContextCustom.cpp:
      (WebCore::JSWorkerContext::markChildren):
      * bindings/js/JSWorkerCustom.cpp:
      * bindings/js/JSXMLHttpRequestCustom.cpp:
      (WebCore::JSXMLHttpRequest::markChildren):
      * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
      (WebCore::JSXMLHttpRequestUpload::markChildren): EventListener marking is
      now autogenerated. Classes that still have custom mark functions for other
      reasons now call a shared EventTarget API to mark their EventListeners.
      
      * bindings/objc/ObjCEventListener.h:
      * bindings/objc/ObjCEventListener.mm:
      (WebCore::ObjCEventListener::handleEvent): Bye bye isWindowEvent.
      
      * bindings/scripts/CodeGeneratorJS.pm: Autogeneration support for
      marking and invalidating event listeners.
      
      * dom/CharacterData.cpp:
      (WebCore::CharacterData::dispatchModifiedEvent):
      * dom/ContainerNode.cpp:
      (WebCore::ContainerNode::insertBefore):
      (WebCore::ContainerNode::replaceChild):
      (WebCore::willRemoveChild):
      (WebCore::ContainerNode::appendChild):
      (WebCore::dispatchChildInsertionEvents):
      (WebCore::dispatchChildRemovalEvents):
      * dom/Document.cpp:
      (WebCore::Document::removeAllEventListeners):
      (WebCore::Document::implicitClose):
      (WebCore::Document::setFocusedNode):
      (WebCore::Document::dispatchWindowEvent):
      (WebCore::Document::dispatchWindowLoadEvent):
      (WebCore::Document::finishedParsing):
      * dom/Document.h: Use dispatchEvent directly.
      
      * dom/Element.h: Moved a few event listener attributes down from Node,
      since they don't apply to all Nodes, only Elements.
      
      * dom/EventListener.h: Removed isWindowEvent parameter.
      
      * dom/EventNames.h: Added the "display" event name, so it works correctly
      with attribute macros, and for performance.
      
      * dom/EventTarget.cpp:
      (WebCore::forbidEventDispatch):
      (WebCore::allowEventDispatch):
      (WebCore::eventDispatchForbidden): Made this code (embarrasingly) thread
      safe, since it's now called on multiple threads. (Currently, we only forbid
      event dispatch on the main thread. If we ever want to forbid event dispatch
      on secondary threads, we can improve it then.)
      
      (WebCore::EventTarget::addEventListener):
      (WebCore::EventTarget::removeEventListener):
      (WebCore::EventTarget::setAttributeEventListener):
      (WebCore::EventTarget::getAttributeEventListener):
      (WebCore::EventTarget::clearAttributeEventListener):
      (WebCore::EventTarget::dispatchEvent):
      (WebCore::EventTarget::fireEventListeners):
      (WebCore::EventTarget::getEventListeners):
      (WebCore::EventTarget::removeAllEventListeners):
      * dom/EventTarget.h:
      (WebCore::FiringEventEndIterator::FiringEventEndIterator):
      (WebCore::EventTarget::ref):
      (WebCore::EventTarget::deref):
      (WebCore::EventTarget::markEventListeners):
      (WebCore::EventTarget::invalidateEventListeners):
      (WebCore::EventTarget::isFiringEventListeners):
      (WebCore::EventTarget::hasEventListeners): The ONE TRUE IMPLEMENTATION of
      EventTarget APIs, crafted from an amalgam of all the different versions
      we used to have. The most significant change here is that we no longer
      make a copy of an EventListener vector before firing the events in the
      vector -- instead, we use a reference to the original vector, along with
      a notification mechanism for the unlikely case when an EventListener is
      removed from the vector. This substantially reduces malloc, copying, and
      refcount overhead, and complexity.
      
      * dom/InputElement.cpp:
      (WebCore::InputElement::setValueFromRenderer):
      * dom/MessageEvent.h:
      (WebCore::MessageEvent::create): Use dispatchEvent directly.
      
      * dom/MessagePort.cpp:
      (WebCore::MessagePort::dispatchMessages):
      (WebCore::MessagePort::eventTargetData):
      (WebCore::MessagePort::ensureEventTargetData):
      * dom/MessagePort.h:
      (WebCore::MessagePort::setOnmessage):
      (WebCore::MessagePort::onmessage):
      * dom/MessagePort.idl: Removed custom EventTarget implementation.
      
      * dom/MutationEvent.h:
      (WebCore::MutationEvent::create): Added some default values so callers
      can construct MutationEvents more easily, without calling a custom dispatch
      function.
      
      * dom/Node.cpp:
      (WebCore::Node::addEventListener):
      (WebCore::Node::removeEventListener):
      (WebCore::Node::eventTargetData):
      (WebCore::Node::ensureEventTargetData):
      (WebCore::Node::handleLocalEvents):
      (WebCore::Node::dispatchEvent):
      (WebCore::Node::dispatchGenericEvent):
      (WebCore::Node::dispatchSubtreeModifiedEvent):
      (WebCore::Node::dispatchUIEvent):
      (WebCore::Node::dispatchKeyEvent):
      (WebCore::Node::dispatchMouseEvent):
      (WebCore::Node::dispatchWheelEvent):
      (WebCore::Node::dispatchFocusEvent):
      (WebCore::Node::dispatchBlurEvent):
      * dom/Node.h:
      (WebCore::Node::preDispatchEventHandler):
      (WebCore::Node::postDispatchEventHandler):
      * dom/Node.idl:
      * dom/NodeRareData.h:
      (WebCore::NodeRareData::eventTargetData):
      (WebCore::NodeRareData::ensureEventTargetData): Use the shared EventTarget
      interface, and call dispatchEvent directly instead of custom dispatchXXXEvent
      functions that just forwarded to dispatchEvent.
      
      * dom/RegisteredEventListener.cpp:
      * dom/RegisteredEventListener.h:
      (WebCore::RegisteredEventListener::RegisteredEventListener):
      (WebCore::operator==): This is just a simple struct now, since we no longer
      do a complicated copy / refCount / isRemoved dance just to honor the rule
      that an EventListener can be removed during event dispatch.
      
      * history/CachedFrame.cpp:
      (WebCore::CachedFrameBase::restore): Removed another custom dispatchEvent.
      
      * html/HTMLBodyElement.cpp:
      * html/HTMLBodyElement.h: Use the shared EventTarget API.
      
      * html/HTMLFormControlElement.cpp:
      (WebCore::HTMLFormControlElement::dispatchFormControlChangeEvent):
      (WebCore::HTMLFormControlElement::checkValidity):
      * html/HTMLFormElement.cpp:
      (WebCore::HTMLFormElement::handleLocalEvents):
      (WebCore::HTMLFormElement::prepareSubmit):
      (WebCore::HTMLFormElement::reset):
      * html/HTMLFormElement.h: Use the standard dispatchEvent API.
      
      * html/HTMLFrameSetElement.cpp:
      * html/HTMLFrameSetElement.h: Use the shared EventTarget API.
      
      * html/HTMLImageLoader.cpp:
      (WebCore::HTMLImageLoader::dispatchLoadEvent):
      * html/HTMLInputElement.cpp:
      (WebCore::HTMLInputElement::onSearch):
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::loadInternal):
      * html/HTMLScriptElement.cpp:
      (WebCore::HTMLScriptElement::dispatchLoadEvent):
      (WebCore::HTMLScriptElement::dispatchErrorEvent):
      * html/HTMLSourceElement.cpp:
      (WebCore::HTMLSourceElement::errorEventTimerFired):
      * html/HTMLTokenizer.cpp:
      (WebCore::HTMLTokenizer::notifyFinished): Use the standard dispatchEvent API.
      
      * inspector/InspectorDOMAgent.cpp:
      (WebCore::InspectorDOMAgent::handleEvent):
      * inspector/InspectorDOMAgent.h:
      * inspector/InspectorDOMStorageResource.cpp:
      (WebCore::InspectorDOMStorageResource::handleEvent):
      * inspector/InspectorDOMStorageResource.h:
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::stopLoading):
      (WebCore::FrameLoader::canCachePageContainingThisFrame):
      (WebCore::FrameLoader::logCanCacheFrameDecision):
      (WebCore::HashChangeEventTask::performTask):
      (WebCore::FrameLoader::pageHidden): No more isWindowEvent.
      
      * loader/ImageDocument.cpp:
      (WebCore::ImageEventListener::handleEvent):
      * loader/appcache/ApplicationCacheGroup.cpp:
      (WebCore::CallCacheListenerTask::performTask):
      * loader/appcache/ApplicationCacheHost.cpp:
      (WebCore::ApplicationCacheHost::notifyDOMApplicationCache):
      * loader/appcache/ApplicationCacheHost.h:
      * loader/appcache/DOMApplicationCache.cpp:
      (WebCore::DOMApplicationCache::eventTargetData):
      (WebCore::DOMApplicationCache::ensureEventTargetData):
      * loader/appcache/DOMApplicationCache.h:
      * loader/appcache/DOMApplicationCache.idl: Switched to the standard
      EventTarget API. As a part of this, I switched this class from using a
      custom internal event name enumeration to using the standard EventNames.
      
      * notifications/Notification.cpp:
      (WebCore::Notification::eventTargetData):
      (WebCore::Notification::ensureEventTargetData):
      * notifications/Notification.h:
      (WebCore::Notification::scriptExecutionContext):
      * notifications/Notification.idl: Switched to the standard EventTarget API.
      
      * page/DOMWindow.cpp:
      (WebCore::PostMessageTimer::event):
      (WebCore::windowsWithUnloadEventListeners):
      (WebCore::windowsWithBeforeUnloadEventListeners):
      (WebCore::allowsBeforeUnloadListeners):
      (WebCore::DOMWindow::dispatchAllPendingBeforeUnloadEvents):
      (WebCore::DOMWindow::pendingUnloadEventListeners):
      (WebCore::DOMWindow::dispatchAllPendingUnloadEvents): Changed the "pending"
      unload / beforeunload listener tracker just to track which windows had
      such listeners, instead of actually keeping a copy of the listeners. Now,
      this code can use the standard EventTarget API.
      
      (WebCore::DOMWindow::~DOMWindow):
      (WebCore::DOMWindow::postMessageTimerFired):
      (WebCore::DOMWindow::addEventListener):
      (WebCore::DOMWindow::removeEventListener):
      (WebCore::DOMWindow::dispatchLoadEvent):
      (WebCore::DOMWindow::dispatchEvent):
      (WebCore::DOMWindow::removeAllEventListeners):
      (WebCore::DOMWindow::captureEvents):
      (WebCore::DOMWindow::releaseEvents):
      (WebCore::DOMWindow::eventTargetData):
      (WebCore::DOMWindow::ensureEventTargetData):
      * page/DOMWindow.h:
      * page/DOMWindow.idl: Use the standard EventTarget APIs.
      
      * page/EventHandler.cpp:
      (WebCore::EventHandler::canMouseDownStartSelect):
      (WebCore::EventHandler::canMouseDragExtendSelect):
      (WebCore::EventHandler::sendResizeEvent):
      (WebCore::EventHandler::sendScrollEvent): Use dispatchEvent directly.
      
      * page/EventSource.cpp:
      (WebCore::EventSource::endRequest):
      (WebCore::EventSource::didReceiveResponse):
      (WebCore::EventSource::parseEventStreamLine):
      (WebCore::EventSource::stop):
      (WebCore::EventSource::createMessageEvent):
      (WebCore::EventSource::eventTargetData):
      (WebCore::EventSource::ensureEventTargetData):
      * page/EventSource.h:
      * page/EventSource.idl: Use the standard EventTarget APIs.
      
      * page/FocusController.cpp:
      (WebCore::dispatchEventsOnWindowAndFocusedNode):
      (WebCore::FocusController::setFocusedFrame):
      * page/Frame.cpp:
      (WebCore::Frame::shouldClose):
      * page/Frame.h:
      * page/Page.cpp:
      (WebCore::networkStateChanged):
      * page/animation/AnimationController.cpp:
      (WebCore::AnimationControllerPrivate::updateStyleIfNeededDispatcherFired):
      * rendering/RenderListBox.cpp:
      (WebCore::RenderListBox::valueChanged):
      * rendering/RenderTextControl.cpp:
      (WebCore::RenderTextControl::selectionChanged):
      * rendering/RenderTextControlMultiLine.cpp:
      (WebCore::RenderTextControlMultiLine::subtreeHasChanged): Use dispatchEvent.
      
      * svg/SVGElement.cpp:
      (WebCore::hasLoadListener): Rewritten for new EventTarget API.
      
      * svg/SVGElementInstance.cpp:
      (WebCore::dummyEventTargetData):
      (WebCore::SVGElementInstance::addEventListener):
      (WebCore::SVGElementInstance::removeEventListener):
      (WebCore::SVGElementInstance::removeAllEventListeners):
      (WebCore::SVGElementInstance::dispatchEvent):
      (WebCore::SVGElementInstance::eventTargetData):
      (WebCore::SVGElementInstance::ensureEventTargetData): Use the EventTarget API.
      
      * svg/SVGElementInstance.h:
      * svg/SVGImageLoader.cpp:
      (WebCore::SVGImageLoader::dispatchLoadEvent):
      * svg/SVGScriptElement.cpp:
      (WebCore::SVGScriptElement::dispatchErrorEvent): Use dispatchEvent directly.
      
      * svg/SVGUseElement.cpp:
      (WebCore::SVGUseElement::transferEventListenersToShadowTree): Updated for
      new EventTarget API.
      
      * svg/animation/SVGSMILElement.cpp:
      (WebCore::ConditionEventListener::handleEvent): No more isWindowEvent.
      
      * websockets/WebSocket.cpp:
      (WebCore::ProcessWebSocketEventTask::create):
      (WebCore::ProcessWebSocketEventTask::performTask):
      (WebCore::ProcessWebSocketEventTask::ProcessWebSocketEventTask):
      (WebCore::WebSocket::didConnect):
      (WebCore::WebSocket::didReceiveMessage):
      (WebCore::WebSocket::didClose):
      (WebCore::WebSocket::eventTargetData):
      (WebCore::WebSocket::ensureEventTargetData):
      * websockets/WebSocket.h:
      * websockets/WebSocket.idl:
      * workers/AbstractWorker.cpp:
      (WebCore::AbstractWorker::eventTargetData):
      (WebCore::AbstractWorker::ensureEventTargetData):
      * workers/AbstractWorker.h:
      * workers/AbstractWorker.idl:
      * workers/DedicatedWorkerContext.cpp:
      * workers/DedicatedWorkerContext.h:
      * workers/DedicatedWorkerContext.idl:
      * workers/DefaultSharedWorkerRepository.cpp:
      (WebCore::SharedWorkerConnectTask::performTask):
      (WebCore::SharedWorkerScriptLoader::load):
      (WebCore::SharedWorkerScriptLoader::notifyFinished):
      * workers/SharedWorker.idl:
      * workers/SharedWorkerContext.cpp:
      (WebCore::createConnectEvent):
      * workers/SharedWorkerContext.h:
      * workers/SharedWorkerContext.idl:
      * workers/Worker.cpp:
      (WebCore::Worker::notifyFinished):
      * workers/Worker.h:
      * workers/Worker.idl:
      * workers/WorkerContext.cpp:
      (WebCore::WorkerContext::eventTargetData):
      (WebCore::WorkerContext::ensureEventTargetData):
      * workers/WorkerContext.h:
      * workers/WorkerContext.idl:
      * workers/WorkerMessagingProxy.cpp:
      (WebCore::MessageWorkerContextTask::performTask):
      (WebCore::MessageWorkerTask::performTask):
      (WebCore::WorkerExceptionTask::performTask):
      * xml/XMLHttpRequest.cpp:
      (WebCore::XMLHttpRequest::callReadyStateChangeListener):
      (WebCore::XMLHttpRequest::createRequest):
      (WebCore::XMLHttpRequest::abort):
      (WebCore::XMLHttpRequest::networkError):
      (WebCore::XMLHttpRequest::abortError):
      (WebCore::XMLHttpRequest::didSendData):
      (WebCore::XMLHttpRequest::didReceiveData):
      (WebCore::XMLHttpRequest::eventTargetData):
      (WebCore::XMLHttpRequest::ensureEventTargetData):
      * xml/XMLHttpRequest.h:
      * xml/XMLHttpRequest.idl:
      * xml/XMLHttpRequestProgressEvent.h:
      (WebCore::XMLHttpRequestProgressEvent::create):
      * xml/XMLHttpRequestUpload.cpp:
      (WebCore::XMLHttpRequestUpload::eventTargetData):
      (WebCore::XMLHttpRequestUpload::ensureEventTargetData):
      * xml/XMLHttpRequestUpload.h:
      * xml/XMLHttpRequestUpload.idl: Use new EventTarget API.
      
      WebKit/mac: Updated for a WebCore rename.
      
      Patch by Geoffrey Garen <ggaren@apple.com> on 2009-09-23
      Reviewed by Sam Weinig.
      
      * WebView/WebFrame.mm:
      (-[WebFrame _cacheabilityDictionary]):
      
      LayoutTests: Layout tests for event target sanitization.
              
      Patch by Geoffrey Garen <ggaren@apple.com> on 2009-09-23
      Reviewed by Sam Weinig.
      
      New tests for event dispatch:
      
      * fast/events/event-attributes-after-exception-expected.txt: Added.
      * fast/events/event-attributes-after-exception.html: Added.
      * fast/events/event-fire-order-expected.txt: Added.
      * fast/events/event-fire-order.html: Added.
      * fast/events/event-fired-after-removal-expected.txt: Added.
      * fast/events/event-fired-after-removal.html: Added.
              
      Fixed these tests:
      
      * fast/xmlhttprequest/xmlhttprequest-get-expected.txt: eventPhase should
      be AT_TARGET (2) when firing an event on an XHR, not INVALID (0).
      * http/tests/xmlhttprequest/infoOnProgressEvent-expected.txt: ditto
      
      * http/tests/xmlhttprequest/event-target-expected.txt:
      * http/tests/xmlhttprequest/event-target.html: Removing an event listener
      during event dispatch should prevent it from firing. (This test was backwards.)
              
      * svg/custom/loadevents-capturing.svg: Enhanced this test to tell you
      why it fails when it fails. Changed it to register runTest() (now named 
      reportResults()) using addEventListener() instead of the 'onload' attribute.
      The test relies on reportResults() running after handler(), so it needs
      to register reportResults() after handler().
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48701 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      521f64b8
  16. 15 Aug, 2009 1 commit
    • weinig@apple.com's avatar
      JavaScriptCore: Added ENABLE_EVENTSOURCE flag. · 99aaf9dd
      weinig@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=14997
      
      Patch by Adam Bergkvist <adam.bergkvist@ericsson.com> on 2009-08-15
      Reviewed by Sam Weinig.
      
      * Configurations/FeatureDefines.xcconfig:
      
      WebCore: Added implementation of the EventSource object that enables
      server-sent events from HTML5.
      http://dev.w3.org/html5/eventsource/
      https://bugs.webkit.org/show_bug.cgi?id=14997
      
      Patch by Adam Bergkvist <adam.bergkvist@ericsson.com> on 2009-08-15
      Reviewed by Sam Weinig.
      
      Tests: fast/eventsource/eventsource-attribute-listeners.html
             fast/eventsource/eventsource-constructor.html
             http/tests/eventsource/eventsource-bad-mime-type.html
             http/tests/eventsource/eventsource-parse-event-stream.html
             http/tests/eventsource/eventsource-reconnect.html
             http/tests/eventsource/eventsource-status-code-states.html
             http/tests/eventsource/workers/eventsource-simple.html
      
      * Configurations/FeatureDefines.xcconfig:
      * DerivedSources.cpp:
      * DerivedSources.make:
      * GNUmakefile.am:
      * WebCore.pro:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.xcodeproj/project.pbxproj:
      * bindings/js/JSDOMWindowCustom.cpp:
      (WebCore::JSDOMWindow::eventSource):
      * bindings/js/JSEventSourceConstructor.cpp: Added.
      (WebCore::):
      (WebCore::JSEventSourceConstructor::JSEventSourceConstructor):
      (WebCore::constructEventSource):
      (WebCore::JSEventSourceConstructor::getConstructData):
      * bindings/js/JSEventSourceConstructor.h: Added.
      (WebCore::JSEventSourceConstructor::classInfo):
      * bindings/js/JSEventSourceCustom.cpp: Added.
      (WebCore::JSEventSource::markChildren):
      (WebCore::JSEventSource::addEventListener):
      (WebCore::JSEventSource::removeEventListener):
      * bindings/js/JSEventTarget.cpp:
      (WebCore::toJS):
      (WebCore::toEventTarget):
      * bindings/js/JSWorkerContextCustom.cpp:
      (WebCore::JSWorkerContext::eventSource):
      * dom/EventNames.h:
      * dom/EventTarget.cpp:
      (WebCore::EventTarget::toEventSource):
      * dom/EventTarget.h:
      * page/DOMWindow.idl:
      * page/EventSource.cpp: Added.
      (WebCore::EventSource::EventSource):
      (WebCore::EventSource::~EventSource):
      (WebCore::EventSource::connect):
      (WebCore::EventSource::endRequest):
      (WebCore::EventSource::scheduleReconnect):
      (WebCore::EventSource::reconnectTimerFired):
      (WebCore::EventSource::url):
      (WebCore::EventSource::readyState):
      (WebCore::EventSource::close):
      (WebCore::EventSource::scriptExecutionContext):
      (WebCore::EventSource::addEventListener):
      (WebCore::EventSource::removeEventListener):
      (WebCore::EventSource::dispatchEvent):
      (WebCore::EventSource::didReceiveResponse):
      (WebCore::EventSource::didReceiveData):
      (WebCore::EventSource::didFinishLoading):
      (WebCore::EventSource::didFail):
      (WebCore::EventSource::didFailRedirectCheck):
      (WebCore::EventSource::parseEventStream):
      (WebCore::EventSource::parseEventStreamLine):
      (WebCore::EventSource::dispatchGenericEvent):
      (WebCore::EventSource::dispatchMessageEvent):
      (WebCore::EventSource::stop):
      * page/EventSource.h: Added.
      (WebCore::EventSource::create):
      (WebCore::EventSource::):
      (WebCore::EventSource::setOnopen):
      (WebCore::EventSource::onopen):
      (WebCore::EventSource::setOnmessage):
      (WebCore::EventSource::onmessage):
      (WebCore::EventSource::setOnerror):
      (WebCore::EventSource::onerror):
      (WebCore::EventSource::toEventSource):
      (WebCore::EventSource::eventListeners):
      (WebCore::EventSource::refEventTarget):
      (WebCore::EventSource::derefEventTarget):
      * page/EventSource.idl: Added.
      * workers/WorkerContext.idl:
      
      WebKit/mac: Added ENABLE_EVENTSOURCE flag.
      https://bugs.webkit.org/show_bug.cgi?id=14997
      
      Patch by Adam Bergkvist <adam.bergkvist@ericsson.com> on 2009-08-15
      Reviewed by Sam Weinig.
      
      * Configurations/FeatureDefines.xcconfig:
      
      WebKitTools: Added EventSource to the build script (default on).
      https://bugs.webkit.org/show_bug.cgi?id=14997 
      
      Patch by Adam Bergkvist <adam.bergkvist@ericsson.com> on 2009-08-14
      Reviewed by Sam Weinig.
      
      * Scripts/build-webkit:
      
      LayoutTests: Tests for EventSource.
      https://bugs.webkit.org/show_bug.cgi?id=14997 
      
      Patch by Adam Bergkvist <adam.bergkvist@ericsson.com> on 2009-08-14
      Reviewed by Sam Weinig.
      
      * fast/eventsource: Added.
      * fast/eventsource/eventsource-attribute-listeners-expected.txt: Added.
      * fast/eventsource/eventsource-attribute-listeners.html: Added.
      * fast/eventsource/eventsource-constructor-expected.txt: Added.
      * fast/eventsource/eventsource-constructor.html: Added.
      * http/tests/eventsource: Added.
      * http/tests/eventsource/eventsource-bad-mime-type-expected.txt: Added.
      * http/tests/eventsource/eventsource-bad-mime-type.html: Added.
      * http/tests/eventsource/eventsource-parse-event-stream-expected.txt: Added.
      * http/tests/eventsource/eventsource-parse-event-stream.html: Added.
      * http/tests/eventsource/eventsource-reconnect-expected.txt: Added.
      * http/tests/eventsource/eventsource-reconnect.html: Added.
      * http/tests/eventsource/eventsource-status-code-states-expected.txt: Added.
      * http/tests/eventsource/eventsource-status-code-states.html: Added.
      * http/tests/eventsource/resources: Added.
      * http/tests/eventsource/resources/bad-mime-type.asis: Added.
      * http/tests/eventsource/resources/event-stream.php: Added.
      * http/tests/eventsource/resources/reconnect.php: Added.
      * http/tests/eventsource/resources/simple-event-stream.asis: Added.
      * http/tests/eventsource/resources/status-codes.php: Added.
      * http/tests/eventsource/workers: Added.
      * http/tests/eventsource/workers/eventsource-simple-expected.txt: Added.
      * http/tests/eventsource/workers/eventsource-simple.html: Added.
      * http/tests/eventsource/workers/resources: Added.
      * http/tests/eventsource/workers/resources/simple-worker.js: Added.
      (es.onmessage):
      (es.onerror):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47323 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      99aaf9dd