1. 12 Nov, 2012 1 commit
    • arv@chromium.org's avatar
      Replace DOMException TYPE_MISMATCH_ERR with TypeError · 04fc7b0e
      arv@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=101604
      
      Reviewed by Adam Barth.
      
      Source/WebCore:
      
      DOMException.TYPE_MISMATCH_ERR is deprecated in favor of using TypeError.
      
      We have historically used TYPE_MISMATCH_ERR as a blanket DOMException code when
      the spec mandates TypeError being thrown.
      
      Updated existing tests.
      
      * Modules/mediastream/MediaConstraintsImpl.cpp:
      * Modules/mediastream/MediaStreamTrackList.cpp:
      * Modules/mediastream/PeerConnection00.cpp:
      * Modules/mediastream/RTCDataChannel.cpp:
      * Modules/mediastream/RTCIceCandidate.cpp:
      * Modules/mediastream/RTCPeerConnection.cpp:
      * Modules/mediastream/RTCSessionDescription.cpp:
      * Modules/mediastream/SessionDescription.cpp:
      * bindings/js/CallbackFunction.cpp:
      * bindings/js/JSCustomXPathNSResolver.cpp:
      * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
      * bindings/js/JSHTMLSelectElementCustom.cpp:
      * bindings/js/JSMutationObserverCustom.cpp:
      * bindings/js/JSSQLResultSetRowListCustom.cpp:
      * bindings/js/JSSQLTransactionCustom.cpp:
      * bindings/js/JSSQLTransactionSyncCustom.cpp:
      * bindings/scripts/CodeGeneratorJS.pm:
      * bindings/scripts/CodeGeneratorObjC.pm:
      * bindings/scripts/CodeGeneratorV8.pm:
      * bindings/v8/V8Callback.h:
      * bindings/v8/V8Collection.cpp:
      * bindings/v8/custom/V8DocumentCustom.cpp:
      * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
      * bindings/v8/custom/V8MutationObserverCustom.cpp:
      * bindings/v8/custom/V8SQLTransactionCustom.cpp:
      * bindings/v8/custom/V8SQLTransactionSyncCustom.cpp:
      * dom/DOMCoreException.idl:
      * html/HTMLElement.cpp:
      * html/HTMLMediaElement.cpp:
      * html/HTMLOptionsCollection.cpp:
      * html/canvas/CanvasRenderingContext2D.cpp:
      * page/Crypto.cpp:
      * page/DOMSelection.cpp:
      * svg/properties/SVGTransformListPropertyTearOff.h:
      
      LayoutTests:
      
      Update the tests to test for TypeError instead of DOMException with the TYPE_MISMATCH_ERR code.
      
      * canvas/philip/tests/2d.drawImage.null.html:
      * canvas/philip/tests/2d.imageData.put.null.html:
      * canvas/philip/tests/2d.pattern.image.null.html:
      * editing/selection/extend-expected.txt:
      * fast/dom/Geolocation/argument-types-expected.txt:
      * fast/dom/Geolocation/not-enough-arguments-expected.txt:
      * fast/dom/Geolocation/script-tests/argument-types.js:
      * fast/dom/HTMLSelectElement/select-selectedIndex-expected.txt:
      * fast/dom/HTMLSelectElement/select-selectedIndex-multiple-expected.txt:
      * fast/js/select-options-add-expected.txt:
      * fast/mediastream/RTCIceCandidate-expected.txt:
      * fast/mediastream/RTCPeerConnection-expected.txt:
      * fast/mediastream/RTCSessionDescription-expected.txt:
      * fast/mediastream/SessionDescription-expected.txt:
      * fast/mediastream/peerconnection-addstream-expected.txt:
      * fast/mediastream/peerconnection-iceoptions-expected.txt:
      * fast/mediastream/peerconnection-iceoptions.html:
      * fast/mediastream/peerconnection-removestream-expected.txt:
      * media/encrypted-media/encrypted-media-syntax.html:
      * media/video-test.js:
      * platform/chromium/fast/dynamic/insertAdjacentElement-expected.txt:
      * security/crypto-random-values-types-expected.txt:
      * svg/dom/SVGTransformList-expected.txt:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134345 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      04fc7b0e
  2. 23 Jul, 2012 1 commit
  3. 10 Apr, 2012 1 commit
    • commit-queue@webkit.org's avatar
      Add Encrypted Media Extensions methods to HTMLMediaElement · a2a07c04
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=82971
      
      Patch by David Dorwin <ddorwin@chromium.org> on 2012-04-10
      Reviewed by Adam Barth.
      
      The extensions are behind the ENABLE(ENCRYPTED_MEDIA) feature define.
      Implementation is based on v0.1 of the draft proposal at
      http://dvcs.w3.org/hg/html-media/raw-file/tip/encrypted-media/encrypted-media.html.
      
      Source/WebCore:
      
      Tests: media/encrypted-media/encrypted-media-not-loaded.html
             media/encrypted-media/encrypted-media-syntax.html
      
      * bindings/generic/RuntimeEnabledFeatures.cpp:
      (WebCore):
      * bindings/generic/RuntimeEnabledFeatures.h:
      (RuntimeEnabledFeatures):
      (WebCore::RuntimeEnabledFeatures::webkitEncryptedMediaEnabled):
      (WebCore::RuntimeEnabledFeatures::setWebkitEncryptedMediaEnabled):
      * html/HTMLMediaElement.cpp:
      (WebCore):
      (WebCore::exceptionCodeForMediaKeyException):
      (WebCore::HTMLMediaElement::webkitGenerateKeyRequest):
      (WebCore::HTMLMediaElement::webkitAddKey):
      (WebCore::HTMLMediaElement::webkitCancelKeyRequest):
      (WebCore::HTMLMediaElement::setVolume):
      (WebCore::HTMLMediaElement::togglePlayState):
      (WebCore::HTMLMediaElement::beginScrubbing):
      (WebCore::HTMLMediaElement::addTextTrack):
      (WebCore::HTMLMediaElement::textTracks):
      (WebCore::HTMLMediaElement::showingTrackWithSameKind):
      (WebCore::HTMLMediaElement::didAddTrack):
      * html/HTMLMediaElement.h:
      * html/HTMLMediaElement.idl:
      * platform/graphics/MediaPlayer.cpp:
      (NullMediaPlayerPrivate):
      (WebCore):
      (WebCore::MediaPlayer::generateKeyRequest):
      (WebCore::MediaPlayer::addKey):
      (WebCore::MediaPlayer::cancelKeyRequest):
      * platform/graphics/MediaPlayer.h:
      * platform/graphics/MediaPlayerPrivate.h:
      (MediaPlayerPrivateInterface):
      (WebCore::MediaPlayerPrivateInterface::addKey):
      (WebCore::MediaPlayerPrivateInterface::generateKeyRequest):
      (WebCore::MediaPlayerPrivateInterface::cancelKeyRequest):
      
      Source/WebKit/chromium:
      
      * features.gypi:
      * public/WebMediaPlayer.h:
      (WebKit):
      (WebMediaPlayer):
      (WebKit::WebMediaPlayer::generateKeyRequest):
      (WebKit::WebMediaPlayer::addKey):
      (WebKit::WebMediaPlayer::cancelKeyRequest):
      * public/WebRuntimeFeatures.h:
      (WebRuntimeFeatures):
      * src/AssertMatchingEnums.cpp:
      * src/WebMediaPlayerClientImpl.cpp:
      (WebKit):
      (WebKit::WebMediaPlayerClientImpl::generateKeyRequest):
      (WebKit::WebMediaPlayerClientImpl::addKey):
      (WebKit::WebMediaPlayerClientImpl::cancelKeyRequest):
      * src/WebMediaPlayerClientImpl.h:
      (WebMediaPlayerClientImpl):
      * src/WebRuntimeFeatures.cpp:
      (WebKit::WebRuntimeFeatures::isMediaStreamEnabled):
      (WebKit::WebRuntimeFeatures::enableEncryptedMedia):
      (WebKit):
      (WebKit::WebRuntimeFeatures::isEncryptedMediaEnabled):
      
      Tools:
      
      * DumpRenderTree/chromium/TestShell.cpp:
      (TestShell::TestShell):
      
      LayoutTests:
      
      * media/encrypted-media/encrypted-media-not-loaded-expected.txt: Added.
      * media/encrypted-media/encrypted-media-not-loaded.html: Added.
      * media/encrypted-media/encrypted-media-syntax-expected.txt: Added.
      * media/encrypted-media/encrypted-media-syntax.html: Added.
      * platform/chromium/test_expectations.txt:
      * platform/efl/Skipped:
      * platform/gtk/Skipped:
      * platform/mac/Skipped:
      * platform/qt/Skipped:
      * platform/win/Skipped:
      * platform/wincairo/Skipped:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@113736 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a2a07c04