getUserMedia requests from the main frame should be treated the same as requests...
authorjonlee@apple.com <jonlee@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 13 Mar 2016 19:51:39 +0000 (19:51 +0000)
committerjonlee@apple.com <jonlee@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 13 Mar 2016 19:51:39 +0000 (19:51 +0000)
commit3419aa0bfbe7a76e8ccd520890b0e9cef20b3b03
tree7995c91ee7e3f4a0f6d372f7909fb64e89537a10
parent10b83cf113ad8e060ec6584f0117509dfededb70
getUserMedia requests from the main frame should be treated the same as requests from an iframe with the same origin
https://bugs.webkit.org/show_bug.cgi?id=155405
<rdar://problem/25131007>

Reviewed by Eric Carlson.

When gUM is called from the main frame, or from a subframe with the same origin, the
top level document origin should be the same.

* Modules/mediastream/UserMediaRequest.cpp:
(WebCore::UserMediaRequest::userMediaDocumentOrigin): Reverse the logic so that it is similar
to topLevelDocumentOrigin.
(WebCore::UserMediaRequest::topLevelDocumentOrigin): Return the top origin always.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@198082 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/Modules/mediastream/UserMediaRequest.cpp