[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:15:09 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit cbe93d64ccf7e953d4c3e2543e9692e6f2217c08
Author: zmo at google.com <zmo at google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Oct 29 13:35:15 2010 +0000

    2010-10-29  Zhenyao Mo  <zmo at google.com>
    
            Reviewed by Chris Marrin.
    
            drawArrays/drawElements with first/offset out of range but size==0 should generate no error
            https://bugs.webkit.org/show_bug.cgi?id=48601
    
            * fast/canvas/webgl/draw-arrays-out-of-bounds-expected.txt:
            * fast/canvas/webgl/draw-arrays-out-of-bounds.html:
            * fast/canvas/webgl/draw-elements-out-of-bounds-expected.txt:
            * fast/canvas/webgl/draw-elements-out-of-bounds.html:
    2010-10-29  Zhenyao Mo  <zmo at google.com>
    
            Reviewed by Chris Marrin.
    
            drawArrays/drawElements with first/offset out of range but size==0 should generate no error
            https://bugs.webkit.org/show_bug.cgi?id=48601
    
            * html/canvas/WebGLRenderingContext.cpp:
            (WebCore::WebGLRenderingContext::drawArrays):
            (WebCore::WebGLRenderingContext::drawElements):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70867 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 40bbd3f..ce1b189 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,15 @@
+2010-10-29  Zhenyao Mo  <zmo at google.com>
+
+        Reviewed by Chris Marrin.
+
+        drawArrays/drawElements with first/offset out of range but size==0 should generate no error
+        https://bugs.webkit.org/show_bug.cgi?id=48601
+
+        * fast/canvas/webgl/draw-arrays-out-of-bounds-expected.txt:
+        * fast/canvas/webgl/draw-arrays-out-of-bounds.html:
+        * fast/canvas/webgl/draw-elements-out-of-bounds-expected.txt:
+        * fast/canvas/webgl/draw-elements-out-of-bounds.html:
+
 2010-10-29  Mikhail Naganov  <mnaganov at chromium.org>
 
         [Chromium] Unreviewed tests checksums update. Also, fix duplicates introduced in r70865.
diff --git a/LayoutTests/fast/canvas/webgl/draw-arrays-out-of-bounds-expected.txt b/LayoutTests/fast/canvas/webgl/draw-arrays-out-of-bounds-expected.txt
index 036b77d..dd23baf 100644
--- a/LayoutTests/fast/canvas/webgl/draw-arrays-out-of-bounds-expected.txt
+++ b/LayoutTests/fast/canvas/webgl/draw-arrays-out-of-bounds-expected.txt
@@ -7,10 +7,10 @@ PASS context.drawArrays(context.TRIANGLES, 0, 1) generated expected GL error: IN
 PASS context.drawArrays(context.TRIANGLES, 0, 10000) generated expected GL error: INVALID_OPERATION.
 PASS context.drawArrays(context.TRIANGLES, 0, 10000000000000) generated expected GL error: INVALID_OPERATION.
 PASS context.drawArrays(context.TRIANGLES, 0, -1) generated expected GL error: INVALID_VALUE.
-PASS context.drawArrays(context.TRIANGLES, 1, 0) generated expected GL error: INVALID_OPERATION.
+PASS context.drawArrays(context.TRIANGLES, 1, 0) generated expected GL error: NO_ERROR.
 PASS context.drawArrays(context.TRIANGLES, -1, 0) generated expected GL error: INVALID_VALUE.
 PASS context.drawArrays(context.TRIANGLES, 0, 0) generated expected GL error: NO_ERROR.
-PASS context.drawArrays(context.TRIANGLES, 100, 0) generated expected GL error: INVALID_OPERATION.
+PASS context.drawArrays(context.TRIANGLES, 100, 0) generated expected GL error: NO_ERROR.
 PASS context.drawArrays(context.TRIANGLES, 1, -1) generated expected GL error: INVALID_VALUE.
 PASS context.drawArrays(context.TRIANGLES, -1, 1) generated expected GL error: INVALID_VALUE.
 
@@ -23,7 +23,7 @@ PASS context.drawArrays(context.TRIANGLES, 0, 10000000000000) generated expected
 PASS context.drawArrays(context.TRIANGLES, 0, -1) generated expected GL error: INVALID_VALUE.
 PASS context.drawArrays(context.TRIANGLES, -1, 0) generated expected GL error: INVALID_VALUE.
 PASS context.drawArrays(context.TRIANGLES, 0, 0) generated expected GL error: NO_ERROR.
-PASS context.drawArrays(context.TRIANGLES, 100, 0) generated expected GL error: INVALID_OPERATION.
+PASS context.drawArrays(context.TRIANGLES, 100, 0) generated expected GL error: NO_ERROR.
 PASS context.drawArrays(context.TRIANGLES, 1, -1) generated expected GL error: INVALID_VALUE.
 PASS context.drawArrays(context.TRIANGLES, -1, 1) generated expected GL error: INVALID_VALUE.
 
diff --git a/LayoutTests/fast/canvas/webgl/draw-arrays-out-of-bounds.html b/LayoutTests/fast/canvas/webgl/draw-arrays-out-of-bounds.html
index 1c50739..c242b0a 100644
--- a/LayoutTests/fast/canvas/webgl/draw-arrays-out-of-bounds.html
+++ b/LayoutTests/fast/canvas/webgl/draw-arrays-out-of-bounds.html
@@ -26,10 +26,10 @@ shouldGenerateGLError(context, context.INVALID_OPERATION, "context.drawArrays(co
 shouldGenerateGLError(context, context.INVALID_OPERATION, "context.drawArrays(context.TRIANGLES, 0, 10000)");
 shouldGenerateGLError(context, context.INVALID_OPERATION, "context.drawArrays(context.TRIANGLES, 0, 10000000000000)");
 shouldGenerateGLError(context, context.INVALID_VALUE, "context.drawArrays(context.TRIANGLES, 0, -1)");
-shouldGenerateGLError(context, context.INVALID_OPERATION, "context.drawArrays(context.TRIANGLES, 1, 0)");
+shouldGenerateGLError(context, context.NO_ERROR, "context.drawArrays(context.TRIANGLES, 1, 0)");
 shouldGenerateGLError(context, context.INVALID_VALUE, "context.drawArrays(context.TRIANGLES, -1, 0)");
 shouldGenerateGLError(context, context.NO_ERROR, "context.drawArrays(context.TRIANGLES, 0, 0)");
-shouldGenerateGLError(context, context.INVALID_OPERATION, "context.drawArrays(context.TRIANGLES, 100, 0)");
+shouldGenerateGLError(context, context.NO_ERROR, "context.drawArrays(context.TRIANGLES, 100, 0)");
 shouldGenerateGLError(context, context.INVALID_VALUE, "context.drawArrays(context.TRIANGLES, 1, -1)");
 shouldGenerateGLError(context, context.INVALID_VALUE, "context.drawArrays(context.TRIANGLES, -1, 1)");
 
@@ -45,7 +45,7 @@ shouldGenerateGLError(context, context.INVALID_OPERATION, "context.drawArrays(co
 shouldGenerateGLError(context, context.INVALID_VALUE, "context.drawArrays(context.TRIANGLES, 0, -1)");
 shouldGenerateGLError(context, context.INVALID_VALUE, "context.drawArrays(context.TRIANGLES, -1, 0)");
 shouldGenerateGLError(context, context.NO_ERROR, "context.drawArrays(context.TRIANGLES, 0, 0)");
-shouldGenerateGLError(context, context.INVALID_OPERATION, "context.drawArrays(context.TRIANGLES, 100, 0)");
+shouldGenerateGLError(context, context.NO_ERROR, "context.drawArrays(context.TRIANGLES, 100, 0)");
 shouldGenerateGLError(context, context.INVALID_VALUE, "context.drawArrays(context.TRIANGLES, 1, -1)");
 shouldGenerateGLError(context, context.INVALID_VALUE, "context.drawArrays(context.TRIANGLES, -1, 1)");
 
diff --git a/LayoutTests/fast/canvas/webgl/draw-elements-out-of-bounds-expected.txt b/LayoutTests/fast/canvas/webgl/draw-elements-out-of-bounds-expected.txt
index 8e52dfd..07ff5e2 100644
--- a/LayoutTests/fast/canvas/webgl/draw-elements-out-of-bounds-expected.txt
+++ b/LayoutTests/fast/canvas/webgl/draw-elements-out-of-bounds-expected.txt
@@ -24,7 +24,7 @@ PASS context.drawElements(context.TRIANGLES, -1, context.UNSIGNED_BYTE, 0) gener
 PASS context.drawElements(context.TRIANGLES, 0, context.UNSIGNED_BYTE, -1) generated expected GL error: INVALID_VALUE.
 PASS context.drawElements(context.TRIANGLES, -1, context.UNSIGNED_BYTE, 1) generated expected GL error: INVALID_VALUE.
 PASS context.drawElements(context.TRIANGLES, 1, context.UNSIGNED_BYTE, -1) generated expected GL error: INVALID_VALUE.
-PASS context.drawElements(context.TRIANGLES, 0, context.UNSIGNED_BYTE, 4) generated expected GL error: INVALID_OPERATION.
+PASS context.drawElements(context.TRIANGLES, 0, context.UNSIGNED_BYTE, 4) generated expected GL error: NO_ERROR.
 PASS context.drawElements(context.TRIANGLES, 0xffffffff, context.UNSIGNED_BYTE, 0) generated expected GL error: INVALID_VALUE.
 PASS context.drawElements(context.TRIANGLES, 0x7fffffff, context.UNSIGNED_BYTE, 0) generated expected GL error: INVALID_OPERATION.
 PASS context.drawElements(context.TRIANGLES, 0x7fffffff, context.UNSIGNED_BYTE, 0x7fffffff) generated expected GL error: INVALID_OPERATION.
diff --git a/LayoutTests/fast/canvas/webgl/draw-elements-out-of-bounds.html b/LayoutTests/fast/canvas/webgl/draw-elements-out-of-bounds.html
index a8054d4..76bd00c 100644
--- a/LayoutTests/fast/canvas/webgl/draw-elements-out-of-bounds.html
+++ b/LayoutTests/fast/canvas/webgl/draw-elements-out-of-bounds.html
@@ -50,7 +50,7 @@ shouldGenerateGLError(context, context.INVALID_VALUE, "context.drawElements(cont
 shouldGenerateGLError(context, context.INVALID_VALUE, "context.drawElements(context.TRIANGLES, 0, context.UNSIGNED_BYTE, -1)");
 shouldGenerateGLError(context, context.INVALID_VALUE, "context.drawElements(context.TRIANGLES, -1, context.UNSIGNED_BYTE, 1)");
 shouldGenerateGLError(context, context.INVALID_VALUE, "context.drawElements(context.TRIANGLES, 1, context.UNSIGNED_BYTE, -1)");
-shouldGenerateGLError(context, context.INVALID_OPERATION, "context.drawElements(context.TRIANGLES, 0, context.UNSIGNED_BYTE, 4)");
+shouldGenerateGLError(context, context.NO_ERROR, "context.drawElements(context.TRIANGLES, 0, context.UNSIGNED_BYTE, 4)");
 shouldGenerateGLError(context, context.INVALID_VALUE, "context.drawElements(context.TRIANGLES, 0xffffffff, context.UNSIGNED_BYTE, 0)");
 shouldGenerateGLError(context, context.INVALID_OPERATION, "context.drawElements(context.TRIANGLES, 0x7fffffff, context.UNSIGNED_BYTE, 0)");
 shouldGenerateGLError(context, context.INVALID_OPERATION, "context.drawElements(context.TRIANGLES, 0x7fffffff, context.UNSIGNED_BYTE, 0x7fffffff)");
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 3b0d13a..b66f272 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,14 @@
+2010-10-29  Zhenyao Mo  <zmo at google.com>
+
+        Reviewed by Chris Marrin.
+
+        drawArrays/drawElements with first/offset out of range but size==0 should generate no error
+        https://bugs.webkit.org/show_bug.cgi?id=48601
+
+        * html/canvas/WebGLRenderingContext.cpp:
+        (WebCore::WebGLRenderingContext::drawArrays):
+        (WebCore::WebGLRenderingContext::drawElements):
+
 2010-10-29  Leandro Gracia Gil  <leandrogracia at google.com>
 
         Reviewed by Jeremy Orlow.
diff --git a/WebCore/html/canvas/WebGLRenderingContext.cpp b/WebCore/html/canvas/WebGLRenderingContext.cpp
index a45aa1a..0b89cce 100644
--- a/WebCore/html/canvas/WebGLRenderingContext.cpp
+++ b/WebCore/html/canvas/WebGLRenderingContext.cpp
@@ -933,6 +933,9 @@ void WebGLRenderingContext::drawArrays(unsigned long mode, long first, long coun
         return;
     }
 
+    if (!count)
+        return;
+
     if (!isErrorGeneratedOnOutOfBoundsAccesses()) {
         // Ensure we have a valid rendering state
         CheckedInt<int32_t> checkedFirst(first);
@@ -983,6 +986,9 @@ void WebGLRenderingContext::drawElements(unsigned long mode, long count, unsigne
         return;
     }
 
+    if (!count)
+        return;
+
     long numElements = 0;
     if (!isErrorGeneratedOnOutOfBoundsAccesses()) {
         // Ensure we have a valid rendering state

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list