Bug 157711

Summary: Use new Web IDL dictionary support for MediaSession.setMetadata()
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: BindingsAssignee: Chris Dumez <cdumez>
Status: REOPENED ---    
Severity: Normal CC: ahmad.saleem792, ap, bfulgham, cdumez, commit-queue, darin, eric.carlson, jer.noble, rniwa
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 157725    
Bug Blocks:    
Attachments:
Description Flags
Patch none

Description Chris Dumez 2016-05-14 13:31:12 PDT
Use new Web IDL dictionary support for MediaSession.setMetadata()
Comment 1 Chris Dumez 2016-05-14 13:34:09 PDT
Created attachment 278944 [details]
Patch
Comment 2 WebKit Commit Bot 2016-05-14 16:51:07 PDT
Comment on attachment 278944 [details]
Patch

Clearing flags on attachment: 278944

Committed r200925: <http://trac.webkit.org/changeset/200925>
Comment 3 WebKit Commit Bot 2016-05-14 16:51:13 PDT
All reviewed patches have been landed.  Closing bug.
Comment 4 Darin Adler 2016-05-15 01:41:15 PDT
Comment on attachment 278944 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=278944&action=review

> Source/WebCore/Modules/mediasession/MediaSession.h:56
> +    struct MediaMetadataInit {

I am surprised this works. Maybe the bindings are inside an #if and not compiling. The name for the struct is supposed to be MediaSession::MetadataInit, not MediaSession::MediaMetadataInit. Maybe there is a bug in the GetNestedClassName function in CodeGeneratorJS.pm?
Comment 5 Darin Adler 2016-05-15 01:42:34 PDT
Yes, looks like this will fail to compile if ENABLE(MEDIA_SESSION) is true.
Comment 6 WebKit Commit Bot 2016-05-15 08:34:07 PDT
Re-opened since this is blocked by bug 157725
Comment 7 Chris Dumez 2016-05-15 08:34:12 PDT
(In reply to comment #5)
> Yes, looks like this will fail to compile if ENABLE(MEDIA_SESSION) is true.

Ok, I will roll out :( I was convinced this was enabled on Mac for some reason.
Comment 8 Darin Adler 2016-05-15 10:15:07 PDT
We can definitely redo it; we just need to turn on compiling on some platform. I find it really hard to maintain code that is not compiled!
Comment 9 Ahmad Saleem 2022-09-02 15:54:17 PDT
This was rolled out and I noticed that there are difference in Webkit MediaSession.IDL with Chrome / Blink:

Webkit Link - https://github.com/WebKit/WebKit/blob/main/Source/WebCore/Modules/mediasession/MediaSession.idl

Chromium / Blink - https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/modules/mediasession/media_session.idl?q=media_Session.idl

Chris - is this needed? Thanks!