Bug 147322

Summary: Media Session: give media elements unique IDs
Product: WebKit Reporter: Matt Rajca <mrajca>
Component: MediaAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: conrad_shultz, eric.carlson, mrajca, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 145411    
Attachments:
Description Flags
Patch eric.carlson: review+

Description Matt Rajca 2015-07-27 09:56:43 PDT
Web page/element ID pairs will be used to keep track of the "focused" Content media element in the UI process. To be able to identify media elements, we give them unique IDs.
Comment 1 Radar WebKit Bug Importer 2015-07-27 09:57:25 PDT
<rdar://problem/22011625>
Comment 2 Matt Rajca 2015-07-27 10:04:12 PDT
Created attachment 257565 [details]
Patch
Comment 3 Eric Carlson 2015-07-31 17:35:30 PDT
Comment on attachment 257565 [details]
Patch

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

As we discussed offline, please file a bug about consolidating this with the MediaPlaybackTargetClient map.

> Source/WebCore/html/HTMLMediaElement.cpp:435
> +    static uint64_t elementID = 0;
> +    m_elementID = ++elementID;

Nit: we usually put something like this in a static function, eg. uint64_t nextPlaybackTargetClientContextId() in Document.cpp.
Comment 4 Matt Rajca 2015-07-31 22:51:27 PDT
(In reply to comment #3)
> Comment on attachment 257565 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=257565&action=review
> 
> As we discussed offline, please file a bug about consolidating this with the
> MediaPlaybackTargetClient map.

Filed: https://bugs.webkit.org/show_bug.cgi?id=147522

> 
> > Source/WebCore/html/HTMLMediaElement.cpp:435
> > +    static uint64_t elementID = 0;
> > +    m_elementID = ++elementID;
> 
> Nit: we usually put something like this in a static function, eg. uint64_t
> nextPlaybackTargetClientContextId() in Document.cpp.

Added.
Comment 5 Matt Rajca 2015-07-31 23:40:05 PDT
Committed r187712: <http://trac.webkit.org/changeset/187712>