1. 14 Jan, 2013 3 commits
    • tommyw@google.com's avatar
      MediaStream API: Update MediaStreamTrack::readyState to match specification · c7f0bd90
      tommyw@google.com authored
      https://bugs.webkit.org/show_bug.cgi?id=106781
      
      Reviewed by Adam Barth.
      
      Source/WebCore:
      
      MediaStreamTrack::readyState now returns a string like the rest of the RTC classes.
      
      Existing tests expanded to cover patch.
      
      * Modules/mediastream/MediaStream.cpp:
      (WebCore::processTrack):
      * Modules/mediastream/MediaStreamTrack.cpp:
      (WebCore::MediaStreamTrack::readyState):
      (WebCore::MediaStreamTrack::ended):
      (WebCore):
      * Modules/mediastream/MediaStreamTrack.h:
      (MediaStreamTrack):
      * Modules/mediastream/MediaStreamTrack.idl:
      
      LayoutTests:
      
      * fast/mediastream/MediaStreamTrack-expected.txt:
      * fast/mediastream/MediaStreamTrack.html:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139618 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c7f0bd90
    • tommyw@google.com's avatar
      MediaStream API: Update the track accessors on MediaStream to match the latest specification · fd01ce17
      tommyw@google.com authored
      https://bugs.webkit.org/show_bug.cgi?id=106660
      
      Reviewed by Adam Barth.
      
      Source/WebCore:
      
      The spec has significantly changed how tracks are accessed from a MediaStream:
      http://dev.w3.org/2011/webrtc/editor/getusermedia.html
      
      In short: the attributes audioTrack/videoTrack that returned special MediaStreamTrackLists have been
      replaced by the functions getAudioTracks()/getVideoTracks that return standard sequences of
      MediaStreamTracks.
      
      Existing tests updated and expanded to cover patch.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * Modules/mediastream/MediaStream.cpp:
      (WebCore::MediaStream::create):
      (WebCore::MediaStream::MediaStream):
      (WebCore::MediaStream::~MediaStream):
      (WebCore::MediaStream::readyState):
      (WebCore):
      (WebCore::MediaStream::addTrack):
      (WebCore::MediaStream::removeTrack):
      (WebCore::MediaStream::getTrackById):
      (WebCore::MediaStream::streamEnded):
      (WebCore::MediaStream::contextDestroyed):
      (WebCore::MediaStream::scheduleDispatchEvent):
      (WebCore::MediaStream::scheduledEventTimerFired):
      * Modules/mediastream/MediaStream.h:
      (MediaStream):
      (WebCore::MediaStream::getAudioTracks):
      (WebCore::MediaStream::getVideoTracks):
      * Modules/mediastream/MediaStream.idl:
      * Modules/mediastream/MediaStreamTrackList.cpp: Removed.
      * Modules/mediastream/MediaStreamTrackList.h: Removed.
      * Modules/mediastream/MediaStreamTrackList.idl: Removed.
      * Modules/webaudio/AudioContext.cpp:
      (WebCore::AudioContext::createMediaStreamSource):
      * WebCore.gypi:
      * dom/EventTargetFactory.in:
      * platform/mediastream/MediaStreamDescriptor.h:
      (WebCore::MediaStreamDescriptor::addAudioComponent):
      (WebCore::MediaStreamDescriptor::removeAudioComponent):
      (WebCore::MediaStreamDescriptor::addVideoComponent):
      (WebCore::MediaStreamDescriptor::removeVideoComponent):
      
      LayoutTests:
      
      Updating and expanding tests for the new getAudioTracks()/getVideoTracks().
      
      * fast/mediastream/MediaStreamConstructor-expected.txt:
      * fast/mediastream/MediaStreamConstructor.html:
      * fast/mediastream/MediaStreamTrack.html:
      * fast/mediastream/MediaStreamTrackList-expected.txt:
      * fast/mediastream/MediaStreamTrackList.html:
      * fast/mediastream/RTCPeerConnection-statsSelector-expected.txt:
      * fast/mediastream/RTCPeerConnection-statsSelector.html:
      * fast/mediastream/getusermedia-expected.txt:
      * fast/mediastream/getusermedia.html:
      * webaudio/mediastreamaudiosourcenode-expected.txt:
      * webaudio/mediastreamaudiosourcenode.html:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139611 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fd01ce17
    • tommyw@google.com's avatar
      MediaStream API: Change MediaStream::readyState to an boolean attribute called ended. · 4aad81ec
      tommyw@google.com authored
      https://bugs.webkit.org/show_bug.cgi?id=106568
      
      Reviewed by Adam Barth.
      
      Source/WebCore:
      
      See specification: http://dev.w3.org/2011/webrtc/editor/getusermedia.html
      
      Existings tests updated to cover patch.
      
      * Modules/mediastream/LocalMediaStream.cpp:
      (WebCore::LocalMediaStream::stop):
      * Modules/mediastream/MediaStream.cpp:
      (WebCore::MediaStream::ended):
      (WebCore::MediaStream::streamEnded):
      * Modules/mediastream/MediaStream.h:
      (MediaStream):
      (WebCore::MediaStream::isLocal):
      * Modules/mediastream/MediaStream.idl:
      * Modules/mediastream/MediaStreamTrackList.cpp:
      (WebCore::MediaStreamTrackList::add):
      (WebCore::MediaStreamTrackList::remove):
      
      LayoutTests:
      
      * fast/mediastream/LocalMediaStream-onended-expected.txt:
      * fast/mediastream/LocalMediaStream-onended.html:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139598 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4aad81ec
  2. 11 Jan, 2013 1 commit
    • jsbell@chromium.org's avatar
      IndexedDB: IDBTransaction should manage lifetime of IDBRequests · 340f1c19
      jsbell@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=106678
      
      Reviewed by Tony Chang.
      
      Ensure reference count of IDBRequests don't bounce off zero if there are no script
      references are while the events are arriving.
      
      No new tests - no detectable behavior changes.
      
      * Modules/indexeddb/IDBRequest.cpp:
      (WebCore::IDBRequest::create): Register with transaction (which now takes a ref) here to...
      (WebCore::IDBRequest::IDBRequest): ...avoid having to relax adoption requirements here.
      * Modules/indexeddb/IDBTransaction.cpp: Keep RefPtr<>s to outstanding requests.
      (WebCore::IDBTransaction::~IDBTransaction):
      (WebCore::IDBTransaction::abort):
      (WebCore::IDBTransaction::onAbort):
      * Modules/indexeddb/IDBTransaction.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139518 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      340f1c19
  3. 10 Jan, 2013 2 commits
    • tommyw@google.com's avatar
      MediaStream API: Adding the new id attribute to MediaStream and MediaStreamTrack · 860809ad
      tommyw@google.com authored
      https://bugs.webkit.org/show_bug.cgi?id=106564
      
      Reviewed by Adam Barth.
      
      Specification: http://dev.w3.org/2011/webrtc/editor/getusermedia.html
      MediaStream looses its label attribute and instead gets an id attribute.
      MediaStreamTrack gets an id attribute.
      
      Source/Platform:
      
      * chromium/public/WebMediaStreamComponent.h:
      (WebMediaStreamComponent):
      * chromium/public/WebMediaStreamDescriptor.h:
      (WebMediaStreamDescriptor):
      
      Source/WebCore:
      
      Not testable yet, will add tests in a followup patch.
      
      * Modules/mediastream/MediaStream.h:
      (WebCore::MediaStream::label):
      (MediaStream):
      (WebCore::MediaStream::id):
      * Modules/mediastream/MediaStream.idl:
      * Modules/mediastream/MediaStreamTrack.cpp:
      (WebCore::MediaStreamTrack::id):
      (WebCore):
      * Modules/mediastream/MediaStreamTrack.h:
      * Modules/mediastream/MediaStreamTrack.idl:
      * platform/chromium/support/WebMediaStreamComponent.cpp:
      (WebKit::WebMediaStreamComponent::initialize):
      (WebKit):
      (WebKit::WebMediaStreamComponent::isEnabled):
      (WebKit::WebMediaStreamComponent::id):
      (WebKit::WebMediaStreamComponent::source):
      * platform/chromium/support/WebMediaStreamDescriptor.cpp:
      (WebKit::WebMediaStreamDescriptor::label):
      (WebKit):
      (WebKit::WebMediaStreamDescriptor::id):
      * platform/mediastream/MediaStreamComponent.h:
      (WebCore::MediaStreamComponent::id):
      (WebCore::MediaStreamComponent::MediaStreamComponent):
      (MediaStreamComponent):
      * platform/mediastream/MediaStreamDescriptor.h:
      (WebCore::MediaStreamDescriptor::create):
      (WebCore::MediaStreamDescriptor::id):
      (WebCore::MediaStreamDescriptor::MediaStreamDescriptor):
      (MediaStreamDescriptor):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139352 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      860809ad
    • alecflett@chromium.org's avatar
      IndexedDB: Allow createIndex/createObjectStore to be asynchronous · 6d7e1488
      alecflett@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=106377
      
      Reviewed by Tony Chang.
      
      Source/WebCore:
      
      Migrate implementations of createIndex/deleteIndex,
      createObjectStore/deleteObjectStore over to IDBDatabaseBackendImpl,
      so that they can be asynchronous in multi-process ports.
      
      Has the side effect of removing the last consumers of
      IDBIndexBackendImpl and IDBObjectStoreBackendImpl. The former
      is removed complete and the latter becomes a temporary namespace
      pending a further more mechanical code shuffle.
      
      A key refactoring effect is that the IDBDatabaseBackendImpl
      now contains the authoritative IDBDatabaseMetadata hierarchy,
      and updates to it are consolidated in one place rather than
      scattered across a parallel object tree.
      
      No new tests as this is just refactoring.
      
      * Modules/indexeddb/IDBBackingStore.cpp: Simplify objectstore/index loading and propagate errors.
      (WebCore::IDBBackingStore::getObjectStores):
      (WebCore::IDBBackingStore::getIndexes):
      * Modules/indexeddb/IDBBackingStore.h:
      (IDBBackingStore):
      * Modules/indexeddb/IDBCursorBackendImpl.cpp: Dependency cleanup.
      * Modules/indexeddb/IDBCursorBackendImpl.h: Dependency cleanup.
      (WebCore):
      * Modules/indexeddb/IDBDatabase.cpp: Frontend IDBObjectStores no longer hold onto backend objects.
      (WebCore::IDBDatabase::createObjectStore):
      (WebCore::IDBDatabase::deleteObjectStore):
      * Modules/indexeddb/IDBDatabaseBackendImpl.cpp: Add all create/deleteIndex operations from IDBIndexBackendImpl.
      (WebCore::CreateObjectStoreOperation::create):
      (WebCore::CreateObjectStoreOperation::CreateObjectStoreOperation):
      (CreateObjectStoreOperation):
      (WebCore::DeleteObjectStoreOperation::create):
      (WebCore::DeleteObjectStoreOperation::DeleteObjectStoreOperation):
      (DeleteObjectStoreOperation):
      (WebCore::CreateObjectStoreAbortOperation::create):
      (WebCore::CreateObjectStoreAbortOperation::CreateObjectStoreAbortOperation):
      (CreateObjectStoreAbortOperation):
      (WebCore::DeleteObjectStoreAbortOperation::create):
      (WebCore::DeleteObjectStoreAbortOperation::DeleteObjectStoreAbortOperation):
      (DeleteObjectStoreAbortOperation):
      (CreateIndexOperation):
      (WebCore::CreateIndexOperation::create):
      (WebCore::CreateIndexOperation::CreateIndexOperation):
      (WebCore):
      (DeleteIndexOperation):
      (WebCore::DeleteIndexOperation::create):
      (WebCore::DeleteIndexOperation::DeleteIndexOperation):
      (CreateIndexAbortOperation):
      (WebCore::CreateIndexAbortOperation::create):
      (WebCore::CreateIndexAbortOperation::CreateIndexAbortOperation):
      (DeleteIndexAbortOperation):
      (WebCore::DeleteIndexAbortOperation::create):
      (WebCore::DeleteIndexAbortOperation::DeleteIndexAbortOperation):
      (WebCore::GetOperation::GetOperation):
      (WebCore::IDBDatabaseBackendImpl::addObjectStore):
      (WebCore::IDBDatabaseBackendImpl::removeObjectStore):
      (WebCore::IDBDatabaseBackendImpl::addIndex):
      (WebCore::IDBDatabaseBackendImpl::removeIndex):
      (WebCore::IDBDatabaseBackendImpl::openInternal):
      (WebCore::IDBDatabaseBackendImpl::metadata):
      (WebCore::IDBDatabaseBackendImpl::createObjectStore):
      (WebCore::CreateObjectStoreOperation::perform):
      (WebCore::IDBDatabaseBackendImpl::deleteObjectStore):
      (WebCore::IDBDatabaseBackendImpl::createIndex):
      (WebCore::CreateIndexOperation::perform):
      (WebCore::CreateIndexAbortOperation::perform):
      (WebCore::IDBDatabaseBackendImpl::deleteIndex):
      (WebCore::DeleteIndexOperation::perform):
      (WebCore::DeleteIndexAbortOperation::perform):
      (WebCore::IDBDatabaseBackendImpl::get):
      (WebCore::IDBDatabaseBackendImpl::put):
      (WebCore::IDBDatabaseBackendImpl::setIndexKeys):
      (WebCore::IDBDatabaseBackendImpl::count):
      (WebCore::DeleteRangeOperation::perform):
      (WebCore::DeleteObjectStoreOperation::perform):
      (WebCore::IDBDatabaseBackendImpl::deleteDatabaseFinal):
      (WebCore::IDBDatabaseBackendImpl::loadObjectStores): Load directly into metadata from backing store.
      (WebCore::CreateObjectStoreAbortOperation::perform):
      (WebCore::DeleteObjectStoreAbortOperation::perform):
      (WebCore::IDBDatabaseBackendImpl::VersionChangeAbortOperation::perform):
      * Modules/indexeddb/IDBDatabaseBackendImpl.h:
      (WebCore):
      (IDBDatabaseBackendImpl):
      (WebCore::IDBDatabaseBackendImpl::createObjectStore):
      (WebCore::IDBDatabaseBackendImpl::deleteObjectStore):
      * Modules/indexeddb/IDBIndexBackendImpl.cpp: Removed.
      * Modules/indexeddb/IDBIndexBackendImpl.h: Removed.
      * Modules/indexeddb/IDBObjectStore.cpp:
      (WebCore::IDBObjectStore::IDBObjectStore): Frontend IDBIndex objects no longer hold onto backend.
      (WebCore::IDBObjectStore::createIndex):
      (WebCore::IDBObjectStore::deleteIndex):
      * Modules/indexeddb/IDBObjectStore.h:
      (WebCore::IDBObjectStore::create):
      (IDBObjectStore):
      * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
      * Modules/indexeddb/IDBObjectStoreBackendImpl.h:
      (WebCore):
      (IDBObjectStoreBackendImpl):
      * Modules/indexeddb/IDBTransaction.cpp:
      (WebCore::IDBTransaction::objectStore):
      * Modules/indexeddb/IDBTransaction.h:
      * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
      * Modules/indexeddb/IDBTransactionBackendImpl.h:
      (WebCore::IDBTransactionBackendImpl::objectStore):
      * WebCore.gypi:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.xcodeproj/project.pbxproj:
      
      Source/WebKit/chromium:
      
      Remove this test as it makes no sense once the objectstore/index
      hierarchy is gone.
      
      * tests/IDBDatabaseBackendTest.cpp:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139289 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6d7e1488
  4. 09 Jan, 2013 3 commits
    • fpizlo@apple.com's avatar
      Unreviewed, fix build after http://trac.webkit.org/changeset/139262 · dd8de65c
      fpizlo@apple.com authored
      * Modules/webaudio/DefaultAudioDestinationNode.cpp:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139266 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      dd8de65c
    • crogers@google.com's avatar
      Allow live/local audio input to be enabled only when needed · 2965a3f8
      crogers@google.com authored
      https://bugs.webkit.org/show_bug.cgi?id=106490
      
      Source/Platform:
      
      Reviewed by Kenneth Russell.
      
      * chromium/public/Platform.h:
      (Platform):
      (WebKit::Platform::createAudioDevice):
      
      Source/WebCore:
      
      Reviewed by Kenneth Russell.
      
      WebAudio can process live/local audio input using a MediaStreamAudioSourceNode.
      But currently the audio back-end is not able to know when/if audio input will be
      needed, so it needs to assume the worst and initialize the system to support potential
      audio input in all cases.  For some audio back-ends this can end up being less efficient
      than initializing for audio output only.  This patch adds the ability for the audio back-end
      to be able to initialize itself for audio input later on, only when/if it's needed.
      
      * Modules/webaudio/AudioContext.cpp:
      (WebCore::AudioContext::createMediaStreamSource):
      * Modules/webaudio/AudioDestinationNode.h:
      (AudioDestinationNode):
      * Modules/webaudio/DefaultAudioDestinationNode.cpp:
      (WebCore::DefaultAudioDestinationNode::DefaultAudioDestinationNode):
      (WebCore::DefaultAudioDestinationNode::initialize):
      (WebCore::DefaultAudioDestinationNode::uninitialize):
      (WebCore::DefaultAudioDestinationNode::createDestination):
      (WebCore):
      (WebCore::DefaultAudioDestinationNode::enableInput):
      * Modules/webaudio/DefaultAudioDestinationNode.h:
      (DefaultAudioDestinationNode):
      * Modules/webaudio/OfflineAudioDestinationNode.h:
      (OfflineAudioDestinationNode):
      (WebCore::OfflineAudioDestinationNode::sampleRate):
      * platform/audio/AudioDestination.h:
      (AudioDestination):
      * platform/audio/gstreamer/AudioDestinationGStreamer.cpp:
      (WebCore::AudioDestination::create):
      * platform/audio/mac/AudioDestinationMac.cpp:
      (WebCore::AudioDestination::create):
      
      Source/WebKit/chromium:
      
      Reviewed by Kenneth Russell.
      
      * src/AudioDestinationChromium.cpp:
      (WebCore):
      (WebCore::AudioDestination::create):
      (WebCore::AudioDestinationChromium::AudioDestinationChromium):
      (WebCore::AudioDestinationChromium::render):
      * src/AudioDestinationChromium.h:
      (AudioDestinationChromium):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139262 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2965a3f8
    • commit-queue@webkit.org's avatar
      IndexedDB: Remove ASSERTs that can't assert but result in compiler warnings · cf94c034
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=106442
      
      Patch by Jussi Kukkonen <jussi.kukkonen@intel.com> on 2013-01-09
      Reviewed by Kentaro Hara.
      
      IDBLevelDBCoding::m_metaDataType has been changed to unsigned
      so ASSERT(m_metaDataType >= 0) is no longer useful: the compiler
      warnings however create build difficulties at least with EFL.
      
      * Modules/indexeddb/IDBLevelDBCoding.cpp:
      (WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::metaDataType):
      (WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::compare):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139193 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cf94c034
  5. 08 Jan, 2013 2 commits
    • mark.lam@apple.com's avatar
      Removed the need for the ProposedDatabase mechanism. · 0a3d6de3
      mark.lam@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=106292.
      
      Reviewed by Sam Weinig.
      
      Source/WebCore: 
      
      No new tests.
      
      * Modules/webdatabase/AbstractDatabase.cpp:
      (WebCore::AbstractDatabase::details):
      (WebCore):
      * Modules/webdatabase/AbstractDatabase.h:
      (AbstractDatabase):
      * Modules/webdatabase/DatabaseContext.cpp:
      (WebCore::DatabaseContext::databaseExceededQuota):
      * Modules/webdatabase/DatabaseContext.h:
      (DatabaseContext):
      * Modules/webdatabase/DatabaseTracker.cpp:
      (WebCore::DatabaseTracker::canEstablishDatabase):
      (WebCore::DatabaseTracker::fullPathForDatabaseNoLock):
      (WebCore::DatabaseTracker::detailsForNameAndOrigin):
      * Modules/webdatabase/DatabaseTracker.h:
      (DatabaseTracker):
      * Modules/webdatabase/SQLTransactionClient.cpp:
      (WebCore::SQLTransactionClient::didExceedQuota):
      * loader/EmptyClients.h:
      (WebCore::EmptyChromeClient::exceededDatabaseQuota):
      * page/ChromeClient.h:
      (ChromeClient):
      
      Source/WebKit/blackberry: 
      
      * WebCoreSupport/ChromeClientBlackBerry.cpp:
      (WebCore::ChromeClientBlackBerry::exceededDatabaseQuota):
      * WebCoreSupport/ChromeClientBlackBerry.h:
      (ChromeClientBlackBerry):
      
      Source/WebKit/chromium: 
      
      * src/ChromeClientImpl.cpp:
      (WebKit::ChromeClientImpl::exceededDatabaseQuota):
      * src/ChromeClientImpl.h:
      (ChromeClientImpl):
      
      Source/WebKit/efl: 
      
      * WebCoreSupport/ChromeClientEfl.cpp:
      (WebCore::ChromeClientEfl::exceededDatabaseQuota):
      * WebCoreSupport/ChromeClientEfl.h:
      (ChromeClientEfl):
      
      Source/WebKit/gtk: 
      
      * WebCoreSupport/ChromeClientGtk.cpp:
      (WebKit::ChromeClient::exceededDatabaseQuota):
      * WebCoreSupport/ChromeClientGtk.h:
      (ChromeClient):
      
      Source/WebKit/mac: 
      
      * WebCoreSupport/WebChromeClient.h:
      * WebCoreSupport/WebChromeClient.mm:
      (WebChromeClient::exceededDatabaseQuota):
      
      Source/WebKit/qt: 
      
      * WebCoreSupport/ChromeClientQt.cpp:
      * WebCoreSupport/ChromeClientQt.h:
      (ChromeClientQt):
      
      Source/WebKit/win: 
      
      * WebCoreSupport/WebChromeClient.cpp:
      (WebChromeClient::exceededDatabaseQuota):
      * WebCoreSupport/WebChromeClient.h:
      (WebChromeClient):
      
      Source/WebKit/wince: 
      
      * WebCoreSupport/ChromeClientWinCE.cpp:
      (WebKit::ChromeClientWinCE::exceededDatabaseQuota):
      * WebCoreSupport/ChromeClientWinCE.h:
      (ChromeClientWinCE):
      
      Source/WebKit/wx: 
      
      * WebKitSupport/ChromeClientWx.cpp:
      (WebCore::ChromeClientWx::exceededDatabaseQuota):
      * WebKitSupport/ChromeClientWx.h:
      (ChromeClientWx):
      
      Source/WebKit2: 
      
      * WebProcess/WebCoreSupport/WebChromeClient.cpp:
      (WebKit::WebChromeClient::exceededDatabaseQuota):
      * WebProcess/WebCoreSupport/WebChromeClient.h:
      (WebChromeClient):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139078 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0a3d6de3
    • kihong.kwon@samsung.com's avatar
      Add DeviceProximityController to support Device Proximity Events. · 7d642a29
      kihong.kwon@samsung.com authored
      https://bugs.webkit.org/show_bug.cgi?id=97630
      
      Reviewed by Hajime Morita.
      
      Source/WebCore:
      
      Implement DeviceProximityController which is inherited from DeviceController to support Device Proximity Events.
      DeviceProximityController has two major functionalities.
      - When listener is added, DeviceProximityController stores DOMWindow pointer to m_listeners
        and start gathering proximity event.
      - When DeviceProximityController receives a proximity event from client, fire an event using m_listeners.
      In addition, setDeviceProximity function is added to Internals for layout test.
      
      Tests: proximity/add-listener-from-callback.html
             proximity/basic-operation.html
             proximity/create-event.html
             proximity/event-after-navigation.html
             proximity/multiple-frames.html
             proximity/no-page-cache.html
             proximity/optional-event-properties.html
             proximity/updates.html
             proximity/window-property.html
      
      * CMakeLists.txt:
      * GNUmakefile.am:
      * GNUmakefile.list.am:
      * Modules/proximity/DeviceProximityClient.h: Added.
      (WebCore):
      (DeviceProximityClient):
      (WebCore::DeviceProximityClient::~DeviceProximityClient):
      * Modules/proximity/DeviceProximityController.cpp: Added.
      (WebCore):
      (WebCore::DeviceProximityController::DeviceProximityController):
      (WebCore::DeviceProximityController::create):
      (WebCore::DeviceProximityController::didChangeDeviceProximity):
      (WebCore::DeviceProximityController::deviceProximityClient):
      (WebCore::DeviceProximityController::hasLastData):
      (WebCore::DeviceProximityController::getLastEvent):
      (WebCore::DeviceProximityController::supplementName):
      (WebCore::DeviceProximityController::from):
      (WebCore::DeviceProximityController::isActiveAt):
      (WebCore::provideDeviceProximityTo):
      * Modules/proximity/DeviceProximityController.h: Added.
      (WebCore):
      (DeviceProximityController):
      (WebCore::DeviceProximityController::~DeviceProximityController):
      * Target.pri:
      * WebCore.gyp/WebCore.gyp:
      * WebCore.gypi:
      * WebCore.pri:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.vcproj/WebCoreCommon.vsprops:
      * WebCore.xcodeproj/project.pbxproj:
      * history/PageCache.cpp:
      When a page has Device Proximity Event Listener, it has not to be cached like Device Orientation.
      (WebCore::logCanCachePageDecision):
      (WebCore::PageCache::canCache):
      * page/DOMWindow.cpp:
      (WebCore::DOMWindow::addEventListener):
      (WebCore::DOMWindow::removeEventListener):
      (WebCore::DOMWindow::removeAllEventListeners):
      * testing/Internals.cpp:
      (WebCore::Internals::setDeviceProximity):
      (WebCore):
      * testing/Internals.h:
      (Internals):
      * testing/Internals.idl:
      
      Source/WebKit2:
      
      Add initial WebDeviceProximityClient class which is inherited DeviceProximityClient.
      But startUpdating and stopUpdating need to be implemented.
      
      * CMakeLists.txt:
      * WebProcess/WebCoreSupport/WebDeviceProximityClient.cpp: Added.
      (WebKit):
      (WebKit::WebDeviceProximityClient::WebDeviceProximityClient):
      (WebKit::WebDeviceProximityClient::startUpdating):
      (WebKit::WebDeviceProximityClient::stopUpdating):
      (WebKit::WebDeviceProximityClient::hasLastData):
      * WebProcess/WebCoreSupport/WebDeviceProximityClient.h: Added.
      (WebKit):
      (WebDeviceProximityClient):
      (WebKit::WebDeviceProximityClient::~WebDeviceProximityClient):
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::WebPage):
      
      LayoutTests:
      
      Add layout test cases for the DeviceProximityController.
      
      * proximity/add-listener-from-callback-expected.txt: Added.
      * proximity/add-listener-from-callback.html: Added.
      * proximity/basic-operation-expected.txt: Added.
      * proximity/basic-operation.html: Added.
      * proximity/create-event-expected.txt: Added.
      * proximity/create-event.html: Added.
      * proximity/event-after-navigation-expected.txt: Added.
      * proximity/event-after-navigation.html: Added.
      * proximity/multiple-frames-expected.txt: Added.
      * proximity/multiple-frames.html: Added.
      * proximity/no-page-cache-expected.txt: Added.
      * proximity/no-page-cache.html: Added.
      * proximity/optional-event-properties-expected.txt: Added.
      * proximity/optional-event-properties.html: Added.
      * proximity/resources/cached-page-1.html: Added.
      * proximity/resources/cached-page-2.html: Added.
      * proximity/resources/event-after-navigation-new.html: Added.
      * proximity/updates-expected.txt: Added.
      * proximity/updates.html: Added.
      * proximity/window-property-expected.txt: Added.
      * proximity/window-property.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139050 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7d642a29
  6. 07 Jan, 2013 2 commits
    • joepeck@webkit.org's avatar
      String improvements in geolocation and notifications modules · 69d1ec5a
      joepeck@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=105352
      
      Reviewed by Sam Weinig.
      
      * Modules/geolocation/Geolocation.cpp:
      (WebCore::Geolocation::GeoNotifier::timerFired):
      (WebCore::Geolocation::startRequest):
      (WebCore::Geolocation::requestUsesCachedPosition):
      (WebCore::Geolocation::makeCachedPositionCallbacks):
      (WebCore::Geolocation::setIsAllowed):
      (WebCore::Geolocation::cancelRequests):
      (WebCore::Geolocation::handlePendingPermissionNotifiers):
      * Modules/geolocation/GeolocationController.cpp:
      (WebCore::GeolocationController::positionChanged):
      * Modules/notifications/WorkerContextNotifications.cpp:
      Use ASCIILiteral for constant strings becoming WTFStrings.
      
      (WebCore::WorkerContextNotifications::from):
      Use AtomicString::ConstructFromLiteral for the static local.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139005 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      69d1ec5a
    • alecflett@chromium.org's avatar
      IndexedDB: Stub out async IDBDatabaseBackendInterface::createObjectStore · 58368741
      alecflett@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=106148
      
      Reviewed by Adam Barth.
      
      Source/WebCore:
      
      These methods are becoming async in multiprocess ports, so stub out
      versions that have no return values.
      
      * Modules/indexeddb/IDBDatabaseBackendImpl.h:
      (WebCore::IDBDatabaseBackendImpl::createObjectStore):
      (WebCore::IDBDatabaseBackendImpl::deleteObjectStore):
      * Modules/indexeddb/IDBDatabaseBackendInterface.h:
      (IDBDatabaseBackendInterface):
      
      Source/WebKit/chromium:
      
      Stub out WebKit API for async createObjectStore.
      
      * public/WebIDBDatabase.h:
      (WebIDBDatabase):
      * src/IDBDatabaseBackendProxy.cpp:
      (WebKit::IDBDatabaseBackendProxy::createObjectStore):
      (WebKit):
      (WebKit::IDBDatabaseBackendProxy::deleteObjectStore):
      * src/IDBDatabaseBackendProxy.h:
      (IDBDatabaseBackendProxy):
      * src/WebIDBDatabaseImpl.cpp:
      (WebKit::WebIDBDatabaseImpl::createObjectStore):
      (WebKit):
      (WebKit::WebIDBDatabaseImpl::deleteObjectStore):
      * src/WebIDBDatabaseImpl.h:
      (WebIDBDatabaseImpl):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138963 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      58368741
  7. 05 Jan, 2013 4 commits
    • commit-queue@webkit.org's avatar
      IndexedDB: Replace int64 with int64_t · f639b6ae
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=106189
      
      Patch by Michael Pruett <michael@68k.org> on 2013-01-05
      Reviewed by Sam Weinig.
      
      Cleaning up coding inconsistencies, no change in behavior.
      
      Tests: storage/indexeddb/*
      
      * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
      (WebCore::GetOperation::create):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138914 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f639b6ae
    • alecflett@chromium.org's avatar
      IndexedDB: Migrate backend ObjectStore calls to use transaction id · 51757b6d
      alecflett@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=102741
      
      Reviewed by Tony Chang.
      
      Source/WebCore:
      
      Fully migrate 8 core data calls (get, put, setIndexKeys, setIndexesReady,
      openCursor, count, deleteRange, and clear) into IDBDatabaseBackendImpl,
      combining common code from IDBObjectStoreBackendImpl and IDBIndexBackendImpl
      in order to simplify the backend interface. These calls are now
      implemented in terms of an int64_t-based transactionId rather than
      an IDBTransactionBackendInterface, which simplifies the ownership model
      between the frontend and the backend.
      
      In addition, remove references to IDBObjectStoreBackend* from IDBIndex,
      as it is no longer needed.
      
      A few duplicate IDB_TRACE methods have been removed from wrapper methods
      that call another method that already have IDB_TRACE's.
      
      Finally, IDBCursorBackendImpl now no longer holds onto an
      IDBObjectStoreBackendImpl*, so its destruction and member variables are
      simplified, and reordered to match proper destruction order.
      
      * Modules/indexeddb/IDBCursorBackendImpl.cpp: Reordered to account for proper destruction.
      (WebCore::IDBCursorBackendImpl::IDBCursorBackendImpl):
      (WebCore::IDBCursorBackendImpl::~IDBCursorBackendImpl):
      (WebCore::IDBCursorBackendImpl::deleteFunction):
      * Modules/indexeddb/IDBCursorBackendImpl.h:
      (WebCore::IDBCursorBackendImpl::create):
      (IDBCursorBackendImpl):
      * Modules/indexeddb/IDBDatabase.h:
      (WebCore::IDBDatabase::backend):
      (IDBDatabase):
      * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
      (GetOperation): Combined from IDBObjectStoreBackendImpl/IDBIndexBackendImpl::*RetrievalOperation
      (WebCore::GetOperation::create):
      (WebCore::GetOperation::GetOperation):
      (WebCore):
      (PutOperation): Combined from IDBObjectStoreBackendImpl/IDBIndexBackendImpl::*StorageOperation.
      (WebCore::PutOperation::create):
      (WebCore::PutOperation::PutOperation):
      (SetIndexesReadyOperation): Moved from IDBObjectStoreBackendImpl::IndexesReadyOperation
      (WebCore::SetIndexesReadyOperation::create):
      (WebCore::SetIndexesReadyOperation::SetIndexesReadyOperation):
      (OpenCursorOperation): Combined from IDBObjectStoreBackendImpl/IDBIndexBackendImpl::Open*CursorOperation
      (WebCore::OpenCursorOperation::create):
      (WebCore::OpenCursorOperation::OpenCursorOperation):
      (CountOperation): Combined from IDBObjectStoreBackendImpl/IDBIndexBackendImpl::CountOperation
      (WebCore::CountOperation::create):
      (WebCore::CountOperation::CountOperation):
      (DeleteRangeOperation): Moved from IDBObjectStoreBackendImpl::DeleteOperation
      (WebCore::DeleteRangeOperation::create):
      (WebCore::DeleteRangeOperation::DeleteRangeOperation):
      (ClearOperation): Moved from IDBObjectStoreBackendImpl::ClearOperation
      (WebCore::ClearOperation::create):
      (WebCore::ClearOperation::ClearOperation):
      (WebCore::IDBDatabaseBackendImpl::get): Combined from IDBObjectStoreBackendImpl/IDBIndexBackendImpl::get*
      (WebCore::GetOperation::perform):
      (WebCore::IDBDatabaseBackendImpl::put): Moved from IDBObjectStoreBackendImpl::put
      (WebCore::PutOperation::perform):
      (WebCore::IDBDatabaseBackendImpl::setIndexKeys): Moved from IDBObjectStoreBackendImpl::setIndexKeys
      (WebCore::IDBDatabaseBackendImpl::setIndexesReady):
      (WebCore::SetIndexesReadyOperation::perform):
      (WebCore::IDBDatabaseBackendImpl::openCursor):
      (WebCore::IDBDatabaseBackendImpl::count):
      (WebCore::CountOperation::perform):
      (WebCore::IDBDatabaseBackendImpl::deleteRange):
      (WebCore::DeleteRangeOperation::perform):
      (WebCore::IDBDatabaseBackendImpl::clear):
      (WebCore::ClearOperation::perform):
      (WebCore::OpenCursorOperation::perform):
      * Modules/indexeddb/IDBIndex.cpp:
      (WebCore::IDBIndex::IDBIndex):
      (WebCore::IDBIndex::openCursor):
      (WebCore::IDBIndex::count):
      (WebCore::IDBIndex::openKeyCursor):
      (WebCore::IDBIndex::get):
      (WebCore::IDBIndex::getKey):
      (WebCore::IDBIndex::backendDB):
      (WebCore):
      * Modules/indexeddb/IDBIndex.h:
      (WebCore::IDBIndex::create):
      (IDBIndex):
      * Modules/indexeddb/IDBIndexBackendImpl.cpp:
      (WebCore::IDBIndexBackendImpl::IDBIndexBackendImpl):
      * Modules/indexeddb/IDBIndexBackendImpl.h:
      (WebCore::IDBIndexBackendImpl::create):
      (WebCore::IDBIndexBackendImpl::openCursor):
      (WebCore::IDBIndexBackendImpl::count):
      (WebCore::IDBIndexBackendImpl::openKeyCursor):
      (WebCore::IDBIndexBackendImpl::get):
      (WebCore::IDBIndexBackendImpl::getKey):
      (IDBIndexBackendImpl):
      * Modules/indexeddb/IDBObjectStore.cpp:
      (WebCore::IDBObjectStore::get):
      (WebCore::IDBObjectStore::put):
      (WebCore::IDBObjectStore::deleteFunction):
      (WebCore::IDBObjectStore::clear):
      (WebCore):
      (WebCore::IDBObjectStore::createIndex):
      (WebCore::IDBObjectStore::index):
      (WebCore::IDBObjectStore::openCursor):
      (WebCore::IDBObjectStore::count):
      (WebCore::IDBObjectStore::backendDB):
      * Modules/indexeddb/IDBObjectStore.h:
      (WebCore::IDBObjectStore::id):
      (IDBObjectStore):
      * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
      (WebCore::IDBObjectStoreBackendImpl::createIndex):
      (WebCore::IDBObjectStoreBackendImpl::loadIndexes):
      (WebCore::IDBObjectStoreBackendImpl::generateKey):
      (WebCore::IDBObjectStoreBackendImpl::updateKeyGenerator):
      * Modules/indexeddb/IDBObjectStoreBackendImpl.h:
      (WebCore::IDBObjectStoreBackendImpl::get):
      (WebCore::IDBObjectStoreBackendImpl::put):
      (WebCore::IDBObjectStoreBackendImpl::deleteFunction):
      (WebCore::IDBObjectStoreBackendImpl::clear):
      (WebCore::IDBObjectStoreBackendImpl::setIndexKeys):
      (WebCore::IDBObjectStoreBackendImpl::setIndexesReady):
      (WebCore::IDBObjectStoreBackendImpl::openCursor):
      (WebCore::IDBObjectStoreBackendImpl::count):
      (IDBObjectStoreBackendImpl):
      * Modules/indexeddb/IDBTransactionBackendImpl.h:
      (WebCore::IDBTransactionBackendImpl::database):
      (IDBTransactionBackendImpl):
      
      Source/WebKit/chromium:
      
      Fix a bug where an array was initialized with a large empty buffer,
      clean up whitespace, and update to match signatures that changed
      in WebCore.
      
      * public/WebIDBDatabase.h:
      (WebKit::WebIDBDatabase::clear):
      * src/WebIDBDatabaseImpl.cpp:
      (WebKit::WebIDBDatabaseImpl::put):
      * src/WebIDBIndexImpl.cpp:
      * tests/IDBDatabaseBackendTest.cpp:
      
      LayoutTests:
      
      Add additional count() tests for multi-entry indexes, not previously
      covered.
      
      * storage/indexeddb/index-multientry-expected.txt:
      * storage/indexeddb/resources/index-multientry.js:
      (.transaction.oncomplete):
      (verifyCount.request.onsuccess.request.onsuccess):
      (verifyCount.request.onsuccess):
      (verifyCount):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138900 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      51757b6d
    • alecflett@chromium.org's avatar
      IndexedDB: Stub out IDBDatabaseBackendInterface::createIndex/deleteIndex · 62b67d60
      alecflett@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=106117
      
      Reviewed by Adam Barth.
      
      Source/WebCore:
      
      No new tests, these are just stubs for refactoring.
      
      * Modules/indexeddb/IDBDatabaseBackendImpl.h:
      (WebCore::IDBDatabaseBackendImpl::createIndex):
      (WebCore::IDBDatabaseBackendImpl::deleteIndex):
      (IDBDatabaseBackendImpl):
      * Modules/indexeddb/IDBDatabaseBackendInterface.h:
      (IDBDatabaseBackendInterface):
      
      Source/WebKit/chromium:
      
      Stubs for migration from WebIDBObjectStore.
      
      * public/WebIDBDatabase.h:
      (WebKit::WebIDBDatabase::createIndex):
      (WebKit::WebIDBDatabase::deleteIndex):
      (WebIDBDatabase):
      * src/IDBDatabaseBackendProxy.cpp:
      (WebKit::IDBDatabaseBackendProxy::createIndex):
      (WebKit):
      (WebKit::IDBDatabaseBackendProxy::deleteIndex):
      * src/IDBDatabaseBackendProxy.h:
      (IDBDatabaseBackendProxy):
      * src/WebIDBDatabaseImpl.cpp:
      (WebKit::WebIDBDatabaseImpl::createIndex):
      (WebKit):
      (WebKit::WebIDBDatabaseImpl::deleteIndex):
      * src/WebIDBDatabaseImpl.h:
      (WebIDBDatabaseImpl):
      * tests/IDBDatabaseBackendTest.cpp:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138898 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      62b67d60
    • crogers@google.com's avatar
      Implement MediaStreamSource::setAudioFormat() · ac0888f3
      crogers@google.com authored
      https://bugs.webkit.org/show_bug.cgi?id=106053
      
      Reviewed by Kenneth Russell.
      
      Source/Platform:
      
      * chromium/public/WebAudioDestinationConsumer.h:
      (WebAudioDestinationConsumer):
      
      Source/WebCore:
      
      MediaStreamAudioDestinationNode needs to be able to tell its associated
      MediaStreamSource about the audio format (number of channels and sample-rate).
      
      * Modules/webaudio/MediaStreamAudioDestinationNode.cpp:
      (WebCore::MediaStreamAudioDestinationNode::MediaStreamAudioDestinationNode):
      * platform/audio/AudioDestinationConsumer.h:
      (AudioDestinationConsumer):
      * platform/chromium/support/WebMediaStreamSource.cpp:
      (ConsumerWrapper):
      (WebKit::ConsumerWrapper::setFormat):
      (WebKit):
      * platform/mediastream/MediaStreamSource.cpp:
      (WebCore::MediaStreamSource::setAudioFormat):
      (WebCore):
      * platform/mediastream/MediaStreamSource.h:
      (MediaStreamSource):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138895 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ac0888f3
  8. 04 Jan, 2013 2 commits
    • crogers@google.com's avatar
      Implement WebIDL-style string constants in WebAudio (part 2) · 04304451
      crogers@google.com authored
      https://bugs.webkit.org/show_bug.cgi?id=105977
      
      Reviewed by Kentaro Hara.
      
      Source/WebCore:
      
      See Deprecation Notes for more detail:
      https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#DeprecationNotes
      
      PannerNode, BiquadFilterNode, OscillatorNode constants must support WebIDL-style string constants.
      Legacy support in the setters for the old integer values should be supported.
      This patch handles the changes for BiquadFilterNode and PannerNode.
      
      Test: webaudio/pannernode-basic.html
      
      * GNUmakefile.list.am:
      * Modules/webaudio/BiquadFilterNode.cpp:
      (WebCore::BiquadFilterNode::type):
      (WebCore):
      (WebCore::BiquadFilterNode::setType):
      * Modules/webaudio/BiquadFilterNode.h:
      (BiquadFilterNode):
      * Modules/webaudio/BiquadFilterNode.idl:
      * Modules/webaudio/PannerNode.cpp:
      (WebCore::PannerNode::panningModel):
      (WebCore):
      (WebCore::PannerNode::setPanningModel):
      (WebCore::PannerNode::distanceModel):
      (WebCore::PannerNode::setDistanceModel):
      * Modules/webaudio/PannerNode.h:
      (PannerNode):
      * Modules/webaudio/PannerNode.idl:
      * Target.pri:
      * UseJSC.cmake:
      * UseV8.cmake:
      * WebCore.gypi:
      * WebCore.xcodeproj/project.pbxproj:
      * bindings/js/JSBiquadFilterNodeCustom.cpp: Copied from Source/WebCore/Modules/webaudio/BiquadFilterNode.cpp.
      (WebCore):
      (WebCore::JSBiquadFilterNode::setType):
      * bindings/js/JSPannerNodeCustom.cpp: Copied from Source/WebCore/Modules/webaudio/BiquadFilterNode.cpp.
      (WebCore):
      (WebCore::JSPannerNode::setPanningModel):
      (WebCore::JSPannerNode::setDistanceModel):
      * bindings/v8/custom/V8BiquadFilterNodeCustom.cpp: Copied from Source/WebCore/Modules/webaudio/BiquadFilterNode.cpp.
      (WebCore):
      (WebCore::V8BiquadFilterNode::typeAccessorSetter):
      * bindings/v8/custom/V8PannerNodeCustom.cpp: Added.
      (WebCore):
      (WebCore::V8PannerNode::panningModelAccessorSetter):
      (WebCore::V8PannerNode::distanceModelAccessorSetter):
      
      LayoutTests:
      
      * webaudio/audiopannernode-basic-expected.txt: Removed.
      * webaudio/audiopannernode-basic.html: Removed.
      * webaudio/biquad-getFrequencyResponse-expected.txt:
      * webaudio/biquad-getFrequencyResponse.html:
      * webaudio/biquadfilternode-basic-expected.txt:
      * webaudio/biquadfilternode-basic.html:
      * webaudio/pannernode-basic-expected.txt: Added.
      * webaudio/pannernode-basic.html: Added.
      * webaudio/resources/biquad-testing.js:
      * webaudio/resources/distance-model-testing.js:
      (createGraph):
      (.return.renderedBuffer):
      (checkDistanceResult):
      * webaudio/resources/panner-model-testing.js:
      (createGraph):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138849 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      04304451
    • mkwst@chromium.org's avatar
      CSP: XHR from an isolated world should bypass a page's policy. · fa8678b4
      mkwst@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=104480
      
      Reviewed by Adam Barth.
      
      Source/WebCore:
      
      Connections of various types are governed by the page's Content Security
      Policy 'connect-src' directive. In the special case of connections
      generated from an isolated world, we'd like to bypass these restrictions
      in order to allow things like extensions to enjoy their uniquely high-
      privilege lifestyle. This patch does just that.
      
      We'll lock them down to their own policy in webkit.org/b/104520, but
      that's a bit far away at the moment. Soon!
      
      Test: http/tests/security/isolatedWorld/bypass-main-world-csp-for-xhr.html
      
      * Modules/websockets/WebSocket.cpp:
      (WebCore::WebSocket::connect):
      * loader/cache/CachedResourceLoader.cpp:
      (WebCore::CachedResourceLoader::canRequest):
      * page/EventSource.cpp:
      (WebCore::EventSource::create):
      * xml/XMLHttpRequest.cpp:
      (WebCore::XMLHttpRequest::open):
          Check whether or not code is running in an isolated world that has
          its own Content Security Policy. If so, bypass the main world's CSP
          checks. Isolated worlds gotta be free, man.
      
      LayoutTests:
      
      * http/tests/security/isolatedWorld/bypass-main-world-csp-for-xhr-expected.txt: Added.
      * http/tests/security/isolatedWorld/bypass-main-world-csp-for-xhr.html: Added.
          A new test! How wonderful!
      * platform/efl/TestExpectations:
      * platform/mac/TestExpectations:
      * platform/qt/TestExpectations:
      * platform/win/TestExpectations:
      * platform/wincairo/TestExpectations:
          Skipping the new test on ports that don't support it.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138817 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fa8678b4
  9. 03 Jan, 2013 2 commits
    • tommyw@google.com's avatar
      MediaStream API: Add a missing state to RTCPeerConnection · e331c432
      tommyw@google.com authored
      https://bugs.webkit.org/show_bug.cgi?id=106017
      
      Reviewed by Adam Barth.
      
      Adding the missing ReadyStateHaveRemoteOffer which will show up in the spec soon.
      
      Source/Platform:
      
      * chromium/public/WebRTCPeerConnectionHandlerClient.h:
      
      Source/WebCore:
      
      Not testable, just another state.
      
      * Modules/mediastream/RTCPeerConnection.cpp:
      (WebCore::RTCPeerConnection::readyState):
      * platform/mediastream/RTCPeerConnectionHandlerClient.h:
      
      Source/WebKit/chromium:
      
      * src/AssertMatchingEnums.cpp:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138738 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e331c432
    • jsbell@chromium.org's avatar
      IndexedDB: Simplify IDBTransactionBackendImpl::scheduleTask usage · 7a4eb741
      jsbell@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=103536
      
      Reviewed by Tony Chang.
      
      Source/WebCore:
      
      Move responsibility for firing abort errors from requests that arrive on the
      back-end after an asynchronous transaction abort out of WebCore, since the
      front-end takes care of this as far as script is concerned.
      
      No new tests -  no behavior changes.
      
      * Modules/indexeddb/IDBCursorBackendImpl.cpp:
      (WebCore::IDBCursorBackendImpl::continueFunction):
      (WebCore::IDBCursorBackendImpl::advance):
      (WebCore::IDBCursorBackendImpl::prefetchContinue):
      * Modules/indexeddb/IDBIndexBackendImpl.cpp:
      (WebCore::IDBIndexBackendImpl::openCursor):
      (WebCore::IDBIndexBackendImpl::openKeyCursor):
      (WebCore::IDBIndexBackendImpl::count):
      (WebCore::IDBIndexBackendImpl::get):
      (WebCore::IDBIndexBackendImpl::getKey):
      * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
      (WebCore::IDBObjectStoreBackendImpl::get):
      (WebCore::IDBObjectStoreBackendImpl::put):
      (WebCore::IDBObjectStoreBackendImpl::deleteFunction):
      (WebCore::IDBObjectStoreBackendImpl::clear):
      (WebCore::IDBObjectStoreBackendImpl::openCursor):
      (WebCore::IDBObjectStoreBackendImpl::count):
      
      Source/WebKit/chromium:
      
      Track whether IDBCallbacks has fired before being destructed. If not it probably
      came in after a transaction had asynchronously aborted; fire an abort error which
      will be ignored on the front-end but will clean up lingering IPC tracking.
      
      * public/WebIDBDatabaseException.h:
      * src/AssertMatchingEnums.cpp:
      * src/IDBCallbacksProxy.cpp:
      (WebKit::IDBCallbacksProxy::IDBCallbacksProxy):
      (WebKit::IDBCallbacksProxy::~IDBCallbacksProxy):
      (WebKit::IDBCallbacksProxy::onError):
      (WebKit::IDBCallbacksProxy::onSuccess):
      * src/IDBCallbacksProxy.h:
      (IDBCallbacksProxy):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138716 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7a4eb741
  10. 02 Jan, 2013 4 commits
    • esprehn@chromium.org's avatar
      Clean up dispatchEvent overrides and overloads · f53e9e37
      esprehn@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=105959
      
      Reviewed by Adam Barth.
      
      Add OVERRIDE to all dispatchEvent overrides and use "using" instead of
      reimplementing EventTarget::dispatchEvent in subclasses where having the
      virtual override of dispatchEvent hides the overloads in
      the superclass.
      
      No new tests, just refactoring.
      
      * Modules/indexeddb/IDBDatabase.h:
      (IDBDatabase):
      * Modules/indexeddb/IDBOpenDBRequest.h:
      (IDBOpenDBRequest):
      * Modules/indexeddb/IDBRequest.h:
      (IDBRequest):
      * Modules/indexeddb/IDBTransaction.h:
      (IDBTransaction):
      * dom/EventDispatchMediator.h:
      (FocusEventDispatchMediator):
      (BlurEventDispatchMediator):
      * dom/GestureEvent.h:
      (GestureEventDispatchMediator):
      * dom/KeyboardEvent.h:
      (KeyboardEventDispatchMediator):
      * dom/MouseEvent.h:
      * dom/Node.h:
      (Node):
      * dom/UIEvent.h:
      (FocusInEventDispatchMediator):
      (FocusOutEventDispatchMediator):
      * dom/WheelEvent.h:
      (WheelEventDispatchMediator):
      * html/HTMLMediaElement.h:
      * html/track/TextTrackCue.cpp:
      * html/track/TextTrackCue.h:
      (TextTrackCue):
      * page/DOMWindow.h:
      (DOMWindow):
      * svg/SVGElementInstance.h:
      (SVGElementInstance):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138674 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f53e9e37
    • dgrogan@chromium.org's avatar
      IndexedDB: Surface a few more leveldb errors. · ba1679ff
      dgrogan@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=105670
      
      Reviewed by Tony Chang.
      
      Two calls to old LevelDBTransaction::get slipped through the cracks.
      
      * Modules/indexeddb/IDBBackingStore.cpp:
      (WebCore::IndexKeyCursorImpl::loadCurrentRow):
      (WebCore::IndexCursorImpl::loadCurrentRow):
        Make these two functions use safeGet instead of get.
      
      * platform/leveldb/LevelDBTransaction.cpp:
      * platform/leveldb/LevelDBTransaction.h:
        Remove get now that it is unused.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138670 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ba1679ff
    • alecflett@chromium.org's avatar
      IndexedDB: Use non-const buffers in put() to avoid copies · 6a9d2eea
      alecflett@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=105572
      
      Reviewed by Adam Barth.
      
      Source/WebCore:
      
      Change the new put() method to allow the implementation to consume
      or adopt the vector, to avoid copying.
      
      No new tests as this is an interface change that will be implemented later.
      
      * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
      (WebCore::IDBDatabaseBackendImpl::put):
      * Modules/indexeddb/IDBDatabaseBackendImpl.h:
      (IDBDatabaseBackendImpl):
      * Modules/indexeddb/IDBDatabaseBackendInterface.h:
      
      Source/WebKit/chromium:
      
      Pass on non-const Vectors to allow buffer adoption rather than copies.
      
      * public/WebIDBDatabase.h:
      (WebIDBDatabase):
      (WebKit::WebIDBDatabase::put):
      * src/IDBDatabaseBackendProxy.cpp:
      (WebKit::IDBDatabaseBackendProxy::put):
      * src/IDBDatabaseBackendProxy.h:
      (IDBDatabaseBackendProxy):
      * src/WebIDBDatabaseImpl.cpp:
      (WebKit::WebIDBDatabaseImpl::put):
      * src/WebIDBDatabaseImpl.h:
      (WebIDBDatabaseImpl):
      * tests/IDBDatabaseBackendTest.cpp:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138666 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6a9d2eea
    • crogers@google.com's avatar
      Implement WebIDL-style string constants in WebAudio · 77d406ad
      crogers@google.com authored
      https://bugs.webkit.org/show_bug.cgi?id=105058
      
      Reviewed by Kentaro Hara.
      
      Source/WebCore:
      
      See Deprecation Notes for more detail:
      https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#DeprecationNotes
      
      PannerNode, BiquadFilterNode, OscillatorNode constants must support WebIDL-style string constants.
      Legacy support in the setters for the old integer values should be supported.
      
      This patch handles the changes for OscillatorNode.
      
      * GNUmakefile.list.am:
      * Modules/webaudio/OscillatorNode.cpp:
      (WebCore::OscillatorNode::OscillatorNode):
      (WebCore::OscillatorNode::type):
      (WebCore):
      (WebCore::OscillatorNode::setType):
      * Modules/webaudio/OscillatorNode.h:
      * Modules/webaudio/OscillatorNode.idl:
      * Target.pri:
      * UseJSC.cmake:
      * UseV8.cmake:
      * WebCore.gypi:
      * WebCore.xcodeproj/project.pbxproj:
      * bindings/js/JSOscillatorNodeCustom.cpp: Copied from Source/WebCore/Modules/webaudio/OscillatorNode.idl.
      (WebCore):
      (WebCore::JSOscillatorNode::setType):
      * bindings/v8/custom/V8OscillatorNodeCustom.cpp: Copied from Source/WebCore/Modules/webaudio/OscillatorNode.idl.
      (WebCore):
      (WebCore::V8OscillatorNode::typeAccessorSetter):
      
      LayoutTests:
      
      * webaudio/oscillator-basic-expected.txt:
      * webaudio/oscillator-basic.html:
      * webaudio/resources/audio-testing.js:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138631 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      77d406ad
  11. 21 Dec, 2012 2 commits
    • jsbell@chromium.org's avatar
      IndexedDB: Combine openConnection and openConnectionWithVersion · 21137244
      jsbell@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=105658
      
      Reviewed by Tony Chang.
      
      Source/WebCore:
      
      Combine the logic from these two methods. Mostly a refactor, but in the "pending calls"
      case the behavior is slightly altered since the version and no-version queues were
      previously separate, so the order changes. The new order matches the spec and FF/IE
      behavior, and a test is added to verify this.
      
      Chromium's webkit_unit_tests rely on a quirk to bypass the upgrade mechanism; the usage
      is slightly altered and made more explicit, and requires a small amount of test-only code.
      
      Test: storage/indexeddb/open-ordering.html
      
      * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
      (WebCore::IDBDatabaseBackendImpl::PendingOpenCall::create):
      (WebCore::IDBDatabaseBackendImpl::PendingOpenCall::PendingOpenCall):
      (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::perform):
      (WebCore::IDBDatabaseBackendImpl::transactionFinishedAndAbortFired):
      (WebCore::IDBDatabaseBackendImpl::processPendingCalls):
      (WebCore::IDBDatabaseBackendImpl::openConnection):
      (WebCore::IDBDatabaseBackendImpl::runIntVersionChangeTransaction):
      (WebCore::IDBDatabaseBackendImpl::close):
      * Modules/indexeddb/IDBDatabaseBackendImpl.h:
      (IDBDatabaseBackendImpl):
      * Modules/indexeddb/IDBFactoryBackendImpl.cpp:
      (WebCore::IDBFactoryBackendImpl::open):
      
      Source/WebKit/chromium:
      
      * tests/IDBDatabaseBackendTest.cpp:
      
      LayoutTests:
      
      * storage/indexeddb/open-ordering-expected.txt: Added.
      * storage/indexeddb/open-ordering.html: Added.
      * storage/indexeddb/resources/open-ordering.js: Added.
      (runTest):
      (onDeleteSuccess):
      (onRequest1Success):
      (onRequest2Success):
      (onRequest3Success):
      (checkOrder):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138400 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      21137244
    • adam.bergkvist@ericsson.com's avatar
      MediaStream API: Update the MediaStream constructor · 582cbf30
      adam.bergkvist@ericsson.com authored
      https://bugs.webkit.org/show_bug.cgi?id=98416
      
      Reviewed by Adam Barth.
      
      Updated the MediaStream constructor to support the more general argument
      list from the latest Media Capture and Streams specification:
      http://dev.w3.org/2011/webrtc/editor/getusermedia.html
      
      Source/WebCore:
      
      Added more test cases to existing tests.
      
      * Modules/mediastream/MediaStream.cpp:
      (WebCore::containsSource):
      (WebCore):
      (WebCore::processTrack):
      (WebCore::createFromSourceVectors):
      (WebCore::MediaStream::create):
      * Modules/mediastream/MediaStream.h:
      * Modules/mediastream/MediaStream.idl:
      
      LayoutTests:
      
      * fast/js/constructor-length.html:
      * fast/mediastream/MediaStreamConstructor-expected.txt:
      * fast/mediastream/MediaStreamConstructor.html:
      * 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@138354 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      582cbf30
  12. 20 Dec, 2012 2 commits
    • alecflett@chromium.org's avatar
      IndexedDB: Cursor and IndexWriter cleanup for refactor · 5d4721c5
      alecflett@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=105449
      
      Reviewed by Tony Chang.
      
      This is a cleanup of some code to make the refactor that is coming
      in https://bugs.webkit.org/show_bug.cgi?id=102741 cleaner. Some
      CursorType assertions have been removed because the code will be
      used in more generic circumstances in a future patch.
      
      The previously-private IndexWriter has been pulled into
      IDBObjectStoreBackendImpl and made to just use IDB*Metadata
      so it can be reused later.
      
      No new tests as this does not change the logic of executing code.
      
      * Modules/indexeddb/IDBCursorBackendImpl.cpp:
      (WebCore::IDBCursorBackendImpl::IDBCursorBackendImpl):
      (WebCore::IDBCursorBackendImpl::CursorPrefetchIterationOperation::perform):
      * Modules/indexeddb/IDBCursorBackendImpl.h:
      (WebCore::IDBCursorBackendImpl::create):
      (WebCore::IDBCursorBackendImpl::value):
      (IDBCursorBackendImpl):
      * Modules/indexeddb/IDBIndexBackendImpl.cpp:
      (WebCore::IDBIndexBackendImpl::OpenIndexCursorOperation::create):
      (WebCore::IDBIndexBackendImpl::OpenIndexCursorOperation::OpenIndexCursorOperation):
      (IDBIndexBackendImpl::OpenIndexCursorOperation):
      (WebCore::IDBIndexBackendImpl::OpenIndexCursorOperation::perform):
      * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
      (WebCore::IDBObjectStoreBackendImpl::IndexWriter::verifyIndexKeys):
      (WebCore::IDBObjectStoreBackendImpl::IndexWriter::writeIndexKeys):
      (WebCore::IDBObjectStoreBackendImpl::IndexWriter::addingKeyAllowed):
      (WebCore::IDBObjectStoreBackendImpl::makeIndexWriters):
      * Modules/indexeddb/IDBObjectStoreBackendImpl.h:
      (IndexWriter):
      (WebCore::IDBObjectStoreBackendImpl::IndexWriter::IndexWriter):
      (IDBObjectStoreBackendImpl):
      * Modules/indexeddb/IDBRequest.cpp:
      (WebCore::IDBRequest::IDBRequest):
      (WebCore::IDBRequest::setCursorDetails):
      (WebCore::IDBRequest::setResultCursor):
      (WebCore::IDBRequest::onSuccess):
      * Modules/indexeddb/IDBRequest.h:
      (IDBRequest):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138290 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5d4721c5
    • jsbell@chromium.org's avatar
      IndexedDB: Layout test showing delete database getting two blocked events · b84573f3
      jsbell@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=92674
      
      Reviewed by Tony Chang.
      
      Source/WebCore:
      
      Match the steps specified behavior for deleteDatabase() in the spec: versionchange/blocked
      events fire if necessary, then waits until a condition is satisfied before continuing with
      the steps to delete the database. The bug was caused by retrying the full call again. Events
      are also now sent out immediately when a "versionchange" transaction is running, rather
      than entering a limbo state - again, the new behavior matches the spec more accurately.
      
      Tests: storage/indexeddb/delete-in-upgradeneeded-close-in-open-success.html
             storage/indexeddb/delete-in-upgradeneeded-close-in-versionchange.html
             storage/indexeddb/deletedatabase-delayed-by-open-and-versionchange.html
             storage/indexeddb/intversion-gated-on-delete.html
      
      * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
      (WebCore::IDBDatabaseBackendImpl::processPendingCalls):
      (WebCore::IDBDatabaseBackendImpl::deleteDatabase): First half of the steps.
      (WebCore):
      (WebCore::IDBDatabaseBackendImpl::isDeleteDatabaseBlocked): Pull out condition test.
      (WebCore::IDBDatabaseBackendImpl::deleteDatabaseFinal): Second half of the of steps.
      * Modules/indexeddb/IDBDatabaseBackendImpl.h:
      (IDBDatabaseBackendImpl):
      
      LayoutTests:
      
      Update/add tests to match the expected behavior where blocked/versionchange events fire
      even when a "versionchange" transaction is running.
      
      * storage/indexeddb/delete-in-upgradeneeded-close-in-open-success-expected.txt: Copied from LayoutTests/storage/indexeddb/intversion-delete-in-upgradeneeded-expected.txt.
      * storage/indexeddb/delete-in-upgradeneeded-close-in-open-success.html: Copied from LayoutTests/storage/indexeddb/intversion-delete-in-upgradeneeded.html.
      * storage/indexeddb/delete-in-upgradeneeded-close-in-versionchange-expected.txt: Renamed from LayoutTests/storage/indexeddb/intversion-delete-in-upgradeneeded-expected.txt.
      * storage/indexeddb/delete-in-upgradeneeded-close-in-versionchange.html: Renamed from LayoutTests/storage/indexeddb/intversion-delete-in-upgradeneeded.html.
      * storage/indexeddb/deletedatabase-delayed-by-open-and-versionchange-expected.txt:
      * storage/indexeddb/deletedatabase-delayed-by-versionchange-expected.txt:
      * storage/indexeddb/intversion-gated-on-delete-expected.txt:
      * storage/indexeddb/resources/delete-in-upgradeneeded-close-in-open-success.js: Copied from LayoutTests/storage/indexeddb/resources/intversion-delete-in-upgradeneeded.js.
      * storage/indexeddb/resources/delete-in-upgradeneeded-close-in-versionchange.js: Renamed from LayoutTests/storage/indexeddb/resources/intversion-delete-in-upgradeneeded.js.
      * storage/indexeddb/resources/deletedatabase-delayed-by-open-and-versionchange.js:
      * storage/indexeddb/resources/factory-deletedatabase.js:
      * storage/indexeddb/resources/intversion-gated-on-delete.js:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138268 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b84573f3
  13. 19 Dec, 2012 1 commit
    • commit-queue@webkit.org's avatar
      [JSC] Add support for overloaded constructors · 35dd3ef4
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=103226
      
      Patch by Tommy Widenflycht <tommyw@chromium.org> on 2012-12-19
      Reviewed by Kentaro Hara.
      
      Source/WebCore:
      
      This patch adds the same support for overloaded constructors to JSC as V8.
      As proof of implementation soundness WebSockets custom constructor is removed.
      
      Existing tests cover patch. As they should.
      
      * GNUmakefile.list.am:
      * Modules/websockets/WebSocket.idl:
      * Target.pri:
      * UseJSC.cmake:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.xcodeproj/project.pbxproj:
      * bindings/js/JSBindingsAllInOne.cpp:
      * bindings/js/JSWebSocketCustom.cpp: Removed.
      * bindings/scripts/CodeGeneratorJS.pm:
      (GenerateConstructorDeclaration):
      (GenerateConstructorDefinitions):
      (GenerateOverloadedConstructorDefinition):
      (GenerateConstructorDefinition):
      (GenerateConstructorHelperMethods):
      * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
      (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors1):
      (WebCore):
      (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors2):
      (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors3):
      (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors4):
      (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors):
      * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
      (JSTestOverloadedConstructorsConstructor):
      
      LayoutTests:
      
      * http/tests/websocket/tests/hybi/url-parsing-expected.txt:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138138 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      35dd3ef4
  14. 18 Dec, 2012 4 commits
    • mark.lam@apple.com's avatar
      Fixed bad merge in "Initial refactoring of database functionality into the manager and server". · 2383bc90
      mark.lam@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=104748.
      
      Not reviewed.
      
      No new tests.
      
      * Modules/webdatabase/DBBackendServer.cpp:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138088 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2383bc90
    • mark.lam@apple.com's avatar
      Initial refactoring of database functionality into the manager and server. · c2b0a80f
      mark.lam@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=104748.
      
      Reviewed by Brady Eidson.
      
      This is not a complete refactor, but a stepping stone on the way to isolating
      script side database activity from the SQL backend.
      
      No new tests.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * Modules/webdatabase/AbstractDatabase.cpp:
      (WebCore):
      (WebCore::updateGuidVersionMap):
      (WebCore::guidForOriginAndName):
      (WebCore::AbstractDatabase::AbstractDatabase):
      (WebCore::AbstractDatabase::maximumSize):
      * Modules/webdatabase/AbstractDatabase.h:
      (AbstractDatabase):
      - Moved isAvailable() and setIsAvailable() to the DatabaseManager.
      * Modules/webdatabase/AbstractDatabaseServer.h:
      (AbstractDatabaseServer):
      * Modules/webdatabase/DBBackendServer.cpp: Added.
      (WebCore::DBBackend::Server::initialize):
      (WebCore::DBBackend::Server::setClient):
      (WebCore::DBBackend::Server::databaseDirectoryPath):
      (WebCore::DBBackend::Server::setDatabaseDirectoryPath):
      (WebCore::DBBackend::Server::fullPathForDatabase):
      (WebCore::DBBackend::Server::hasEntryForOrigin):
      (WebCore::DBBackend::Server::origins):
      (WebCore::DBBackend::Server::databaseNamesForOrigin):
      (WebCore::DBBackend::Server::detailsForNameAndOrigin):
      (WebCore::DBBackend::Server::usageForOrigin):
      (WebCore::DBBackend::Server::quotaForOrigin):
      (WebCore::DBBackend::Server::setQuota):
      (WebCore::DBBackend::Server::deleteAllDatabases):
      (WebCore::DBBackend::Server::deleteOrigin):
      (WebCore::DBBackend::Server::deleteDatabase):
      (WebCore::DBBackend::Server::scheduleNotifyDatabaseChanged):
      (WebCore::DBBackend::Server::databaseChanged):
      (WebCore::DBBackend::Server::closeDatabasesImmediately):
      (WebCore::DBBackend::Server::interruptAllDatabasesForContext):
      (WebCore::DBBackend::Server::canEstablishDatabase):
      (WebCore::DBBackend::Server::addOpenDatabase):
      (WebCore::DBBackend::Server::removeOpenDatabase):
      (WebCore::DBBackend::Server::setDatabaseDetails):
      (WebCore::DBBackend::Server::getMaxSizeForDatabase):
      - Refactored all calls to the DatabaseTracker to go thru the DBBackend::Server.
      * Modules/webdatabase/DBBackendServer.h:
      * Modules/webdatabase/DOMWindowWebDatabase.cpp:
      (WebCore::DOMWindowWebDatabase::openDatabase):
      * Modules/webdatabase/Database.cpp:
      (WebCore::Database::close):
      (WebCore::Database::maximumSize):
      * Modules/webdatabase/Database.h:
      (Database):
      - Moved the openDatabase() factory method to the DatabaseManager.
      - Removed the unused deliverPendingCallback() prototype.
      * Modules/webdatabase/DatabaseBasicTypes.h: Added.
      - A place to define some common basic types used by the database module.
      * Modules/webdatabase/DatabaseContext.cpp:
      (WebCore::DatabaseContext::databaseExceededQuota):
      * Modules/webdatabase/DatabaseManager.cpp:
      (WebCore::DatabaseManager::DatabaseManager):
      (WebCore::DatabaseManager::initialize):
      (WebCore::DatabaseManager::setClient):
      (WebCore::DatabaseManager::databaseDirectoryPath):
      (WebCore::DatabaseManager::setDatabaseDirectoryPath):
      (WebCore::DatabaseManager::isAvailable):
      (WebCore::DatabaseManager::setIsAvailable):
      (DatabaseCreationCallbackTask):
      (WebCore::DatabaseCreationCallbackTask::create):
      (WebCore::DatabaseCreationCallbackTask::performTask):
      (WebCore::DatabaseCreationCallbackTask::DatabaseCreationCallbackTask):
      (WebCore::DatabaseManager::openDatabase):
      (WebCore::DatabaseManager::openDatabaseSync):
      (WebCore::DatabaseManager::setHasOpenDatabases):
      (WebCore::DatabaseManager::fullPathForDatabase):
      (WebCore::DatabaseManager::hasEntryForOrigin):
      (WebCore::DatabaseManager::origins):
      (WebCore::DatabaseManager::databaseNamesForOrigin):
      (WebCore::DatabaseManager::detailsForNameAndOrigin):
      (WebCore::DatabaseManager::usageForOrigin):
      (WebCore::DatabaseManager::quotaForOrigin):
      (WebCore::DatabaseManager::setQuota):
      (WebCore::DatabaseManager::deleteAllDatabases):
      (WebCore::DatabaseManager::deleteOrigin):
      (WebCore::DatabaseManager::deleteDatabase):
      (WebCore::DatabaseManager::scheduleNotifyDatabaseChanged):
      (WebCore::DatabaseManager::databaseChanged):
      (WebCore::DatabaseManager::closeDatabasesImmediately):
      (WebCore::DatabaseManager::interruptAllDatabasesForContext):
      (WebCore::DatabaseManager::canEstablishDatabase):
      (WebCore::DatabaseManager::addOpenDatabase):
      (WebCore::DatabaseManager::removeOpenDatabase):
      (WebCore::DatabaseManager::setDatabaseDetails):
      (WebCore::DatabaseManager::getMaxSizeForDatabase):
      * Modules/webdatabase/DatabaseManager.h:
      (DatabaseManager):
      * Modules/webdatabase/DatabaseSync.cpp:
      (WebCore::DatabaseSync::~DatabaseSync):
      (WebCore::DatabaseSync::closeImmediately):
      * Modules/webdatabase/DatabaseSync.h:
      (DatabaseSync):
      - Moved the openDatabaseSync() factory method to the DatabaseManager.
      * Modules/webdatabase/DatabaseTask.h:
      * Modules/webdatabase/SQLResultSet.h:
      * Modules/webdatabase/SQLStatementSync.h:
      * Modules/webdatabase/SQLTransaction.h:
      * Modules/webdatabase/SQLTransactionClient.cpp:
      (WebCore::SQLTransactionClient::didCommitWriteTransaction):
      (WebCore::SQLTransactionClient::didExecuteStatement):
      (WebCore::SQLTransactionClient::didExceedQuota):
      * Modules/webdatabase/SQLTransactionSync.h:
      * Modules/webdatabase/WorkerContextWebDatabase.cpp:
      (WebCore::WorkerContextWebDatabase::openDatabase):
      (WebCore::WorkerContextWebDatabase::openDatabaseSync):
      * Target.pri:
      * WebCore.gypi:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.xcodeproj/project.pbxproj:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138085 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c2b0a80f
    • commit-queue@webkit.org's avatar
      IndexedDB: Implement custom bindings for parsing options · 41e22baa
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=96614
      
      Patch by Michael Pruett <michael@68k.org> on 2012-12-18
      Reviewed by Darin Adler.
      
      Parsing the options dictionary in IDBDatabase.createObjectStore()
      and IDBObjectStore.createIndex() requires custom bindings in JSC.
      
      Tests: storage/indexeddb/*
      
      * GNUmakefile.list.am:
      * Modules/indexeddb/IDBDatabase.cpp:
      (WebCore::IDBDatabase::createObjectStore):
      (WebCore):
      * Modules/indexeddb/IDBDatabase.h:
      (IDBDatabase):
      * Modules/indexeddb/IDBDatabase.idl:
      * Modules/indexeddb/IDBObjectStore.cpp:
      (WebCore::IDBObjectStore::createIndex):
      (WebCore):
      * Modules/indexeddb/IDBObjectStore.h:
      (IDBObjectStore):
      * Modules/indexeddb/IDBObjectStore.idl:
      * UseJSC.cmake:
      * bindings/js/IDBBindingUtilities.cpp:
      (WebCore::idbKeyPathFromValue): Added utility function for converting a JSValue to an IDBKeyPath.
      (WebCore):
      * bindings/js/IDBBindingUtilities.h:
      (WebCore):
      * bindings/js/JSIDBDatabaseCustom.cpp: Added.
      (WebCore):
      (WebCore::JSIDBDatabase::createObjectStore):
      * bindings/js/JSIDBObjectStoreCustom.cpp: Added.
      (WebCore):
      (WebCore::JSIDBObjectStore::createIndex):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138081 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      41e22baa
    • dgrogan@chromium.org's avatar
      IndexedDB: Split BackingStore histogram · 524a2489
      dgrogan@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=105222
      
      Reviewed by Tony Chang.
      
      Add separate histograms for Consistency, Write, and Read errors.
      Recategorize some read errors as consistency errors.
      
      Tested the preprocessor logic by manually making some functions fail
      and printing the histogram string from chromium code.
      
      Next up is logging successes to get an idea of which functions have
      the highest failure _rate_.
      
      * Modules/indexeddb/IDBBackingStore.cpp:
      (WebCore::recordInternalError):
      (WebCore):
      (WebCore::setUpMetadata):
      (WebCore::IDBBackingStore::getIDBDatabaseMetaData):
      (WebCore::getNewDatabaseId):
      (WebCore::IDBBackingStore::createIDBDatabaseMetaData):
      (WebCore::IDBBackingStore::getObjectStores):
      (WebCore::setMaxObjectStoreId):
      (WebCore::IDBBackingStore::deleteObjectStore):
      (WebCore::IDBBackingStore::getRecord):
      (WebCore::getNewVersionNumber):
      (WebCore::IDBBackingStore::getKeyGeneratorCurrentNumber):
      (WebCore::IDBBackingStore::keyExistsInObjectStore):
      (WebCore::IDBBackingStore::getIndexes):
      (WebCore::setMaxIndexId):
      (WebCore::versionExists):
      (WebCore::IDBBackingStore::findKeyInIndex):
      (WebCore::IDBBackingStore::getPrimaryKeyViaIndex):
      (WebCore::IDBBackingStore::keyExistsInIndex):
      (WebCore::ObjectStoreKeyCursorImpl::loadCurrentRow):
      (WebCore::ObjectStoreCursorImpl::loadCurrentRow):
      (WebCore::IndexKeyCursorImpl::loadCurrentRow):
      (WebCore::IndexCursorImpl::loadCurrentRow):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138072 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      524a2489
  15. 17 Dec, 2012 1 commit
    • commit-queue@webkit.org's avatar
      IndexedDB: Don't use strings to represent serialized values · 7632ff2a
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=104354
      
      Patch by Michael Pruett <michael@68k.org> on 2012-12-17
      Reviewed by Kentaro Hara.
      
      Use Vector<uint8_t> rather than String to represent serialized values
      in IndexedDB. This change is necessary to implement IndexedDB for JSC.
      
      Tests: storage/indexeddb/*
      
      * Modules/indexeddb/IDBBackingStore.cpp:
      (WebCore::IDBBackingStore::getRecord):
      (WebCore::IDBBackingStore::putRecord):
      (WebCore::ObjectStoreKeyCursorImpl::value):
      (WebCore::ObjectStoreKeyCursorImpl::ObjectStoreKeyCursorImpl):
      (WebCore::ObjectStoreCursorImpl::value):
      (ObjectStoreCursorImpl):
      (WebCore::ObjectStoreCursorImpl::loadCurrentRow):
      (WebCore::IndexKeyCursorImpl::value):
      (WebCore::IndexCursorImpl::value):
      (WebCore::IndexCursorImpl::IndexCursorImpl):
      (IndexCursorImpl):
      (WebCore::IndexCursorImpl::loadCurrentRow):
      * Modules/indexeddb/IDBBackingStore.h:
      (IDBBackingStore):
      (Cursor):
      * Modules/indexeddb/IDBCursorBackendImpl.cpp:
      (WebCore::IDBCursorBackendImpl::CursorPrefetchIterationOperation::perform):
      * Modules/indexeddb/IDBCursorBackendImpl.h:
      (WebCore::IDBCursorBackendImpl::value):
      * Modules/indexeddb/IDBIndexBackendImpl.cpp:
      (WebCore::IDBIndexBackendImpl::IndexReferencedValueRetrievalOperation::perform):
      * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
      (WebCore::IDBObjectStoreBackendImpl::ObjectStoreRetrievalOperation::perform):
      (WebCore::IDBObjectStoreBackendImpl::ObjectStoreStorageOperation::perform):
      * bindings/js/SerializedScriptValue.cpp:
      (WebCore::SerializedScriptValue::SerializedScriptValue):
      (WebCore):
      * bindings/js/SerializedScriptValue.h:
      * bindings/v8/SerializedScriptValue.cpp:
      (WebCore::SerializedScriptValue::createFromWireBytes):
      (WebCore):
      (WebCore::SerializedScriptValue::toWireBytes):
      * bindings/v8/SerializedScriptValue.h:
      (SerializedScriptValue):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137954 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7632ff2a
  16. 15 Dec, 2012 1 commit
    • mark.lam@apple.com's avatar
      Re-landing patch for "Introducing the DatabaseStrategy and database servers". · 266a1d70
      mark.lam@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=104934.
      
      Not reviewed.
      
      Source/WebCore: 
      
      Merged from r137767. Previously reviewed by Sam Weinig.
      Also added __ZTVN7WebCore16DatabaseStrategyE to WebCore.exp.in.
      
      No new tests.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * Modules/webdatabase/AbstractDatabaseServer.h: Copied from Source/WebCore/Modules/webdatabase/AbstractDatabaseServer.h.
      * Modules/webdatabase/DBBackendServer.h: Copied from Source/WebCore/Modules/webdatabase/DBBackendServer.h.
      * Modules/webdatabase/DatabaseManager.cpp:
      (WebCore::DatabaseManager::DatabaseManager):
      * Modules/webdatabase/DatabaseManager.h:
      (DatabaseManager):
      * Target.pri:
      * WebCore.exp.in:
      * WebCore.gypi:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.xcodeproj/project.pbxproj:
      * platform/DatabaseStrategy.cpp: Copied from Source/WebCore/platform/DatabaseStrategy.cpp.
      * platform/DatabaseStrategy.h: Copied from Source/WebCore/platform/DatabaseStrategy.h.
      * platform/PlatformStrategies.h:
      (WebCore::PlatformStrategies::databaseStrategy):
      (PlatformStrategies):
      (WebCore::PlatformStrategies::PlatformStrategies):
      
      Source/WebKit/efl: 
      
      Merged from r137767. Previously reviewed by Sam Weinig.
      
      * WebCoreSupport/PlatformStrategiesEfl.cpp:
      (PlatformStrategiesEfl::createDatabaseStrategy):
      * WebCoreSupport/PlatformStrategiesEfl.h:
      (PlatformStrategiesEfl):
      
      Source/WebKit/gtk: 
      
      Merged from r137767. Previously reviewed by Sam Weinig.
      
      * WebCoreSupport/PlatformStrategiesGtk.cpp:
      (PlatformStrategiesGtk::createDatabaseStrategy):
      * WebCoreSupport/PlatformStrategiesGtk.h:
      (PlatformStrategiesGtk):
      
      Source/WebKit/mac: 
      
      Merged from r137767. Previously reviewed by Sam Weinig.
      
      * WebCoreSupport/WebPlatformStrategies.h:
      (WebPlatformStrategies):
      * WebCoreSupport/WebPlatformStrategies.mm:
      (WebPlatformStrategies::createDatabaseStrategy):
      
      Source/WebKit/qt: 
      
      Merged from r137767. Previously reviewed by Sam Weinig.
      
      * WebCoreSupport/PlatformStrategiesQt.cpp:
      (PlatformStrategiesQt::createDatabaseStrategy):
      * WebCoreSupport/PlatformStrategiesQt.h:
      (PlatformStrategiesQt):
      
      Source/WebKit/win: 
      
      Merged from r137767. Previously reviewed by Sam Weinig.
      
      * WebCoreSupport/WebPlatformStrategies.cpp:
      (WebPlatformStrategies::createDatabaseStrategy):
      * WebCoreSupport/WebPlatformStrategies.h:
      (WebPlatformStrategies):
      
      Source/WebKit/wince: 
      
      Merged from r137767. Previously reviewed by Sam Weinig.
      
      * WebCoreSupport/PlatformStrategiesWinCE.cpp:
      (PlatformStrategiesWinCE::createDatabaseStrategy):
      * WebCoreSupport/PlatformStrategiesWinCE.h:
      (PlatformStrategiesWinCE):
      
      Source/WebKit2: 
      
      Merged from r137767. Previously reviewed by Sam Weinig.
      
      * CMakeLists.txt:
      * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
      (WebKit::WebPlatformStrategies::createDatabaseStrategy):
      (WebKit):
      (WebKit::WebPlatformStrategies::getDatabaseServer):
      * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
      (WebPlatformStrategies):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137795 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      266a1d70
  17. 14 Dec, 2012 2 commits
    • commit-queue@webkit.org's avatar
      Unreviewed, rolling out r137767. · 13209154
      commit-queue@webkit.org authored
      http://trac.webkit.org/changeset/137767
      https://bugs.webkit.org/show_bug.cgi?id=105062
      
      Broke Mac builds. (Requested by mlam on #webkit).
      
      Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-12-14
      
      Source/WebCore:
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * Modules/webdatabase/AbstractDatabaseServer.h: Removed.
      * Modules/webdatabase/DBBackendServer.h: Removed.
      * Modules/webdatabase/DatabaseManager.cpp:
      (WebCore::DatabaseManager::DatabaseManager):
      * Modules/webdatabase/DatabaseManager.h:
      * Target.pri:
      * WebCore.exp.in:
      * WebCore.gypi:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.xcodeproj/project.pbxproj:
      * platform/DatabaseStrategy.cpp: Removed.
      * platform/DatabaseStrategy.h: Removed.
      * platform/PlatformStrategies.h:
      (WebCore):
      (WebCore::PlatformStrategies::PlatformStrategies):
      (PlatformStrategies):
      
      Source/WebKit/efl:
      
      * WebCoreSupport/PlatformStrategiesEfl.cpp:
      * WebCoreSupport/PlatformStrategiesEfl.h:
      (PlatformStrategiesEfl):
      
      Source/WebKit/gtk:
      
      * WebCoreSupport/PlatformStrategiesGtk.cpp:
      * WebCoreSupport/PlatformStrategiesGtk.h:
      (PlatformStrategiesGtk):
      
      Source/WebKit/mac:
      
      * WebCoreSupport/WebPlatformStrategies.h:
      (WebPlatformStrategies):
      * WebCoreSupport/WebPlatformStrategies.mm:
      
      Source/WebKit/qt:
      
      * WebCoreSupport/PlatformStrategiesQt.cpp:
      * WebCoreSupport/PlatformStrategiesQt.h:
      (PlatformStrategiesQt):
      
      Source/WebKit/win:
      
      * WebCoreSupport/WebPlatformStrategies.cpp:
      * WebCoreSupport/WebPlatformStrategies.h:
      (WebPlatformStrategies):
      
      Source/WebKit/wince:
      
      * WebCoreSupport/PlatformStrategiesWinCE.cpp:
      * WebCoreSupport/PlatformStrategiesWinCE.h:
      (PlatformStrategiesWinCE):
      
      Source/WebKit2:
      
      * CMakeLists.txt:
      * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
      * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
      (WebPlatformStrategies):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137784 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      13209154
    • mark.lam@apple.com's avatar
      Introducing the DatabaseStrategy and database servers. · 6122d624
      mark.lam@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=104934.
      
      Reviewed by Sam Weinig.
      
      The database server is currently a placeholder that does nothing.
      
      Source/WebCore: 
      
      No new tests.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * Modules/webdatabase/AbstractDatabaseServer.h: Added.
      (WebCore):
      (AbstractDatabaseServer):
      (WebCore::AbstractDatabaseServer::AbstractDatabaseServer):
      (WebCore::AbstractDatabaseServer::~AbstractDatabaseServer):
      * Modules/webdatabase/DBBackendServer.h: Added.
      (DBBackend):
      * Modules/webdatabase/DatabaseManager.cpp:
      (WebCore::DatabaseManager::DatabaseManager):
      * Modules/webdatabase/DatabaseManager.h:
      (WebCore):
      (DatabaseManager):
      * Target.pri:
      * WebCore.exp.in:
      * WebCore.gypi:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.xcodeproj/project.pbxproj:
      * platform/DatabaseStrategy.cpp: Added.
      (WebCore):
      (WebCore::DatabaseStrategy::getDatabaseServer):
      * platform/DatabaseStrategy.h: Added.
      (WebCore):
      (DatabaseStrategy):
      (WebCore::DatabaseStrategy::~DatabaseStrategy):
      * platform/PlatformStrategies.h:
      (WebCore):
      (WebCore::PlatformStrategies::databaseStrategy):
      (PlatformStrategies):
      (WebCore::PlatformStrategies::PlatformStrategies):
      
      Source/WebKit/efl: 
      
      * WebCoreSupport/PlatformStrategiesEfl.cpp:
      (PlatformStrategiesEfl::createDatabaseStrategy):
      * WebCoreSupport/PlatformStrategiesEfl.h:
      (PlatformStrategiesEfl):
      
      Source/WebKit/gtk: 
      
      * WebCoreSupport/PlatformStrategiesGtk.cpp:
      (PlatformStrategiesGtk::createDatabaseStrategy):
      * WebCoreSupport/PlatformStrategiesGtk.h:
      (PlatformStrategiesGtk):
      
      Source/WebKit/mac: 
      
      * WebCoreSupport/WebPlatformStrategies.h:
      (WebPlatformStrategies):
      * WebCoreSupport/WebPlatformStrategies.mm:
      (WebPlatformStrategies::createDatabaseStrategy):
      
      Source/WebKit/qt: 
      
      * WebCoreSupport/PlatformStrategiesQt.cpp:
      (PlatformStrategiesQt::createDatabaseStrategy):
      * WebCoreSupport/PlatformStrategiesQt.h:
      (PlatformStrategiesQt):
      
      Source/WebKit/win: 
      
      * WebCoreSupport/WebPlatformStrategies.cpp:
      (WebPlatformStrategies::createDatabaseStrategy):
      * WebCoreSupport/WebPlatformStrategies.h:
      (WebPlatformStrategies):
      
      Source/WebKit/wince: 
      
      * WebCoreSupport/PlatformStrategiesWinCE.cpp:
      (PlatformStrategiesWinCE::createDatabaseStrategy):
      * WebCoreSupport/PlatformStrategiesWinCE.h:
      (PlatformStrategiesWinCE):
      
      Source/WebKit2: 
      
      * CMakeLists.txt:
      * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
      (WebKit::WebPlatformStrategies::createDatabaseStrategy):
      (WebKit):
      (WebKit::WebPlatformStrategies::getDatabaseServer):
      * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
      (WebPlatformStrategies):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137767 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6122d624
  18. 13 Dec, 2012 1 commit
    • dgrogan@chromium.org's avatar
      IndexedDB: Improve error messages · 7948a89c
      dgrogan@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=104624
      
      Reviewed by Tony Chang.
      
      Source/WebCore:
      
      Add detail to error messages so that they are more helpful and can be
      traced back to a specific line of code.
      
      Updated test: transaction-error.html
      
      * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
      (WebCore::IDBDatabaseBackendImpl::CreateObjectStoreOperation::perform):
      (WebCore::IDBDatabaseBackendImpl::DeleteObjectStoreOperation::perform):
      (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::perform):
      (WebCore::IDBDatabaseBackendImpl::openConnection):
      (WebCore::IDBDatabaseBackendImpl::openConnectionWithVersion):
      (WebCore::IDBDatabaseBackendImpl::deleteDatabase):
      (WebCore::IDBDatabaseBackendImpl::close):
      * Modules/indexeddb/IDBFactoryBackendImpl.cpp:
      (WebCore::IDBFactoryBackendImpl::getDatabaseNames):
      (WebCore::IDBFactoryBackendImpl::deleteDatabase):
      (WebCore::IDBFactoryBackendImpl::open):
      * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
      (WebCore::IDBObjectStoreBackendImpl::setIndexKeys):
      (WebCore::IDBObjectStoreBackendImpl::createIndex):
      (WebCore::IDBObjectStoreBackendImpl::CreateIndexOperation::perform):
      * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
      (WebCore::IDBTransactionBackendImpl::abort):
      (WebCore::IDBTransactionBackendImpl::commit):
      
      LayoutTests:
      
      Updated error message and establish that non-ascii characters in index
      names don't make it back to the browser properly.
      
      * storage/indexeddb/resources/shared.js:
      (unexpectedAbortCallback):
      * storage/indexeddb/resources/transaction-error.js:
      (testErrorFromCommit.trans.oncomplete.request.onupgradeneeded.trans.onabort):
      (testErrorFromCommit.trans.oncomplete.request.onupgradeneeded):
      (testErrorFromCommit.trans.oncomplete):
      (testErrorFromCommit):
      * storage/indexeddb/transaction-error-expected.txt:
      * storage/indexeddb/transaction-error.html:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137635 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7948a89c
  19. 12 Dec, 2012 1 commit
    • gyuyoung.kim@samsung.com's avatar
      NetworkInfoController needs to support destructor · 734a17d9
      gyuyoung.kim@samsung.com authored
      https://bugs.webkit.org/show_bug.cgi?id=104642
      
      Reviewed by Kentaro Hara.
      
      Though NetworkInfoController can be referenced by each port in order to update network status change,
      there is no virtual interface to destroy it. Beside each port client also needs to be destroyed when
      controller is destroyed.
      
      Source/WebCore:
      
      * Modules/networkinfo/NetworkInfoClient.h:
      (NetworkInfoClient):
      * Modules/networkinfo/NetworkInfoConnection.h:
      (WebCore::NetworkInfoConnection::networkInfoControllerDestroyed):
      * Modules/networkinfo/NetworkInfoController.cpp:
      (WebCore::NetworkInfoController::~NetworkInfoController):
      
      Source/WebKit/blackberry:
      
      * WebCoreSupport/NetworkInfoClientBlackBerry.cpp:
      (WebCore::NetworkInfoClientBlackBerry::networkInfoControllerDestroyed):
      (WebCore):
      * WebCoreSupport/NetworkInfoClientBlackBerry.h:
      (NetworkInfoClientBlackBerry):
      
      Source/WebKit/efl:
      
      * WebCoreSupport/NetworkInfoClientEfl.cpp:
      (WebCore::NetworkInfoClientEfl::networkInfoControllerDestroyed):
      (WebCore):
      * WebCoreSupport/NetworkInfoClientEfl.h:
      (NetworkInfoClientEfl):
      
      Source/WebKit2:
      
      * UIProcess/efl/NetworkInfoProvider.cpp:
      (NetworkInfoProvider::networkInfoControllerDestroyed):
      * UIProcess/efl/NetworkInfoProvider.h:
      (NetworkInfoProvider):
      * WebProcess/WebCoreSupport/WebNetworkInfoClient.cpp:
      (WebKit::WebNetworkInfoClient::networkInfoControllerDestroyed):
      (WebKit):
      * WebProcess/WebCoreSupport/WebNetworkInfoClient.h:
      (WebNetworkInfoClient):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137568 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      734a17d9