Bug 152000 - [MediaStream] MediaDeviceInfo.label must be empty unless the user has granted permission to access device
Summary: [MediaStream] MediaDeviceInfo.label must be empty unless the user has granted...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Eric Carlson
URL:
Keywords: InRadar
Depends on: 152001 152087
Blocks:
  Show dependency treegraph
 
Reported: 2015-12-08 10:38 PST by Eric Carlson
Modified: 2015-12-23 14:53 PST (History)
1 user (show)

See Also:


Attachments
Proposed patch. (38.54 KB, patch)
2015-12-23 12:12 PST, Eric Carlson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Carlson 2015-12-08 10:38:36 PST
MediaDeviceInfo.label must be empty if none of the local devices are attached to an active MediaStreamTrack in the current browsing context, and if no persistent permission to access the devices has been granted to the page's origin.
Comment 1 Eric Carlson 2015-12-23 12:12:15 PST
Created attachment 267850 [details]
Proposed patch.

Include label when the document has had an active media stream track.
Comment 2 Radar WebKit Bug Importer 2015-12-23 13:53:47 PST
<rdar://problem/24001637>
Comment 3 Brent Fulgham 2015-12-23 14:35:33 PST
Comment on attachment 267850 [details]
Proposed patch.

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

Looks good. I had a couple of minor nits below.

> Source/WebCore/ChangeLog:28
> +        (WebCore::mediaStreams): Deleted. Drive-by cleanup: moved list of all streams MediaStreamRegistry.

moved list of all streams *to* MediaStreamRegistry?

> Source/WebCore/Modules/mediastream/MediaStream.cpp:240
> +    if (Document *document = downcast<Document>(scriptExecutionContext()))

Document* document!
Comment 4 Eric Carlson 2015-12-23 14:48:51 PST
(In reply to comment #3)
> Comment on attachment 267850 [details]
>
> > Source/WebCore/ChangeLog:28
> > +        (WebCore::mediaStreams): Deleted. Drive-by cleanup: moved list of all streams MediaStreamRegistry.
> 
> moved list of all streams *to* MediaStreamRegistry?
> 
Fixed.

> > Source/WebCore/Modules/mediastream/MediaStream.cpp:240
> > +    if (Document *document = downcast<Document>(scriptExecutionContext()))
> 
> Document* document!
Oops, fixed.

Thanks!
Comment 5 Eric Carlson 2015-12-23 14:53:08 PST
Committed r194397: https://trac.webkit.org/r194397