[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.18-1-697-g2f78b87
eric at webkit.org
eric at webkit.org
Wed Jan 20 22:17:49 UTC 2010
The following commit has been merged in the debian/unstable branch:
commit 5f478f166ff310ba7fb9280be930a944a06eaddb
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Jan 8 22:29:55 2010 +0000
2010-01-08 Kenneth Russell <kbr at google.com>
Reviewed by Dimitri Glazkov.
WebGLArray subclasses do the wrong conversion in indexSetter
https://bugs.webkit.org/show_bug.cgi?id=33350
* fast/canvas/webgl/array-setters-expected.txt: Added.
* fast/canvas/webgl/array-setters.html: Added.
* fast/canvas/webgl/array-unit-tests-expected.txt:
* fast/canvas/webgl/array-unit-tests.html:
2010-01-08 Kenneth Russell <kbr at google.com>
Reviewed by Dimitri Glazkov.
WebGLArray subclasses do the wrong conversion in indexSetter
https://bugs.webkit.org/show_bug.cgi?id=33350
Test: fast/canvas/webgl/array-setters.html
* bindings/js/JSWebGLFloatArrayCustom.cpp:
(WebCore::JSWebGLFloatArray::indexSetter):
* bindings/js/JSWebGLUnsignedIntArrayCustom.cpp:
(WebCore::JSWebGLUnsignedIntArray::indexSetter):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53009 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index cf2dbce..ca1a4b7 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,15 @@
+2010-01-08 Kenneth Russell <kbr at google.com>
+
+ Reviewed by Dimitri Glazkov.
+
+ WebGLArray subclasses do the wrong conversion in indexSetter
+ https://bugs.webkit.org/show_bug.cgi?id=33350
+
+ * fast/canvas/webgl/array-setters-expected.txt: Added.
+ * fast/canvas/webgl/array-setters.html: Added.
+ * fast/canvas/webgl/array-unit-tests-expected.txt:
+ * fast/canvas/webgl/array-unit-tests.html:
+
2010-01-08 Ojan Vafai <ojan at chromium.org>
Reviewed by Darin Adler.
diff --git a/LayoutTests/fast/canvas/webgl/array-setters-expected.txt b/LayoutTests/fast/canvas/webgl/array-setters-expected.txt
new file mode 100644
index 0000000..3cd1efa
--- /dev/null
+++ b/LayoutTests/fast/canvas/webgl/array-setters-expected.txt
@@ -0,0 +1,107 @@
+Test all permutations of WebGLArray setters to make sure values don't get truncated
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+Regression test for https://bugs.webkit.org/show_bug.cgi?id=33350 : WebGLArray subclasses do the wrong conversion in indexSetter
+Testing WebGLByteArray
+PASS webGLArray is array
+PASS webGLArray[0] is array[0]
+PASS webGLArray.get(0) is array[0]
+PASS webGLArray[1] is array[1]
+PASS webGLArray.get(1) is array[1]
+PASS webGLArray[0] is 0
+PASS webGLArray.get(0) is 0
+PASS webGLArray[1] is 0
+PASS webGLArray.get(1) is 0
+PASS webGLArray[0] is array[0]
+PASS webGLArray.get(0) is array[0]
+PASS webGLArray[1] is array[1]
+PASS webGLArray.get(1) is array[1]
+Testing WebGLUnsignedByteArray
+PASS webGLArray is array
+PASS webGLArray[0] is array[0]
+PASS webGLArray.get(0) is array[0]
+PASS webGLArray[1] is array[1]
+PASS webGLArray.get(1) is array[1]
+PASS webGLArray[0] is 0
+PASS webGLArray.get(0) is 0
+PASS webGLArray[1] is 0
+PASS webGLArray.get(1) is 0
+PASS webGLArray[0] is array[0]
+PASS webGLArray.get(0) is array[0]
+PASS webGLArray[1] is array[1]
+PASS webGLArray.get(1) is array[1]
+Testing WebGLShortArray
+PASS webGLArray is array
+PASS webGLArray[0] is array[0]
+PASS webGLArray.get(0) is array[0]
+PASS webGLArray[1] is array[1]
+PASS webGLArray.get(1) is array[1]
+PASS webGLArray[0] is 0
+PASS webGLArray.get(0) is 0
+PASS webGLArray[1] is 0
+PASS webGLArray.get(1) is 0
+PASS webGLArray[0] is array[0]
+PASS webGLArray.get(0) is array[0]
+PASS webGLArray[1] is array[1]
+PASS webGLArray.get(1) is array[1]
+Testing WebGLUnsignedShortArray
+PASS webGLArray is array
+PASS webGLArray[0] is array[0]
+PASS webGLArray.get(0) is array[0]
+PASS webGLArray[1] is array[1]
+PASS webGLArray.get(1) is array[1]
+PASS webGLArray[0] is 0
+PASS webGLArray.get(0) is 0
+PASS webGLArray[1] is 0
+PASS webGLArray.get(1) is 0
+PASS webGLArray[0] is array[0]
+PASS webGLArray.get(0) is array[0]
+PASS webGLArray[1] is array[1]
+PASS webGLArray.get(1) is array[1]
+Testing WebGLIntArray
+PASS webGLArray is array
+PASS webGLArray[0] is array[0]
+PASS webGLArray.get(0) is array[0]
+PASS webGLArray[1] is array[1]
+PASS webGLArray.get(1) is array[1]
+PASS webGLArray[0] is 0
+PASS webGLArray.get(0) is 0
+PASS webGLArray[1] is 0
+PASS webGLArray.get(1) is 0
+PASS webGLArray[0] is array[0]
+PASS webGLArray.get(0) is array[0]
+PASS webGLArray[1] is array[1]
+PASS webGLArray.get(1) is array[1]
+Testing WebGLUnsignedIntArray
+PASS webGLArray is array
+PASS webGLArray[0] is array[0]
+PASS webGLArray.get(0) is array[0]
+PASS webGLArray[1] is array[1]
+PASS webGLArray.get(1) is array[1]
+PASS webGLArray[0] is 0
+PASS webGLArray.get(0) is 0
+PASS webGLArray[1] is 0
+PASS webGLArray.get(1) is 0
+PASS webGLArray[0] is array[0]
+PASS webGLArray.get(0) is array[0]
+PASS webGLArray[1] is array[1]
+PASS webGLArray.get(1) is array[1]
+Testing WebGLFloatArray
+PASS webGLArray is array
+PASS webGLArray[0] is array[0]
+PASS webGLArray.get(0) is array[0]
+PASS webGLArray[1] is array[1]
+PASS webGLArray.get(1) is array[1]
+PASS webGLArray[0] is 0
+PASS webGLArray.get(0) is 0
+PASS webGLArray[1] is 0
+PASS webGLArray.get(1) is 0
+PASS webGLArray[0] is array[0]
+PASS webGLArray.get(0) is array[0]
+PASS webGLArray[1] is array[1]
+PASS webGLArray.get(1) is array[1]
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/canvas/webgl/array-setters.html b/LayoutTests/fast/canvas/webgl/array-setters.html
new file mode 100644
index 0000000..762531e
--- /dev/null
+++ b/LayoutTests/fast/canvas/webgl/array-setters.html
@@ -0,0 +1,57 @@
+<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("Test all permutations of WebGLArray setters to make sure values don't get truncated");
+
+debug('Regression test for <a href="https://bugs.webkit.org/show_bug.cgi?id=33350">https://bugs.webkit.org/show_bug.cgi?id=33350</a> : <code>WebGLArray subclasses do the wrong conversion in indexSetter</code>');
+
+var webGLArray = null;
+var array = null;
+
+function testSetters(typeName, low, high) {
+ var type = window[typeName];
+ webGLArray = new type(2);
+ array = [low, high];
+ debug("Testing " + typeName);
+ webGLArray.set(array);
+ shouldBe("webGLArray", "array");
+ shouldBe("webGLArray[0]", "array[0]");
+ shouldBe("webGLArray.get(0)", "array[0]");
+ shouldBe("webGLArray[1]", "array[1]");
+ shouldBe("webGLArray.get(1)", "array[1]");
+ webGLArray[0] = 0;
+ webGLArray[1] = 0;
+ shouldBe("webGLArray[0]", "0");
+ shouldBe("webGLArray.get(0)", "0");
+ shouldBe("webGLArray[1]", "0");
+ shouldBe("webGLArray.get(1)", "0");
+ webGLArray[0] = array[0];
+ shouldBe("webGLArray[0]", "array[0]");
+ shouldBe("webGLArray.get(0)", "array[0]");
+ webGLArray.set(1, array[1]);
+ shouldBe("webGLArray[1]", "array[1]");
+ shouldBe("webGLArray.get(1)", "array[1]");
+}
+
+testSetters("WebGLByteArray", -128, 127);
+testSetters("WebGLUnsignedByteArray", 0, 255);
+testSetters("WebGLShortArray", -32768, 32767);
+testSetters("WebGLUnsignedShortArray", 0, 65535);
+testSetters("WebGLIntArray", -2147483648, 2147483647);
+testSetters("WebGLUnsignedIntArray", 0, 4294967295);
+testSetters("WebGLFloatArray", -2.5, 3.5);
+
+successfullyParsed = true;
+</script>
+
+<script src="../../js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/fast/canvas/webgl/array-unit-tests-expected.txt b/LayoutTests/fast/canvas/webgl/array-unit-tests-expected.txt
index 5cb4e79..15bfa43 100644
--- a/LayoutTests/fast/canvas/webgl/array-unit-tests-expected.txt
+++ b/LayoutTests/fast/canvas/webgl/array-unit-tests-expected.txt
@@ -23,7 +23,7 @@ PASS negativeTest WebGLFloatArray SetFromWebGLArray
PASS test WebGLFloatArray SetFromArray
PASS test WebGLFloatArray Slice
PASS negativeTest WebGLFloatArray Slice
-PASS test WebGLFloatArray BoundaryConditions(-500, -500, 500, 500)
+PASS test WebGLFloatArray BoundaryConditions(-500.5, -500.5, 500.5, 500.5)
PASS test WebGLIntArray SetAndGetPos10ToNeg10
PASS test WebGLIntArray SetAndGetMethodsPos10ToNeg10
PASS test WebGLIntArray ConstructWithArrayOfSignedValues
diff --git a/LayoutTests/fast/canvas/webgl/array-unit-tests.html b/LayoutTests/fast/canvas/webgl/array-unit-tests.html
index e6b06af..a33f89e 100644
--- a/LayoutTests/fast/canvas/webgl/array-unit-tests.html
+++ b/LayoutTests/fast/canvas/webgl/array-unit-tests.html
@@ -366,10 +366,10 @@ function runTests() {
{name: "WebGLFloatArray",
unsigned: false,
elementSizeInBytes: 4,
- low: -500,
- expectedLow: -500,
- high: 500,
- expectedHigh: 500},
+ low: -500.5,
+ expectedLow: -500.5,
+ high: 500.5,
+ expectedHigh: 500.5},
{name: "WebGLIntArray",
unsigned: false,
elementSizeInBytes: 4,
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 7a62cd1..55ac0ee 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2010-01-08 Kenneth Russell <kbr at google.com>
+
+ Reviewed by Dimitri Glazkov.
+
+ WebGLArray subclasses do the wrong conversion in indexSetter
+ https://bugs.webkit.org/show_bug.cgi?id=33350
+
+ Test: fast/canvas/webgl/array-setters.html
+
+ * bindings/js/JSWebGLFloatArrayCustom.cpp:
+ (WebCore::JSWebGLFloatArray::indexSetter):
+ * bindings/js/JSWebGLUnsignedIntArrayCustom.cpp:
+ (WebCore::JSWebGLUnsignedIntArray::indexSetter):
+
2010-01-08 Luiz Agostini <luiz.agostini at openbossa.org>
Reviewed by Kenneth Rohde Christiansen.
diff --git a/WebCore/bindings/js/JSWebGLFloatArrayCustom.cpp b/WebCore/bindings/js/JSWebGLFloatArrayCustom.cpp
index bcb8bab..f4acbcf 100644
--- a/WebCore/bindings/js/JSWebGLFloatArrayCustom.cpp
+++ b/WebCore/bindings/js/JSWebGLFloatArrayCustom.cpp
@@ -38,7 +38,7 @@ namespace WebCore {
void JSWebGLFloatArray::indexSetter(JSC::ExecState* exec, unsigned index, JSC::JSValue value)
{
- impl()->set(index, static_cast<float>(value.toInt32(exec)));
+ impl()->set(index, static_cast<float>(value.toNumber(exec)));
}
JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, WebGLFloatArray* object)
diff --git a/WebCore/bindings/js/JSWebGLUnsignedIntArrayCustom.cpp b/WebCore/bindings/js/JSWebGLUnsignedIntArrayCustom.cpp
index 5a27a30..c8b7454 100644
--- a/WebCore/bindings/js/JSWebGLUnsignedIntArrayCustom.cpp
+++ b/WebCore/bindings/js/JSWebGLUnsignedIntArrayCustom.cpp
@@ -38,7 +38,7 @@ namespace WebCore {
void JSWebGLUnsignedIntArray::indexSetter(JSC::ExecState* exec, unsigned index, JSC::JSValue value)
{
- impl()->set(index, static_cast<unsigned int>(value.toInt32(exec)));
+ impl()->set(index, static_cast<unsigned int>(value.toUInt32(exec)));
}
JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, WebGLUnsignedIntArray* object)
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list