[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 13:48:06 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 3253d53ec772ff091c7947826526eb5973949fac
Author: zmo at google.com <zmo at google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Sep 27 17:07:39 2010 +0000

    2010-09-16  Zhenyao Mo  <zmo at google.com>
    
            Reviewed by Kenneth Russell.
    
            Fold getString into getParameter and implement new queries
            https://bugs.webkit.org/show_bug.cgi?id=40321
    
            Test: fast/canvas/webgl/gl-getstring.html
    
            * html/canvas/WebGLRenderingContext.cpp: Merge getString enums into getParameter.
            (WebCore::WebGLRenderingContext::getParameter):
            * html/canvas/WebGLRenderingContext.h: Remove getString.
            * html/canvas/WebGLRenderingContext.idl: Remove getString.
    2010-09-16  Zhenyao Mo  <zmo at google.com>
    
            Reviewed by Kenneth Russell.
    
            Fold getString into getParameter and implement new queries
            https://bugs.webkit.org/show_bug.cgi?id=40321
    
            * fast/canvas/webgl/gl-getstring-expected.txt: Added.
            * fast/canvas/webgl/gl-getstring.html: Added.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68400 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index be610ac..70baf37 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,13 @@
+2010-09-16  Zhenyao Mo  <zmo at google.com>
+
+        Reviewed by Kenneth Russell.
+
+        Fold getString into getParameter and implement new queries
+        https://bugs.webkit.org/show_bug.cgi?id=40321
+
+        * fast/canvas/webgl/gl-getstring-expected.txt: Added.
+        * fast/canvas/webgl/gl-getstring.html: Added.
+
 2010-09-24  Zhenyao Mo  <zmo at google.com>
 
         Reviewed by Kenneth Russell.
diff --git a/LayoutTests/fast/canvas/webgl/gl-getstring-expected.txt b/LayoutTests/fast/canvas/webgl/gl-getstring-expected.txt
new file mode 100644
index 0000000..3b5b466
--- /dev/null
+++ b/LayoutTests/fast/canvas/webgl/gl-getstring-expected.txt
@@ -0,0 +1,18 @@
+This test checks getParameter returns strings in the correct format
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Canvas.getContext
+PASS context exists
+
+PASS getParameter(gl.VERSION) correctly started with WebGL 1.0
+PASS getParameter(gl.SHADING_LANGUAGE_VERSION) correctly started with WebGL GLSL ES 1.0
+PASS gl.getParameter(gl.VENDOR) is non-null.
+PASS gl.getParameter(gl.RENDERER) is non-null.
+PASS gl.getError() is gl.NO_ERROR
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/canvas/webgl/gl-getstring.html b/LayoutTests/fast/canvas/webgl/gl-getstring.html
new file mode 100644
index 0000000..a824a02
--- /dev/null
+++ b/LayoutTests/fast/canvas/webgl/gl-getstring.html
@@ -0,0 +1,57 @@
+<!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 gl.getParameter Strings 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 getParameter returns strings in the correct format");
+
+debug("");
+debug("Canvas.getContext");
+
+var gl = create3DContext(document.getElementById("canvas"));
+if (!gl) {
+  testFailed("context does not exist");
+} else {
+  testPassed("context exists");
+
+  debug("");
+  checkPrefix("WebGL 1.0", "VERSION");
+  checkPrefix("WebGL GLSL ES 1.0", "SHADING_LANGUAGE_VERSION");
+  shouldBeNonNull("gl.getParameter(gl.VENDOR)");
+  shouldBeNonNull("gl.getParameter(gl.RENDERER)");
+  shouldBe("gl.getError()", "gl.NO_ERROR");
+}
+
+function checkPrefix(expected, enum_val) {
+  var s = gl.getParameter(gl[enum_val]);
+  if (s != null &&
+      s.length >= expected.length &&
+      s.substring(0, expected.length) == expected) {
+    testPassed("getParameter(gl." + enum_val + ") correctly started with " + expected);
+  } else {
+    testFailed("getParameter(gl." + enum_val + ") did not start with " + expected);
+  }
+}
+
+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 c662573..d4e8ad5 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2010-09-16  Zhenyao Mo  <zmo at google.com>
+
+        Reviewed by Kenneth Russell.
+
+        Fold getString into getParameter and implement new queries
+        https://bugs.webkit.org/show_bug.cgi?id=40321
+
+        Test: fast/canvas/webgl/gl-getstring.html
+
+        * html/canvas/WebGLRenderingContext.cpp: Merge getString enums into getParameter.
+        (WebCore::WebGLRenderingContext::getParameter):
+        * html/canvas/WebGLRenderingContext.h: Remove getString.
+        * html/canvas/WebGLRenderingContext.idl: Remove getString.
+
 2010-09-24  Zhenyao Mo  <zmo at google.com>
 
         Reviewed by Kenneth Russell.
diff --git a/WebCore/html/canvas/WebGLRenderingContext.cpp b/WebCore/html/canvas/WebGLRenderingContext.cpp
index 68a6954..8c371a4 100644
--- a/WebCore/html/canvas/WebGLRenderingContext.cpp
+++ b/WebCore/html/canvas/WebGLRenderingContext.cpp
@@ -1379,6 +1379,8 @@ WebGLGetInfo WebGLRenderingContext::getParameter(unsigned long pname, ExceptionC
         return getLongParameter(pname);
     case GraphicsContext3D::RENDERBUFFER_BINDING:
         return WebGLGetInfo(PassRefPtr<WebGLRenderbuffer>(m_renderbufferBinding));
+    case GraphicsContext3D::RENDERER:
+        return WebGLGetInfo(m_context->getString(GraphicsContext3D::RENDERER));
     case GraphicsContext3D::SAMPLE_BUFFERS:
         return getLongParameter(pname);
     case GraphicsContext3D::SAMPLE_COVERAGE_INVERT:
@@ -1391,6 +1393,8 @@ WebGLGetInfo WebGLRenderingContext::getParameter(unsigned long pname, ExceptionC
         return getWebGLIntArrayParameter(pname);
     case GraphicsContext3D::SCISSOR_TEST:
         return getBooleanParameter(pname);
+    case GraphicsContext3D::SHADING_LANGUAGE_VERSION:
+        return WebGLGetInfo("WebGL GLSL ES 1.0 (" + m_context->getString(GraphicsContext3D::SHADING_LANGUAGE_VERSION) + ")");
     case GraphicsContext3D::STENCIL_BACK_FAIL:
         return getUnsignedLongParameter(pname);
     case GraphicsContext3D::STENCIL_BACK_FUNC:
@@ -1438,6 +1442,10 @@ WebGLGetInfo WebGLRenderingContext::getParameter(unsigned long pname, ExceptionC
         return WebGLGetInfo(m_unpackFlipY);
     case GraphicsContext3D::UNPACK_PREMULTIPLY_ALPHA_WEBGL:
         return WebGLGetInfo(m_unpackPremultiplyAlpha);
+    case GraphicsContext3D::VENDOR:
+        return WebGLGetInfo("Webkit (" + m_context->getString(GraphicsContext3D::VENDOR) + ")");
+    case GraphicsContext3D::VERSION:
+        return WebGLGetInfo("WebGL 1.0 (" + m_context->getString(GraphicsContext3D::VERSION) + ")");
     case GraphicsContext3D::VIEWPORT:
         return getWebGLIntArrayParameter(pname);
     default:
@@ -1563,12 +1571,6 @@ String WebGLRenderingContext::getShaderSource(WebGLShader* shader, ExceptionCode
     return m_context->getShaderSource(objectOrZero(shader));
 }
 
-String WebGLRenderingContext::getString(unsigned long name)
-{
-    WebGLStateRestorer(this, false);
-    return m_context->getString(name);
-}
-
 WebGLGetInfo WebGLRenderingContext::getTexParameter(unsigned long target, unsigned long pname, ExceptionCode& ec)
 {
     UNUSED_PARAM(ec);
diff --git a/WebCore/html/canvas/WebGLRenderingContext.h b/WebCore/html/canvas/WebGLRenderingContext.h
index d812c69..a52cbb7 100644
--- a/WebCore/html/canvas/WebGLRenderingContext.h
+++ b/WebCore/html/canvas/WebGLRenderingContext.h
@@ -163,7 +163,6 @@ public:
     // void glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision);
 
     String getShaderSource(WebGLShader*, ExceptionCode&);
-    String getString(unsigned long name);
 
     WebGLGetInfo getTexParameter(unsigned long target, unsigned long pname, ExceptionCode&);
 
diff --git a/WebCore/html/canvas/WebGLRenderingContext.idl b/WebCore/html/canvas/WebGLRenderingContext.idl
index 7a63752..260d878 100644
--- a/WebCore/html/canvas/WebGLRenderingContext.idl
+++ b/WebCore/html/canvas/WebGLRenderingContext.idl
@@ -563,7 +563,6 @@ module html {
         // void glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision);
 
         [StrictTypeChecking] DOMString    getShaderSource(in WebGLShader shader) raises(DOMException);
-        [StrictTypeChecking] DOMString    getString(in unsigned long name);
 
         // any getTexParameter(in unsigned long target, in unsigned long pname) raises(DOMException);
         [StrictTypeChecking, Custom] void getTexParameter();

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list