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

Side by Side Diff: Source/core/html/canvas/WebGLRenderingContext.cpp

Issue 80363002: Fix spelling in tainted canvas error message. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « LayoutTests/http/tests/security/webgl-remote-read-remote-image-blocked-no-crossorigin-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 5144 matching lines...) Expand 10 before | Expand all | Expand 10 after
5155 return true; 5155 return true;
5156 } 5156 }
5157 5157
5158 bool WebGLRenderingContext::validateHTMLCanvasElement(const char* functionName, HTMLCanvasElement* canvas, ExceptionState& exceptionState) 5158 bool WebGLRenderingContext::validateHTMLCanvasElement(const char* functionName, HTMLCanvasElement* canvas, ExceptionState& exceptionState)
5159 { 5159 {
5160 if (!canvas || !canvas->buffer()) { 5160 if (!canvas || !canvas->buffer()) {
5161 synthesizeGLError(GraphicsContext3D::INVALID_VALUE, functionName, "no ca nvas"); 5161 synthesizeGLError(GraphicsContext3D::INVALID_VALUE, functionName, "no ca nvas");
5162 return false; 5162 return false;
5163 } 5163 }
5164 if (wouldTaintOrigin(canvas)) { 5164 if (wouldTaintOrigin(canvas)) {
5165 exceptionState.throwSecurityError(ExceptionMessages::failedToExecute(fun ctionName, "WebGLRenderingContext", "tainted canvases may not be loded.")); 5165 exceptionState.throwSecurityError(ExceptionMessages::failedToExecute(fun ctionName, "WebGLRenderingContext", "tainted canvases may not be loaded."));
5166 return false; 5166 return false;
5167 } 5167 }
5168 return true; 5168 return true;
5169 } 5169 }
5170 5170
5171 bool WebGLRenderingContext::validateHTMLVideoElement(const char* functionName, H TMLVideoElement* video, ExceptionState& exceptionState) 5171 bool WebGLRenderingContext::validateHTMLVideoElement(const char* functionName, H TMLVideoElement* video, ExceptionState& exceptionState)
5172 { 5172 {
5173 if (!video || !video->videoWidth() || !video->videoHeight()) { 5173 if (!video || !video->videoWidth() || !video->videoHeight()) {
5174 synthesizeGLError(GraphicsContext3D::INVALID_VALUE, functionName, "no vi deo"); 5174 synthesizeGLError(GraphicsContext3D::INVALID_VALUE, functionName, "no vi deo");
5175 return false; 5175 return false;
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
5616 if (m_textureUnits[i].m_texture2DBinding 5616 if (m_textureUnits[i].m_texture2DBinding
5617 || m_textureUnits[i].m_textureCubeMapBinding) { 5617 || m_textureUnits[i].m_textureCubeMapBinding) {
5618 m_onePlusMaxNonDefaultTextureUnit = i + 1; 5618 m_onePlusMaxNonDefaultTextureUnit = i + 1;
5619 return; 5619 return;
5620 } 5620 }
5621 } 5621 }
5622 m_onePlusMaxNonDefaultTextureUnit = 0; 5622 m_onePlusMaxNonDefaultTextureUnit = 0;
5623 } 5623 }
5624 5624
5625 } // namespace WebCore 5625 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/http/tests/security/webgl-remote-read-remote-image-blocked-no-crossorigin-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698