[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

zmo at google.com zmo at google.com
Wed Dec 22 15:23:08 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit de236775e690adc758d4fa6857dbe81a53e502f6
Author: zmo at google.com <zmo at google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Nov 2 16:44:27 2010 +0000

    2010-11-01  Zhenyao Mo  <zmo at google.com>
    
            Reviewed by Andreas Kling.
    
            vertexAttribPointer should generate INVALID_VALUE if the stride exceeds 255
            https://bugs.webkit.org/show_bug.cgi?id=48677
    
            Test: fast/canvas/webgl/gl-vertexattribpointer.html
    
            * html/canvas/WebGLRenderingContext.cpp:
            (WebCore::WebGLRenderingContext::vertexAttribPointer): Generate INVALID_VALUE if stride > 255.
    2010-11-01  Zhenyao Mo  <zmo at google.com>
    
            Reviewed by Andreas Kling.
    
            vertexAttribPointer should generate INVALID_VALUE if the stride exceeds 255
            https://bugs.webkit.org/show_bug.cgi?id=48677
    
            * fast/canvas/webgl/gl-vertexattribpointer-expected.txt: Added.
            * fast/canvas/webgl/gl-vertexattribpointer.html: Added.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71123 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 4cb66b4..d562307 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,13 @@
+2010-11-01  Zhenyao Mo  <zmo at google.com>
+
+        Reviewed by Andreas Kling.
+
+        vertexAttribPointer should generate INVALID_VALUE if the stride exceeds 255
+        https://bugs.webkit.org/show_bug.cgi?id=48677
+
+        * fast/canvas/webgl/gl-vertexattribpointer-expected.txt: Added.
+        * fast/canvas/webgl/gl-vertexattribpointer.html: Added.
+
 2010-11-02  Stephen White  <senorblanco at chromium.org>
 
         Unreviewed; test expectations fix.
diff --git a/LayoutTests/fast/canvas/webgl/gl-vertexattribpointer-expected.txt b/LayoutTests/fast/canvas/webgl/gl-vertexattribpointer-expected.txt
new file mode 100644
index 0000000..addf09d
--- /dev/null
+++ b/LayoutTests/fast/canvas/webgl/gl-vertexattribpointer-expected.txt
@@ -0,0 +1,17 @@
+This test checks vertexAttribPointer behaviors in WebGL.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Canvas.getContext
+PASS context exists
+
+Checking gl.vertexAttribPointer.
+PASS getError was expected value: INVALID_OPERATION : vertexAttribPointer should fail if no buffer is bound
+PASS getError was expected value: INVALID_VALUE : WebGL API supports vertex attribute data strides up to 255 bytes
+PASS getError was expected value: NO_ERROR : vertexAttribPointer with stride <= 255 should succeed
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/canvas/webgl/gl-vertexattribpointer.html b/LayoutTests/fast/canvas/webgl/gl-vertexattribpointer.html
new file mode 100644
index 0000000..70c8ee7
--- /dev/null
+++ b/LayoutTests/fast/canvas/webgl/gl-vertexattribpointer.html
@@ -0,0 +1,56 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+  "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>WebGL vertexAttribPointer Conformance Tests</title>
+<link rel="stylesheet" href="../../js/resources/js-test-style.css"/>
+<script src="resources/desktop-gl-constants.js" type="text/javascript"></script>
+<script src="../../js/resources/js-test-pre.js"></script>
+<script src="resources/webgl-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<canvas id="canvas" width="2" height="2"> </canvas>
+<script>
+description("This test checks vertexAttribPointer behaviors in WebGL.");
+
+debug("");
+debug("Canvas.getContext");
+
+var gl = create3DContext(document.getElementById("canvas"));
+if (!gl) {
+  testFailed("context does not exist");
+} else {
+  testPassed("context exists");
+
+  debug("");
+  debug("Checking gl.vertexAttribPointer.");
+
+  gl.vertexAttribPointer(0, 3, gl.FLOAT, 0, 0, 12);
+  glErrorShouldBe(gl, gl.INVALID_OPERATION,
+      "vertexAttribPointer should fail if no buffer is bound");
+
+  var vertexObject = gl.createBuffer();
+  gl.bindBuffer(gl.ARRAY_BUFFER, vertexObject);
+  gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(512), gl.STATIC_DRAW);
+  gl.vertexAttribPointer(0, 1, gl.FLOAT, 0, 256, 0);
+  glErrorShouldBe(gl, gl.INVALID_VALUE,
+      "WebGL API supports vertex attribute data strides up to 255 bytes");
+  gl.vertexAttribPointer(0, 1, gl.FLOAT, 0, 255, 0);
+  glErrorShouldBe(gl, gl.NO_ERROR,
+      "vertexAttribPointer with stride <= 255 should succeed");
+}
+
+debug("");
+successfullyParsed = true;
+
+</script>
+<script src="../../js/resources/js-test-post.js"></script>
+
+<script>
+</script>
+
+</body>
+</html>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 97463a2..4c1443b 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,15 @@
+2010-11-01  Zhenyao Mo  <zmo at google.com>
+
+        Reviewed by Andreas Kling.
+
+        vertexAttribPointer should generate INVALID_VALUE if the stride exceeds 255
+        https://bugs.webkit.org/show_bug.cgi?id=48677
+
+        Test: fast/canvas/webgl/gl-vertexattribpointer.html
+
+        * html/canvas/WebGLRenderingContext.cpp:
+        (WebCore::WebGLRenderingContext::vertexAttribPointer): Generate INVALID_VALUE if stride > 255.
+
 2010-11-01  Martin Robinson  <mrobinson at igalia.com>
 
         Reviewed by Xan Lopez.
diff --git a/WebCore/html/canvas/WebGLRenderingContext.cpp b/WebCore/html/canvas/WebGLRenderingContext.cpp
index 0b89cce..6b0b5fa 100644
--- a/WebCore/html/canvas/WebGLRenderingContext.cpp
+++ b/WebCore/html/canvas/WebGLRenderingContext.cpp
@@ -2845,7 +2845,7 @@ void WebGLRenderingContext::vertexAttribPointer(unsigned long index, long size,
         m_context->synthesizeGLError(GraphicsContext3D::INVALID_VALUE);
         return;
     }
-    if (size < 1 || size > 4 || stride < 0 || offset < 0) {
+    if (size < 1 || size > 4 || stride < 0 || stride > 255 || offset < 0) {
         m_context->synthesizeGLError(GraphicsContext3D::INVALID_VALUE);
         return;
     }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list