[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:45:47 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 88d1932c83c59f482bc9019490a01d1a4cb74e2b
Author: zmo at google.com <zmo at google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Nov 11 23:04:07 2010 +0000

    2010-11-10  Zhenyao Mo  <zmo at google.com>
    
            Reviewed by Kenneth Russell.
    
            Implement UNPACK_COLORSPACE_CONVERSION_WEBGL
            https://bugs.webkit.org/show_bug.cgi?id=47196
    
            This is the first patch for this bug.  We add constants and methods, but haven't hooked it up with texture uploading yet.  Also, in order to check in constants.html, we need to remove out-dated constants, and update affected tests correspondingly.
    
            Test: fast/canvas/webgl/constants.html
    
            * html/canvas/WebGLRenderingContext.cpp:
            (WebCore::WebGLRenderingContext::WebGLRenderingContext): Move init code to initializeNewContext.
            (WebCore::WebGLRenderingContext::initializeNewContext): Ditto.
            (WebCore::WebGLRenderingContext::getParameter): Implement UNPACK_COLORSPACE_CONVERSION_WEBGL.
            (WebCore::WebGLRenderingContext::pixelStorei): Ditto.
            * html/canvas/WebGLRenderingContext.h: Add a member to track UNPACK_COLORSPACE_CONVERSION_WEBGL setting.
            * html/canvas/WebGLRenderingContext.idl: Update constants.
            * platform/graphics/GraphicsContext3D.h: Update constants.
    2010-11-10  Zhenyao Mo  <zmo at google.com>
    
            Reviewed by Kenneth Russell.
    
            Implement UNPACK_COLORSPACE_CONVERSION_WEBGL
            https://bugs.webkit.org/show_bug.cgi?id=47196
    
            This is the first patch for this bug.  We add constants and methods, but haven't hooked it up with texture uploading yet.  Also, in order to check in constants.html, we need to remove out-dated constants, and update affected tests correspondingly.
    
            * fast/canvas/webgl/constants-expected.txt: Added.
            * fast/canvas/webgl/constants.html: Added.
            * fast/canvas/webgl/copy-tex-image-and-sub-image-2d-expected.txt:
            * fast/canvas/webgl/copy-tex-image-and-sub-image-2d.html: Update due to removal of TRUE/FALSE.
            * fast/canvas/webgl/texture-transparent-pixels-initialized-expected.txt:
            * fast/canvas/webgl/texture-transparent-pixels-initialized.html: Ditto.
            * fast/canvas/webgl/webgl-specific-expected.txt:
            * fast/canvas/webgl/webgl-specific.html: Add test cases for UNPACK_COLORSPACE_CONVERSION_WEBGL.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71855 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index a36bba5..28dc5d0 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,21 @@
+2010-11-10  Zhenyao Mo  <zmo at google.com>
+
+        Reviewed by Kenneth Russell.
+
+        Implement UNPACK_COLORSPACE_CONVERSION_WEBGL
+        https://bugs.webkit.org/show_bug.cgi?id=47196
+
+        This is the first patch for this bug.  We add constants and methods, but haven't hooked it up with texture uploading yet.  Also, in order to check in constants.html, we need to remove out-dated constants, and update affected tests correspondingly.
+
+        * fast/canvas/webgl/constants-expected.txt: Added.
+        * fast/canvas/webgl/constants.html: Added.
+        * fast/canvas/webgl/copy-tex-image-and-sub-image-2d-expected.txt:
+        * fast/canvas/webgl/copy-tex-image-and-sub-image-2d.html: Update due to removal of TRUE/FALSE.
+        * fast/canvas/webgl/texture-transparent-pixels-initialized-expected.txt:
+        * fast/canvas/webgl/texture-transparent-pixels-initialized.html: Ditto.
+        * fast/canvas/webgl/webgl-specific-expected.txt:
+        * fast/canvas/webgl/webgl-specific.html: Add test cases for UNPACK_COLORSPACE_CONVERSION_WEBGL.
+
 2010-11-11  Mihai Parparita  <mihaip at chromium.org>
 
         Unreviewed Chromium expectation update:
diff --git a/LayoutTests/fast/canvas/webgl/constants-expected.txt b/LayoutTests/fast/canvas/webgl/constants-expected.txt
new file mode 100644
index 0000000..82d279c
--- /dev/null
+++ b/LayoutTests/fast/canvas/webgl/constants-expected.txt
@@ -0,0 +1,12 @@
+This test ensures that the WebGL context has all the constants in the specification.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Canvas.getContext
+PASS All WebGL constants found to have correct values.
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/canvas/webgl/constants.html b/LayoutTests/fast/canvas/webgl/constants.html
new file mode 100644
index 0000000..a68a441
--- /dev/null
+++ b/LayoutTests/fast/canvas/webgl/constants.html
@@ -0,0 +1,493 @@
+<html>
+<head>
+<!--
+Copyright (c) 2009 Ilmari Heikkinen. All rights reserved.
+Use of this source code is governed by a BSD-style license that can be
+found in the LICENSE file.
+-->
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>WebGL Constants Test</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" style="width: 50px; height: 50px;"> </canvas>
+<script>
+description("This test ensures that the WebGL context has all the constants in the specification.");
+
+var constants = {
+    /* ClearBufferMask */
+DEPTH_BUFFER_BIT               : 0x00000100,
+STENCIL_BUFFER_BIT             : 0x00000400,
+COLOR_BUFFER_BIT               : 0x00004000,
+    
+    /* BeginMode */
+POINTS                         : 0x0000,
+LINES                          : 0x0001,
+LINE_LOOP                      : 0x0002,
+LINE_STRIP                     : 0x0003,
+TRIANGLES                      : 0x0004,
+TRIANGLE_STRIP                 : 0x0005,
+TRIANGLE_FAN                   : 0x0006,
+    
+    /* AlphaFunction (not supported in ES20) */
+    /*      NEVER */
+    /*      LESS */
+    /*      EQUAL */
+    /*      LEQUAL */
+    /*      GREATER */
+    /*      NOTEQUAL */
+    /*      GEQUAL */
+    /*      ALWAYS */
+    
+    /* BlendingFactorDest */
+ZERO                           : 0,
+ONE                            : 1,
+SRC_COLOR                      : 0x0300,
+ONE_MINUS_SRC_COLOR            : 0x0301,
+SRC_ALPHA                      : 0x0302,
+ONE_MINUS_SRC_ALPHA            : 0x0303,
+DST_ALPHA                      : 0x0304,
+ONE_MINUS_DST_ALPHA            : 0x0305,
+    
+    /* BlendingFactorSrc */
+    /*      ZERO */
+    /*      ONE */
+DST_COLOR                      : 0x0306,
+ONE_MINUS_DST_COLOR            : 0x0307,
+SRC_ALPHA_SATURATE             : 0x0308,
+    /*      SRC_ALPHA */
+    /*      ONE_MINUS_SRC_ALPHA */
+    /*      DST_ALPHA */
+    /*      ONE_MINUS_DST_ALPHA */
+    
+    /* BlendEquationSeparate */
+FUNC_ADD                       : 0x8006,
+BLEND_EQUATION                 : 0x8009,
+BLEND_EQUATION_RGB             : 0x8009,   /* same as BLEND_EQUATION */
+BLEND_EQUATION_ALPHA           : 0x883D,
+    
+    /* BlendSubtract */
+FUNC_SUBTRACT                  : 0x800A,
+FUNC_REVERSE_SUBTRACT          : 0x800B,
+    
+    /* Separate Blend Functions */
+BLEND_DST_RGB                  : 0x80C8,
+BLEND_SRC_RGB                  : 0x80C9,
+BLEND_DST_ALPHA                : 0x80CA,
+BLEND_SRC_ALPHA                : 0x80CB,
+CONSTANT_COLOR                 : 0x8001,
+ONE_MINUS_CONSTANT_COLOR       : 0x8002,
+CONSTANT_ALPHA                 : 0x8003,
+ONE_MINUS_CONSTANT_ALPHA       : 0x8004,
+BLEND_COLOR                    : 0x8005,
+    
+    /* Buffer Objects */
+ARRAY_BUFFER                   : 0x8892,
+ELEMENT_ARRAY_BUFFER           : 0x8893,
+ARRAY_BUFFER_BINDING           : 0x8894,
+ELEMENT_ARRAY_BUFFER_BINDING   : 0x8895,
+    
+STREAM_DRAW                    : 0x88E0,
+STATIC_DRAW                    : 0x88E4,
+DYNAMIC_DRAW                   : 0x88E8,
+    
+BUFFER_SIZE                    : 0x8764,
+BUFFER_USAGE                   : 0x8765,
+    
+CURRENT_VERTEX_ATTRIB          : 0x8626,
+    
+    /* CullFaceMode */
+FRONT                          : 0x0404,
+BACK                           : 0x0405,
+FRONT_AND_BACK                 : 0x0408,
+    
+    /* DepthFunction */
+    /*      NEVER */
+    /*      LESS */
+    /*      EQUAL */
+    /*      LEQUAL */
+    /*      GREATER */
+    /*      NOTEQUAL */
+    /*      GEQUAL */
+    /*      ALWAYS */
+    
+    /* EnableCap */
+    /* TEXTURE_2D */
+CULL_FACE                      : 0x0B44,
+BLEND                          : 0x0BE2,
+DITHER                         : 0x0BD0,
+STENCIL_TEST                   : 0x0B90,
+DEPTH_TEST                     : 0x0B71,
+SCISSOR_TEST                   : 0x0C11,
+POLYGON_OFFSET_FILL            : 0x8037,
+SAMPLE_ALPHA_TO_COVERAGE       : 0x809E,
+SAMPLE_COVERAGE                : 0x80A0,
+    
+    /* ErrorCode */
+NO_ERROR                       : 0,
+INVALID_ENUM                   : 0x0500,
+INVALID_VALUE                  : 0x0501,
+INVALID_OPERATION              : 0x0502,
+OUT_OF_MEMORY                  : 0x0505,
+    
+    /* FrontFaceDirection */
+CW                             : 0x0900,
+CCW                            : 0x0901,
+    
+    /* GetPName */
+LINE_WIDTH                     : 0x0B21,
+ALIASED_POINT_SIZE_RANGE       : 0x846D,
+ALIASED_LINE_WIDTH_RANGE       : 0x846E,
+CULL_FACE_MODE                 : 0x0B45,
+FRONT_FACE                     : 0x0B46,
+DEPTH_RANGE                    : 0x0B70,
+DEPTH_WRITEMASK                : 0x0B72,
+DEPTH_CLEAR_VALUE              : 0x0B73,
+DEPTH_FUNC                     : 0x0B74,
+STENCIL_CLEAR_VALUE            : 0x0B91,
+STENCIL_FUNC                   : 0x0B92,
+STENCIL_FAIL                   : 0x0B94,
+STENCIL_PASS_DEPTH_FAIL        : 0x0B95,
+STENCIL_PASS_DEPTH_PASS        : 0x0B96,
+STENCIL_REF                    : 0x0B97,
+STENCIL_VALUE_MASK             : 0x0B93,
+STENCIL_WRITEMASK              : 0x0B98,
+STENCIL_BACK_FUNC              : 0x8800,
+STENCIL_BACK_FAIL              : 0x8801,
+STENCIL_BACK_PASS_DEPTH_FAIL   : 0x8802,
+STENCIL_BACK_PASS_DEPTH_PASS   : 0x8803,
+STENCIL_BACK_REF               : 0x8CA3,
+STENCIL_BACK_VALUE_MASK        : 0x8CA4,
+STENCIL_BACK_WRITEMASK         : 0x8CA5,
+VIEWPORT                       : 0x0BA2,
+SCISSOR_BOX                    : 0x0C10,
+    /*      SCISSOR_TEST */
+COLOR_CLEAR_VALUE              : 0x0C22,
+COLOR_WRITEMASK                : 0x0C23,
+UNPACK_ALIGNMENT               : 0x0CF5,
+PACK_ALIGNMENT                 : 0x0D05,
+MAX_TEXTURE_SIZE               : 0x0D33,
+MAX_VIEWPORT_DIMS              : 0x0D3A,
+SUBPIXEL_BITS                  : 0x0D50,
+RED_BITS                       : 0x0D52,
+GREEN_BITS                     : 0x0D53,
+BLUE_BITS                      : 0x0D54,
+ALPHA_BITS                     : 0x0D55,
+DEPTH_BITS                     : 0x0D56,
+STENCIL_BITS                   : 0x0D57,
+POLYGON_OFFSET_UNITS           : 0x2A00,
+    /*      POLYGON_OFFSET_FILL */
+POLYGON_OFFSET_FACTOR          : 0x8038,
+TEXTURE_BINDING_2D             : 0x8069,
+SAMPLE_BUFFERS                 : 0x80A8,
+SAMPLES                        : 0x80A9,
+SAMPLE_COVERAGE_VALUE          : 0x80AA,
+SAMPLE_COVERAGE_INVERT         : 0x80AB,
+    
+    /* GetTextureParameter */
+    /*      TEXTURE_MAG_FILTER */
+    /*      TEXTURE_MIN_FILTER */
+    /*      TEXTURE_WRAP_S */
+    /*      TEXTURE_WRAP_T */
+    
+NUM_COMPRESSED_TEXTURE_FORMATS : 0x86A2,
+COMPRESSED_TEXTURE_FORMATS     : 0x86A3,
+    
+    /* HintMode */
+DONT_CARE                      : 0x1100,
+FASTEST                        : 0x1101,
+NICEST                         : 0x1102,
+    
+    /* HintTarget */
+GENERATE_MIPMAP_HINT            : 0x8192,
+    
+    /* DataType */
+BYTE                           : 0x1400,
+UNSIGNED_BYTE                  : 0x1401,
+SHORT                          : 0x1402,
+UNSIGNED_SHORT                 : 0x1403,
+INT                            : 0x1404,
+UNSIGNED_INT                   : 0x1405,
+FLOAT                          : 0x1406,
+    
+    /* PixelFormat */
+DEPTH_COMPONENT                : 0x1902,
+ALPHA                          : 0x1906,
+RGB                            : 0x1907,
+RGBA                           : 0x1908,
+LUMINANCE                      : 0x1909,
+LUMINANCE_ALPHA                : 0x190A,
+    
+    /* PixelType */
+    /*      UNSIGNED_BYTE */
+UNSIGNED_SHORT_4_4_4_4         : 0x8033,
+UNSIGNED_SHORT_5_5_5_1         : 0x8034,
+UNSIGNED_SHORT_5_6_5           : 0x8363,
+    
+    /* Shaders */
+FRAGMENT_SHADER                  : 0x8B30,
+VERTEX_SHADER                    : 0x8B31,
+MAX_VERTEX_ATTRIBS               : 0x8869,
+MAX_VERTEX_UNIFORM_VECTORS       : 0x8DFB,
+MAX_VARYING_VECTORS              : 0x8DFC,
+MAX_COMBINED_TEXTURE_IMAGE_UNITS : 0x8B4D,
+MAX_VERTEX_TEXTURE_IMAGE_UNITS   : 0x8B4C,
+MAX_TEXTURE_IMAGE_UNITS          : 0x8872,
+MAX_FRAGMENT_UNIFORM_VECTORS     : 0x8DFD,
+SHADER_TYPE                      : 0x8B4F,
+DELETE_STATUS                    : 0x8B80,
+LINK_STATUS                      : 0x8B82,
+VALIDATE_STATUS                  : 0x8B83,
+ATTACHED_SHADERS                 : 0x8B85,
+ACTIVE_UNIFORMS                  : 0x8B86,
+ACTIVE_UNIFORM_MAX_LENGTH        : 0x8B87,
+ACTIVE_ATTRIBUTES                : 0x8B89,
+ACTIVE_ATTRIBUTE_MAX_LENGTH      : 0x8B8A,
+SHADING_LANGUAGE_VERSION         : 0x8B8C,
+CURRENT_PROGRAM                  : 0x8B8D,
+    
+    /* StencilFunction */
+NEVER                          : 0x0200,
+LESS                           : 0x0201,
+EQUAL                          : 0x0202,
+LEQUAL                         : 0x0203,
+GREATER                        : 0x0204,
+NOTEQUAL                       : 0x0205,
+GEQUAL                         : 0x0206,
+ALWAYS                         : 0x0207,
+    
+    /* StencilOp */
+    /*      ZERO */
+KEEP                           : 0x1E00,
+REPLACE                        : 0x1E01,
+INCR                           : 0x1E02,
+DECR                           : 0x1E03,
+INVERT                         : 0x150A,
+INCR_WRAP                      : 0x8507,
+DECR_WRAP                      : 0x8508,
+    
+    /* StringName */
+VENDOR                         : 0x1F00,
+RENDERER                       : 0x1F01,
+VERSION                        : 0x1F02,
+EXTENSIONS                     : 0x1F03,
+    
+    /* TextureMagFilter */
+NEAREST                        : 0x2600,
+LINEAR                         : 0x2601,
+    
+    /* TextureMinFilter */
+    /*      NEAREST */
+    /*      LINEAR */
+NEAREST_MIPMAP_NEAREST         : 0x2700,
+LINEAR_MIPMAP_NEAREST          : 0x2701,
+NEAREST_MIPMAP_LINEAR          : 0x2702,
+LINEAR_MIPMAP_LINEAR           : 0x2703,
+    
+    /* TextureParameterName */
+TEXTURE_MAG_FILTER             : 0x2800,
+TEXTURE_MIN_FILTER             : 0x2801,
+TEXTURE_WRAP_S                 : 0x2802,
+TEXTURE_WRAP_T                 : 0x2803,
+    
+    /* TextureTarget */
+TEXTURE_2D                     : 0x0DE1,
+TEXTURE                        : 0x1702,
+    
+TEXTURE_CUBE_MAP               : 0x8513,
+TEXTURE_BINDING_CUBE_MAP       : 0x8514,
+TEXTURE_CUBE_MAP_POSITIVE_X    : 0x8515,
+TEXTURE_CUBE_MAP_NEGATIVE_X    : 0x8516,
+TEXTURE_CUBE_MAP_POSITIVE_Y    : 0x8517,
+TEXTURE_CUBE_MAP_NEGATIVE_Y    : 0x8518,
+TEXTURE_CUBE_MAP_POSITIVE_Z    : 0x8519,
+TEXTURE_CUBE_MAP_NEGATIVE_Z    : 0x851A,
+MAX_CUBE_MAP_TEXTURE_SIZE      : 0x851C,
+    
+    /* TextureUnit */
+TEXTURE0                       : 0x84C0,
+TEXTURE1                       : 0x84C1,
+TEXTURE2                       : 0x84C2,
+TEXTURE3                       : 0x84C3,
+TEXTURE4                       : 0x84C4,
+TEXTURE5                       : 0x84C5,
+TEXTURE6                       : 0x84C6,
+TEXTURE7                       : 0x84C7,
+TEXTURE8                       : 0x84C8,
+TEXTURE9                       : 0x84C9,
+TEXTURE10                      : 0x84CA,
+TEXTURE11                      : 0x84CB,
+TEXTURE12                      : 0x84CC,
+TEXTURE13                      : 0x84CD,
+TEXTURE14                      : 0x84CE,
+TEXTURE15                      : 0x84CF,
+TEXTURE16                      : 0x84D0,
+TEXTURE17                      : 0x84D1,
+TEXTURE18                      : 0x84D2,
+TEXTURE19                      : 0x84D3,
+TEXTURE20                      : 0x84D4,
+TEXTURE21                      : 0x84D5,
+TEXTURE22                      : 0x84D6,
+TEXTURE23                      : 0x84D7,
+TEXTURE24                      : 0x84D8,
+TEXTURE25                      : 0x84D9,
+TEXTURE26                      : 0x84DA,
+TEXTURE27                      : 0x84DB,
+TEXTURE28                      : 0x84DC,
+TEXTURE29                      : 0x84DD,
+TEXTURE30                      : 0x84DE,
+TEXTURE31                      : 0x84DF,
+ACTIVE_TEXTURE                 : 0x84E0,
+    
+    /* TextureWrapMode */
+REPEAT                         : 0x2901,
+CLAMP_TO_EDGE                  : 0x812F,
+MIRRORED_REPEAT                : 0x8370,
+    
+    /* Uniform Types */
+FLOAT_VEC2                     : 0x8B50,
+FLOAT_VEC3                     : 0x8B51,
+FLOAT_VEC4                     : 0x8B52,
+INT_VEC2                       : 0x8B53,
+INT_VEC3                       : 0x8B54,
+INT_VEC4                       : 0x8B55,
+BOOL                           : 0x8B56,
+BOOL_VEC2                      : 0x8B57,
+BOOL_VEC3                      : 0x8B58,
+BOOL_VEC4                      : 0x8B59,
+FLOAT_MAT2                     : 0x8B5A,
+FLOAT_MAT3                     : 0x8B5B,
+FLOAT_MAT4                     : 0x8B5C,
+SAMPLER_2D                     : 0x8B5E,
+SAMPLER_CUBE                   : 0x8B60,
+    
+    /* Vertex Arrays */
+VERTEX_ATTRIB_ARRAY_ENABLED        : 0x8622,
+VERTEX_ATTRIB_ARRAY_SIZE           : 0x8623,
+VERTEX_ATTRIB_ARRAY_STRIDE         : 0x8624,
+VERTEX_ATTRIB_ARRAY_TYPE           : 0x8625,
+VERTEX_ATTRIB_ARRAY_NORMALIZED     : 0x886A,
+VERTEX_ATTRIB_ARRAY_POINTER        : 0x8645,
+VERTEX_ATTRIB_ARRAY_BUFFER_BINDING : 0x889F,
+    
+    /* Shader Source */
+COMPILE_STATUS                 : 0x8B81,
+INFO_LOG_LENGTH                : 0x8B84,
+SHADER_SOURCE_LENGTH           : 0x8B88,
+SHADER_COMPILER                : 0x8DFA,
+    
+    /* Shader Precision-Specified Types */
+LOW_FLOAT                      : 0x8DF0,
+MEDIUM_FLOAT                   : 0x8DF1,
+HIGH_FLOAT                     : 0x8DF2,
+LOW_INT                        : 0x8DF3,
+MEDIUM_INT                     : 0x8DF4,
+HIGH_INT                       : 0x8DF5,
+    
+    /* Framebuffer Object. */
+FRAMEBUFFER                    : 0x8D40,
+RENDERBUFFER                   : 0x8D41,
+    
+RGBA4                          : 0x8056,
+RGB5_A1                        : 0x8057,
+RGB565                         : 0x8D62,
+DEPTH_COMPONENT16              : 0x81A5,
+STENCIL_INDEX                  : 0x1901,
+STENCIL_INDEX8                 : 0x8D48,
+DEPTH_STENCIL                  : 0x84F9,
+    
+RENDERBUFFER_WIDTH             : 0x8D42,
+RENDERBUFFER_HEIGHT            : 0x8D43,
+RENDERBUFFER_INTERNAL_FORMAT   : 0x8D44,
+RENDERBUFFER_RED_SIZE          : 0x8D50,
+RENDERBUFFER_GREEN_SIZE        : 0x8D51,
+RENDERBUFFER_BLUE_SIZE         : 0x8D52,
+RENDERBUFFER_ALPHA_SIZE        : 0x8D53,
+RENDERBUFFER_DEPTH_SIZE        : 0x8D54,
+RENDERBUFFER_STENCIL_SIZE      : 0x8D55,
+    
+FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE           : 0x8CD0,
+FRAMEBUFFER_ATTACHMENT_OBJECT_NAME           : 0x8CD1,
+FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL         : 0x8CD2,
+FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE : 0x8CD3,
+    
+COLOR_ATTACHMENT0              : 0x8CE0,
+DEPTH_ATTACHMENT               : 0x8D00,
+STENCIL_ATTACHMENT             : 0x8D20,
+DEPTH_STENCIL_ATTACHMENT       : 0x821A,
+    
+NONE                           : 0,
+    
+FRAMEBUFFER_COMPLETE                      : 0x8CD5,
+FRAMEBUFFER_INCOMPLETE_ATTACHMENT         : 0x8CD6,
+FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT : 0x8CD7,
+FRAMEBUFFER_INCOMPLETE_DIMENSIONS         : 0x8CD9,
+FRAMEBUFFER_UNSUPPORTED                   : 0x8CDD,
+  
+FRAMEBUFFER_BINDING            : 0x8CA6,
+RENDERBUFFER_BINDING           : 0x8CA7,
+MAX_RENDERBUFFER_SIZE          : 0x84E8,
+    
+INVALID_FRAMEBUFFER_OPERATION  : 0x0506,
+
+/* WebGL-specific enums */
+UNPACK_FLIP_Y_WEBGL                : 0x9240,
+UNPACK_PREMULTIPLY_ALPHA_WEBGL     : 0x9241,
+CONTEXT_LOST_WEBGL                 : 0x9242,
+UNPACK_COLORSPACE_CONVERSION_WEBGL : 0x9243,
+BROWSER_DEFAULT_WEBGL              : 0x9244
+};
+
+function assertProperty(v, p) {
+  if (v[p] == null) {
+    testFailed("Property does not exist: " + p)
+    return false;
+  } else {
+    return true;
+  }
+}
+
+function assertMsg_(bool, msg) {
+  if (!bool) // show only failures to avoid spamming result list
+    assertMsg(bool, msg);
+  return bool;
+}
+
+debug("");
+debug("Canvas.getContext");
+
+var canvas = document.getElementById("canvas");
+var gl = create3DContext(canvas);
+var passed = true;
+for (var i in constants) {
+  var r = assertProperty(gl, i) && assertMsg_(gl[i] == constants[i], "Property "+i+" value test "+gl[i]+" == "+constants[i]);
+  passed = passed && r;
+}
+if (passed) {
+  testPassed("All WebGL constants found to have correct values.");
+}
+var extended = false;
+for (var i in gl) {
+  if (i.match(/^[^a-z]/) && constants[i] == null) {
+    if (!extended) {
+      extended = true;
+      debug("Also found the following extra constants:");
+    }
+    debug(i);
+  }
+}
+
+debug("");
+successfullyParsed = true;
+</script>
+<script src="../../js/resources/js-test-post.js"></script>
+<script>
+</script>
+
+</body>
+</html>
diff --git a/LayoutTests/fast/canvas/webgl/copy-tex-image-and-sub-image-2d-expected.txt b/LayoutTests/fast/canvas/webgl/copy-tex-image-and-sub-image-2d-expected.txt
index 6b3d36c..a8d17ba 100644
--- a/LayoutTests/fast/canvas/webgl/copy-tex-image-and-sub-image-2d-expected.txt
+++ b/LayoutTests/fast/canvas/webgl/copy-tex-image-and-sub-image-2d-expected.txt
@@ -5,30 +5,30 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
 
 Testing with antialias on
 Testing copyTexImage2D
-PASS gl.getError() is gl.NO_ERROR
-PASS gl.getError() is gl.NO_ERROR
+PASS getError was expected value: NO_ERROR : 
+PASS getError was expected value: NO_ERROR : 
 PASS pixel is correctColor
 PASS pixel is correctColor
 PASS pixel is correctColor
 PASS pixel is correctColor
 Testing copyTexSubImage2D
-PASS gl.getError() is gl.NO_ERROR
-PASS gl.getError() is gl.NO_ERROR
+PASS getError was expected value: NO_ERROR : 
+PASS getError was expected value: NO_ERROR : 
 PASS pixel is correctColor
 PASS pixel is correctColor
 PASS pixel is correctColor
 PASS pixel is correctColor
 Testing with antialias off
 Testing copyTexImage2D
-PASS gl.getError() is gl.NO_ERROR
-PASS gl.getError() is gl.NO_ERROR
+PASS getError was expected value: NO_ERROR : 
+PASS getError was expected value: NO_ERROR : 
 PASS pixel is correctColor
 PASS pixel is correctColor
 PASS pixel is correctColor
 PASS pixel is correctColor
 Testing copyTexSubImage2D
-PASS gl.getError() is gl.NO_ERROR
-PASS gl.getError() is gl.NO_ERROR
+PASS getError was expected value: NO_ERROR : 
+PASS getError was expected value: NO_ERROR : 
 PASS pixel is correctColor
 PASS pixel is correctColor
 PASS pixel is correctColor
diff --git a/LayoutTests/fast/canvas/webgl/copy-tex-image-and-sub-image-2d.html b/LayoutTests/fast/canvas/webgl/copy-tex-image-and-sub-image-2d.html
index 12d5b68..2246c77 100644
--- a/LayoutTests/fast/canvas/webgl/copy-tex-image-and-sub-image-2d.html
+++ b/LayoutTests/fast/canvas/webgl/copy-tex-image-and-sub-image-2d.html
@@ -17,14 +17,11 @@ void main()
 </script>
 
 <script id="fshader" type="x-shader/x-fragment">
+#ifdef GL_ES
+precision mediump float;
+#endif
 uniform sampler2D tex;
-// Workaround for non-compliant WebGL implementations (FIXME)
-#if defined(GL_ES)
-varying mediump vec2 texCoord;
-#else
 varying vec2 texCoord;
-#endif
-
 void main()
 {
     gl_FragColor = texture2D(tex, texCoord);
@@ -86,7 +83,7 @@ function runTestIteration(antialias)
     gl.enableVertexAttribArray(0);
     gl.vertexAttribPointer(0, 3, gl.FLOAT, false, 0, 0);
     gl.enableVertexAttribArray(1);
-    gl.vertexAttribPointer(1, 2, gl.FLOAT, gl.FALSE, 0, texCoordOffset);
+    gl.vertexAttribPointer(1, 2, gl.FLOAT, false, 0, texCoordOffset);
 
     gl.colorMask(1, 1, 1, 0);
     gl.disable(gl.BLEND);
@@ -104,9 +101,9 @@ function runTestIteration(antialias)
     gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
     gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
 
-    shouldBe("gl.getError()", "gl.NO_ERROR");
+    glErrorShouldBe(gl, gl.NO_ERROR);
     gl.copyTexImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 0, 0, 2, 2, 0);
-    shouldBe("gl.getError()", "gl.NO_ERROR");
+    glErrorShouldBe(gl, gl.NO_ERROR);
 
     // Green canvas
     gl.clearColor(0, 1, 0, 1);
@@ -138,9 +135,9 @@ function runTestIteration(antialias)
     gl.clearColor(0, 1, 0, 1);
     gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
 
-    shouldBe("gl.getError()", "gl.NO_ERROR");
+    glErrorShouldBe(gl, gl.NO_ERROR);
     gl.copyTexSubImage2D(gl.TEXTURE_2D, 0, 0, 0, 0, 0, 2, 2);
-    shouldBe("gl.getError()", "gl.NO_ERROR");
+    glErrorShouldBe(gl, gl.NO_ERROR);
 
     // Blue canvas
     gl.clearColor(0, 0, 1, 1);
diff --git a/LayoutTests/fast/canvas/webgl/texture-transparent-pixels-initialized-expected.txt b/LayoutTests/fast/canvas/webgl/texture-transparent-pixels-initialized-expected.txt
index aaba6a9..a29f4be 100644
--- a/LayoutTests/fast/canvas/webgl/texture-transparent-pixels-initialized-expected.txt
+++ b/LayoutTests/fast/canvas/webgl/texture-transparent-pixels-initialized-expected.txt
@@ -3,15 +3,9 @@ Tests there is no garbage in transparent regions of images uploaded as textures
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 Checking lower left corner
-PASS buf[idx] == 0 && buf[idx + 1] == 0 && buf[idx + 2] == 0 is true
-PASS buf[idx] == 0 && buf[idx + 1] == 0 && buf[idx + 2] == 0 is true
-PASS buf[idx] == 0 && buf[idx + 1] == 0 && buf[idx + 2] == 0 is true
-PASS buf[idx] == 0 && buf[idx + 1] == 0 && buf[idx + 2] == 0 is true
+PASS shouldBe 255,255,255
 Checking upper left corner
-PASS buf[idx] == 0 && buf[idx + 1] == 0 && buf[idx + 2] == 0 is true
-PASS buf[idx] == 0 && buf[idx + 1] == 0 && buf[idx + 2] == 0 is true
-PASS buf[idx] == 0 && buf[idx + 1] == 0 && buf[idx + 2] == 0 is true
-PASS buf[idx] == 0 && buf[idx + 1] == 0 && buf[idx + 2] == 0 is true
+PASS shouldBe 255,255,255
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/LayoutTests/fast/canvas/webgl/texture-transparent-pixels-initialized.html b/LayoutTests/fast/canvas/webgl/texture-transparent-pixels-initialized.html
index 91c3456..f74961c 100644
--- a/LayoutTests/fast/canvas/webgl/texture-transparent-pixels-initialized.html
+++ b/LayoutTests/fast/canvas/webgl/texture-transparent-pixels-initialized.html
@@ -3,33 +3,9 @@
 <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>
-<script id="vshader" type="x-shader/x-vertex">
-attribute vec3 g_Position;
-attribute vec2 g_TexCoord0;
-
-varying vec2 texCoord;
-
-void main()
-{
-    gl_Position = vec4(g_Position.x, g_Position.y, g_Position.z, 1.0);
-    texCoord = g_TexCoord0;
-}
-</script>
-
-<script id="fshader" type="x-shader/x-fragment">
-#ifdef GL_ES
-precision highp float;
-#endif
-uniform sampler2D tex;
-varying vec2 texCoord;
-
-void main()
-{
-    gl_FragColor = texture2D(tex, texCoord);
-}
-</script>
-
+<script src="resources/webgl-test-utils.js"></script>
 <script>
+var wtu = WebGLTestUtils;
 var gl = null;
 var textureLoc = null;
 var successfullyParsed = false;
@@ -42,17 +18,15 @@ function init()
 
     description('Tests there is no garbage in transparent regions of images uploaded as textures');
 
-    gl = initWebGL("example", "vshader", "fshader", [ "g_Position", "g_TexCoord0" ], [ 0, 0, 0, 1 ], 1);
+    wtu = WebGLTestUtils;
+    var canvas = document.getElementById("example");
+    gl = wtu.create3DContext(canvas);
+    var program = wtu.setupTexturedQuad(gl);
+    gl.clearColor(0.5,0.5,0.5,1);
+    gl.clearDepth(1);
 
-    textureLoc = gl.getUniformLocation(gl.program, "tex");
+    textureLoc = gl.getUniformLocation(program, "tex");
 
-    var vertices = new Float32Array([
-         1.0,  1.0, 0.0,
-        -1.0,  1.0, 0.0,
-        -1.0, -1.0, 0.0,
-         1.0,  1.0, 0.0,
-        -1.0, -1.0, 0.0,
-         1.0, -1.0, 0.0]);
     // The input texture has 8 characters; take the leftmost one
     var coeff = 1.0 / 8.0;
     var texCoords = new Float32Array([
@@ -62,38 +36,14 @@ function init()
         coeff, 1.0,
         0.0, 0.0,
         coeff, 0.0]);
-    var texCoordOffset = vertices.byteLength;
 
     var vbo = gl.createBuffer();
     gl.bindBuffer(gl.ARRAY_BUFFER, vbo);
-    gl.bufferData(gl.ARRAY_BUFFER,
-                  texCoordOffset + texCoords.byteLength,
-                  gl.STATIC_DRAW);
-    gl.bufferSubData(gl.ARRAY_BUFFER, 0, vertices);
-    gl.bufferSubData(gl.ARRAY_BUFFER, texCoordOffset, texCoords);
-
-    gl.enableVertexAttribArray(0);
-    gl.vertexAttribPointer(0, 3, gl.FLOAT, false, 0, 0);
+    gl.bufferData(gl.ARRAY_BUFFER, texCoords, gl.STATIC_DRAW);
     gl.enableVertexAttribArray(1);
-    gl.vertexAttribPointer(1, 2, gl.FLOAT, gl.FALSE, 0, texCoordOffset);
-
-    texture = loadTexture("resources/bug-32888-texture.png");
-}
+    gl.vertexAttribPointer(1, 2, gl.FLOAT, false, 0, 0);
 
-function loadTexture(src) {
-    var texture = gl.createTexture();
-    gl.bindTexture(gl.TEXTURE_2D, texture);
-    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
-    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
-    var image = new Image();
-    image.onload = function() {
-        gl.bindTexture(gl.TEXTURE_2D, texture);
-        gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, true);
-        gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, image);
-        runTest();
-    };
-    image.src = src;
-    return texture;
+    texture = wtu.loadTexture(gl, "resources/bug-32888-texture.png", runTest);
 }
 
 // These two declarations need to be global for "shouldBe" to see them
@@ -103,42 +53,24 @@ var idx = 0;
 function runTest()
 {
     gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+    gl.enable(gl.BLEND);
+    gl.blendFunc(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA);
     // Bind the texture to texture unit 0
     gl.bindTexture(gl.TEXTURE_2D, texture);
     // Point the uniform sampler to texture unit 0
     gl.uniform1i(textureLoc, 0);
     // Draw the triangles
-    gl.drawArrays(gl.TRIANGLES, 0, 6);
+    wtu.drawQuad(gl, [0, 0, 0, 255]);
 
-    // Read back the rendering results
-    var width = 32;
-    var height = 32;
-    buf = new Uint8Array(width * height * 4);
-    gl.readPixels(0, 0, width, height, gl.RGBA, gl.UNSIGNED_BYTE, buf);
     // Spot check a couple of 2x2 regions in the upper and lower left
-    // corners; they should be the background color rather than
-    // garbage
-    var queryWidth = 2;
-    var queryHeight = 2;
+    // corners; they should be the rgb values in the texture.
+    color = [0, 0, 0];
     debug("Checking lower left corner");
-    var xoff = 1;
-    var yoff = height - 3;
-    for (var y = 0; y < queryHeight; y++) {
-        for (var x = 0; x < queryWidth; x++) {
-            idx = ((yoff + y) * width * 4 +
-                   (xoff + x) * 4);
-            shouldBe("buf[idx] == 0 && buf[idx + 1] == 0 && buf[idx + 2] == 0", "true");
-        }
-    }
+    wtu.checkCanvasRect(gl, 1, gl.canvas.height - 3, 2, 2, color,
+                        "shouldBe " + color);
     debug("Checking upper left corner");
-    yoff = 1;
-    for (var y = 0; y < queryHeight; y++) {
-        for (var x = 0; x < queryWidth; x++) {
-            idx = ((yoff + y) * width * 4 +
-                   (xoff + x) * 4);
-            shouldBe("buf[idx] == 0 && buf[idx + 1] == 0 && buf[idx + 2] == 0", "true");
-        }
-    }
+    wtu.checkCanvasRect(gl, 1, 1, 2, 2, color,
+                        "shouldBe " + color);
 
     successfullyParsed = true;
     var epilogue = document.createElement("script");
diff --git a/LayoutTests/fast/canvas/webgl/webgl-specific-expected.txt b/LayoutTests/fast/canvas/webgl/webgl-specific-expected.txt
index bf65ff1..43a4e7e 100644
--- a/LayoutTests/fast/canvas/webgl/webgl-specific-expected.txt
+++ b/LayoutTests/fast/canvas/webgl/webgl-specific-expected.txt
@@ -29,6 +29,9 @@ PASS getError was expected value: INVALID_OPERATION : a different mask value for
 PASS getError was expected value: INVALID_OPERATION : a different mask value for front and back facing is illegal
 PASS undefined is undefined.
 PASS undefined is undefined.
+PASS gl.getParameter(gl.UNPACK_COLORSPACE_CONVERSION_WEBGL) is gl.BROWSER_DEFAULT_WEBGL
+PASS gl.getParameter(gl.UNPACK_COLORSPACE_CONVERSION_WEBGL) is gl.NONE
+PASS getError was expected value: NO_ERROR : set/get UNPACK_COLORSPACE_CONVERSION_WEBGL should generate no error
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/LayoutTests/fast/canvas/webgl/webgl-specific.html b/LayoutTests/fast/canvas/webgl/webgl-specific.html
index 759f9ab..e301efa 100644
--- a/LayoutTests/fast/canvas/webgl/webgl-specific.html
+++ b/LayoutTests/fast/canvas/webgl/webgl-specific.html
@@ -101,6 +101,12 @@ glErrorShouldBe(gl, gl.INVALID_OPERATION,
 shouldBeUndefined(gl.IMPLEMENTATION_COLOR_READ_FORMAT);
 shouldBeUndefined(gl.IMPLEMENTATION_COLOR_READ_TYPE);
 
+shouldBe("gl.getParameter(gl.UNPACK_COLORSPACE_CONVERSION_WEBGL)", "gl.BROWSER_DEFAULT_WEBGL");
+gl.pixelStorei(gl.UNPACK_COLORSPACE_CONVERSION_WEBGL, gl.NONE);
+shouldBe("gl.getParameter(gl.UNPACK_COLORSPACE_CONVERSION_WEBGL)", "gl.NONE");
+glErrorShouldBe(gl, gl.NO_ERROR,
+    "set/get UNPACK_COLORSPACE_CONVERSION_WEBGL should generate no error");
+
 successfullyParsed = true;
 </script>
 
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 7630781..4035418 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,23 @@
+2010-11-10  Zhenyao Mo  <zmo at google.com>
+
+        Reviewed by Kenneth Russell.
+
+        Implement UNPACK_COLORSPACE_CONVERSION_WEBGL
+        https://bugs.webkit.org/show_bug.cgi?id=47196
+
+        This is the first patch for this bug.  We add constants and methods, but haven't hooked it up with texture uploading yet.  Also, in order to check in constants.html, we need to remove out-dated constants, and update affected tests correspondingly.
+
+        Test: fast/canvas/webgl/constants.html
+
+        * html/canvas/WebGLRenderingContext.cpp:
+        (WebCore::WebGLRenderingContext::WebGLRenderingContext): Move init code to initializeNewContext.
+        (WebCore::WebGLRenderingContext::initializeNewContext): Ditto.
+        (WebCore::WebGLRenderingContext::getParameter): Implement UNPACK_COLORSPACE_CONVERSION_WEBGL.
+        (WebCore::WebGLRenderingContext::pixelStorei): Ditto.
+        * html/canvas/WebGLRenderingContext.h: Add a member to track UNPACK_COLORSPACE_CONVERSION_WEBGL setting.
+        * html/canvas/WebGLRenderingContext.idl: Update constants.
+        * platform/graphics/GraphicsContext3D.h: Update constants.
+
 2010-11-11  Chris Marrin  <cmarrin at apple.com>
 
         Reviewed by James Robinson.
diff --git a/WebCore/html/canvas/WebGLRenderingContext.cpp b/WebCore/html/canvas/WebGLRenderingContext.cpp
index 94dac10..240b894 100644
--- a/WebCore/html/canvas/WebGLRenderingContext.cpp
+++ b/WebCore/html/canvas/WebGLRenderingContext.cpp
@@ -105,9 +105,6 @@ WebGLRenderingContext::WebGLRenderingContext(HTMLCanvasElement* passedCanvas, Pa
     , m_context(context)
     , m_videoCache(4)
     , m_contextLost(false)
-    , m_stencilMask(0xFFFFFFFF)
-    , m_stencilFuncRef(0)
-    , m_stencilFuncMask(0xFFFFFFFF)
 {
     ASSERT(m_context);
     initializeNewContext();
@@ -122,11 +119,15 @@ void WebGLRenderingContext::initializeNewContext()
     m_unpackAlignment = 4;
     m_unpackFlipY = false;
     m_unpackPremultiplyAlpha = false;
+    m_unpackColorspaceConversion = GraphicsContext3D::BROWSER_DEFAULT_WEBGL;
     m_boundArrayBuffer = 0;
     m_boundElementArrayBuffer = 0;
     m_currentProgram = 0;
     m_framebufferBinding = 0;
     m_renderbufferBinding = 0;
+    m_stencilMask = 0xFFFFFFFF;
+    m_stencilFuncRef = 0;
+    m_stencilFuncMask = 0xFFFFFFFF;
     m_vertexAttribState.clear();
 
     int numCombinedTextureImageUnits = 0;
@@ -1632,6 +1633,8 @@ WebGLGetInfo WebGLRenderingContext::getParameter(unsigned long pname, ExceptionC
         return WebGLGetInfo(m_unpackFlipY);
     case GraphicsContext3D::UNPACK_PREMULTIPLY_ALPHA_WEBGL:
         return WebGLGetInfo(m_unpackPremultiplyAlpha);
+    case GraphicsContext3D::UNPACK_COLORSPACE_CONVERSION_WEBGL:
+        return WebGLGetInfo(m_unpackColorspaceConversion);
     case GraphicsContext3D::VENDOR:
         return WebGLGetInfo("Webkit (" + m_context->getString(GraphicsContext3D::VENDOR) + ")");
     case GraphicsContext3D::VERSION:
@@ -2148,21 +2151,32 @@ void WebGLRenderingContext::pixelStorei(unsigned long pname, long param)
     case GraphicsContext3D::UNPACK_PREMULTIPLY_ALPHA_WEBGL:
         m_unpackPremultiplyAlpha = param;
         break;
+    case GraphicsContext3D::UNPACK_COLORSPACE_CONVERSION_WEBGL:
+        if (param == GraphicsContext3D::BROWSER_DEFAULT_WEBGL || param == GraphicsContext3D::NONE)
+            m_unpackColorspaceConversion = static_cast<unsigned long>(param);
+        else {
+            m_context->synthesizeGLError(GraphicsContext3D::INVALID_VALUE);
+            return;
+        }
+        break;
     case GraphicsContext3D::PACK_ALIGNMENT:
     case GraphicsContext3D::UNPACK_ALIGNMENT:
-        m_context->pixelStorei(pname, param);
         if (param == 1 || param == 2 || param == 4 || param == 8) {
             if (pname == GraphicsContext3D::PACK_ALIGNMENT)
                 m_packAlignment = static_cast<int>(param);
             else // GraphicsContext3D::UNPACK_ALIGNMENT:
                 m_unpackAlignment = static_cast<int>(param);
+            m_context->pixelStorei(pname, param);
+            cleanupAfterGraphicsCall(false);
+        } else {
+            m_context->synthesizeGLError(GraphicsContext3D::INVALID_VALUE);
+            return;
         }
         break;
     default:
         m_context->synthesizeGLError(GraphicsContext3D::INVALID_ENUM);
         return;
     }
-    cleanupAfterGraphicsCall(false);
 }
 
 void WebGLRenderingContext::polygonOffset(double factor, double units)
diff --git a/WebCore/html/canvas/WebGLRenderingContext.h b/WebCore/html/canvas/WebGLRenderingContext.h
index 5f66248..fc8d8fa 100644
--- a/WebCore/html/canvas/WebGLRenderingContext.h
+++ b/WebCore/html/canvas/WebGLRenderingContext.h
@@ -422,6 +422,7 @@ public:
     int m_unpackAlignment;
     bool m_unpackFlipY;
     bool m_unpackPremultiplyAlpha;
+    unsigned long m_unpackColorspaceConversion;
     bool m_contextLost;
 
     long m_stencilBits;
diff --git a/WebCore/html/canvas/WebGLRenderingContext.idl b/WebCore/html/canvas/WebGLRenderingContext.idl
index 4d41b78..afac638 100644
--- a/WebCore/html/canvas/WebGLRenderingContext.idl
+++ b/WebCore/html/canvas/WebGLRenderingContext.idl
@@ -37,10 +37,6 @@ module html {
         const unsigned int STENCIL_BUFFER_BIT             = 0x00000400;
         const unsigned int COLOR_BUFFER_BIT               = 0x00004000;
 
-        /* Boolean */
-        const unsigned int FALSE                          = 0;
-        const unsigned int TRUE                           = 1;
-
         /* BeginMode */
         const unsigned int POINTS                         = 0x0000;
         const unsigned int LINES                          = 0x0001;
@@ -230,7 +226,6 @@ module html {
         const unsigned int INT                            = 0x1404;
         const unsigned int UNSIGNED_INT                   = 0x1405;
         const unsigned int FLOAT                          = 0x1406;
-        const unsigned int FIXED                          = 0x140C;
 
         /* PixelFormat */
         const unsigned int DEPTH_COMPONENT                = 0x1902;
@@ -398,10 +393,6 @@ module html {
         const unsigned int SHADER_SOURCE_LENGTH           = 0x8B88;
         const unsigned int SHADER_COMPILER                = 0x8DFA;
 
-        /* Shader Binary */
-        const unsigned int SHADER_BINARY_FORMATS          = 0x8DF8;
-        const unsigned int NUM_SHADER_BINARY_FORMATS      = 0x8DF9;
-
         /* Shader Precision-Specified Types */
         const unsigned int LOW_FLOAT                      = 0x8DF0;
         const unsigned int MEDIUM_FLOAT                   = 0x8DF1;
@@ -457,9 +448,11 @@ module html {
         const unsigned int INVALID_FRAMEBUFFER_OPERATION  = 0x0506;
 
         /* WebGL-specific enums */
-        const unsigned int UNPACK_FLIP_Y_WEBGL            = 0x9240;
-        const unsigned int UNPACK_PREMULTIPLY_ALPHA_WEBGL = 0x9241;
-        const unsigned int CONTEXT_LOST_WEBGL             = 0x9242;
+        const unsigned int UNPACK_FLIP_Y_WEBGL                = 0x9240;
+        const unsigned int UNPACK_PREMULTIPLY_ALPHA_WEBGL     = 0x9241;
+        const unsigned int CONTEXT_LOST_WEBGL                 = 0x9242;
+        const unsigned int UNPACK_COLORSPACE_CONVERSION_WEBGL = 0x9243;
+        const unsigned int BROWSER_DEFAULT_WEBGL              = 0x9244;
 
         [StrictTypeChecking] void         activeTexture(in unsigned long texture) raises(DOMException);
         [StrictTypeChecking] void         attachShader(in WebGLProgram program, in WebGLShader shader) raises(DOMException);
diff --git a/WebCore/platform/graphics/GraphicsContext3D.h b/WebCore/platform/graphics/GraphicsContext3D.h
index e34a2f8..d59d78f 100644
--- a/WebCore/platform/graphics/GraphicsContext3D.h
+++ b/WebCore/platform/graphics/GraphicsContext3D.h
@@ -404,6 +404,8 @@ public:
         UNPACK_FLIP_Y_WEBGL = 0x9240,
         UNPACK_PREMULTIPLY_ALPHA_WEBGL = 0x9241,
         CONTEXT_LOST_WEBGL = 0x9242,
+        UNPACK_COLORSPACE_CONVERSION_WEBGL = 0x9243,
+        BROWSER_DEFAULT_WEBGL = 0x9244
     };
 
     // Context creation attributes.

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list