RESOLVED FIXED Bug 82971
Add Encrypted Media Extensions methods to HTMLMediaElement
https://bugs.webkit.org/show_bug.cgi?id=82971
Summary Add Encrypted Media Extensions methods to HTMLMediaElement
David Dorwin
Reported 2012-04-02 16:37:03 PDT
Attachments
Patch (47.83 KB, patch)
2012-04-03 10:26 PDT, David Dorwin
no flags
Patch (44.69 KB, patch)
2012-04-09 15:38 PDT, David Dorwin
no flags
Patch (44.68 KB, patch)
2012-04-09 16:40 PDT, David Dorwin
no flags
David Dorwin
Comment 1 2012-04-03 10:26:23 PDT
WebKit Review Bot
Comment 2 2012-04-03 10:31:54 PDT
Please wait for approval from abarth@webkit.org, dglazkov@chromium.org, fishd@chromium.org, jamesr@chromium.org or tkent@chromium.org before submitting, as this patch contains changes to the Chromium public API. See also https://trac.webkit.org/wiki/ChromiumWebKitAPI.
Adam Barth
Comment 3 2012-04-03 15:25:49 PDT
David, would you be willing to send an email to webkit-dev announcing this new feature? http://www.webkit.org/coding/adding-features.html Thanks.
David Dorwin
Comment 4 2012-04-03 15:48:23 PDT
@abarth: Workiing on it. Thanks.
Adam Barth
Comment 5 2012-04-09 10:27:29 PDT
Comment on attachment 135355 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=135355&action=review This patch looks pretty good. A few minor comments below. > Source/WebCore/ChangeLog:10 > + Add Encrypted Media Extensions methods to HTMLMediaElement > + https://bugs.webkit.org/show_bug.cgi?id=82971 > + > + Reviewed by NOBODY (OOPS!). > + > + Tests: media/encrypted-media/encrypted-media-not-loaded.html > + media/encrypted-media/encrypted-media-syntax.html > + Please add some more information to the ChangeLog. For example, you might mention the ENABLE(ENCRYPTED_MEDIA) macro and reference the spec that you're implementing. > Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h:210 > + static bool webkitEncryptedMediaEnabled() { return isEncryptedMediaEnabled; } > + static void setWebkitEncryptedMediaEnabled(bool isEnabled) { isEncryptedMediaEnabled = isEnabled; } We can drop the "webkit" prefix here. (I know other features use the "webkit" prefix, but they shouldn't.) > Source/WebCore/html/HTMLMediaElement.cpp:2241 > +ExceptionCode exceptionCodeForMediaKeyException(MediaPlayer::MediaKeyException exception) Please mark this function as "static" so that it has internal linkage. Also, we tend to put functions like this near the top of the file. > Source/WebCore/html/HTMLMediaElement.cpp:2252 > + default: > + ASSERT_NOT_REACHED(); > + return INVALID_STATE_ERR; WebKit tends to leave off the "default" case so that the compiler complains if we forget an enum value. > Source/WebCore/html/HTMLMediaElement.cpp:2270 > + if (initData.get()) { There's no need to call ".get()" here. There's an implicit conversion to bool. > Source/WebCore/html/HTMLMediaElement.cpp:2303 > + if (initData.get()) { ditto > Source/WebCore/html/HTMLMediaElement.cpp:2387 > - > + Generally, we don't like to trim trailing whitespace on unrelated lines because it messes up "svn blame". Would you be willing to remove these parts of the patch? > Source/WebCore/html/HTMLMediaElement.idl:130 > + This change seems unrelated. > LayoutTests/platform/mac/Skipped:480 > +fast/events/constructors/media-key-event-constructor.html I don't see this test in this patch... Maybe it's in a later patch?
David Dorwin
Comment 6 2012-04-09 15:38:39 PDT
David Dorwin
Comment 7 2012-04-09 15:41:40 PDT
Comment on attachment 135355 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=135355&action=review >> Source/WebCore/ChangeLog:10 >> + > > Please add some more information to the ChangeLog. For example, you might mention the ENABLE(ENCRYPTED_MEDIA) macro and reference the spec that you're implementing. Added that information. >> Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h:210 >> + static void setWebkitEncryptedMediaEnabled(bool isEnabled) { isEncryptedMediaEnabled = isEnabled; } > > We can drop the "webkit" prefix here. (I know other features use the "webkit" prefix, but they shouldn't.) Done >> Source/WebCore/html/HTMLMediaElement.cpp:2241 >> +ExceptionCode exceptionCodeForMediaKeyException(MediaPlayer::MediaKeyException exception) > > Please mark this function as "static" so that it has internal linkage. Also, we tend to put functions like this near the top of the file. Done >> Source/WebCore/html/HTMLMediaElement.cpp:2252 >> + return INVALID_STATE_ERR; > > WebKit tends to leave off the "default" case so that the compiler complains if we forget an enum value. Done >> Source/WebCore/html/HTMLMediaElement.cpp:2270 >> + if (initData.get()) { > > There's no need to call ".get()" here. There's an implicit conversion to bool. Done >> Source/WebCore/html/HTMLMediaElement.cpp:2303 >> + if (initData.get()) { > > ditto Done >> Source/WebCore/html/HTMLMediaElement.cpp:2387 >> + > > Generally, we don't like to trim trailing whitespace on unrelated lines because it messes up "svn blame". Would you be willing to remove these parts of the patch? Done. >> Source/WebCore/html/HTMLMediaElement.idl:130 >> + > > This change seems unrelated. Done >> LayoutTests/platform/mac/Skipped:480 >> +fast/events/constructors/media-key-event-constructor.html > > I don't see this test in this patch... Maybe it's in a later patch? Correct. It's added in https://bugs.webkit.org/show_bug.cgi?id=82974. I was trying to avoid editing these same 6 files again, but I can remove it if you prefer.
David Dorwin
Comment 8 2012-04-09 16:40:47 PDT
Adam Barth
Comment 9 2012-04-09 23:25:17 PDT
Comment on attachment 136338 [details] Patch Thanks.
WebKit Review Bot
Comment 10 2012-04-10 10:48:07 PDT
Comment on attachment 136338 [details] Patch Clearing flags on attachment: 136338 Committed r113736: <http://trac.webkit.org/changeset/113736>
WebKit Review Bot
Comment 11 2012-04-10 10:48:13 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.