Changeset 142918 in webkit
- Timestamp:
- Feb 14, 2013, 2:26:53 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 10 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/media/encrypted-media/encrypted-media-v2-syntax-expected.txt (modified) (2 diffs)
-
LayoutTests/media/encrypted-media/encrypted-media-v2-syntax.html (modified) (2 diffs)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/Modules/encryptedmedia/CDM.h (modified) (1 diff)
-
Source/WebCore/Modules/encryptedmedia/MediaKeySession.cpp (modified) (3 diffs)
-
Source/WebCore/Modules/encryptedmedia/MediaKeySession.h (modified) (1 diff)
-
Source/WebCore/Modules/encryptedmedia/MediaKeySession.idl (modified) (1 diff)
-
Source/WebCore/html/HTMLMediaElement.cpp (modified) (1 diff)
-
Source/WebCore/testing/MockCDM.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r142904 r142918 1 2013-02-14 Jer Noble <jer.noble@apple.com> 2 3 EME: replace MediaKeySession.addKey() -> update() 4 https://bugs.webkit.org/show_bug.cgi?id=109461 5 6 Rebaseline after API change. 7 8 Reviewed by Eric Carlson. 9 10 * media/encrypted-media/encrypted-media-v2-syntax-expected.txt: 11 * media/encrypted-media/encrypted-media-v2-syntax.html: 12 1 13 2013-02-14 Lamarque V. Souza <Lamarque.Souza@basyskom.com> 2 14 -
trunk/LayoutTests/media/encrypted-media/encrypted-media-v2-syntax-expected.txt
r142327 r142918 15 15 EXPECTED (typeof mediaKeySession == 'object') OK 16 16 EXPECTED (typeof mediaKeySession.addEventListener == 'function') OK 17 EXPECTED (typeof mediaKeySession. addKey== 'function') OK17 EXPECTED (typeof mediaKeySession.update == 'function') OK 18 18 EXPECTED (mediaKeySession.error == 'null') OK 19 19 EXPECTED (mediaKeySession.keySystem == 'com.webcore.mock') OK … … 22 22 EXPECTED (mediaKeySession.onwebkitkeyerror == 'null') OK 23 23 EXPECTED (mediaKeySession.onwebkitkeymessage == 'null') OK 24 TEST(mediaKeySession. addKey(null)) THROWS(DOMException.INVALID_ACCESS_ERR) OK24 TEST(mediaKeySession.update(null)) THROWS(DOMException.INVALID_ACCESS_ERR) OK 25 25 END OF TEST 26 26 -
trunk/LayoutTests/media/encrypted-media/encrypted-media-v2-syntax.html
r142327 r142918 40 40 testExpected('typeof mediaKeySession', 'object'); 41 41 testExpected('typeof mediaKeySession.addEventListener', 'function'); 42 testExpected('typeof mediaKeySession. addKey', 'function');42 testExpected('typeof mediaKeySession.update', 'function'); 43 43 testExpected('mediaKeySession.error', null); 44 44 testExpected('mediaKeySession.keySystem', 'com.webcore.mock'); … … 47 47 testExpected('mediaKeySession.onwebkitkeyerror', null); 48 48 testExpected('mediaKeySession.onwebkitkeymessage', null); 49 testException('mediaKeySession. addKey(null)', "DOMException.INVALID_ACCESS_ERR");49 testException('mediaKeySession.update(null)', "DOMException.INVALID_ACCESS_ERR"); 50 50 endTest(); 51 51 } -
trunk/Source/WebCore/ChangeLog
r142914 r142918 1 2013-02-14 Jer Noble <jer.noble@apple.com> 2 3 EME: replace MediaKeySession.addKey() -> update() 4 https://bugs.webkit.org/show_bug.cgi?id=109461 5 6 Reviewed by Eric Carlson. 7 8 No new tests; updated media/encrypted-media/encrypted-media-v2-syntax.html test. 9 10 In the latest draft of the Encrypted Media Spec, the addKeys() method has been replaced 11 with update(). 12 13 * Modules/encryptedmedia/CDM.h: 14 * Modules/encryptedmedia/MediaKeySession.cpp: 15 (WebCore::MediaKeySession::update): 16 (WebCore::MediaKeySession::addKeyTimerFired): 17 * Modules/encryptedmedia/MediaKeySession.h: 18 * Modules/encryptedmedia/MediaKeySession.idl: 19 * html/HTMLMediaElement.cpp: 20 (WebCore::HTMLMediaElement::webkitAddKey): 21 * testing/MockCDM.cpp: 22 (WebCore::MockCDMSession::update): 23 1 24 2013-02-14 Tony Chang <tony@chromium.org> 2 25 -
trunk/Source/WebCore/Modules/encryptedmedia/CDM.h
r142327 r142918 54 54 virtual PassRefPtr<Uint8Array> generateKeyRequest(const String& mimeType, Uint8Array* initData, String& destinationURL, unsigned short& errorCode, unsigned long& systemCode) = 0; 55 55 virtual void releaseKeys() = 0; 56 virtual bool addKey(Uint8Array*, RefPtr<Uint8Array>& nextMessage, unsigned short& errorCode, unsigned long& systemCode) = 0;56 virtual bool update(Uint8Array*, RefPtr<Uint8Array>& nextMessage, unsigned short& errorCode, unsigned long& systemCode) = 0; 57 57 }; 58 58 -
trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySession.cpp
r142327 r142918 139 139 } 140 140 141 void MediaKeySession:: addKey(Uint8Array* key, ExceptionCode& ec)141 void MediaKeySession::update(Uint8Array* key, ExceptionCode& ec) 142 142 { 143 143 // From <http://dvcs.w3.org/hg/html-media/raw-file/tip/encrypted-media/encrypted-media.html#dom-addkey>: … … 166 166 unsigned long systemCode = 0; 167 167 168 // NOTE: Continued from step 2. of MediaKeySession:: addKey()168 // NOTE: Continued from step 2. of MediaKeySession::update() 169 169 // 2.1. Let cdm be the cdm loaded in the MediaKeys constructor. 170 170 // NOTE: This is m_session. … … 174 174 RefPtr<Uint8Array> nextMessage; 175 175 // 2.4. Use cdm to handle key. 176 didStoreKey = m_session-> addKey(pendingKey.get(), nextMessage, errorCode, systemCode);176 didStoreKey = m_session->update(pendingKey.get(), nextMessage, errorCode, systemCode); 177 177 // 2.5. If did store key is true and the media element is waiting for a key, queue a task to attempt to resume playback. 178 178 // TODO: Find and restart the media element -
trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySession.h
r142327 r142918 61 61 62 62 void generateKeyRequest(const String& mimeType, Uint8Array* initData); 63 void addKey(Uint8Array* key, ExceptionCode&);63 void update(Uint8Array* key, ExceptionCode&); 64 64 void close(); 65 65 -
trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySession.idl
r142327 r142918 37 37 38 38 // session operations 39 void addKey(in Uint8Array key)39 void update(in Uint8Array key) 40 40 raises(DOMException); 41 41 void close(); -
trunk/Source/WebCore/html/HTMLMediaElement.cpp
r142819 r142918 2544 2544 static bool firstTime = true; 2545 2545 if (firstTime && context() && context()->scriptExecutionContext()) { 2546 context()->scriptExecutionContext()->addConsoleMessage(JSMessageSource, WarningMessageLevel, "'HTMLMediaElement.webkitAddKey()' is deprecated. Use 'MediaKeySession. addKey()' instead.");2546 context()->scriptExecutionContext()->addConsoleMessage(JSMessageSource, WarningMessageLevel, "'HTMLMediaElement.webkitAddKey()' is deprecated. Use 'MediaKeySession.update()' instead."); 2547 2547 firstTime = false; 2548 2548 } -
trunk/Source/WebCore/testing/MockCDM.cpp
r142327 r142918 43 43 virtual PassRefPtr<Uint8Array> generateKeyRequest(const String& mimeType, Uint8Array* initData, String& destinationURL, unsigned short& errorCode, unsigned long& systemCode) OVERRIDE; 44 44 virtual void releaseKeys() OVERRIDE; 45 virtual bool addKey(Uint8Array*, RefPtr<Uint8Array>& nextMessage, unsigned short& errorCode, unsigned long& systemCode) OVERRIDE;45 virtual bool update(Uint8Array*, RefPtr<Uint8Array>& nextMessage, unsigned short& errorCode, unsigned long& systemCode) OVERRIDE; 46 46 47 47 protected: … … 129 129 } 130 130 131 bool MockCDMSession:: addKey(Uint8Array* key, RefPtr<Uint8Array>&, unsigned short& errorCode, unsigned long&)131 bool MockCDMSession::update(Uint8Array* key, RefPtr<Uint8Array>&, unsigned short& errorCode, unsigned long&) 132 132 { 133 133 for (unsigned i = 0; i < keyPrefix()->length(); ++i) {
Note:
See TracChangeset
for help on using the changeset viewer.