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

Unified Diff: third_party/WebKit/LayoutTests/fast/canvas/webgl/css-webkit-canvas-repaint.html

Issue 1416793004: Remove support for -webkit-canvas and Document.getCSSCanvasContext. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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: third_party/WebKit/LayoutTests/fast/canvas/webgl/css-webkit-canvas-repaint.html
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/webgl/css-webkit-canvas-repaint.html b/third_party/WebKit/LayoutTests/fast/canvas/webgl/css-webkit-canvas-repaint.html
deleted file mode 100644
index d8bc828a1f5b7217c0038bb803a5a8537f4891c4..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/fast/canvas/webgl/css-webkit-canvas-repaint.html
+++ /dev/null
@@ -1,117 +0,0 @@
-<html>
- <head>
- <style>
- div {
- width:200px;
- height:200px;
- border:2px solid black;
- content: -webkit-canvas(triangle);
- }
- </style>
-
- <script id="vertexShader" type="x-shader/x-vertex">
- attribute vec4 vPosition;
-
- void main() {
- gl_Position = vPosition;
- }
- </script>
-
- <script id="fragmentShader" type="x-shader/x-fragment">
- void main() {
- gl_FragColor = vec4(0.8, 0.7, 0, 1.0);
- }
- </script>
-
- <script type="application/x-javascript">
- function getFragmentShader()
- {
- var shaderNode = document.getElementById("fragmentShader"); // fragmentShader has been defined at the top
- var shaderSource = getShaderSource(shaderNode);
-
- var shader = gl.createShader(gl.FRAGMENT_SHADER);
- gl.shaderSource(shader, shaderSource);
- gl.compileShader(shader);
-
- return shader;
- }
-
- function getShaderSource(shaderNode)
- {
- var shaderSource = "";
- var node = shaderNode.firstChild;
- while (node) {
- if (node.nodeType == 3) // Node.TEXT_NODE
- shaderSource += node.textContent;
- node = node.nextSibling;
- }
-
- return shaderSource;
- }
-
- function getVertexShader()
- {
- var shaderNode = document.getElementById("vertexShader");
- var shaderSource = getShaderSource(shaderNode);
-
- var shader = gl.createShader(gl.VERTEX_SHADER);
- gl.shaderSource(shader, shaderSource);
- gl.compileShader(shader);
-
- return shader;
- }
-
- function initialize()
- {
- gl = document.getCSSCanvasContext("webgl", "triangle", 200, 200);
-
- var vertexShader = getVertexShader();
- var fragmentShader = getFragmentShader();
-
- var shaderProgram = gl.createProgram();
- gl.attachShader(shaderProgram, vertexShader);
- gl.attachShader(shaderProgram, fragmentShader);
- gl.bindAttribLocation(shaderProgram, 0, "vPosition"); // vPosition has been defined at the top
- gl.linkProgram(shaderProgram);
-
- gl.useProgram(shaderProgram);
-
- var buffer = gl.createBuffer();
- gl.bindBuffer(gl.ARRAY_BUFFER, buffer);
- }
-
- function draw(r, g, b)
- {
- var vertices = [ 0.0, 0.8, 0.0,
- -0.8, -0.8, 0.0,
- 0.8, -0.8, 0.0 ];
- gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(vertices), gl.STATIC_DRAW);
-
- gl.vertexAttribPointer(0, 3, gl.FLOAT, false, 0, 0); // Load the vertex data
- gl.enableVertexAttribArray(0);
- gl.clearColor(r, g, b, 1);
- gl.clear(gl.COLOR_BUFFER_BIT);
- gl.drawArrays(gl.TRIANGLES, 0, 3);
- }
-
- if (window.testRunner) {
- testRunner.waitUntilDone();
- testRunner.overridePreference("WebKitWebGLEnabled", "1");
- }
-
- initialize();
-
- setTimeout(function() {
- draw(0.7, 0, 0);
- setTimeout(function() {
- draw(0, 0.5, 0);
- if (window.testRunner)
- testRunner.notifyDone();
- }, 100);
- }, 100);
- </script>
- </head>
- <body>
- <div></div>
- </body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698