[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

eric at webkit.org eric at webkit.org
Thu Apr 8 00:30:59 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 3fb5b6d1a27cf6585785dbac31f58eea75d3b5d3
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Dec 10 09:21:00 2009 +0000

    2009-12-10  Kenneth Russell  <kbr at google.com>
    
            Reviewed by Oliver Hunt.
    
            [Chromium] SporeViewer demo doesn't work in Chromium
            https://bugs.webkit.org/show_bug.cgi?id=32364
    
            Test: fast/canvas/webgl/bug-32364.html
    
            * fast/canvas/webgl/bug-32364-expected.txt: Added.
            * fast/canvas/webgl/bug-32364.html: Added.
    2009-12-10  Kenneth Russell  <kbr at google.com>
    
            Reviewed by Oliver Hunt.
    
            [Chromium] SporeViewer demo doesn't work in Chromium
            https://bugs.webkit.org/show_bug.cgi?id=32364
    
            Test: fast/canvas/webgl/bug-32364.html
    
            * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
            (WebCore::CALLBACK_FUNC_DECL):
            (WebCore::vertexAttribAndUniformHelperf):
            (WebCore::uniformHelperi):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51943 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index f7be8a4..5c4113f 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,15 @@
+2009-12-10  Kenneth Russell  <kbr at google.com>
+
+        Reviewed by Oliver Hunt.
+
+        [Chromium] SporeViewer demo doesn't work in Chromium
+        https://bugs.webkit.org/show_bug.cgi?id=32364
+
+        Test: fast/canvas/webgl/bug-32364.html
+
+        * fast/canvas/webgl/bug-32364-expected.txt: Added.
+        * fast/canvas/webgl/bug-32364.html: Added.
+
 2009-12-09  Maciej Stachowiak  <mjs at apple.com>
 
         Reviewed by Oliver Hunt.
diff --git a/LayoutTests/fast/canvas/webgl/bug-32364-expected.txt b/LayoutTests/fast/canvas/webgl/bug-32364-expected.txt
new file mode 100644
index 0000000..bed2eaf
--- /dev/null
+++ b/LayoutTests/fast/canvas/webgl/bug-32364-expected.txt
@@ -0,0 +1,13 @@
+Regression test for https://bugs.webkit.org/show_bug.cgi?id=32364 : [Chromium] SporeViewer demo doesn't work in Chromium
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+PASS gl.useProgram(floatProgram) is undefined.
+PASS gl.getError() is gl.NO_ERROR
+PASS gl.uniform4fv(fval4Loc, new WebGLFloatArray([0.1, 0.2, 0.4, 1.0])); is undefined.
+PASS gl.bindTexture(gl.TEXTURE_2D, texture) is undefined.
+PASS gl.texImage2D(gl.TEXTURE_2D, 0, tmpcanvas) is undefined.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/canvas/webgl/bug-32364.html b/LayoutTests/fast/canvas/webgl/bug-32364.html
new file mode 100644
index 0000000..a9a4051
--- /dev/null
+++ b/LayoutTests/fast/canvas/webgl/bug-32364.html
@@ -0,0 +1,35 @@
+<html>
+<head>
+<link rel="stylesheet" href="../../js/resources/js-test-style.css"/>
+<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>
+
+<script>
+
+description('Regression test for <a href="https://bugs.webkit.org/show_bug.cgi?id=32364">https://bugs.webkit.org/show_bug.cgi?id=32364</a> : <code>[Chromium] SporeViewer demo doesn\'t work in Chromium</code>');
+
+var gl = create3DContext();
+var floatProgram = loadProgram(gl, "resources/floatUniformShader.vert", "resources/noopUniformShader.frag");
+shouldBeUndefined("gl.useProgram(floatProgram)");
+var fval4Loc = gl.getUniformLocation(floatProgram, "fval4");
+shouldBe("gl.getError()", "gl.NO_ERROR");
+shouldBeUndefined("gl.uniform4fv(fval4Loc, new WebGLFloatArray([0.1, 0.2, 0.4, 1.0]));");
+
+var tmpcanvas = document.createElement("canvas");
+tmpcanvas.width = 2;
+tmpcanvas.height = 2;
+var texture = gl.createTexture();
+shouldBeUndefined("gl.bindTexture(gl.TEXTURE_2D, texture)");
+shouldBeUndefined("gl.texImage2D(gl.TEXTURE_2D, 0, tmpcanvas)");
+
+successfullyParsed = true;
+
+</script>
+<script src="../../js/resources/js-test-post.js"></script>
+
+</body>
+</html>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 2bc4b1f..d82d26a 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2009-12-10  Kenneth Russell  <kbr at google.com>
+
+        Reviewed by Oliver Hunt.
+
+        [Chromium] SporeViewer demo doesn't work in Chromium
+        https://bugs.webkit.org/show_bug.cgi?id=32364
+
+        Test: fast/canvas/webgl/bug-32364.html
+
+        * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
+        (WebCore::CALLBACK_FUNC_DECL):
+        (WebCore::vertexAttribAndUniformHelperf):
+        (WebCore::uniformHelperi):
+
 2009-12-09  Beth Dakin  <bdakin at apple.com>
 
         Reviewed by Oliver Hunt.
diff --git a/WebCore/bindings/v8/custom/V8WebGLRenderingContextCustom.cpp b/WebCore/bindings/v8/custom/V8WebGLRenderingContextCustom.cpp
index 4d916fd..fd73a5b 100644
--- a/WebCore/bindings/v8/custom/V8WebGLRenderingContextCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8WebGLRenderingContextCustom.cpp
@@ -52,6 +52,7 @@
 #include "V8WebGLUnsignedByteArray.h"
 #include "V8WebGLUnsignedIntArray.h"
 #include "V8WebGLUnsignedShortArray.h"
+#include "V8HTMLCanvasElement.h"
 #include "V8HTMLImageElement.h"
 #include "V8Proxy.h"
 
@@ -459,6 +460,8 @@ CALLBACK_FUNC_DECL(WebGLRenderingContextTexImage2D)
     //                   in GLenum format, in GLenum type, in WebGLArray pixels);
     // * void texImage2D(in GLenum target, in GLint level, in HTMLImageElement image,
     //                   [Optional] in GLboolean flipY, [Optional] in GLboolean premultiplyAlpha);
+    // * void texImage2D(in GLenum target, in GLint level, in HTMLCanvasElement image,
+    //                   [Optional] in GLboolean flipY, [Optional] in GLboolean premultiplyAlpha);
     if (args.Length() != 3 &&
         args.Length() != 4 &&
         args.Length() != 5 &&
@@ -486,16 +489,20 @@ CALLBACK_FUNC_DECL(WebGLRenderingContextTexImage2D)
         args.Length() == 4 ||
         args.Length() == 5) {
         v8::Handle<v8::Value> arg = args[2];
+        bool flipY = false;
+        bool premultiplyAlpha = false;
+        if (args.Length() >= 4)
+            flipY = args[3]->BooleanValue();
+        if (args.Length() >= 5)
+            premultiplyAlpha = args[4]->BooleanValue();
         if (V8HTMLImageElement::HasInstance(arg)) {
-            HTMLImageElement* image_element = V8DOMWrapper::convertDOMWrapperToNode<HTMLImageElement>(v8::Handle<v8::Object>::Cast(arg));
-            bool flipY = false;
-            bool premultiplyAlpha = false;
-            if (args.Length() >= 4)
-                flipY = args[3]->BooleanValue();
-            if (args.Length() >= 5)
-                premultiplyAlpha = args[4]->BooleanValue();
-            context->texImage2D(target, level, image_element, flipY, premultiplyAlpha, ec);
+            HTMLImageElement* element = V8DOMWrapper::convertDOMWrapperToNode<HTMLImageElement>(v8::Handle<v8::Object>::Cast(arg));
+            context->texImage2D(target, level, element, flipY, premultiplyAlpha, ec);
+        } else if (V8HTMLCanvasElement::HasInstance(arg)) {
+            HTMLCanvasElement* element = V8DOMWrapper::convertDOMWrapperToNode<HTMLCanvasElement>(v8::Handle<v8::Object>::Cast(arg));
+            context->texImage2D(target, level, element, flipY, premultiplyAlpha, ec);
         } else {
+            // FIXME: support HTMLVideoElement and ImageData.
             // FIXME: consider different / better exception type.
             V8Proxy::setDOMException(SYNTAX_ERR);
             return notHandledByInterceptor();
@@ -613,7 +620,7 @@ static v8::Handle<v8::Value> vertexAttribAndUniformHelperf(const v8::Arguments&
     // * glVertexAttrib4fv(GLint index, Array data);
     // * glVertexAttrib4fv(GLint index, WebGLFloatArray data);
 
-    if (args.Length() != 3) {
+    if (args.Length() != 2) {
         V8Proxy::setDOMException(SYNTAX_ERR);
         return notHandledByInterceptor();
     }
@@ -698,7 +705,7 @@ static v8::Handle<v8::Value> uniformHelperi(const v8::Arguments& args,
     // * glUniform4iv(GLUniformLocation location, Array data);
     // * glUniform4iv(GLUniformLocation location, WebGLIntArray data);
 
-    if (args.Length() != 3) {
+    if (args.Length() != 2) {
         V8Proxy::setDOMException(SYNTAX_ERR);
         return notHandledByInterceptor();
     }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list