1. 21 Nov, 2013 1 commit
    • commit-queue@webkit.org's avatar
      Remove ENABLE_WORKERS · f0eff209
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=105784
      
      .:
      
      Patch by Peter Molnar <pmolnar.u-szeged@partner.samsung.com> on 2013-11-21
      Reviewed by Darin Adler.
      
      * Source/autotools/SetupWebKitFeatures.m4:
      * Source/cmake/WebKitFeatures.cmake:
      * Source/cmakeconfig.h.cmake:
      
      Source/WebCore:
      
      Patch by Peter Molnar <pmolnar.u-szeged@partner.samsung.com> on 2013-11-21
      Reviewed by Darin Adler.
      
      Source/WebKit:
      
      Patch by Peter Molnar <pmolnar.u-szeged@partner.samsung.com> on 2013-11-21
      Reviewed by Darin Adler.
      
      * WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:
      
      Source/WebKit/efl:
      
      Patch by Peter Molnar <pmolnar.u-szeged@partner.samsung.com> on 2013-11-21
      Reviewed by Darin Adler.
      
      * ewk/ewk_settings.cpp:
      (ewk_settings_memory_cache_clear):
      
      Source/WebKit/win:
      
      Patch by Peter Molnar <pmolnar.u-szeged@partner.samsung.com> on 2013-11-21
      Reviewed by Darin Adler.
      
      * WebWorkersPrivate.cpp:
      (WebWorkersPrivate::workerThreadCount):
      
      Source/WTF:
      
      Patch by Peter Molnar <pmolnar.u-szeged@partner.samsung.com> on 2013-11-21
      Reviewed by Darin Adler.
      
      * wtf/FeatureDefines.h:
      * wtf/nix/FeatureDefinesNix.h:
      
      Tools:
      
      Patch by Peter Molnar <pmolnar.u-szeged@partner.samsung.com> on 2013-11-21
      Reviewed by Darin Adler.
      
      * Scripts/webkitperl/FeatureList.pm:
      
      WebKitLibraries:
      
      Patch by Peter Molnar <pmolnar.u-szeged@partner.samsung.com> on 2013-11-21
      Reviewed by Darin Adler.
      
      * win/tools/vsprops/FeatureDefines.props:
      * win/tools/vsprops/FeatureDefinesCairo.props:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159679 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f0eff209
  2. 20 Nov, 2013 3 commits
    • beidson@apple.com's avatar
      Alphabetization followup to r159567 · a480b931
      beidson@apple.com authored
      Reviewed by style-bot  :(
      
      * Modules/indexeddb/IDBDatabaseBackend.h:
      * Modules/indexeddb/IDBIndex.h:
      * Modules/indexeddb/IDBObjectStore.h:
      * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
      * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
      * inspector/InspectorIndexedDBAgent.cpp:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159568 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a480b931
    • beidson@apple.com's avatar
      Rename IDBMetadata.h to IDBDatabaseMetadata.h · f756dd49
      beidson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=124668
      
      Reviewed by Dean Jackson.
      
      * GNUmakefile.list.am:
      * WebCore.xcodeproj/project.pbxproj:
      
      * Modules/indexeddb/IDBDatabase.h:
      * Modules/indexeddb/IDBDatabaseBackend.h:
      
      * Modules/indexeddb/IDBDatabaseMetadata.h: Renamed from Source/WebCore/Modules/indexeddb/IDBMetadata.h.
      (WebCore::IDBIndexMetadata::IDBIndexMetadata):
      (WebCore::IDBObjectStoreMetadata::IDBObjectStoreMetadata):
      (WebCore::IDBDatabaseMetadata::IDBDatabaseMetadata):
      
      * Modules/indexeddb/IDBIndex.h:
      * Modules/indexeddb/IDBObjectStore.h:
      * Modules/indexeddb/IDBServerConnection.h:
      * Modules/indexeddb/IDBTransaction.h:
      * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
      * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
      * Modules/indexeddb/leveldb/IDBIndexWriterLevelDB.h:
      * inspector/InspectorIndexedDBAgent.cpp:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159567 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f756dd49
    • beidson@apple.com's avatar
      Cleanup getOrEstablishIDBDatabaseMetadata and stub it out in WK2 · 08b907cf
      beidson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=124635
      
      Reviewed by Tim Horton.
      
      Source/WebCore:
      
      getOrEstablishIDBDatabaseMetadata() should not have to take a database name parameter because the
      server connection should already know what database name it represents.
      
      * Modules/indexeddb/IDBDatabaseBackend.cpp:
      (WebCore::IDBDatabaseBackend::openInternalAsync):
      
      * Modules/indexeddb/IDBServerConnection.h:
      * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
      (WebCore::IDBServerConnectionLevelDB::IDBServerConnectionLevelDB):
      (WebCore::IDBServerConnectionLevelDB::getOrEstablishIDBDatabaseMetadata):
      * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.h:
      
      * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
      (WebCore::IDBFactoryBackendLevelDB::deleteDatabase):
      (WebCore::IDBFactoryBackendLevelDB::open):
      
      Source/WebKit2:
      
      Stub out the message for getOrEstablishIDBDatabaseMetadata in the DatabaseProcess.
      
      * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
      (WebKit::DatabaseProcessIDBConnection::establishConnection):
      (WebKit::DatabaseProcessIDBConnection::getOrEstablishIDBDatabaseMetadata):
      * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
      * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in:
      
      * Shared/SecurityOriginData.cpp:
      (WebKit::SecurityOriginData::fromSecurityOrigin):
      * Shared/SecurityOriginData.h:
      
      * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
      (WebKit::WebIDBServerConnection::WebIDBServerConnection):
      (WebKit::WebIDBServerConnection::deleteDatabase):
      (WebKit::WebIDBServerConnection::getOrEstablishIDBDatabaseMetadata):
      * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159563 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      08b907cf
  3. 19 Nov, 2013 2 commits
    • jer.noble@apple.com's avatar
      [MSE] Support fastSeek() in MediaSource. · 6d6b4408
      jer.noble@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=124422
      
      Reviewed by Eric Carlson.
      
      Source/WebCore:
      
      Test: media/media-source/media-source-fastseek.html
      
      * Modules/mediasource/MediaSource.cpp:
      * Modules/mediasource/MediaSource.h:
      
      Add support for "seek to the next fastest time" in MediaSource by
      returning the time of the nearest Sync sample.
      
      Move the data structure logic out of SourceBuffer and into it's own
      class:
      * Modules/mediasource/SampleMap.cpp: Added.
      (WebCore::SampleIsLessThanMediaTimeComparator::operator()):
      (WebCore::SampleIsGreaterThanMediaTimeComparator::operator()):
      (WebCore::SampleIsRandomAccess::operator()):
      (WebCore::SamplePresentationTimeIsWithinRangeComparator::operator()):
      (WebCore::SampleMap::addSample):
      (WebCore::SampleMap::removeSample):
      (WebCore::SampleMap::findSampleContainingPresentationTime):
      (WebCore::SampleMap::findSampleAfterPresentationTime):
      (WebCore::SampleMap::findSampleWithDecodeTime):
      (WebCore::SampleMap::reverseFindSampleContainingPresentationTime):
      (WebCore::SampleMap::reverseFindSampleBeforePresentationTime):
      (WebCore::SampleMap::reverseFindSampleWithDecodeTime):
      (WebCore::SampleMap::findSyncSamplePriorToPresentationTime):
      (WebCore::SampleMap::findSyncSamplePriorToDecodeIterator):
      (WebCore::SampleMap::findSyncSampleAfterPresentationTime):
      (WebCore::SampleMap::findSyncSampleAfterDecodeIterator):
      (WebCore::SampleMap::findSamplesBetweenPresentationTimes):
      (WebCore::SampleMap::findDependentSamples):
      * Modules/mediasource/SampleMap.h: Added.
      (WebCore::SampleMap::presentationBegin):
      (WebCore::SampleMap::presentationEnd):
      (WebCore::SampleMap::decodeBegin):
      (WebCore::SampleMap::decodeEnd):
      (WebCore::SampleMap::reversePresentationBegin):
      (WebCore::SampleMap::reversePresentationEnd):
      (WebCore::SampleMap::reverseDecodeBegin):
      (WebCore::SampleMap::reverseDecodeEnd):
      
      Add logic to find and return the time of the next & previous sync
      sample, within the threshold provided:
      * Modules/mediasource/SourceBuffer.cpp:
      (WebCore::SourceBuffer::TrackBuffer::TrackBuffer):
      (WebCore::SourceBuffer::sourceBufferPrivateSeekToTime):
      (WebCore::SourceBuffer::sourceBufferPrivateFastSeekTimeForMediaTime):
      (WebCore::SourceBuffer::appendBufferTimerFired):
      (WebCore::SourceBuffer::setActive):
      (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
      (WebCore::SourceBuffer::sourceBufferPrivateDidBecomeReadyForMoreSamples):
      (WebCore::SourceBuffer::provideMediaData):
      * Modules/mediasource/SourceBuffer.h:
      * platform/graphics/SourceBufferPrivate.h:
      (WebCore::SourceBufferPrivate::setActive):
      * platform/graphics/SourceBufferPrivateClient.h:
      (WebCore::SourceBufferPrivateClient::sourceBufferPrivateFastSeekTimeForMediaTime):
      (WebCore::SourceBufferPrivateClient::sourceBufferPrivateSeekToTime):
      
      Add new files to the project:
      * WebCore.xcodeproj/project.pbxproj:
      
      Drive-by fixes in HTMLMediaElement:
      * html/HTMLMediaSource.h:
      * html/HTMLMediaElement.cpp:
      (HTMLMediaElement::finishSeek): Cause the MediaSource to check the ready state of all its buffers.
      (HTMLMediaElement::selectNextSourceChild): Pass in whether the source element has a MediaSource URL.
      
      Implement the seekWithTolerance behavior in MockMediaPlayerMediaSource:
      * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
      (WebCore::MockMediaPlayerMediaSource::maxTimeSeekableDouble):
      (WebCore::MockMediaPlayerMediaSource::currentTimeDouble):
      (WebCore::MockMediaPlayerMediaSource::seekWithTolerance):
      (WebCore::MockMediaPlayerMediaSource::advanceCurrentTime):
      * platform/mock/mediasource/MockMediaPlayerMediaSource.h:
      * platform/mock/mediasource/MockMediaSourcePrivate.cpp:
      (WebCore::MockMediaSourcePrivate::seekToTime):
      * platform/mock/mediasource/MockMediaSourcePrivate.h:
      * platform/mock/mediasource/MockSourceBufferPrivate.cpp:
      (WebCore::MockMediaSample::flags):
      (WebCore::MockSourceBufferPrivate::setActive):
      (WebCore::MockSourceBufferPrivate::fastSeekTimeForMediaTime):
      (WebCore::MockSourceBufferPrivate::seekToTime):
      * platform/mock/mediasource/MockSourceBufferPrivate.h:
      
      LayoutTests:
      
      * media/media-source/media-source-fastseek-expected.txt: Added.
      * media/media-source/media-source-fastseek.html: Added.
      * media/media-source/mock-media-source.js:
      (var):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159519 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6d6b4408
    • beidson@apple.com's avatar
      Consolidate IDBBackingStore*Interface and IDBBackingStore*LevelDB · 0bf3ded5
      beidson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=124597
      
      Reviewed by Alexey Proskuryakov.
      
      The Interface abstraction doesn’t make sense anymore, as LevelDB will be the only implementor.
      
      * Modules/indexeddb/IDBBackingStoreCursorInterface.h: Removed.
      * Modules/indexeddb/IDBBackingStoreInterface.h: Removed.
      * Modules/indexeddb/IDBBackingStoreTransactionInterface.h: Removed.
      
      * Modules/indexeddb/IDBServerConnection.h:
      
      * Modules/indexeddb/leveldb/IDBBackingStoreCursorLevelDB.h:
      (WebCore::IDBBackingStoreCursorLevelDB::key):
      (WebCore::IDBBackingStoreCursorLevelDB::primaryKey):
      (WebCore::IDBBackingStoreCursorLevelDB::recordIdentifier):
      
      * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
      (WebCore::IDBBackingStoreLevelDB::getOrEstablishIDBDatabaseMetadata):
      (WebCore::IDBBackingStoreLevelDB::updateIDBDatabaseVersion):
      (WebCore::IDBBackingStoreLevelDB::deleteDatabase):
      (WebCore::IDBBackingStoreLevelDB::createObjectStore):
      (WebCore::IDBBackingStoreLevelDB::deleteObjectStore):
      (WebCore::IDBBackingStoreLevelDB::getRecord):
      (WebCore::IDBBackingStoreLevelDB::putRecord):
      (WebCore::IDBBackingStoreLevelDB::clearObjectStore):
      (WebCore::IDBBackingStoreLevelDB::deleteRecord):
      (WebCore::IDBBackingStoreLevelDB::getKeyGeneratorCurrentNumber):
      (WebCore::IDBBackingStoreLevelDB::maybeUpdateKeyGeneratorCurrentNumber):
      (WebCore::IDBBackingStoreLevelDB::keyExistsInObjectStore):
      (WebCore::IDBBackingStoreLevelDB::createIndex):
      (WebCore::IDBBackingStoreLevelDB::deleteIndex):
      (WebCore::IDBBackingStoreLevelDB::putIndexDataForRecord):
      (WebCore::IDBBackingStoreLevelDB::findKeyInIndex):
      (WebCore::IDBBackingStoreLevelDB::getPrimaryKeyViaIndex):
      (WebCore::IDBBackingStoreLevelDB::keyExistsInIndex):
      (WebCore::IDBBackingStoreLevelDB::makeIndexWriters):
      (WebCore::IDBBackingStoreLevelDB::openObjectStoreCursor):
      (WebCore::IDBBackingStoreLevelDB::openObjectStoreKeyCursor):
      (WebCore::IDBBackingStoreLevelDB::openIndexKeyCursor):
      (WebCore::IDBBackingStoreLevelDB::openIndexCursor):
      * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
      
      * Modules/indexeddb/leveldb/IDBBackingStoreTransactionLevelDB.h:
      (WebCore::IDBBackingStoreTransactionLevelDB::levelDBTransactionFrom):
      
      * Modules/indexeddb/leveldb/IDBIndexWriterLevelDB.cpp:
      (WebCore::IDBIndexWriterLevelDB::writeIndexKeys):
      (WebCore::IDBIndexWriterLevelDB::verifyIndexKeys):
      (WebCore::IDBIndexWriterLevelDB::addingKeyAllowed):
      * Modules/indexeddb/leveldb/IDBIndexWriterLevelDB.h:
      
      * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
      (WebCore::IDBServerConnectionLevelDB::get):
      (WebCore::IDBServerConnectionLevelDB::openCursor):
      (WebCore::IDBServerConnectionLevelDB::count):
      (WebCore::IDBServerConnectionLevelDB::deleteRange):
      
      * WebCore.xcodeproj/project.pbxproj:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159517 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0bf3ded5
  4. 18 Nov, 2013 6 commits
    • beidson@apple.com's avatar
      Remove IDBServerConnection's deprecatedBackingStore() · eabaaaa4
      beidson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=124547
      
      Reviewed by Tim Horton.
      
      It is no longer needed, as the front end no longer knows about the backing store.
      
      * Modules/indexeddb/IDBServerConnection.h:
      
      * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
      * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159470 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      eabaaaa4
    • beidson@apple.com's avatar
      Remove unneeded BackingStore-related #include from IDBFactoryBackendInterface · c5dd0e51
      beidson@apple.com authored
      Rubberstamped by Beth Dakin.
      
      * Modules/indexeddb/IDBFactoryBackendInterface.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159450 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c5dd0e51
    • commit-queue@webkit.org's avatar
      Change mediasource and mediastream modules to use nullptr · 7b16a923
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=124530
      
      Patch by Nick Diego Yamane <nick.yamane@openbossa.org> on 2013-11-18
      Reviewed by Tim Horton.
      
      No new tests needed, no behavior change.
      
      * Modules/mediasource/MediaSource.cpp:
      * Modules/mediasource/SourceBuffer.cpp:
      * Modules/mediastream/MediaStream.cpp:
      * Modules/mediastream/RTCDTMFSender.cpp:
      * Modules/mediastream/RTCDataChannel.cpp:
      * Modules/mediastream/RTCIceCandidate.cpp:
      * Modules/mediastream/RTCPeerConnection.cpp:
      * Modules/mediastream/RTCSessionDescription.cpp:
      * Modules/mediastream/RTCStatsResponse.cpp:
      * Modules/mediastream/UserMediaRequest.cpp:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159447 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7b16a923
    • beidson@apple.com's avatar
      Move execution of IDBCursorBackendOperations to the IDBServerConnection · d76c6308
      beidson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=124463
      
      Reviewed by Tim Horton.
      
      This almost entirely removes knowledge of the backing store from the front end.
      
      The primary change here is to give cursors a unique ID.
      
      This way the IDBCursorBackend can reference itself by ID, while the
      IDBServerConnection can handle mapping that ID to a backing store.
      
      * Modules/indexeddb/IDBBackingStoreCursorInterface.h:
      
      * Modules/indexeddb/IDBBackingStoreInterface.h:
      
      * Modules/indexeddb/IDBCursorBackend.cpp:
      (WebCore::IDBCursorBackend::IDBCursorBackend):
      (WebCore::IDBCursorBackend::deleteFunction):
      (WebCore::IDBCursorBackend::prefetchReset):
      (WebCore::IDBCursorBackend::close):
      (WebCore::IDBCursorBackend::updateCursorData):
      (WebCore::IDBCursorBackend::clearCursorData):
      * Modules/indexeddb/IDBCursorBackend.h:
      (WebCore::IDBCursorBackend::create):
      (WebCore::IDBCursorBackend::key):
      (WebCore::IDBCursorBackend::primaryKey):
      (WebCore::IDBCursorBackend::value):
      (WebCore::IDBCursorBackend::id):
      (WebCore::IDBCursorBackend::transaction):
      (WebCore::IDBCursorBackend::setSavedCursorID):
      
      * Modules/indexeddb/IDBCursorBackendOperations.cpp:
      (WebCore::CursorAdvanceOperation::perform):
      (WebCore::CursorIterationOperation::perform):
      (WebCore::CursorPrefetchIterationOperation::perform):
      * Modules/indexeddb/IDBCursorBackendOperations.h:
      (WebCore::CursorIterationOperation::key):
      (WebCore::CursorIterationOperation::callbacks):
      (WebCore::CursorAdvanceOperation::count):
      (WebCore::CursorAdvanceOperation::callbacks):
      (WebCore::CursorPrefetchIterationOperation::numberToFetch):
      (WebCore::CursorPrefetchIterationOperation::callbacks):
      
      * Modules/indexeddb/IDBServerConnection.h:
      
      * Modules/indexeddb/leveldb/IDBBackingStoreCursorLevelDB.h:
      (WebCore::IDBBackingStoreCursorLevelDB::IDBBackingStoreCursorLevelDB):
      
      * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
      (WebCore::ObjectStoreKeyCursorImpl::create):
      (WebCore::ObjectStoreKeyCursorImpl::clone):
      (WebCore::ObjectStoreKeyCursorImpl::ObjectStoreKeyCursorImpl):
      (WebCore::ObjectStoreCursorImpl::create):
      (WebCore::ObjectStoreCursorImpl::clone):
      (WebCore::ObjectStoreCursorImpl::ObjectStoreCursorImpl):
      (WebCore::IDBBackingStoreLevelDB::openObjectStoreCursor):
      (WebCore::IDBBackingStoreLevelDB::openObjectStoreKeyCursor):
      (WebCore::IDBBackingStoreLevelDB::openIndexKeyCursor):
      (WebCore::IDBBackingStoreLevelDB::openIndexCursor):
      * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
      
      * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
      (WebCore::IDBServerConnectionLevelDB::IDBServerConnectionLevelDB):
      (WebCore::IDBServerConnectionLevelDB::setIndexKeys):
      (WebCore::IDBServerConnectionLevelDB::createObjectStore):
      (WebCore::IDBServerConnectionLevelDB::createIndex):
      (WebCore::IDBServerConnectionLevelDB::deleteIndex):
      (WebCore::IDBServerConnectionLevelDB::get):
      (WebCore::IDBServerConnectionLevelDB::put):
      (WebCore::IDBServerConnectionLevelDB::openCursor):
      (WebCore::IDBServerConnectionLevelDB::count):
      (WebCore::IDBServerConnectionLevelDB::deleteRange):
      (WebCore::IDBServerConnectionLevelDB::clearObjectStore):
      (WebCore::IDBServerConnectionLevelDB::deleteObjectStore):
      (WebCore::IDBServerConnectionLevelDB::changeDatabaseVersion):
      (WebCore::IDBServerConnectionLevelDB::cursorAdvance):
      (WebCore::IDBServerConnectionLevelDB::cursorIterate):
      (WebCore::IDBServerConnectionLevelDB::cursorPrefetchIteration):
      (WebCore::IDBServerConnectionLevelDB::cursorPrefetchReset):
      * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159445 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d76c6308
    • jer.noble@apple.com's avatar
      [WTF] Media time should not have a constructor which accepts a single int or float. · 64408e52
      jer.noble@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=124470
      
      Source/WebCore:
      
      Reviewed by Eric Carlson.
      
      Fix the compile error exposed by removing the default parameter in the MediaTime constructor.
      
      * Modules/mediasource/SourceBuffer.cpp:
      (WebCore::SourceBuffer::setTimestampOffset):
      
      Source/WTF:
      
      Having a constructor taking a single number value, as it's very easy to accidentially mis-
      initialize a MediaTime with a double (automatically casted to a int64_t).
      
      Reviewed by Eric Carlson.
      
      * wtf/MediaTime.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      64408e52
    • commit-queue@webkit.org's avatar
      Change webaudio to use nullptr for null pointers · d84e93a9
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=124526
      
      Patch by Nick Diego Yamane <nick.yamane@openbossa.org> on 2013-11-18
      Reviewed by Anders Carlsson.
      
      No new tests needed, no behavior change.
      
      * Modules/webaudio/AudioBuffer.cpp:
      * Modules/webaudio/AudioContext.cpp:
      * Modules/webaudio/AudioNode.cpp:
      * Modules/webaudio/ChannelMergerNode.cpp:
      * Modules/webaudio/ChannelSplitterNode.cpp:
      * Modules/webaudio/MediaStreamAudioSource.cpp:
      * Modules/webaudio/OfflineAudioContext.cpp:
      * Modules/webaudio/PeriodicWave.cpp:
      * Modules/webaudio/ScriptProcessorNode.cpp:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159442 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d84e93a9
  5. 17 Nov, 2013 1 commit
    • ap@apple.com's avatar
      Use uint8_t vectors for WebCrypto data · f37f9b40
      ap@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=124466
      
      Reviewed by Sam Weinig.
      
      Source/WebCore: 
      
      Using Vector<char> for crypto key data is somewhat non-idiomatic, and it gets simply
      dangerous for bignums, because signed arithmetic is not appropriate for bignum digits.
      
      * Modules/websockets/WebSocketHandshake.cpp:
      (WebCore::generateSecWebSocketKey):
      (WebCore::WebSocketHandshake::getExpectedWebSocketAccept):
      No longer need to cast data to char* here.
      
      * bindings/js/JSCryptoKeySerializationJWK.cpp:
      * bindings/js/JSCryptoKeySerializationJWK.h:
      * crypto/CryptoDigest.h:
      * crypto/CryptoKey.h:
      * crypto/keys/CryptoKeyAES.cpp:
      * crypto/keys/CryptoKeyAES.h:
      * crypto/keys/CryptoKeyDataOctetSequence.h:
      * crypto/keys/CryptoKeyDataRSAComponents.cpp:
      * crypto/keys/CryptoKeyDataRSAComponents.h:
      * crypto/keys/CryptoKeyHMAC.cpp:
      * crypto/keys/CryptoKeyHMAC.h:
      * crypto/keys/CryptoKeyRSA.h:
      * crypto/keys/CryptoKeySerializationRaw.cpp:
      * crypto/keys/CryptoKeySerializationRaw.h:
      * crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:
      * crypto/mac/CryptoAlgorithmHMACMac.cpp:
      * crypto/mac/CryptoDigestMac.cpp:
      * crypto/mac/CryptoKeyMac.cpp:
      * crypto/parameters/CryptoAlgorithmRsaKeyGenParams.h:
      Switched to Vector<uint8_t>.
      
      * crypto/mac/CryptoKeyRSAMac.cpp:
      (WebCore::getPublicKeyComponents): Extracted from buildAlgorithmDescription() and simplified.
      (WebCore::CryptoKeyRSA::create): Switched to Vector<uint8_t>.
      (WebCore::CryptoKeyRSA::buildAlgorithmDescription): No longer need to copy data just
      to change type from Vector<char> to Vector<unsigned char>.
      (WebCore::bigIntegerToUInt32): Ditto. No longer need to cast types when dealing with the bignum.
      (WebCore::CryptoKeyRSA::generatePair): Improved an error message a little.
      
      * fileapi/FileReaderLoader.cpp: (WebCore::FileReaderLoader::convertToDataURL):
      * inspector/DOMPatchSupport.cpp: (WebCore::DOMPatchSupport::createDigest):
      * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::archive):
      * platform/graphics/cg/ImageBufferCG.cpp: (WebCore::CGImageToDataURL):
      No longer need to cast data to char* here.
      
      Source/WTF: 
      
      Binary data can be UTF-8, in which case "char*" is idiomatic, or it can be arbitrary
      binary data, in which case "uint8_t*" is more common.
      
      Changed encode functions that took "const char *" to "const void*", and decode
      functions that took "Vector<char>&" now take an adapter class.
      
      The adapter relies on Vector<char> and Vector<uint8_t> classes having an identical layout.
      
      * wtf/text/Base64.cpp:
      (WTF::base64Encode):
      (WTF::base64URLEncode):
      (WTF::base64DecodeInternal):
      (WTF::base64Decode):
      (WTF::base64URLDecode):
      * wtf/text/Base64.h:
      (WTF::SignedOrUnsignedCharVectorAdapter):
      (WTF::ConstSignedOrUnsignedCharVectorAdapter):
      (WTF::base64Encode):
      (WTF::base64URLEncode):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159390 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f37f9b40
  6. 15 Nov, 2013 7 commits
    • beidson@apple.com's avatar
      Move IDBCursorBackend operations into their own files · 1eae3156
      beidson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=124444
      
      Reviewed by Tim Horton.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * WebCore.xcodeproj/project.pbxproj:
      
      * Modules/indexeddb/IDBCursorBackend.cpp:
      * Modules/indexeddb/IDBCursorBackend.h:
      (WebCore::IDBCursorBackend::cursorType):
      (WebCore::IDBCursorBackend::deprecatedBackingStoreCursor):
      (WebCore::IDBCursorBackend::deprecatedSetBackingStoreCursor):
      (WebCore::IDBCursorBackend::deprecatedSetSavedBackingStoreCursor):
      
      * Modules/indexeddb/IDBCursorBackendOperations.cpp: Added.
      (WebCore::CallOnDestruct::CallOnDestruct):
      (WebCore::CallOnDestruct::~CallOnDestruct):
      (WebCore::CursorAdvanceOperation::perform):
      (WebCore::CursorIterationOperation::perform):
      (WebCore::CursorPrefetchIterationOperation::perform):
      * Modules/indexeddb/IDBCursorBackendOperations.h: Added.
      (WebCore::CursorIterationOperation::create):
      (WebCore::CursorIterationOperation::CursorIterationOperation):
      (WebCore::CursorAdvanceOperation::create):
      (WebCore::CursorAdvanceOperation::CursorAdvanceOperation):
      (WebCore::CursorPrefetchIterationOperation::create):
      (WebCore::CursorPrefetchIterationOperation::CursorPrefetchIterationOperation):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159373 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1eae3156
    • beidson@apple.com's avatar
      Let IDBDatabaseBackend create IDBTransactionBackend's directly · 6e5f0963
      beidson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=124438
      
      Reviewed by Beth Dakin.
      
      Source/WebCore:
      
      Create IDBTransactionBackends directly:
      * Modules/indexeddb/IDBDatabaseBackend.cpp:
      (WebCore::IDBDatabaseBackend::createTransaction):
      * Modules/indexeddb/IDBDatabaseBackend.h:
      
      Remove maybeCreateTransactionBackend():
      * Modules/indexeddb/IDBFactoryBackendInterface.h:
      * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
      * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
      
      Source/WebKit2:
      
      Remove maybeCreateTransactionBackend():
      * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
      * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159365 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6e5f0963
    • beidson@apple.com's avatar
      Remove last vestiges of IDBBackingStore* from IDBTransactionBackend. · 046ca9e7
      beidson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=124436
      
      Reviewed by Tim Horton.
      
      Source/WebCore:
      
      * Modules/indexeddb/IDBFactoryBackendInterface.h: Removed createCursorBackend.
      * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp: Removed createCursorBackend.
      * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h: Removed createCursorBackend.
      
      * Modules/indexeddb/IDBCursorBackend.h:
      
      * Modules/indexeddb/IDBTransactionBackend.cpp:
      * Modules/indexeddb/IDBTransactionBackend.h:
      
      * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
      (WebCore::IDBServerConnectionLevelDB::openCursor):
      
      Source/WebKit2:
      
      * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp: Removed createCursorBackend.
      * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159362 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      046ca9e7
    • beidson@apple.com's avatar
      Make IDBIndexWriter a LevelDB specific concept · fcd7ae95
      beidson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=124434
      
      Reviewed by Tim Horton.
      
      This includes renaming the class and moving it into the leveldb subdirectory.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * WebCore.xcodeproj/project.pbxproj:
      
      * Modules/indexeddb/IDBBackingStoreInterface.h:
      * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
      
      * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
      (WebCore::IDBBackingStoreLevelDB::makeIndexWriters):
      * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
      
      * Modules/indexeddb/leveldb/IDBIndexWriterLevelDB.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBIndexWriter.cpp.
      (WebCore::IDBIndexWriterLevelDB::IDBIndexWriterLevelDB):
      (WebCore::IDBIndexWriterLevelDB::writeIndexKeys):
      (WebCore::IDBIndexWriterLevelDB::verifyIndexKeys):
      (WebCore::IDBIndexWriterLevelDB::addingKeyAllowed):
      * Modules/indexeddb/leveldb/IDBIndexWriterLevelDB.h: Renamed from Source/WebCore/Modules/indexeddb/IDBIndexWriter.h.
      (WebCore::IDBIndexWriterLevelDB::create):
      
      * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
      (WebCore::IDBServerConnectionLevelDB::setIndexKeys):
      (WebCore::IDBServerConnectionLevelDB::put):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159359 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fcd7ae95
    • beidson@apple.com's avatar
      Remove IDBBackingStoreInterface.h includes that are no longer needed · 21c65fb2
      beidson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=124433
      
      Reviewed by Tim Horton.
      
      * Modules/indexeddb/IDBCursorBackend.cpp:
      * Modules/indexeddb/IDBCursorBackend.h:
      * Modules/indexeddb/IDBFactoryBackendInterface.h:
      * Modules/indexeddb/IDBTransactionBackend.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159355 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      21c65fb2
    • beidson@apple.com's avatar
      Move execution of IDBTransactionBackendOperations to the IDBServerConnection · 05a35ca3
      beidson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=124385
      
      Reviewed by Tim Horton.
      
      Source/WebCore:
      
      Each IDBOperation has it’s ::perform() moved to a method on IDBServerConnection.
      This almost removes all knowledge of the backing stores from the front end.
      
      * Modules/indexeddb/IDBDatabaseBackend.cpp:
      (WebCore::IDBDatabaseBackend::clearObjectStore):
      (WebCore::IDBDatabaseBackend::runIntVersionChangeTransaction):
      * Modules/indexeddb/IDBDatabaseBackend.h:
      
      * Modules/indexeddb/IDBObjectStore.cpp:
      (WebCore::IDBObjectStore::clear):
      
      Add methods to reflect each transaction backend operation:
      * Modules/indexeddb/IDBServerConnection.h:
      
      Schedule certain operations with callbacks:
      * Modules/indexeddb/IDBTransactionBackend.cpp:
      (WebCore::IDBTransactionBackend::scheduleVersionChangeOperation):
      (WebCore::IDBTransactionBackend::schedulePutOperation):
      (WebCore::IDBTransactionBackend::scheduleOpenCursorOperation):
      (WebCore::IDBTransactionBackend::scheduleCountOperation):
      (WebCore::IDBTransactionBackend::scheduleDeleteRangeOperation):
      (WebCore::IDBTransactionBackend::scheduleClearObjectStoreOperation):
      * Modules/indexeddb/IDBTransactionBackend.h:
      
      Make each operation’s perform() method defer to the IDBServerConnection (with a callback):
      * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
      (WebCore::CreateObjectStoreOperation::perform):
      (WebCore::CreateIndexOperation::perform):
      (WebCore::CreateIndexAbortOperation::perform):
      (WebCore::DeleteIndexOperation::perform):
      (WebCore::DeleteIndexAbortOperation::perform):
      (WebCore::GetOperation::perform):
      (WebCore::PutOperation::perform):
      (WebCore::SetIndexesReadyOperation::perform):
      (WebCore::OpenCursorOperation::perform):
      (WebCore::CountOperation::perform):
      (WebCore::DeleteRangeOperation::perform):
      (WebCore::ClearObjectStoreOperation::perform):
      (WebCore::DeleteObjectStoreOperation::perform):
      (WebCore::IDBDatabaseBackend::VersionChangeOperation::perform):
      (WebCore::CreateObjectStoreAbortOperation::perform):
      
      Add accessors to each operation’s data members so the IDBServerConnection has everything it needs:
      * Modules/indexeddb/IDBTransactionBackendOperations.h:
      (WebCore::CreateObjectStoreOperation::objectStoreMetadata):
      (WebCore::DeleteObjectStoreOperation::objectStoreMetadata):
      (WebCore::IDBDatabaseBackend::VersionChangeOperation::create):
      (WebCore::IDBDatabaseBackend::VersionChangeOperation::version):
      (WebCore::IDBDatabaseBackend::VersionChangeOperation::callbacks):
      (WebCore::IDBDatabaseBackend::VersionChangeOperation::databaseCallbacks):
      (WebCore::IDBDatabaseBackend::VersionChangeOperation::VersionChangeOperation):
      (WebCore::CreateObjectStoreAbortOperation::CreateObjectStoreAbortOperation):
      (WebCore::CreateIndexOperation::objectStoreID):
      (WebCore::CreateIndexOperation::idbIndexMetadata):
      (WebCore::CreateIndexOperation::CreateIndexOperation):
      (WebCore::CreateIndexAbortOperation::CreateIndexAbortOperation):
      (WebCore::DeleteIndexOperation::objectStoreID):
      (WebCore::DeleteIndexOperation::idbIndexMetadata):
      (WebCore::DeleteIndexOperation::DeleteIndexOperation):
      (WebCore::DeleteIndexAbortOperation::DeleteIndexAbortOperation):
      (WebCore::GetOperation::objectStoreID):
      (WebCore::GetOperation::indexID):
      (WebCore::GetOperation::cursorType):
      (WebCore::GetOperation::keyRange):
      (WebCore::GetOperation::callbacks):
      (WebCore::GetOperation::autoIncrement):
      (WebCore::GetOperation::keyPath):
      (WebCore::GetOperation::GetOperation):
      (WebCore::PutOperation::create):
      (WebCore::PutOperation::putMode):
      (WebCore::PutOperation::objectStore):
      (WebCore::PutOperation::key):
      (WebCore::PutOperation::indexIDs):
      (WebCore::PutOperation::indexKeys):
      (WebCore::PutOperation::callbacks):
      (WebCore::PutOperation::value):
      (WebCore::PutOperation::PutOperation):
      (WebCore::OpenCursorOperation::create):
      (WebCore::OpenCursorOperation::objectStoreID):
      (WebCore::OpenCursorOperation::indexID):
      (WebCore::OpenCursorOperation::direction):
      (WebCore::OpenCursorOperation::cursorType):
      (WebCore::OpenCursorOperation::taskType):
      (WebCore::OpenCursorOperation::keyRange):
      (WebCore::OpenCursorOperation::cursorDirection):
      (WebCore::OpenCursorOperation::callbacks):
      (WebCore::OpenCursorOperation::OpenCursorOperation):
      (WebCore::CountOperation::create):
      (WebCore::CountOperation::objectStoreID):
      (WebCore::CountOperation::indexID):
      (WebCore::CountOperation::keyRange):
      (WebCore::CountOperation::callbacks):
      (WebCore::CountOperation::CountOperation):
      (WebCore::DeleteRangeOperation::create):
      (WebCore::DeleteRangeOperation::objectStoreID):
      (WebCore::DeleteRangeOperation::callbacks):
      (WebCore::DeleteRangeOperation::keyRange):
      (WebCore::DeleteRangeOperation::DeleteRangeOperation):
      (WebCore::ClearObjectStoreOperation::create):
      (WebCore::ClearObjectStoreOperation::objectStoreID):
      (WebCore::ClearObjectStoreOperation::callbacks):
      (WebCore::ClearObjectStoreOperation::ClearObjectStoreOperation):
      
      Implement each operation in terms of the appropriate backing store, then perform the callback:
      * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
      (WebCore::IDBServerConnectionLevelDB::createObjectStore):
      (WebCore::IDBServerConnectionLevelDB::createIndex):
      (WebCore::IDBServerConnectionLevelDB::deleteIndex):
      (WebCore::IDBServerConnectionLevelDB::get):
      (WebCore::IDBServerConnectionLevelDB::put):
      (WebCore::IDBServerConnectionLevelDB::openCursor):
      (WebCore::IDBServerConnectionLevelDB::count):
      (WebCore::IDBServerConnectionLevelDB::deleteRange):
      (WebCore::IDBServerConnectionLevelDB::clearObjectStore):
      (WebCore::IDBServerConnectionLevelDB::deleteObjectStore):
      (WebCore::IDBServerConnectionLevelDB::changeDatabaseVersion):
      * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.h:
      
      * WebCore.xcodeproj/project.pbxproj:
      
      Source/WebKit2:
      
      * WebProcess/Databases/IndexedDB/WebProcessIDBDatabaseBackend.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159353 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      05a35ca3
    • commit-queue@webkit.org's avatar
      Modifying RTCIceCandidate object construction to match the spec · a1366a09
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=124369
      
      Patch by Thiago de Barros Lacerda <thiago.lacerda@openbossa.org> on 2013-11-15
      Reviewed by Eric Carlson.
      
      According to the spec the RTCIceCandidateInit parameter in RTCSessionDescription constructor is optional,
      which must not be nullable, and, if passed, must be a valid Dictionary. If the keys are not present, the string
      object that stores them in the RTCIceCandidate class, must be null in those cases. Also, if a key is present
      and its value is not valid an exception must be raised.
      
      Source/WebCore:
      
      Existing test was updated.
      
      * GNUmakefile.list.am:
      * Modules/mediastream/RTCIceCandidate.cpp:
      (WebCore::RTCIceCandidate::create):
      * Modules/mediastream/RTCIceCandidate.idl:
      * UseJSC.cmake:
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.vcxproj/WebCore.vcxproj.filters:
      * WebCore.xcodeproj/project.pbxproj:
      * bindings/js/JSRTCIceCandidateCustom.cpp: Added.
      (WebCore::JSRTCIceCandidateConstructor::constructJSRTCIceCandidate):
      
      LayoutTests:
      
      * fast/mediastream/RTCIceCandidate-expected.txt:
      * fast/mediastream/RTCIceCandidate.html:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159349 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a1366a09
  7. 13 Nov, 2013 3 commits
    • beidson@apple.com's avatar
      Move setIndexKeys() to the IDBServerConnection · 381c7f71
      beidson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=124301
      
      Reviewed by Anders Carlsson.
      
      This is a big step towards moving knowledge of the backing store out of the frontend.
      
      * Modules/indexeddb/IDBBackingStoreInterface.h:
      
      * Modules/indexeddb/IDBDatabaseBackend.cpp:
      (WebCore::IDBDatabaseBackend::setIndexKeys):
      
      * Modules/indexeddb/IDBServerConnection.h:
      * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
      (WebCore::IDBServerConnectionLevelDB::setIndexKeys):
      * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.h:
      
      * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
      (WebCore::PutOperation::perform):
      
      * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
      (WebCore::IDBBackingStoreLevelDB::makeIndexWriters):
      * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159245 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      381c7f71
    • commit-queue@webkit.org's avatar
      Modifying RTCSessionDescription object construction to match the spec · 53a006ec
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=124212
      
      Patch by Thiago de Barros Lacerda <thiago.lacerda@openbossa.org> on 2013-11-13
      Reviewed by Eric Carlson.
      
      According to the spec the RTCSessionDescriptionInit parameter in RTCSessionDescription constructor is optional,
      which must not be nullable. If the 'type' and/or 'sdp' keys are not present, the string object that stores
      them in the RTCSessionDescription class, must be null in those cases. Also, if an object that is not a
      Dictionary is passed as argument to the constructor, an exception must be raised.
      
      Source/WebCore:
      
      Existing test was updated.
      
      * GNUmakefile.list.am:
      * Modules/mediastream/RTCSessionDescription.cpp:
      (WebCore::RTCSessionDescription::create):
      * Modules/mediastream/RTCSessionDescription.idl:
      * UseJSC.cmake:
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.vcxproj/WebCore.vcxproj.filters:
      * WebCore.xcodeproj/project.pbxproj:
      * bindings/js/JSRTCSessionDescriptionCustom.cpp: Added.
      (WebCore::JSRTCSessionDescriptionConstructor::constructJSRTCSessionDescription):
      
      LayoutTests:
      
      * fast/mediastream/RTCSessionDescription-expected.txt:
      * fast/mediastream/RTCSessionDescription.html:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159230 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      53a006ec
    • jer.noble@apple.com's avatar
      Add support for HTMLMediaElement.fastSeek() · e679a9d6
      jer.noble@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=124262
      
      Reviewed by Eric Carlson.
      
      Source/WebCore:
      
      Test: media/video-fast-seek.html
      
      Add the fastSeek() method to HTMLMediaElement, and use fastSeek() in
      the JavaScript media controls.
      
      Add the new fastSeek() method:
      * html/HTMLMediaElement.cpp:
      (HTMLMediaElement::fastSeek): Call seekWithTolerance.
      (HTMLMediaElement::seek): Call seekWithTolerance with 0 tolerance.
      (HTMLMediaElement::seekWithTolerance): Renamed from seek().
      * html/HTMLMediaElement.h:
      * html/HTMLMediaElement.idl:
      
      Add seekWithTolerance() to MediaPlayer:
      * platform/graphics/MediaPlayer.cpp:
      (WebCore::MediaPlayer::seekWithTolerance): Pass to MediaPlayerPrivate.
      * platform/graphics/MediaPlayer.h:
      * platform/graphics/MediaPlayerPrivate.h:
      (WebCore::MediaPlayerPrivateInterface::seekWithTolerance): Default implementation which
          calls seek().
      * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
      (WebCore::MediaPlayerPrivateAVFoundation::seek): Call seekWithTolerance with 0 tolerance.
      (WebCore::MediaPlayerPrivateAVFoundation::seekWithTolerance): Renamed from seek().
      * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
      * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
      * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
      (WebCore::MediaPlayerPrivateAVFoundationObjC::seekToTime): Take tolerance parameters.
      
      Use the new fastSeek() method while actively scrubbing.
      * Modules/mediacontrols/mediaControlsApple.js:
      (Controller.prototype.createControls): Add mouse up and down handlers.
      (Controller.prototype.handleTimeUpdate): Only update the timeline when not scrubbing.
      (Controller.prototype.handleTimelineChange): Use fastSeek().
      (Controller.prototype.handleTimelineMouseDown): Start scrubbing.
      (Controller.prototype.handleTimelineMouseUp): Stop scrubbing.
      
      LayoutTests:
      
      * media/video-fast-seek-expected.txt: Added.
      * media/video-fast-seek.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159208 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e679a9d6
  8. 12 Nov, 2013 2 commits
    • beidson@apple.com's avatar
      Move basic IDBBackingStoreTransaction operations to IDBServerConnection · 26d801bb
      beidson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=124244
      
      Reviewed by Tim Horton (and unofficially Anders Carlsson).
      
      This patch:
      - Makes IDBBackingStore the owner of an IDBBackingStoreTransaction.
      - Adds the integer transaction ID to IDBBackingStoreTransaction for reference.
      - Removes IDBTransactionBackend’s reliance on IDBBackingStoreTransaction by moving
        necessary methods to IDBServerConnection.
      - Renames the IDBTransactionBackend::backingStoreTransaction() accessor to
        deprecatedBackingStoreTransaction to make it clear it’s on the way out.
      
      * Modules/indexeddb/IDBBackingStoreInterface.h:
      
      * Modules/indexeddb/IDBDatabaseBackend.cpp:
      (WebCore::IDBDatabaseBackend::setIndexKeys):
      
      * Modules/indexeddb/IDBServerConnection.h:
      
      * Modules/indexeddb/IDBTransactionBackend.cpp:
      (WebCore::IDBTransactionBackend::IDBTransactionBackend):
      (WebCore::IDBTransactionBackend::~IDBTransactionBackend):
      (WebCore::IDBTransactionBackend::deprecatedBackingStoreTransaction):
      (WebCore::IDBTransactionBackend::scheduleTask):
      (WebCore::IDBTransactionBackend::abort):
      (WebCore::IDBTransactionBackend::commit):
      (WebCore::IDBTransactionBackend::taskTimerFired):
      * Modules/indexeddb/IDBTransactionBackend.h:
      
      * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
      (WebCore::CreateObjectStoreOperation::perform):
      (WebCore::CreateIndexOperation::perform):
      (WebCore::DeleteIndexOperation::perform):
      (WebCore::GetOperation::perform):
      (WebCore::PutOperation::perform):
      (WebCore::OpenCursorOperation::perform):
      (WebCore::CountOperation::perform):
      (WebCore::DeleteRangeOperation::perform):
      (WebCore::ClearOperation::perform):
      (WebCore::DeleteObjectStoreOperation::perform):
      (WebCore::IDBDatabaseBackend::VersionChangeOperation::perform):
      
      * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
      (WebCore::IDBBackingStoreLevelDB::makeIndexWriters):
      (WebCore::IDBBackingStoreLevelDB::generateKey):
      (WebCore::IDBBackingStoreLevelDB::updateKeyGenerator):
      (WebCore::IDBBackingStoreLevelDB::establishBackingStoreTransaction):
      (WebCore::IDBBackingStoreLevelDB::deprecatedBackingStoreTransaction):
      (WebCore::IDBBackingStoreLevelDB::removeBackingStoreTransaction):
      * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
      
      * Modules/indexeddb/leveldb/IDBBackingStoreTransactionLevelDB.cpp:
      (WebCore::IDBBackingStoreTransactionLevelDB::IDBBackingStoreTransactionLevelDB):
      (WebCore::IDBBackingStoreTransactionLevelDB::~IDBBackingStoreTransactionLevelDB):
      (WebCore::IDBBackingStoreTransactionLevelDB::resetTransaction):
      * Modules/indexeddb/leveldb/IDBBackingStoreTransactionLevelDB.h:
      
      * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
      (WebCore::IDBServerConnectionLevelDB::IDBServerConnectionLevelDB):
      (WebCore::IDBServerConnectionLevelDB::deprecatedBackingStoreTransaction):
      (WebCore::IDBServerConnectionLevelDB::openTransaction):
      (WebCore::IDBServerConnectionLevelDB::beginTransaction):
      (WebCore::IDBServerConnectionLevelDB::commitTransaction):
      (WebCore::IDBServerConnectionLevelDB::resetTransaction):
      (WebCore::IDBServerConnectionLevelDB::rollbackTransaction):
      * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159177 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      26d801bb
    • beidson@apple.com's avatar
      Introduce IDBServerConnection (and start moving things to it). · d37cec23
      beidson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=124193
      
      Reviewed by Alexey Proskuryakov.
      
      IDBServerConnection will be a purely asynchronous interface for database connections, transactions, and cursors.
      Its interface will be 100% asynchronous and callback based - Perfect for an IPC divide.
      Eventually none of the IDB<Foo>Backend classes will need IDBBackingStore<Foo> classes at all,
      and they’ll all use IDBServerConnection directly.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * WebCore.xcodeproj/project.pbxproj:
      
      * Modules/indexeddb/IDBServerConnection.h: Added.
      (WebCore::IDBServerConnection::~IDBServerConnection):
      
      Concrete implementation that - for now - wraps an IDBBackingStoreLevelDB:
      * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp: Added.
      (WebCore::IDBServerConnectionLevelDB::IDBServerConnectionLevelDB):
      (WebCore::IDBServerConnectionLevelDB::deprecatedBackingStore):
      (WebCore::IDBServerConnectionLevelDB::isClosed):
      (WebCore::IDBServerConnectionLevelDB::getOrEstablishIDBDatabaseMetadata):
      (WebCore::IDBServerConnectionLevelDB::deleteDatabase):
      (WebCore::IDBServerConnectionLevelDB::close):
      * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.h: Added.
      
      LevelDB created databases get LevelDB server connections:
      * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
      (WebCore::IDBFactoryBackendLevelDB::deleteDatabase):
      (WebCore::IDBFactoryBackendLevelDB::open):
      
      Replace most uses of IDBBackingStore with server connection:
      * Modules/indexeddb/IDBDatabaseBackend.cpp:
      (WebCore::IDBDatabaseBackend::create):
      (WebCore::IDBDatabaseBackend::IDBDatabaseBackend):
      (WebCore::IDBDatabaseBackend::openInternalAsync):
      (WebCore::IDBDatabaseBackend::setIndexKeys):
      (WebCore::IDBDatabaseBackend::openConnectionInternal):
      (WebCore::IDBDatabaseBackend::deleteDatabaseAsync):
      (WebCore::IDBDatabaseBackend::close):
      * Modules/indexeddb/IDBDatabaseBackend.h:
      (WebCore::IDBDatabaseBackend::serverConnection):
      
      Change all the operations to access their DatabaseBackend’s server connection instead
      if hanging on to a backing store directly:
      * Modules/indexeddb/IDBTransactionBackend.cpp:
      (WebCore::IDBTransactionBackend::IDBTransactionBackend):
      (WebCore::IDBTransactionBackend::scheduleCreateObjectStoreOperation):
      (WebCore::IDBTransactionBackend::scheduleDeleteObjectStoreOperation):
      (WebCore::IDBTransactionBackend::scheduleCreateIndexOperation):
      (WebCore::IDBTransactionBackend::scheduleDeleteIndexOperation):
      (WebCore::IDBTransactionBackend::scheduleGetOperation):
      (WebCore::IDBTransactionBackend::schedulePutOperation):
      (WebCore::IDBTransactionBackend::scheduleOpenCursorOperation):
      (WebCore::IDBTransactionBackend::scheduleCountOperation):
      (WebCore::IDBTransactionBackend::scheduleDeleteRangeOperation):
      (WebCore::IDBTransactionBackend::scheduleClearOperation):
      * Modules/indexeddb/IDBTransactionBackend.h:
      
      * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
      (WebCore::CreateObjectStoreOperation::perform):
      (WebCore::CreateIndexOperation::perform):
      (WebCore::DeleteIndexOperation::perform):
      (WebCore::GetOperation::perform):
      (WebCore::PutOperation::perform):
      (WebCore::OpenCursorOperation::perform):
      (WebCore::CountOperation::perform):
      (WebCore::DeleteRangeOperation::perform):
      (WebCore::ClearOperation::perform):
      (WebCore::DeleteObjectStoreOperation::perform):
      (WebCore::IDBDatabaseBackend::VersionChangeOperation::perform):
      * Modules/indexeddb/IDBTransactionBackendOperations.h:
      (WebCore::CreateObjectStoreOperation::create):
      (WebCore::CreateObjectStoreOperation::CreateObjectStoreOperation):
      (WebCore::DeleteObjectStoreOperation::create):
      (WebCore::DeleteObjectStoreOperation::DeleteObjectStoreOperation):
      (WebCore::CreateIndexOperation::create):
      (WebCore::CreateIndexOperation::CreateIndexOperation):
      (WebCore::DeleteIndexOperation::create):
      (WebCore::DeleteIndexOperation::DeleteIndexOperation):
      (WebCore::GetOperation::create):
      (WebCore::GetOperation::GetOperation):
      (WebCore::PutOperation::create):
      (WebCore::PutOperation::PutOperation):
      (WebCore::OpenCursorOperation::create):
      (WebCore::OpenCursorOperation::OpenCursorOperation):
      (WebCore::CountOperation::create):
      (WebCore::CountOperation::CountOperation):
      (WebCore::DeleteRangeOperation::create):
      (WebCore::DeleteRangeOperation::DeleteRangeOperation):
      (WebCore::ClearOperation::create):
      (WebCore::ClearOperation::ClearOperation):
      * Modules/indexeddb/IDBTransactionCoordinator.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159144 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d37cec23
  9. 11 Nov, 2013 3 commits
    • beidson@apple.com's avatar
      Make IDBTransaction tasks asynchronous · f596c75a
      beidson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=124183
      
      Reviewed by Tim Horton.
      
      This is an almost zero-change in behavior.
      
      The one thing that is different is that previously, IDBTransactionBackends would synchronously
      run through their entire set of IDBOperation’s without ever returning control to the runloop.
      
      Now, they start one task and then wait for its completion to schedule the start of the next task.
      
      Change IDBOperation’s perform() to take a completion handler so it can be asynchronous.
      Add an IDBSynchronousOperation class to handle "Abort" tasks, which never need to perform i/o
      and therefore can be entirely synchronous.
      * Modules/indexeddb/IDBOperation.h:
      (WebCore::IDBSynchronousOperation::~IDBSynchronousOperation):
      
      * Modules/indexeddb/IDBTransactionBackend.cpp:
      (WebCore::IDBTransactionBackend::scheduleTask): "Abort tasks" are now IDBSynchronousOperations.
      (WebCore::IDBTransactionBackend::abort):
      (WebCore::IDBTransactionBackend::taskTimerFired): Instead of running through the entire set of tasks,
        perform a single task asynchronously. The completion handler for the task will reset the task timer
        to asynchronously start the next task.
      * Modules/indexeddb/IDBTransactionBackend.h:
      (WebCore::IDBTransactionBackend::scheduleTask): "Abort tasks" are now IDBSynchronousOperations.
      
      Update all operations to take completion handlers.
      For now, perform things synchronously like before, calling the completion handler when complete.
      * Modules/indexeddb/IDBCursorBackend.cpp:
      (WebCore::CallOnDestruct::CallOnDestruct): Helper class to make sure completion callbacks are always called perform() exits.
      (WebCore::CallOnDestruct::~CallOnDestruct):
      (WebCore::IDBCursorBackend::CursorIterationOperation::create):
      (WebCore::IDBCursorBackend::CursorAdvanceOperation::create):
      (WebCore::IDBCursorBackend::CursorPrefetchIterationOperation::create):
      (WebCore::IDBCursorBackend::CursorAdvanceOperation::perform):
      (WebCore::IDBCursorBackend::CursorIterationOperation::perform):
      (WebCore::IDBCursorBackend::CursorPrefetchIterationOperation::perform):
      
      * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
      (WebCore::CallOnDestruct::CallOnDestruct): Helper class to make sure completion callbacks are always called when perform() exits.
      (WebCore::CallOnDestruct::~CallOnDestruct):
      (WebCore::CreateObjectStoreOperation::perform):
      (WebCore::CreateIndexOperation::perform):
      (WebCore::DeleteIndexOperation::perform):
      (WebCore::GetOperation::perform):
      (WebCore::PutOperation::perform):
      (WebCore::SetIndexesReadyOperation::perform):
      (WebCore::OpenCursorOperation::perform):
      (WebCore::CountOperation::perform):
      (WebCore::DeleteRangeOperation::perform):
      (WebCore::ClearOperation::perform):
      (WebCore::DeleteObjectStoreOperation::perform):
      (WebCore::IDBDatabaseBackend::VersionChangeOperation::perform):
      
      * Modules/indexeddb/IDBTransactionBackendOperations.h:
      (WebCore::CreateObjectStoreOperation::create):
      (WebCore::DeleteObjectStoreOperation::create):
      (WebCore::IDBDatabaseBackend::VersionChangeOperation::create):
      (WebCore::CreateObjectStoreAbortOperation::create):
      (WebCore::DeleteObjectStoreAbortOperation::create):
      (WebCore::IDBDatabaseBackend::VersionChangeAbortOperation::create):
      (WebCore::CreateIndexOperation::create):
      (WebCore::CreateIndexAbortOperation::create):
      (WebCore::DeleteIndexOperation::create):
      (WebCore::DeleteIndexAbortOperation::create):
      (WebCore::GetOperation::create):
      (WebCore::PutOperation::create):
      (WebCore::SetIndexesReadyOperation::create):
      (WebCore::OpenCursorOperation::create):
      (WebCore::CountOperation::create):
      (WebCore::DeleteRangeOperation::create):
      (WebCore::ClearOperation::create):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159095 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f596c75a
    • beidson@apple.com's avatar
      Make IDBBackingStoreTransaction be RefCounted · ce8b1f89
      beidson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=124168
      
      Reviewed by Tim Horton.
      
      This is necessarily to safely add a fully asynchronous interface into the IDB mechanism.
      
      * Modules/indexeddb/IDBBackingStoreInterface.h:
      * Modules/indexeddb/IDBBackingStoreTransactionInterface.h:
      * Modules/indexeddb/IDBTransactionBackend.h:
      
      * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
      (WebCore::IDBBackingStoreLevelDB::createBackingStoreTransaction):
      * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
      * Modules/indexeddb/leveldb/IDBBackingStoreTransactionLevelDB.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159072 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ce8b1f89
    • zandobersek@gmail.com's avatar
      Remove the OperationsNotDeletable attribute from most of the WebIDL interfaces · d5961560
      zandobersek@gmail.com authored
      https://bugs.webkit.org/show_bug.cgi?id=124151
      
      Reviewed by Geoffrey Garen.
      
      The OperationsNotDeletable attribute currently doesn't have any effect, but will soon enforce
      non-configurability of operations on the interface that uses the attribute. Non-configurability
      of operations is the default behavior at the moment, but will be changed to follow the WebIDL
      specification which requires that the operations are configurable (i.e. -- in JSC terms -- deletable).
      IE and Firefox already exhibit this behavior in the majority of cases, while Chrome and Opera don't.
      
      The attribute remains in use on the Location interface to mimic the Unforgeable attribute which
      also makes operations of an interface non-configurable. Unforgeable attribute will be used instead
      when support for it will be added to the JSC bindings generator.
      
      * Modules/battery/BatteryManager.idl:
      * Modules/encryptedmedia/MediaKeySession.idl:
      * Modules/encryptedmedia/MediaKeys.idl:
      * Modules/gamepad/GamepadList.idl:
      * Modules/geolocation/Geolocation.idl:
      * Modules/indexeddb/IDBCursor.idl:
      * Modules/indexeddb/IDBDatabase.idl:
      * Modules/indexeddb/IDBFactory.idl:
      * Modules/indexeddb/IDBIndex.idl:
      * Modules/indexeddb/IDBKeyRange.idl:
      * Modules/indexeddb/IDBObjectStore.idl:
      * Modules/indexeddb/IDBTransaction.idl:
      * Modules/indexeddb/IDBVersionChangeEvent.idl:
      * Modules/mediacontrols/MediaControlsHost.idl:
      * Modules/mediasource/MediaSource.idl:
      * Modules/mediasource/SourceBuffer.idl:
      * Modules/mediasource/SourceBufferList.idl:
      * Modules/mediastream/MediaStream.idl:
      * Modules/mediastream/MediaStreamTrack.idl:
      * Modules/mediastream/RTCDTMFSender.idl:
      * Modules/mediastream/RTCDataChannel.idl:
      * Modules/mediastream/RTCPeerConnection.idl:
      * Modules/mediastream/RTCStatsReport.idl:
      * Modules/mediastream/RTCStatsResponse.idl:
      * Modules/networkinfo/NetworkInfoConnection.idl:
      * Modules/notifications/Notification.idl:
      * Modules/notifications/NotificationCenter.idl:
      * Modules/proximity/DeviceProximityEvent.idl:
      * Modules/quota/StorageInfo.idl:
      * Modules/quota/StorageQuota.idl:
      * Modules/speech/SpeechGrammarList.idl:
      * Modules/speech/SpeechRecognition.idl:
      * Modules/speech/SpeechRecognitionResult.idl:
      * Modules/speech/SpeechRecognitionResultList.idl:
      * Modules/speech/SpeechSynthesis.idl:
      * Modules/webaudio/AnalyserNode.idl:
      * Modules/webaudio/AudioBuffer.idl:
      * Modules/webaudio/AudioBufferSourceNode.idl:
      * Modules/webaudio/AudioContext.idl:
      * Modules/webaudio/AudioListener.idl:
      * Modules/webaudio/AudioNode.idl:
      * Modules/webaudio/AudioParam.idl:
      * Modules/webaudio/BiquadFilterNode.idl:
      * Modules/webaudio/OscillatorNode.idl:
      * Modules/webaudio/PannerNode.idl:
      * Modules/webdatabase/Database.idl:
      * Modules/webdatabase/DatabaseSync.idl:
      * Modules/webdatabase/SQLResultSetRowList.idl:
      * Modules/webdatabase/SQLTransaction.idl:
      * Modules/webdatabase/SQLTransactionSync.idl:
      * Modules/websockets/WebSocket.idl:
      * crypto/CryptoKey.idl:
      * crypto/SubtleCrypto.idl:
      * css/CSSHostRule.idl:
      * css/CSSMediaRule.idl:
      * css/CSSPrimitiveValue.idl:
      * css/CSSRuleList.idl:
      * css/CSSStyleDeclaration.idl:
      * css/CSSStyleSheet.idl:
      * css/CSSSupportsRule.idl:
      * css/CSSValueList.idl:
      * css/DOMWindowCSS.idl:
      * css/FontLoader.idl:
      * css/MediaList.idl:
      * css/MediaQueryList.idl:
      * css/MediaQueryListListener.idl:
      * css/StyleMedia.idl:
      * css/StyleSheet.idl:
      * css/StyleSheetList.idl:
      * css/WebKitCSSFilterValue.idl:
      * css/WebKitCSSKeyframesRule.idl:
      * css/WebKitCSSMatrix.idl:
      * css/WebKitCSSTransformValue.idl:
      * dom/CharacterData.idl:
      * dom/ChildNode.idl:
      * dom/ClientRectList.idl:
      * dom/Clipboard.idl:
      * dom/CompositionEvent.idl:
      * dom/CustomEvent.idl:
      * dom/DOMCoreException.idl:
      * dom/DOMImplementation.idl:
      * dom/DOMNamedFlowCollection.idl:
      * dom/DOMStringList.idl:
      * dom/DOMStringMap.idl:
      * dom/DataTransferItem.idl:
      * dom/DataTransferItemList.idl:
      * dom/DeviceMotionEvent.idl:
      * dom/DeviceOrientationEvent.idl:
      * dom/Document.idl:
      * dom/DocumentFragment.idl:
      * dom/DocumentType.idl:
      * dom/Element.idl:
      * dom/Event.idl:
      * dom/EventException.idl:
      * dom/EventListener.idl:
      * dom/EventTarget.idl:
      * dom/HashChangeEvent.idl:
      * dom/KeyboardEvent.idl:
      * dom/MessageEvent.idl:
      * dom/MessagePort.idl:
      * dom/MouseEvent.idl:
      * dom/MutationEvent.idl:
      * dom/MutationObserver.idl:
      * dom/NamedNodeMap.idl:
      * dom/Node.idl:
      * dom/NodeFilter.idl:
      * dom/NodeIterator.idl:
      * dom/NodeList.idl:
      * dom/Range.idl:
      * dom/RangeException.idl:
      * dom/ShadowRoot.idl:
      * dom/Text.idl:
      * dom/TextEvent.idl:
      * dom/TouchEvent.idl:
      * dom/TouchList.idl:
      * dom/TreeWalker.idl:
      * dom/UIEvent.idl:
      * dom/WebKitNamedFlow.idl:
      * dom/WheelEvent.idl:
      * fileapi/Blob.idl:
      * fileapi/FileException.idl:
      * fileapi/FileList.idl:
      * fileapi/FileReader.idl:
      * fileapi/FileReaderSync.idl:
      * html/DOMFormData.idl:
      * html/DOMSettableTokenList.idl:
      * html/DOMTokenList.idl:
      * html/DOMURL.idl:
      * html/HTMLAllCollection.idl:
      * html/HTMLAnchorElement.idl:
      * html/HTMLButtonElement.idl:
      * html/HTMLCanvasElement.idl:
      * html/HTMLCollection.idl:
      * html/HTMLDocument.idl:
      * html/HTMLElement.idl:
      * html/HTMLEmbedElement.idl:
      * html/HTMLFieldSetElement.idl:
      * html/HTMLFormControlsCollection.idl:
      * html/HTMLFormElement.idl:
      * html/HTMLFrameElement.idl:
      * html/HTMLIFrameElement.idl:
      * html/HTMLInputElement.idl:
      * html/HTMLKeygenElement.idl:
      * html/HTMLMarqueeElement.idl:
      * html/HTMLMediaElement.idl:
      * html/HTMLObjectElement.idl:
      * html/HTMLOptionsCollection.idl:
      * html/HTMLOutputElement.idl:
      * html/HTMLSelectElement.idl:
      * html/HTMLTableElement.idl:
      * html/HTMLTableRowElement.idl:
      * html/HTMLTableSectionElement.idl:
      * html/HTMLTextAreaElement.idl:
      * html/HTMLVideoElement.idl:
      * html/MediaController.idl:
      * html/RadioNodeList.idl:
      * html/TimeRanges.idl:
      * html/canvas/CanvasGradient.idl:
      * html/canvas/CanvasRenderingContext2D.idl:
      * html/canvas/DOMPath.idl:
      * html/canvas/EXTDrawBuffers.idl:
      * html/canvas/OESVertexArrayObject.idl:
      * html/canvas/WebGLDebugShaders.idl:
      * html/canvas/WebGLLoseContext.idl:
      * html/canvas/WebGLRenderingContext.idl:
      * html/track/AudioTrackList.idl:
      * html/track/TextTrack.idl:
      * html/track/TextTrackCue.idl:
      * html/track/TextTrackCueList.idl:
      * html/track/TextTrackList.idl:
      * html/track/TextTrackRegionList.idl:
      * html/track/VideoTrackList.idl:
      * loader/appcache/DOMApplicationCache.idl:
      * page/Console.idl:
      * page/Crypto.idl:
      * page/DOMSecurityPolicy.idl:
      * page/DOMSelection.idl:
      * page/DOMWindow.idl:
      * page/EventSource.idl:
      * page/History.idl:
      * page/Navigator.idl:
      * page/Performance.idl:
      * page/PerformanceEntryList.idl:
      * page/SpeechInputResultList.idl:
      * page/WindowBase64.idl:
      * page/WindowTimers.idl:
      * plugins/DOMMimeTypeArray.idl:
      * plugins/DOMPlugin.idl:
      * plugins/DOMPluginArray.idl:
      * storage/Storage.idl:
      * storage/StorageEvent.idl:
      * svg/SVGAngle.idl:
      * svg/SVGAnimationElement.idl:
      * svg/SVGColor.idl:
      * svg/SVGCursorElement.idl:
      * svg/SVGDocument.idl:
      * svg/SVGElement.idl:
      * svg/SVGElementInstanceList.idl:
      * svg/SVGException.idl:
      * svg/SVGFEDropShadowElement.idl:
      * svg/SVGFEGaussianBlurElement.idl:
      * svg/SVGFEMorphologyElement.idl:
      * svg/SVGFilterElement.idl:
      * svg/SVGGraphicsElement.idl:
      * svg/SVGLength.idl:
      * svg/SVGLengthList.idl:
      * svg/SVGMarkerElement.idl:
      * svg/SVGMaskElement.idl:
      * svg/SVGMatrix.idl:
      * svg/SVGNumberList.idl:
      * svg/SVGPaint.idl:
      * svg/SVGPathElement.idl:
      * svg/SVGPathSegList.idl:
      * svg/SVGPatternElement.idl:
      * svg/SVGPoint.idl:
      * svg/SVGPointList.idl:
      * svg/SVGSVGElement.idl:
      * svg/SVGStringList.idl:
      * svg/SVGTests.idl:
      * svg/SVGTextContentElement.idl:
      * svg/SVGTransform.idl:
      * svg/SVGTransformList.idl:
      * workers/DedicatedWorkerGlobalScope.idl:
      * workers/Worker.idl:
      * workers/WorkerGlobalScope.idl:
      * workers/WorkerLocation.idl:
      * xml/DOMParser.idl:
      * xml/XMLHttpRequest.idl:
      * xml/XMLHttpRequestException.idl:
      * xml/XMLHttpRequestUpload.idl:
      * xml/XMLSerializer.idl:
      * xml/XPathEvaluator.idl:
      * xml/XPathException.idl:
      * xml/XPathExpression.idl:
      * xml/XPathNSResolver.idl:
      * xml/XPathResult.idl:
      * xml/XSLTProcessor.idl:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159061 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d5961560
  10. 08 Nov, 2013 5 commits
    • beidson@apple.com's avatar
      Merge IDBDatabaseBackendInterface and IDBDatabaseBackendImpl · 7b14f470
      beidson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=124088
      
      Source/WebCore:
      
      Reviewed by Tim Horton.
      
      Source/WebKit2:
      
      Reviewed by Tim Horton.
      
      This abstraction is no longer meaningful in its current form in WebCore.
      The current groundwork for the WK2 DatabaseProcess relied on this abstraction,
      but that will be reworked in a future patch.
      
      * DatabaseProcess/IndexedDB/DatabaseProcessIDBDatabaseBackend.h:
      
      * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
      (WebKit::WebIDBFactoryBackend::maybeCreateTransactionBackend):
      (WebKit::WebIDBFactoryBackend::createCursorBackend):
      * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.h:
      
      * WebProcess/Databases/IndexedDB/WebProcessIDBDatabaseBackend.cpp:
      (WebKit::WebProcessIDBDatabaseBackend::put):
      (WebKit::WebProcessIDBDatabaseBackend::openCursor):
      * WebProcess/Databases/IndexedDB/WebProcessIDBDatabaseBackend.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158992 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7b14f470
    • beidson@apple.com's avatar
      Merge IDBTransactionBackendInterface and IDBTransactionBackendImpl · 37036791
      beidson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=124077
      
      Reviewed by Alexey Proskuryakov.
      
      Source/WebCore:
      
      The abstraction is no longer needed.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * WebCore.xcodeproj/project.pbxproj:
      
      * Modules/indexeddb/IDBTransactionBackendInterface.h: Removed.
      
      * Modules/indexeddb/IDBTransactionBackend.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionBackendImpl.cpp.
      * Modules/indexeddb/IDBTransactionBackend.h: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionBackendImpl.h.
      
      * Modules/indexeddb/IDBBackingStoreInterface.h:
      * Modules/indexeddb/IDBCursorBackend.cpp:
      * Modules/indexeddb/IDBCursorBackend.h:
      * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
      * Modules/indexeddb/IDBDatabaseBackendImpl.h:
      * Modules/indexeddb/IDBFactoryBackendInterface.h:
      * Modules/indexeddb/IDBTransactionBackendOperations.h:
      * Modules/indexeddb/IDBTransactionCoordinator.cpp:
      * Modules/indexeddb/IDBTransactionCoordinator.h:
      * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
      * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
      * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
      * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
      
      Source/WebKit2:
      
      * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
      * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158969 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      37036791
    • commit-queue@webkit.org's avatar
      Checking for TypeError in RTCPeerConnection object creation · 9d56fba8
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=124049
      
      Patch by Thiago de Barros Lacerda <thiago.lacerda@openbossa.org> on 2013-11-08
      Reviewed by Eric Carlson.
      
      Source/WebCore:
      
      If invalid parameters are passed on RTCPeerConnection creation we must throw a TypeError exception.
      According to the spec it requires a Dictionary argument, the RTCConfiguration, which is mandatory.
      
      Please notice that this patch does not make every tests run as expected,
      RTCPeerConnectionHandlerMock needs to be update to deal with contraints.
      
      Existing tests were updated.
      
      * GNUmakefile.list.am:
      * Modules/mediastream/RTCPeerConnection.idl:
      * UseJSC.cmake:
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.vcxproj/WebCore.vcxproj.filters:
      * WebCore.xcodeproj/project.pbxproj:
      * bindings/js/JSRTCPeerConnectionCustom.cpp: Added.
      (WebCore::JSRTCPeerConnectionConstructor::constructJSRTCPeerConnection):
      
      LayoutTests:
      
      Please notice that this patch does not make every tests run as expected,
      RTCPeerConnectionHandlerMock needs to be update to deal with contraints.
      
      * fast/mediastream/RTCPeerConnection-AddRemoveStream.html:
      * fast/mediastream/RTCPeerConnection-createAnswer.html:
      * fast/mediastream/RTCPeerConnection-createOffer.html:
      * fast/mediastream/RTCPeerConnection-datachannel.html:
      * fast/mediastream/RTCPeerConnection-dtmf.html:
      * fast/mediastream/RTCPeerConnection-events.html:
      * fast/mediastream/RTCPeerConnection-expected.txt:
      * fast/mediastream/RTCPeerConnection-ice-expected.txt:
      * fast/mediastream/RTCPeerConnection-ice.html:
      * fast/mediastream/RTCPeerConnection-localDescription.html:
      * fast/mediastream/RTCPeerConnection-onnegotiationneeded.html:
      * fast/mediastream/RTCPeerConnection-remoteDescription.html:
      * fast/mediastream/RTCPeerConnection-stats-expected.txt:
      * fast/mediastream/RTCPeerConnection-stats.html:
      * fast/mediastream/RTCPeerConnection-statsSelector-expected.txt:
      * fast/mediastream/RTCPeerConnection-statsSelector.html:
      * fast/mediastream/RTCPeerConnection.html:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158964 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9d56fba8
    • beidson@apple.com's avatar
      Merge IDBCursorBackendInterface and IDBCursorBackendImpl · 96d115ed
      beidson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=124068
      
      Reviewed by Anders Carlsson.
      
      Source/WebCore:
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * WebCore.xcodeproj/project.pbxproj:
      
      * Modules/indexeddb/IDBCursorBackendInterface.h: Removed.
      
      * Modules/indexeddb/IDBCursorBackend.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBCursorBackendImpl.cpp.
      * Modules/indexeddb/IDBCursorBackend.h: Renamed from Source/WebCore/Modules/indexeddb/IDBCursorBackendImpl.h.
      
      * Modules/indexeddb/IDBCallbacks.h:
      * Modules/indexeddb/IDBCursor.cpp:
      * Modules/indexeddb/IDBCursor.h:
      * Modules/indexeddb/IDBCursorWithValue.cpp:
      * Modules/indexeddb/IDBCursorWithValue.h:
      * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
      * Modules/indexeddb/IDBFactoryBackendInterface.h:
      * Modules/indexeddb/IDBRequest.cpp:
      * Modules/indexeddb/IDBRequest.h:
      * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
      * Modules/indexeddb/IDBTransactionBackendImpl.h:
      * Modules/indexeddb/IDBTransactionBackendInterface.h:
      * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
      * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
      * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
      
      Source/WebKit2:
      
      * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
      (WebKit::WebIDBFactoryBackend::createCursorBackend):
      * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158959 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      96d115ed
    • jer.noble@apple.com's avatar
      [MSE] Bring SourceBuffer.append up to the most recent spec. · d1028b7c
      jer.noble@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=123377
      
      Reviewed by Eric Carlson.
      
      Source/WebCore:
      
      Test: media/media-source/media-source-append-failed.html
      
      Bring the MediaSource append() implementation up to the current spec.
      
      * Modules/mediasource/SourceBuffer.cpp:
      (WebCore::SourceBuffer::appendBufferInternal):
      (WebCore::SourceBuffer::appendBufferTimerFired):
      * platform/graphics/SourceBufferPrivate.h:
      * platform/mock/mediasource/MockSourceBufferPrivate.cpp:
      (WebCore::MockSourceBufferPrivate::append):
      (WebCore::MockSourceBufferPrivate::evictCodedFrames):
      (WebCore::MockSourceBufferPrivate::isFull):
      * platform/mock/mediasource/MockSourceBufferPrivate.h:
      
      LayoutTests:
      
      * media/media-source/media-source-append-failed-expected.txt: Added.
      * media/media-source/media-source-append-failed.html: Added.
      * media/media-source/mock-media-source.js:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158928 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d1028b7c
  11. 07 Nov, 2013 2 commits
    • jer.noble@apple.com's avatar
      [MSE] Add mock MediaSource classes for testing. · a74247b8
      jer.noble@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=123322
      
      Reviewed by Eric Carlson.
      
      Source/WebCore:
      
      Tests: media/media-source/media-source-addsourcebuffer.html
             media/media-source/media-source-append-buffer.html
             media/media-source/media-source-canplaythrough.html
             media/media-source/media-source-closed.html
             media/media-source/media-source-play.html
             media/media-source/media-source-track-enabled.html
             media/media-source/media-source-tracks.html
      
      Add mock implementation of platform MediaSource classes, allowing ports to test the
      MediaSource API without having a platform implementation.
      
      The MockMediaSource will support a byteformat defined in MockBox.h: a simple box-style media
      format with an initialization segment containing a number of tracks, followed by a list of
      samples.
      
      Add a means to insert a new media engine factory at runtime, so the internals object can add
      a MockMediaSourceMediaPlayer:
      * platform/graphics/MediaPlayer.cpp:
      (WebCore::MediaPlayerFactorySupport::callRegisterMediaEngine):
      * platform/graphics/MediaPlayer.h:
      * testing/Internals.cpp:
      (WebCore::Internals::initializeMockMediaSource):
      * testing/Internals.h:
      * testing/Internals.idl:
      
      For non-media-source supporting media engines, fail immediately when asked to load a media
      source, so that the MockMediaSourceMediaPlayer will be instantiated as a fall-back:
      * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
      (WebCore::MediaPlayerPrivateAVFoundation::load):
      * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
      * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
      (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType):
      * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
      * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
      (WebCore::MediaPlayerPrivateQTKit::load):
      (WebCore::MediaPlayerPrivateQTKit::supportsType):
      
      Add new files to the project:
      * WebCore.xcodeproj/project.pbxproj:
      * Source/WebCore/WebCore.exp.in:
      
      Update the MediaSource implementation:
      * Modules/mediasource/MediaSource.cpp:
      (WebCore::MediaSource::monitorSourceBuffers): Add a link to the spec.
      * Modules/mediasource/SourceBuffer.cpp:
      (WebCore::SourceBuffer::buffered): Ditto.
      (WebCore::SourceBuffer::setTimestampOffset): Ditto.
      (WebCore::SourceBuffer::validateInitializationSegment): Ditto.
      (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment): Ditto. Also,
          bring the implementation up to date with part of the spec.
      (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): Remove "Predicate" from
          SampleIsRandomAccessPredicate.
      
      Add utility classes to parse and represent the bytestream supported by the MockMediaSource:
      * platform/mock/mediasource/MockBox.cpp: Added.
      (WebCore::MockBox::MockBox):
      (WebCore::MockBox::peekType):
      (WebCore::MockBox::peekLength):
      (WebCore::MockTrackBox::MockTrackBox):
      (WebCore::MockTrackBox::type):
      (WebCore::MockInitializationBox::MockInitializationBox):
      (WebCore::MockInitializationBox::type):
      (WebCore::MockSampleBox::MockSampleBox):
      (WebCore::MockSampleBox::type):
      * platform/mock/mediasource/MockBox.h: Added.
      (WebCore::MockBox::length):
      (WebCore::MockBox::type):
      (WebCore::MockTrackBox::trackID):
      (WebCore::MockTrackBox::codec):
      (WebCore::MockTrackBox::kind):
      (WebCore::MockInitializationBox::duration):
      (WebCore::MockInitializationBox::tracks):
      (WebCore::MockSampleBox::presentationTimestamp):
      (WebCore::MockSampleBox::decodeTimestamp):
      (WebCore::MockSampleBox::duration):
      (WebCore::MockSampleBox::trackID):
      (WebCore::MockSampleBox::flags):
      (WebCore::MockSampleBox::isSync):
      
      Add a MediaPlayerPrivate implementation which uses MockMediaSource:
      * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp: Added.
      (WebCore::MockMediaPlayerMediaSource::registerMediaEngine):
      (WebCore::MockMediaPlayerMediaSource::create):
      (WebCore::mimeTypeCache):
      (WebCore::MockMediaPlayerMediaSource::getSupportedTypes):
      (WebCore::MockMediaPlayerMediaSource::supportsType):
      (WebCore::MockMediaPlayerMediaSource::MockMediaPlayerMediaSource):
      (WebCore::MockMediaPlayerMediaSource::~MockMediaPlayerMediaSource):
      (WebCore::MockMediaPlayerMediaSource::load):
      (WebCore::MockMediaPlayerMediaSource::cancelLoad):
      (WebCore::MockMediaPlayerMediaSource::play):
      (WebCore::MockMediaPlayerMediaSource::pause):
      (WebCore::MockMediaPlayerMediaSource::naturalSize):
      (WebCore::MockMediaPlayerMediaSource::hasVideo):
      (WebCore::MockMediaPlayerMediaSource::hasAudio):
      (WebCore::MockMediaPlayerMediaSource::setVisible):
      (WebCore::MockMediaPlayerMediaSource::seeking):
      (WebCore::MockMediaPlayerMediaSource::paused):
      (WebCore::MockMediaPlayerMediaSource::networkState):
      (WebCore::MockMediaPlayerMediaSource::readyState):
      (WebCore::MockMediaPlayerMediaSource::buffered):
      (WebCore::MockMediaPlayerMediaSource::didLoadingProgress):
      (WebCore::MockMediaPlayerMediaSource::setSize):
      (WebCore::MockMediaPlayerMediaSource::paint):
      (WebCore::MockMediaPlayerMediaSource::currentTimeDouble):
      (WebCore::MockMediaPlayerMediaSource::durationDouble):
      (WebCore::MockMediaPlayerMediaSource::seekDouble):
      (WebCore::MockMediaPlayerMediaSource::advanceCurrentTime):
      (WebCore::MockMediaPlayerMediaSource::updateDuration):
      (WebCore::MockMediaPlayerMediaSource::setReadyState):
      * platform/mock/mediasource/MockMediaPlayerMediaSource.h: Added.
      
      Add a mock implementation of MediaSourcePrivate, which uses MockSourceBuffer:
      * platform/mock/mediasource/MockMediaSourcePrivate.cpp: Added.
      (WebCore::MockMediaSourcePrivate::create):
      (WebCore::MockMediaSourcePrivate::MockMediaSourcePrivate):
      (WebCore::MockMediaSourcePrivate::~MockMediaSourcePrivate):
      (WebCore::MockMediaSourcePrivate::addSourceBuffer):
      (WebCore::MockMediaSourcePrivate::removeSourceBuffer):
      (WebCore::MockMediaSourcePrivate::duration):
      (WebCore::MockMediaSourcePrivate::setDuration):
      (WebCore::MockMediaSourcePrivate::markEndOfStream):
      (WebCore::MockMediaSourcePrivate::unmarkEndOfStream):
      (WebCore::MockMediaSourcePrivate::readyState):
      (WebCore::MockMediaSourcePrivate::setReadyState):
      (WebCore::MockMediaSourcePrivate::sourceBufferPrivateDidChangeActiveState):
      (WebCore::MockSourceBufferPrivateHasAudio):
      (WebCore::MockMediaSourcePrivate::hasAudio):
      (WebCore::MockSourceBufferPrivateHasVideo):
      (WebCore::MockMediaSourcePrivate::hasVideo):
      * platform/mock/mediasource/MockMediaSourcePrivate.h: Added.
      (WebCore::MockMediaSourcePrivate::activeSourceBuffers):
      (WebCore::MockMediaSourcePrivate::player):
      
      Add a mock implementation of SourceBufferPrivate, which uses MockBoxes to parse the
      bytestream provided by SourceBuffer:
      * platform/mock/mediasource/MockSourceBufferPrivate.cpp: Added.
      (WebCore::MockMediaSample::create):
      (WebCore::MockMediaSample::~MockMediaSample):
      (WebCore::MockMediaSample::MockMediaSample):
      (WebCore::MockMediaSample::platformSample):
      (WebCore::MockMediaDescription::create):
      (WebCore::MockMediaDescription::~MockMediaDescription):
      (WebCore::MockMediaDescription::MockMediaDescription):
      (WebCore::MockSourceBufferPrivate::create):
      (WebCore::MockSourceBufferPrivate::MockSourceBufferPrivate):
      (WebCore::MockSourceBufferPrivate::~MockSourceBufferPrivate):
      (WebCore::MockSourceBufferPrivate::setClient):
      (WebCore::MockSourceBufferPrivate::append):
      (WebCore::MockSourceBufferPrivate::didReceiveInitializationSegment):
      (WebCore::MockSourceBufferPrivate::didReceiveSample):
      (WebCore::MockSourceBufferPrivate::abort):
      (WebCore::MockSourceBufferPrivate::removedFromMediaSource):
      (WebCore::MockSourceBufferPrivate::readyState):
      (WebCore::MockSourceBufferPrivate::setReadyState):
      (WebCore::MockSourceBufferPrivate::hasVideo):
      (WebCore::MockSourceBufferPrivate::hasAudio):
      * platform/mock/mediasource/MockSourceBufferPrivate.h: Added.
      
      Create mock implementations of AudioTrackPrivate, VideoTrackPrivate, and TextTrackPrivate
      which wrap the MockTrackBox class:
      * platform/mock/mediasource/MockTracks.cpp: Added.
      * platform/mock/mediasource/MockTracks.h: Added.
      (WebCore::MockAudioTrackPrivate::create):
      (WebCore::MockAudioTrackPrivate::~MockAudioTrackPrivate):
      (WebCore::MockAudioTrackPrivate::id):
      (WebCore::MockAudioTrackPrivate::MockAudioTrackPrivate):
      (WebCore::MockTextTrackPrivate::create):
      (WebCore::MockTextTrackPrivate::~MockTextTrackPrivate):
      (WebCore::MockTextTrackPrivate::id):
      (WebCore::MockTextTrackPrivate::MockTextTrackPrivate):
      (WebCore::MockVideoTrackPrivate::create):
      (WebCore::MockVideoTrackPrivate::~MockVideoTrackPrivate):
      (WebCore::MockVideoTrackPrivate::id):
      (WebCore::MockVideoTrackPrivate::MockVideoTrackPrivate):
      
      LayoutTests:
      
      * media/media-source/media-source-addsourcebuffer-expected.txt: Added.
      * media/media-source/media-source-addsourcebuffer.html: Added.
      * media/media-source/media-source-append-buffer-expected.txt: Added.
      * media/media-source/media-source-append-buffer.html: Added.
      * media/media-source/media-source-canplaythrough-expected.txt: Added.
      * media/media-source/media-source-canplaythrough.html: Added.
      * media/media-source/media-source-closed-expected.txt: Added.
      * media/media-source/media-source-closed.html: Added.
      * media/media-source/media-source-play-expected.txt: Added.
      * media/media-source/media-source-play.html: Added.
      * media/media-source/mock-media-source.js: Added.
      * media/video-test.js:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158853 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a74247b8
    • commit-queue@webkit.org's avatar
      Changing MediaStreamDescriptor to MediaStreamPrivate · 25861c2e
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=123935
      
      Patch by Thiago de Barros Lacerda <thiago.lacerda@openbossa.org> on 2013-11-07
      Reviewed by Eric Carlson.
      
      Source/WebCore:
      
      No new tests needed.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * Modules/mediastream/MediaStream.cpp:
      (WebCore::MediaStream::create):
      (WebCore::MediaStream::MediaStream):
      (WebCore::MediaStream::~MediaStream):
      (WebCore::MediaStream::ended):
      (WebCore::MediaStream::setEnded):
      (WebCore::MediaStream::addTrack):
      (WebCore::MediaStream::removeTrack):
      (WebCore::MediaStream::removeRemoteSource):
      * Modules/mediastream/MediaStream.h:
      * Modules/mediastream/MediaStreamRegistry.cpp:
      (WebCore::MediaStreamRegistry::registerURL):
      (WebCore::MediaStreamRegistry::unregisterURL):
      (WebCore::MediaStreamRegistry::lookupMediaStreamPrivate):
      * Modules/mediastream/MediaStreamRegistry.h:
      * Modules/mediastream/MediaStreamTrack.cpp:
      * Modules/mediastream/MediaStreamTrack.h:
      * Modules/mediastream/RTCPeerConnection.cpp:
      (WebCore::RTCPeerConnection::addStream):
      (WebCore::RTCPeerConnection::removeStream):
      (WebCore::RTCPeerConnection::didAddRemoteStream):
      (WebCore::RTCPeerConnection::didRemoveRemoteStream):
      * Modules/mediastream/RTCPeerConnection.h:
      * Modules/mediastream/UserMediaRequest.cpp:
      (WebCore::UserMediaRequest::didCreateStream):
      (WebCore::UserMediaRequest::callSuccessHandler):
      * Modules/mediastream/UserMediaRequest.h:
      * Modules/webaudio/MediaStreamAudioDestinationNode.cpp:
      (WebCore::MediaStreamAudioDestinationNode::MediaStreamAudioDestinationNode):
      * WebCore.xcodeproj/project.pbxproj:
      * html/HTMLMediaElement.cpp:
      (HTMLMediaElement::loadResource):
      * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
      (WebCore::toWebMediaStreamPrivate):
      (WebCore::MediaPlayerPrivate::lookupMediaStream):
      * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h:
      * platform/mediastream/MediaStreamCenter.cpp:
      * platform/mediastream/MediaStreamCreationClient.h:
      * platform/mediastream/MediaStreamPrivate.cpp: Renamed from Source/WebCore/platform/mediastream/MediaStreamDescriptor.cpp.
      (WebCore::MediaStreamPrivate::create):
      (WebCore::MediaStreamPrivate::addSource):
      (WebCore::MediaStreamPrivate::removeSource):
      (WebCore::MediaStreamPrivate::addRemoteSource):
      (WebCore::MediaStreamPrivate::removeRemoteSource):
      (WebCore::MediaStreamPrivate::addRemoteTrack):
      (WebCore::MediaStreamPrivate::removeRemoteTrack):
      (WebCore::MediaStreamPrivate::MediaStreamPrivate):
      (WebCore::MediaStreamPrivate::setEnded):
      (WebCore::MediaStreamPrivate::addTrack):
      (WebCore::MediaStreamPrivate::removeTrack):
      * platform/mediastream/MediaStreamPrivate.h: Renamed from Source/WebCore/platform/mediastream/MediaStreamDescriptor.h.
      (WebCore::MediaStreamPrivateClient::~MediaStreamPrivateClient):
      (WebCore::MediaStreamPrivate::~MediaStreamPrivate):
      (WebCore::MediaStreamPrivate::client):
      (WebCore::MediaStreamPrivate::setClient):
      (WebCore::MediaStreamPrivate::id):
      (WebCore::MediaStreamPrivate::numberOfAudioSources):
      (WebCore::MediaStreamPrivate::audioSources):
      (WebCore::MediaStreamPrivate::numberOfVideoSources):
      (WebCore::MediaStreamPrivate::videoSources):
      (WebCore::MediaStreamPrivate::numberOfAudioTracks):
      (WebCore::MediaStreamPrivate::audioTracks):
      (WebCore::MediaStreamPrivate::numberOfVideoTracks):
      (WebCore::MediaStreamPrivate::videoTracks):
      (WebCore::MediaStreamPrivate::ended):
      * platform/mediastream/MediaStreamSource.cpp:
      * platform/mediastream/MediaStreamSource.h:
      * platform/mediastream/RTCPeerConnectionHandler.h:
      * platform/mediastream/RTCPeerConnectionHandlerClient.h:
      * platform/mediastream/blackberry/MediaStreamCenterBlackBerry.cpp:
      * platform/mediastream/blackberry/MediaStreamCenterBlackBerry.h:
      * platform/mediastream/gstreamer/MediaStreamCenterGStreamer.cpp:
      * platform/mediastream/gstreamer/MediaStreamCenterGStreamer.h:
      * platform/mediastream/mac/MediaStreamCenterMac.cpp:
      (WebCore::MediaStreamCenterMac::createMediaStream):
      * platform/mock/MockMediaStreamCenter.cpp:
      (WebCore::MockMediaStreamCenter::createMediaStream):
      * platform/mock/RTCPeerConnectionHandlerMock.cpp:
      (WebCore::RTCPeerConnectionHandlerMock::addStream):
      (WebCore::RTCPeerConnectionHandlerMock::removeStream):
      * platform/mock/RTCPeerConnectionHandlerMock.h:
      
      Source/WebKit/blackberry:
      
      * WebCoreSupport/UserMediaClientImpl.cpp:
      (WebCore::toMediaStreamPrivate):
      (WebCore::WebUserMediaRequestClientImpl::requestSucceeded):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158849 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      25861c2e
  12. 06 Nov, 2013 1 commit
    • jer.noble@apple.com's avatar
      [MSE] Add MediaSource extensions to AudioTrack, VideoTrack, and TextTrack. · 9161ec36
      jer.noble@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=123374
      
      Reviewed by Eric Carlson.
      
      No tests added; tests will be added when Mock implementations are added in a future patch.
      
      Add new partial interfaces for added methods on AudioTrack, TextTrack, and VideoTrack:
      * Modules/mediasource/AudioTrackMediaSource.idl: Add read-only sourceBuffer attribute.
      * Modules/mediasource/TextTrackMediaSource.idl: Ditto.
      * Modules/mediasource/VideoTrackMediaSource.idl: Ditto.
      * Modules/mediasource/AudioTrackMediaSource.h:
      (WebCore::AudioTrackMediaSource::sourceBuffer): Added static wrapper around non-static sourceBuffer().
      * Modules/mediasource/TextTrackMediaSource.h:
      (WebCore::TextTrackMediaSource::sourceBuffer): Ditto.
      * Modules/mediasource/VideoTrackMediaSource.h:
      (WebCore::VideoTrackMediaSource::sourceBuffer): Ditto.
      
      Add support for writable kind & language attributes through a custom setter:
      * bindings/js/JSAudioTrackCustom.cpp:
      (WebCore::JSAudioTrack::setKind):
      (WebCore::JSAudioTrack::setLanguage):
      * bindings/js/JSTextTrackCustom.cpp:
      (WebCore::JSTextTrack::setKind):
      (WebCore::JSTextTrack::setLanguage):
      * bindings/js/JSVideoTrackCustom.cpp:
      (WebCore::JSVideoTrack::setKind):
      (WebCore::JSVideoTrack::setLanguage):
      * html/track/AudioTrack.idl:
      * html/track/TextTrack.idl:
      * html/track/VideoTrack.idl:
      
      Add setter methods to the implementation classes:
      * html/track/TextTrack.cpp:
      (WebCore::TextTrack::TextTrack):
      (WebCore::TextTrack::setKind):
      (WebCore::TextTrack::setLanguage):
      * html/track/TextTrack.h:
      * html/track/TrackBase.cpp:
      (WebCore::TrackBase::TrackBase):
      (WebCore::TrackBase::setKind):
      (WebCore::TrackBase::setKindInternal):
      * html/track/TrackBase.h:
      (WebCore::TrackBase::setLanguage):
      (WebCore::TrackBase::sourceBuffer):
      (WebCore::TrackBase::setSourceBuffer):
      * html/track/VideoTrack.cpp:
      (WebCore::VideoTrack::VideoTrack):
      (WebCore::VideoTrack::setKind):
      (WebCore::VideoTrack::setLanguage):
      * html/track/VideoTrack.h:
      
      Implement the unimplemented portions of MediaSource and SourceBuffer:
      * Modules/mediasource/MediaSource.cpp:
      (WebCore::MediaSource::removeSourceBuffer):
      * Modules/mediasource/MediaSourceBase.cpp:
      (WebCore::MediaSourceBase::MediaSourceBase):
      (WebCore::MediaSourceBase::setPrivateAndOpen):
      (WebCore::MediaSourceBase::setReadyState):
      (WebCore::MediaSourceBase::attachToElement):
      * Modules/mediasource/MediaSourceBase.h:
      (WebCore::MediaSourceBase::mediaElement):
      * Modules/mediasource/SourceBuffer.cpp:
      (WebCore::SourceBuffer::videoTracks):
      (WebCore::SourceBuffer::audioTracks):
      (WebCore::SourceBuffer::textTracks):
      (WebCore::SourceBuffer::sourceBufferPrivateDidAddAudioTrack):
      (WebCore::SourceBuffer::sourceBufferPrivateDidAddVideoTrack):
      (WebCore::SourceBuffer::sourceBufferPrivateDidAddTextTrack):
      (WebCore::SourceBuffer::sourceBufferPrivateDidChangeActiveState):
      * Modules/mediasource/SourceBuffer.h:
      * Modules/mediasource/SourceBuffer.idl:
      
      Add new files to the project:
      * DerivedSources.make:
      * WebCore.xcodeproj/project.pbxproj:
      
      And a smorgasbord of other utility changes:
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::loadResource): Pass this when attaching.
      (WebCore::HTMLMediaElement::mediaPlayerDidAddTextTrack): Ditto.
      * html/HTMLMediaSource.h:
      * html/track/TextTrackList.cpp:
      (TextTrackList::item): Make const.
      * html/track/TextTrackList.h:
      (WebCore::TextTrackList::lastItem): Added.
      * platform/graphics/InbandTextTrackPrivate.h:
      (WebCore::InbandTextTrackPrivate::create): Added.
      (WebCore::MockSourceBufferPrivate::trackDidChangeEnabled):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158821 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9161ec36
  13. 05 Nov, 2013 2 commits
    • commit-queue@webkit.org's avatar
      AX: media controls accessibility needs more work · bcfea162
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=123749
      
      Patch by James Craig <jcraig@apple.com> on 2013-11-05
      Reviewed by Jer Noble.
      
      Updated some of the control labels/roles to improve accessibility.
        - Volume slider is now keyboard/screenreader accessible.
        - muteButton was a checkbox toggling checked state, now a button that toggles label "mute/unmute"
        - fullscreenButton was a checkbox toggling checked state, now a button that toggles label "display/exit full screen"
        - captionButton was a checkbox, now a popup button that launches the newly accessible menu.
      Subtitles menu is now keyboard/screenreader accessible (uses roaming tabindex).
      Render dump expectations changed because volume slider is now hidden via...
      ...opacity/size (to make accessible without hover) instead of display:none.
      
      Updated existing test coverage.
      
      Source/WebCore:
      
      * Modules/mediacontrols/mediaControlsApple.css:
      (audio::-webkit-media-controls-panel .volume-box):
      (audio::-webkit-media-controls-panel .volume-box:active):
      (audio::-webkit-media-controls-toggle-closed-captions-button):
      (audio::-webkit-media-controls-closed-captions-container .list):
      (audio::-webkit-media-controls-closed-captions-container li:focus):
      * Modules/mediacontrols/mediaControlsApple.js:
      (Controller.prototype.createControls):
      (Controller.prototype.handleFullscreenChange):
      (Controller.prototype.handleMuteButtonClicked):
      (Controller.prototype.handleMinButtonClicked):
      (Controller.prototype.handleMaxButtonClicked):
      (Controller.prototype.handleVolumeSliderChange):
      (Controller.prototype.buildCaptionMenu):
      (Controller.prototype.focusSiblingCaptionItem):
      (Controller.prototype.handleCaptionItemKeyUp):
      
      LayoutTests:
      
      * platform/mac/accessibility/media-element-expected.txt:
      * platform/mac/media/audio-controls-rendering-expected.txt:
      * platform/mac/media/controls-after-reload-expected.txt:
      * platform/mac/media/controls-strict-expected.txt:
      * platform/mac/media/controls-styling-strict-expected.txt:
      * platform/mac/media/controls-without-preload-expected.txt:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158713 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bcfea162
    • beidson@apple.com's avatar
      IDB: Split backend Cursors and Transactions into their own files · fedb605d
      beidson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=123789
      
      Reviewed by Alexey Proskuryakov.
      
      Source/WebCore:
      
      No new tests (Rename, no change in behavior).
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * WebCore.xcodeproj/project.pbxproj:
      
      * Modules/indexeddb/IDBBackingStoreCursorInterface.h:
      (WebCore::IDBBackingStoreCursorInterface::~IDBBackingStoreCursorInterface):
      
      * Modules/indexeddb/IDBBackingStoreInterface.h:
      
      * Modules/indexeddb/IDBBackingStoreTransactionInterface.h: Added.
      (WebCore::IDBBackingStoreTransactionInterface::~IDBBackingStoreTransactionInterface):
      
      * Modules/indexeddb/IDBCursorBackendImpl.cpp:
      (WebCore::IDBCursorBackendImpl::IDBCursorBackendImpl):
      * Modules/indexeddb/IDBCursorBackendImpl.h:
      (WebCore::IDBCursorBackendImpl::create):
      
      * Modules/indexeddb/IDBFactoryBackendInterface.h:
      
      * Modules/indexeddb/IDBIndexWriter.cpp:
      (WebCore::IDBIndexWriter::writeIndexKeys):
      (WebCore::IDBIndexWriter::verifyIndexKeys):
      (WebCore::IDBIndexWriter::addingKeyAllowed):
      * Modules/indexeddb/IDBIndexWriter.h:
      
      * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
      (WebCore::IDBTransactionBackendImpl::createCursorBackend):
      * Modules/indexeddb/IDBTransactionBackendImpl.h:
      * Modules/indexeddb/IDBTransactionBackendInterface.h:
      
      * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
      (WebCore::GetOperation::perform):
      (WebCore::OpenCursorOperation::perform):
      (WebCore::CountOperation::perform):
      (WebCore::DeleteRangeOperation::perform):
      
      * Modules/indexeddb/leveldb/IDBBackingStoreCursorLevelDB.cpp: Added.
      (WebCore::IDBBackingStoreCursorLevelDB::IDBBackingStoreCursorLevelDB):
      (WebCore::IDBBackingStoreCursorLevelDB::firstSeek):
      (WebCore::IDBBackingStoreCursorLevelDB::advance):
      (WebCore::IDBBackingStoreCursorLevelDB::continueFunction):
      (WebCore::IDBBackingStoreCursorLevelDB::haveEnteredRange):
      (WebCore::IDBBackingStoreCursorLevelDB::isPastBounds):
      * Modules/indexeddb/leveldb/IDBBackingStoreCursorLevelDB.h: Added.
      (WebCore::IDBBackingStoreCursorLevelDB::~IDBBackingStoreCursorLevelDB):
      (WebCore::IDBBackingStoreCursorLevelDB::IDBBackingStoreCursorLevelDB):
      
      * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
      (WebCore::IDBBackingStoreLevelDB::compareIndexKeys):
      (WebCore::IDBBackingStoreLevelDB::updateIDBDatabaseVersion):
      (WebCore::IDBBackingStoreLevelDB::createObjectStore):
      (WebCore::IDBBackingStoreLevelDB::deleteObjectStore):
      (WebCore::IDBBackingStoreLevelDB::getRecord):
      (WebCore::IDBBackingStoreLevelDB::putRecord):
      (WebCore::IDBBackingStoreLevelDB::clearObjectStore):
      (WebCore::IDBBackingStoreLevelDB::deleteRecord):
      (WebCore::IDBBackingStoreLevelDB::getKeyGeneratorCurrentNumber):
      (WebCore::IDBBackingStoreLevelDB::maybeUpdateKeyGeneratorCurrentNumber):
      (WebCore::IDBBackingStoreLevelDB::keyExistsInObjectStore):
      (WebCore::IDBBackingStoreLevelDB::createIndex):
      (WebCore::IDBBackingStoreLevelDB::deleteIndex):
      (WebCore::IDBBackingStoreLevelDB::putIndexDataForRecord):
      (WebCore::findGreatestKeyLessThanOrEqual):
      (WebCore::IDBBackingStoreLevelDB::findKeyInIndex):
      (WebCore::IDBBackingStoreLevelDB::getPrimaryKeyViaIndex):
      (WebCore::IDBBackingStoreLevelDB::keyExistsInIndex):
      (WebCore::ObjectStoreKeyCursorImpl::create):
      (WebCore::ObjectStoreKeyCursorImpl::clone):
      (WebCore::ObjectStoreKeyCursorImpl::ObjectStoreKeyCursorImpl):
      (WebCore::ObjectStoreCursorImpl::create):
      (WebCore::ObjectStoreCursorImpl::clone):
      (WebCore::ObjectStoreCursorImpl::ObjectStoreCursorImpl):
      (WebCore::objectStoreCursorOptions):
      (WebCore::indexCursorOptions):
      (WebCore::IDBBackingStoreLevelDB::openObjectStoreCursor):
      (WebCore::IDBBackingStoreLevelDB::openObjectStoreKeyCursor):
      (WebCore::IDBBackingStoreLevelDB::openIndexKeyCursor):
      (WebCore::IDBBackingStoreLevelDB::openIndexCursor):
      (WebCore::IDBBackingStoreLevelDB::createBackingStoreTransaction):
      * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
      
             * Modules/indexeddb/leveldb/IDBBackingStoreTransactionLevelDB.cpp: Added.
      (WebCore::IDBBackingStoreTransactionLevelDB::IDBBackingStoreTransactionLevelDB):
      (WebCore::IDBBackingStoreTransactionLevelDB::begin):
      (WebCore::IDBBackingStoreTransactionLevelDB::commit):
      (WebCore::IDBBackingStoreTransactionLevelDB::rollback):
      * Modules/indexeddb/leveldb/IDBBackingStoreTransactionLevelDB.h:
      
      * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
      (WebCore::IDBFactoryBackendLevelDB::createCursorBackend):
      * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
      
      Source/WebKit2:
      
      * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
      (WebKit::WebIDBFactoryBackend::createCursorBackend):
      * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158654 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fedb605d
  14. 04 Nov, 2013 2 commits