Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(893)

Unified Diff: Source/core/html/HTMLMediaElement.cpp

Issue 893123004: Check origin before providing initData in encrypted event (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: common Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/html/HTMLMediaElement.cpp
diff --git a/Source/core/html/HTMLMediaElement.cpp b/Source/core/html/HTMLMediaElement.cpp
index 87488bcd8747770f47dbde13f397416c2228c213..ceb74cb00a5ef8a9e374d5dab607b0ac77dedbf4 100644
--- a/Source/core/html/HTMLMediaElement.cpp
+++ b/Source/core/html/HTMLMediaElement.cpp
@@ -1564,6 +1564,11 @@ bool HTMLMediaElement::isSafeToLoadURL(const KURL& url, InvalidURLAction actionI
return true;
}
+bool HTMLMediaElement::canAccessSrcFromOrigin(SecurityOrigin* origin) const
+{
+ return hasSingleSecurityOrigin() && ((webMediaPlayer() && webMediaPlayer()->didPassCORSAccessCheck()) || !origin->taintsCanvas(currentSrc()));
ddorwin 2015/02/04 23:56:51 taintsCanvas() has a special exception that is not
ddorwin 2015/02/04 23:56:51 It's not clear what didPassCORSAccessCheck() means
sandersd (OOO until July 31) 2015/02/05 00:32:29 The name is bad, the meaning is that there was a c
sandersd (OOO until July 31) 2015/02/05 00:32:29 My reading of the code is that it is canRequest()
+}
+
void HTMLMediaElement::startProgressEventTimer()
{
if (m_progressEventTimer.isActive())

Powered by Google App Engine
This is Rietveld 408576698