Bug 147322 - Media Session: give media elements unique IDs
Summary: Media Session: give media elements unique IDs
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks: 145411
  Show dependency treegraph
 
Reported: 2015-07-27 09:56 PDT by Matt Rajca
Modified: 2015-07-31 23:40 PDT (History)
4 users (show)

See Also:


Attachments
Patch (3.61 KB, patch)
2015-07-27 10:04 PDT, Matt Rajca
eric.carlson: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>