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

Unified Diff: Source/core/html/canvas/WebGLRenderingContextBase.cpp

Issue 181693006: Refactoring source image usage in CanvasRenderingContext2D (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: applied last corrections Created 6 years, 9 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
« no previous file with comments | « Source/core/html/canvas/CanvasRenderingContext2D.idl ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/canvas/WebGLRenderingContextBase.cpp
diff --git a/Source/core/html/canvas/WebGLRenderingContextBase.cpp b/Source/core/html/canvas/WebGLRenderingContextBase.cpp
index 17d2a38b73aa29b8db6b3aaf639a0360bd4c4091..55316929862abeaa1e212a8d740eebbc30f4278b 100644
--- a/Source/core/html/canvas/WebGLRenderingContextBase.cpp
+++ b/Source/core/html/canvas/WebGLRenderingContextBase.cpp
@@ -5094,7 +5094,7 @@ bool WebGLRenderingContextBase::validateHTMLImageElement(const char* functionNam
synthesizeGLError(GL_INVALID_VALUE, functionName, "invalid image");
return false;
}
- if (wouldTaintOrigin(image)) {
+ if (image->wouldTaintOrigin(canvas()->securityOrigin())) {
exceptionState.throwSecurityError("The cross-origin image at " + url.elidedString() + " may not be loaded.");
return false;
}
@@ -5107,7 +5107,7 @@ bool WebGLRenderingContextBase::validateHTMLCanvasElement(const char* functionNa
synthesizeGLError(GL_INVALID_VALUE, functionName, "no canvas");
return false;
}
- if (wouldTaintOrigin(canvas)) {
+ if (canvas->wouldTaintOrigin(this->canvas()->securityOrigin())) {
exceptionState.throwSecurityError("Tainted canvases may not be loaded.");
return false;
}
@@ -5120,7 +5120,7 @@ bool WebGLRenderingContextBase::validateHTMLVideoElement(const char* functionNam
synthesizeGLError(GL_INVALID_VALUE, functionName, "no video");
return false;
}
- if (wouldTaintOrigin(video)) {
+ if (video->wouldTaintOrigin(canvas()->securityOrigin())) {
exceptionState.throwSecurityError("The video element contains cross-origin data, and may not be loaded.");
return false;
}
« no previous file with comments | « Source/core/html/canvas/CanvasRenderingContext2D.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698