Title: [198082] trunk/Source/WebCore
- Revision
- 198082
- Author
- [email protected]
- Date
- 2016-03-13 12:51:39 -0700 (Sun, 13 Mar 2016)
Log Message
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.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (198081 => 198082)
--- trunk/Source/WebCore/ChangeLog 2016-03-13 19:02:57 UTC (rev 198081)
+++ trunk/Source/WebCore/ChangeLog 2016-03-13 19:51:39 UTC (rev 198082)
@@ -1,3 +1,19 @@
+2016-03-13 Jon Lee <[email protected]>
+
+ 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.
+
2016-03-13 David Kilzer <[email protected]>
REGRESSION (r198079): Windows build broke because of "%PRId64" format specifier
Modified: trunk/Source/WebCore/Modules/mediastream/UserMediaRequest.cpp (198081 => 198082)
--- trunk/Source/WebCore/Modules/mediastream/UserMediaRequest.cpp 2016-03-13 19:02:57 UTC (rev 198081)
+++ trunk/Source/WebCore/Modules/mediastream/UserMediaRequest.cpp 2016-03-13 19:51:39 UTC (rev 198082)
@@ -108,10 +108,10 @@
SecurityOrigin* UserMediaRequest::userMediaDocumentOrigin() const
{
- if (m_scriptExecutionContext)
- return m_scriptExecutionContext->securityOrigin();
+ if (!m_scriptExecutionContext)
+ return nullptr;
- return nullptr;
+ return m_scriptExecutionContext->securityOrigin();
}
SecurityOrigin* UserMediaRequest::topLevelDocumentOrigin() const
@@ -119,11 +119,6 @@
if (!m_scriptExecutionContext)
return nullptr;
- if (Frame* frame = downcast<Document>(*scriptExecutionContext()).frame()) {
- if (frame->isMainFrame())
- return nullptr;
- }
-
return m_scriptExecutionContext->topOrigin();
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes