Bug 153163

Summary: [MediaStream] MediaDeviceInfo deviceId and groupId must be unique to the page's origin
Product: WebKit Reporter: Eric Carlson <eric.carlson>
Component: MediaAssignee: Eric Carlson <eric.carlson>
Status: RESOLVED FIXED    
Severity: Normal CC: adam.bergkvist, buildbot, commit-queue, jonlee, rniwa, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
WIP patch for the bots to chew on
buildbot: commit-queue-
Archive of layout-test-results from ews105 for mac-yosemite-wk2
none
Another WIP patch for the bots to check.
buildbot: commit-queue-
Archive of layout-test-results from ews104 for mac-yosemite-wk2
none
Patch for the bots.
none
Updated patch for the bots.
none
Another updated patch for the bots.
none
Another updated patch.
none
Another updated patch.
none
Another updated patch.
none
Another updated patch.
none
Another updated patch.
none
Proposed patch. none

Description Eric Carlson 2016-01-15 15:50:57 PST
MediaDeviceInfo.deviceId and MediaDeviceInfo.groupId must be unique to the page origin, but they must be stable across browsing sessions if the user has granted persistent permission to an origin to access local devices. When in Private Browsing, different identifiers must be used that do not persist across sessions. Persistent identifiers must be reset when the user clears cached identifiers (eg. cookies).
Comment 1 Eric Carlson 2016-01-15 16:27:03 PST
Created attachment 269119 [details]
WIP patch for the bots to chew on
Comment 2 WebKit Commit Bot 2016-01-15 16:29:36 PST
Attachment 269119 [details] did not pass style-queue:


ERROR: Source/WebCore/CMakeLists.txt:924:  No trailing spaces  [whitespace/trailing] [5]
ERROR: Source/WebCore/CMakeLists.txt:924:  Alphabetical sorting problem. "Modules/mediastream/MediaDeviceIdentifierHashSaltRequest.cpp" should be before "Modules/mediastream/MediaDevices.cpp".  [list/order] [5]
Total errors found: 2 in 67 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Build Bot 2016-01-15 17:41:08 PST
Comment on attachment 269119 [details]
WIP patch for the bots to chew on

Attachment 269119 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/696324

New failing tests:
http/tests/media/media-stream/enumerate-devices-source-id.html
http/tests/media/media-stream/enumerate-devices-source-id-frame.html
http/tests/contentextensions/font-display-none-repeated-layout.html
http/tests/media/media-stream/enumerate-devices-source-id-persistent-permission-frame.html
Comment 4 Build Bot 2016-01-15 17:41:10 PST
Created attachment 269134 [details]
Archive of layout-test-results from ews105 for mac-yosemite-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews105  Port: mac-yosemite-wk2  Platform: Mac OS X 10.10.5
Comment 5 Eric Carlson 2016-01-20 09:31:06 PST
Created attachment 269353 [details]
Another WIP patch for the bots to check.
Comment 6 Build Bot 2016-01-20 10:31:31 PST
Comment on attachment 269353 [details]
Another WIP patch for the bots to check.

Attachment 269353 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/717781

New failing tests:
http/tests/media/media-stream/enumerate-devices-source-id.html
Comment 7 Build Bot 2016-01-20 10:31:36 PST
Created attachment 269356 [details]
Archive of layout-test-results from ews104 for mac-yosemite-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews104  Port: mac-yosemite-wk2  Platform: Mac OS X 10.10.5
Comment 8 Radar WebKit Bug Importer 2016-01-25 14:37:21 PST
<rdar://problem/24334526>
Comment 9 Eric Carlson 2016-02-23 16:32:26 PST
Created attachment 272062 [details]
Patch for the bots.
Comment 10 Eric Carlson 2016-02-23 17:56:54 PST
Created attachment 272073 [details]
Updated patch for the bots.
Comment 11 Eric Carlson 2016-02-24 09:59:38 PST
Created attachment 272116 [details]
Another updated patch for the bots.
Comment 12 Eric Carlson 2016-02-24 10:58:13 PST
Created attachment 272120 [details]
Another updated patch.
Comment 13 Eric Carlson 2016-02-24 11:18:31 PST
Created attachment 272124 [details]
Another updated patch.
Comment 14 Eric Carlson 2016-02-24 11:42:47 PST
Created attachment 272130 [details]
Another updated patch.
Comment 15 Eric Carlson 2016-02-24 11:56:30 PST
Created attachment 272133 [details]
Another updated patch.
Comment 16 Eric Carlson 2016-02-24 12:12:47 PST
Created attachment 272134 [details]
Another updated patch.
Comment 17 Eric Carlson 2016-02-24 12:58:06 PST
Created attachment 272141 [details]
Proposed patch.
Comment 18 Tim Horton 2016-02-24 13:19:48 PST
Comment on attachment 272141 [details]
Proposed patch.

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

> Source/WebCore/Modules/mediastream/MediaDevicesRequest.cpp:99
> +static void hashString(SHA1& sha1, const String& string)

Surprising this is here and not elsewhere. Very nitpicky string logic to be in media code.
Comment 19 Eric Carlson 2016-02-25 07:18:14 PST
Committed r197114: <http://trac.webkit.org/changeset/197114>
Comment 20 Eric Carlson 2016-02-25 08:35:50 PST
And https://trac.webkit.org/r197120  to fix the iOS builds.