Diff
Modified: trunk/LayoutTests/ChangeLog (105704 => 105705)
--- trunk/LayoutTests/ChangeLog 2012-01-24 08:49:47 UTC (rev 105704)
+++ trunk/LayoutTests/ChangeLog 2012-01-24 08:54:47 UTC (rev 105705)
@@ -1,3 +1,13 @@
+2012-01-24 Kenichi Ishibashi <[email protected]>
+
+ [V8] Add Uint8ClampedArray support
+ https://bugs.webkit.org/show_bug.cgi?id=76803
+
+ Reviewed by Kenneth Russell.
+
+ * platform/chromium/fast/canvas/webgl/array-unit-tests-expected.txt: Removed.
+ * platform/chromium/test_expectations.txt: Removed fast/js/dfg-uint8clampedarray.html.
+
2012-01-23 Csaba Osztrogonác <[email protected]>
[Qt][WK2] http/tests/navigation/anchor-frames-gbk.html fails
Deleted: trunk/LayoutTests/platform/chromium/fast/canvas/webgl/array-unit-tests-expected.txt (105704 => 105705)
--- trunk/LayoutTests/platform/chromium/fast/canvas/webgl/array-unit-tests-expected.txt 2012-01-24 08:49:47 UTC (rev 105704)
+++ trunk/LayoutTests/platform/chromium/fast/canvas/webgl/array-unit-tests-expected.txt 2012-01-24 08:54:47 UTC (rev 105705)
@@ -1,280 +0,0 @@
-CONSOLE MESSAGE: line 222: Uncaught ReferenceError: Uint8ClampedArray is not defined
-Verifies the functionality of the new array-like objects in the TypedArray spec
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-PASS test Float32Array SetAndGetPos10ToNeg10
-PASS test Float32Array ConstructWithArrayOfSignedValues
-PASS test Float32Array ConstructWithTypedArrayOfSignedValues
-Testing Float32Array GetWithOutOfRangeIndices
-PASS array[2] is undefined.
-PASS array[-1] is undefined.
-PASS array[0x20000000] is undefined.
-PASS test Float32Array OffsetsAndSizes
-PASS test Float32Array SetFromTypedArray
-PASS negativeTest Float32Array SetFromTypedArray
-PASS test Float32Array SetFromArray
-PASS negativeTest Float32Array SetFromArray
-PASS test Float32Array Subarray
-PASS negativeTest Float32Array Subarray
-PASS test Float32Array SetBoundaryConditions
-PASS test Float32Array ConstructionBoundaryConditions
-PASS Construction of Float32Array with null buffer threw exception
-PASS Construction of Float32Array with (null buffer, 0) threw exception
-PASS Construction of Float32Array with (null buffer, 0, 0) threw exception
-PASS Construction of Float32Array with out-of-range number of elements threw an exception
-PASS Construction of Float32Array with out-of-range offset threw an exception
-PASS Construction of ArrayBuffer with negative size threw exception
-PASS Construction of Float32Array with negative size threw exception
-PASS Construction of Float32Array with negative out-of-range values threw an exception
-PASS Construction of Float32Array with unaligned offset threw an exception
-PASS Construction of Float32Array with unaligned length threw an exception
-PASS Construction of huge Float32Array threw exception
-PASS Array lengths matched with explicit and implicit creation of ArrayBuffer
-PASS new Float32Array(new ArrayBuffer(18), 0, 2) succeeded
-Testing subarray of Float32Array
-PASS array.length is 32 / typeSize
-PASS array.subarray(4, 0x3FFFFFFF).length is (32 / typeSize) - 4
-PASS array.subarray(4, -2147483648).length is 0
-PASS array.length is 0
-Testing subarray with default inputs of Float32Array
-PASS array.length is 32 / typeSize
-PASS array.subarray(0).length is (32 / typeSize)
-PASS array.subarray(2).length is (32 / typeSize) - 2
-PASS array.subarray(-2).length is 2
-PASS array.subarray(-2147483648).length is (32 / typeSize)
-PASS Setting Float32Array from array with out-of-range offset was caught
-PASS Setting Float32Array from Float32Array with out-of-range offset was caught
-PASS Setting Float32Array from array with negative offset was caught
-PASS Setting Float32Array from Float32Array with negative offset was caught
-PASS Setting Float32Array from array with -0 offset
-PASS Setting Float32Array from Float32Array with -0 offset
-PASS Setting Float32Array from array with boundary offset
-PASS Setting Float32Array from Float32Array with boundary offset
-PASS Setting Float32Array from array with non-integer offset
-PASS Setting Float32Array from Float32Array with non-integer offset
-PASS Setting Float32Array from fake array with invalid length was caught
-PASS array.get is undefined.
-PASS array.set(0, 1) threw exception.
-PASS test storing NaN in Float32Array
-PASS test Float64Array SetAndGetPos10ToNeg10
-PASS test Float64Array ConstructWithArrayOfSignedValues
-PASS test Float64Array ConstructWithTypedArrayOfSignedValues
-Testing Float64Array GetWithOutOfRangeIndices
-PASS array[2] is undefined.
-PASS array[-1] is undefined.
-PASS array[0x20000000] is undefined.
-PASS test Float64Array OffsetsAndSizes
-PASS test Float64Array SetFromTypedArray
-PASS negativeTest Float64Array SetFromTypedArray
-PASS test Float64Array SetFromArray
-PASS negativeTest Float64Array SetFromArray
-PASS test Float64Array Subarray
-PASS negativeTest Float64Array Subarray
-PASS test Float64Array SetBoundaryConditions
-PASS test Float64Array ConstructionBoundaryConditions
-PASS Construction of Float64Array with null buffer threw exception
-PASS Construction of Float64Array with (null buffer, 0) threw exception
-PASS Construction of Float64Array with (null buffer, 0, 0) threw exception
-PASS Construction of Float64Array with out-of-range number of elements threw an exception
-PASS Construction of Float64Array with out-of-range offset threw an exception
-PASS Construction of ArrayBuffer with negative size threw exception
-PASS Construction of Float64Array with negative size threw exception
-PASS Construction of Float64Array with negative out-of-range values threw an exception
-PASS Construction of Float64Array with unaligned offset threw an exception
-PASS Construction of Float64Array with unaligned length threw an exception
-PASS Construction of huge Float64Array threw exception
-PASS Array lengths matched with explicit and implicit creation of ArrayBuffer
-PASS new Float64Array(new ArrayBuffer(36), 0, 2) succeeded
-Testing subarray of Float64Array
-PASS array.length is 32 / typeSize
-PASS array.subarray(4, 0x3FFFFFFF).length is (32 / typeSize) - 4
-PASS array.subarray(4, -2147483648).length is 0
-PASS array.length is 0
-Testing subarray with default inputs of Float64Array
-PASS array.length is 32 / typeSize
-PASS array.subarray(0).length is (32 / typeSize)
-PASS array.subarray(2).length is (32 / typeSize) - 2
-PASS array.subarray(-2).length is 2
-PASS array.subarray(-2147483648).length is (32 / typeSize)
-PASS Setting Float64Array from array with out-of-range offset was caught
-PASS Setting Float64Array from Float64Array with out-of-range offset was caught
-PASS Setting Float64Array from array with negative offset was caught
-PASS Setting Float64Array from Float64Array with negative offset was caught
-PASS Setting Float64Array from array with -0 offset
-PASS Setting Float64Array from Float64Array with -0 offset
-PASS Setting Float64Array from array with boundary offset
-PASS Setting Float64Array from Float64Array with boundary offset
-PASS Setting Float64Array from array with non-integer offset
-PASS Setting Float64Array from Float64Array with non-integer offset
-PASS Setting Float64Array from fake array with invalid length was caught
-PASS array.get is undefined.
-PASS array.set(0, 1) threw exception.
-PASS test storing NaN in Float64Array
-PASS test Int8Array SetAndGetPos10ToNeg10
-PASS test Int8Array ConstructWithArrayOfSignedValues
-PASS test Int8Array ConstructWithTypedArrayOfSignedValues
-PASS test integral array truncation behavior for Int8Array
-Testing Int8Array GetWithOutOfRangeIndices
-PASS array[2] is undefined.
-PASS array[-1] is undefined.
-PASS array[0x20000000] is undefined.
-PASS test Int8Array OffsetsAndSizes
-PASS test Int8Array SetFromTypedArray
-PASS negativeTest Int8Array SetFromTypedArray
-PASS test Int8Array SetFromArray
-PASS negativeTest Int8Array SetFromArray
-PASS test Int8Array Subarray
-PASS negativeTest Int8Array Subarray
-PASS test Int8Array SetBoundaryConditions
-PASS test Int8Array ConstructionBoundaryConditions
-PASS Construction of Int8Array with null buffer threw exception
-PASS Construction of Int8Array with (null buffer, 0) threw exception
-PASS Construction of Int8Array with (null buffer, 0, 0) threw exception
-PASS Construction of Int8Array with out-of-range number of elements threw an exception
-PASS Construction of Int8Array with out-of-range offset threw an exception
-PASS Construction of ArrayBuffer with negative size threw exception
-PASS Construction of Int8Array with negative size threw exception
-PASS Construction of Int8Array with negative out-of-range values threw an exception
-PASS Array lengths matched with explicit and implicit creation of ArrayBuffer
-Testing subarray of Int8Array
-PASS array.length is 32 / typeSize
-PASS array.subarray(4, 0x3FFFFFFF).length is (32 / typeSize) - 4
-PASS array.subarray(4, -2147483648).length is 0
-Testing subarray with default inputs of Int8Array
-PASS array.length is 32 / typeSize
-PASS array.subarray(0).length is (32 / typeSize)
-PASS array.subarray(2).length is (32 / typeSize) - 2
-PASS array.subarray(-2).length is 2
-PASS array.subarray(-2147483648).length is (32 / typeSize)
-PASS Setting Int8Array from array with out-of-range offset was caught
-PASS Setting Int8Array from Int8Array with out-of-range offset was caught
-PASS Setting Int8Array from array with negative offset was caught
-PASS Setting Int8Array from Int8Array with negative offset was caught
-PASS Setting Int8Array from array with -0 offset
-PASS Setting Int8Array from Int8Array with -0 offset
-PASS Setting Int8Array from array with boundary offset
-PASS Setting Int8Array from Int8Array with boundary offset
-PASS Setting Int8Array from array with non-integer offset
-PASS Setting Int8Array from Int8Array with non-integer offset
-PASS Setting Int8Array from fake array with invalid length was caught
-PASS array.get is undefined.
-PASS array.set(0, 1) threw exception.
-PASS test storing NaN in Int8Array
-PASS test Int16Array SetAndGetPos10ToNeg10
-PASS test Int16Array ConstructWithArrayOfSignedValues
-PASS test Int16Array ConstructWithTypedArrayOfSignedValues
-PASS test integral array truncation behavior for Int16Array
-Testing Int16Array GetWithOutOfRangeIndices
-PASS array[2] is undefined.
-PASS array[-1] is undefined.
-PASS array[0x20000000] is undefined.
-PASS test Int16Array OffsetsAndSizes
-PASS test Int16Array SetFromTypedArray
-PASS negativeTest Int16Array SetFromTypedArray
-PASS test Int16Array SetFromArray
-PASS negativeTest Int16Array SetFromArray
-PASS test Int16Array Subarray
-PASS negativeTest Int16Array Subarray
-PASS test Int16Array SetBoundaryConditions
-PASS test Int16Array ConstructionBoundaryConditions
-PASS Construction of Int16Array with null buffer threw exception
-PASS Construction of Int16Array with (null buffer, 0) threw exception
-PASS Construction of Int16Array with (null buffer, 0, 0) threw exception
-PASS Construction of Int16Array with out-of-range number of elements threw an exception
-PASS Construction of Int16Array with out-of-range offset threw an exception
-PASS Construction of ArrayBuffer with negative size threw exception
-PASS Construction of Int16Array with negative size threw exception
-PASS Construction of Int16Array with negative out-of-range values threw an exception
-PASS Construction of Int16Array with unaligned offset threw an exception
-PASS Construction of Int16Array with unaligned length threw an exception
-PASS Construction of huge Int16Array threw exception
-PASS Array lengths matched with explicit and implicit creation of ArrayBuffer
-PASS new Int16Array(new ArrayBuffer(9), 0, 2) succeeded
-Testing subarray of Int16Array
-PASS array.length is 32 / typeSize
-PASS array.subarray(4, 0x3FFFFFFF).length is (32 / typeSize) - 4
-PASS array.subarray(4, -2147483648).length is 0
-PASS array.length is 0
-Testing subarray with default inputs of Int16Array
-PASS array.length is 32 / typeSize
-PASS array.subarray(0).length is (32 / typeSize)
-PASS array.subarray(2).length is (32 / typeSize) - 2
-PASS array.subarray(-2).length is 2
-PASS array.subarray(-2147483648).length is (32 / typeSize)
-PASS Setting Int16Array from array with out-of-range offset was caught
-PASS Setting Int16Array from Int16Array with out-of-range offset was caught
-PASS Setting Int16Array from array with negative offset was caught
-PASS Setting Int16Array from Int16Array with negative offset was caught
-PASS Setting Int16Array from array with -0 offset
-PASS Setting Int16Array from Int16Array with -0 offset
-PASS Setting Int16Array from array with boundary offset
-PASS Setting Int16Array from Int16Array with boundary offset
-PASS Setting Int16Array from array with non-integer offset
-PASS Setting Int16Array from Int16Array with non-integer offset
-PASS Setting Int16Array from fake array with invalid length was caught
-PASS array.get is undefined.
-PASS array.set(0, 1) threw exception.
-PASS test storing NaN in Int16Array
-PASS test Int32Array SetAndGetPos10ToNeg10
-PASS test Int32Array ConstructWithArrayOfSignedValues
-PASS test Int32Array ConstructWithTypedArrayOfSignedValues
-PASS test integral array truncation behavior for Int32Array
-Testing Int32Array GetWithOutOfRangeIndices
-PASS array[2] is undefined.
-PASS array[-1] is undefined.
-PASS array[0x20000000] is undefined.
-PASS test Int32Array OffsetsAndSizes
-PASS test Int32Array SetFromTypedArray
-PASS negativeTest Int32Array SetFromTypedArray
-PASS test Int32Array SetFromArray
-PASS negativeTest Int32Array SetFromArray
-PASS test Int32Array Subarray
-PASS negativeTest Int32Array Subarray
-PASS test Int32Array SetBoundaryConditions
-PASS test Int32Array ConstructionBoundaryConditions
-PASS Construction of Int32Array with null buffer threw exception
-PASS Construction of Int32Array with (null buffer, 0) threw exception
-PASS Construction of Int32Array with (null buffer, 0, 0) threw exception
-PASS Construction of Int32Array with out-of-range number of elements threw an exception
-PASS Construction of Int32Array with out-of-range offset threw an exception
-PASS Construction of ArrayBuffer with negative size threw exception
-PASS Construction of Int32Array with negative size threw exception
-PASS Construction of Int32Array with negative out-of-range values threw an exception
-PASS Construction of Int32Array with unaligned offset threw an exception
-PASS Construction of Int32Array with unaligned length threw an exception
-PASS Construction of huge Int32Array threw exception
-PASS Array lengths matched with explicit and implicit creation of ArrayBuffer
-PASS new Int32Array(new ArrayBuffer(18), 0, 2) succeeded
-Testing subarray of Int32Array
-PASS array.length is 32 / typeSize
-PASS array.subarray(4, 0x3FFFFFFF).length is (32 / typeSize) - 4
-PASS array.subarray(4, -2147483648).length is 0
-PASS array.length is 0
-Testing subarray with default inputs of Int32Array
-PASS array.length is 32 / typeSize
-PASS array.subarray(0).length is (32 / typeSize)
-PASS array.subarray(2).length is (32 / typeSize) - 2
-PASS array.subarray(-2).length is 2
-PASS array.subarray(-2147483648).length is (32 / typeSize)
-PASS Setting Int32Array from array with out-of-range offset was caught
-PASS Setting Int32Array from Int32Array with out-of-range offset was caught
-PASS Setting Int32Array from array with negative offset was caught
-PASS Setting Int32Array from Int32Array with negative offset was caught
-PASS Setting Int32Array from array with -0 offset
-PASS Setting Int32Array from Int32Array with -0 offset
-PASS Setting Int32Array from array with boundary offset
-PASS Setting Int32Array from Int32Array with boundary offset
-PASS Setting Int32Array from array with non-integer offset
-PASS Setting Int32Array from Int32Array with non-integer offset
-PASS Setting Int32Array from fake array with invalid length was caught
-PASS array.get is undefined.
-PASS array.set(0, 1) threw exception.
-PASS test storing NaN in Int32Array
-PASS test Uint8Array SetAndGet10To1
-PASS test Uint8Array ConstructWithArrayOfUnsignedValues
-PASS test Uint8Array ConstructWithTypedArrayOfUnsignedValues
-FAIL successfullyParsed should be true (of type boolean). Was undefined (of type undefined).
-
-TEST COMPLETE
-
Modified: trunk/LayoutTests/platform/chromium/test_expectations.txt (105704 => 105705)
--- trunk/LayoutTests/platform/chromium/test_expectations.txt 2012-01-24 08:49:47 UTC (rev 105704)
+++ trunk/LayoutTests/platform/chromium/test_expectations.txt 2012-01-24 08:54:47 UTC (rev 105705)
@@ -3877,9 +3877,6 @@
BUGWK65711 : svg/custom/js-late-pattern-and-object-creation.svg = IMAGE+TEXT IMAGE
BUGWK65711 : svg/text/append-text-node-to-tspan.html = IMAGE+TEXT IMAGE
-// Uint8ClampedArray still not implemented.
-BUGWK74455 : fast/js/dfg-uint8clampedarray.html = TEXT
-
// Needs baseline
BUGWK76118 : fast/css/text-overflow-input.html = MISSING
Modified: trunk/Source/_javascript_Core/ChangeLog (105704 => 105705)
--- trunk/Source/_javascript_Core/ChangeLog 2012-01-24 08:49:47 UTC (rev 105704)
+++ trunk/Source/_javascript_Core/ChangeLog 2012-01-24 08:54:47 UTC (rev 105705)
@@ -1,3 +1,15 @@
+2012-01-24 Kenichi Ishibashi <[email protected]>
+
+ [V8] Add Uint8ClampedArray support
+ https://bugs.webkit.org/show_bug.cgi?id=76803
+
+ Reviewed by Kenneth Russell.
+
+ * wtf/ArrayBufferView.h:
+ (WTF::ArrayBufferView::isUnsignedByteClampedArray): Added.
+ * wtf/Uint8ClampedArray.h:
+ (WTF::Uint8ClampedArray::isUnsignedByteClampedArray): Overridden to return true.
+
2012-01-23 Carlos Garcia Campos <[email protected]>
[GTK] Add WebKitDownload to WebKit2 GTK+ API
Modified: trunk/Source/_javascript_Core/wtf/ArrayBufferView.h (105704 => 105705)
--- trunk/Source/_javascript_Core/wtf/ArrayBufferView.h 2012-01-24 08:49:47 UTC (rev 105704)
+++ trunk/Source/_javascript_Core/wtf/ArrayBufferView.h 2012-01-24 08:54:47 UTC (rev 105705)
@@ -40,6 +40,7 @@
public:
virtual bool isByteArray() const { return false; }
virtual bool isUnsignedByteArray() const { return false; }
+ virtual bool isUnsignedByteClampedArray() const { return false; }
virtual bool isShortArray() const { return false; }
virtual bool isUnsignedShortArray() const { return false; }
virtual bool isIntArray() const { return false; }
Modified: trunk/Source/_javascript_Core/wtf/Uint8ClampedArray.h (105704 => 105705)
--- trunk/Source/_javascript_Core/wtf/Uint8ClampedArray.h 2012-01-24 08:49:47 UTC (rev 105704)
+++ trunk/Source/_javascript_Core/wtf/Uint8ClampedArray.h 2012-01-24 08:54:47 UTC (rev 105705)
@@ -51,6 +51,9 @@
unsigned length);
// Make constructor visible to superclass.
friend class TypedArrayBase<unsigned char>;
+
+ // Overridden from ArrayBufferView.
+ virtual bool isUnsignedByteClampedArray() const { return true; }
};
PassRefPtr<Uint8ClampedArray> Uint8ClampedArray::create(unsigned length)
Modified: trunk/Source/WebCore/ChangeLog (105704 => 105705)
--- trunk/Source/WebCore/ChangeLog 2012-01-24 08:49:47 UTC (rev 105704)
+++ trunk/Source/WebCore/ChangeLog 2012-01-24 08:54:47 UTC (rev 105705)
@@ -1,3 +1,27 @@
+2012-01-24 Kenichi Ishibashi <[email protected]>
+
+ [V8] Add Uint8ClampedArray support
+ https://bugs.webkit.org/show_bug.cgi?id=76803
+
+ Reviewed by Kenneth Russell.
+
+ No new tests. fast/js/script-tests/dfg-uint8clampedarray.js should pass on chromium port.
+
+ * WebCore.gypi: Added required files.
+ * bindings/scripts/CodeGeneratorV8.pm:
+ (IsTypedArrayType): Added Uint8ClampedArray.
+ * bindings/v8/SerializedScriptValue.cpp: Added the tag for Uint8ClampedArray.
+ (WebCore::V8ObjectMap::Writer::writeArrayBufferView): Appends the tag when buffer is Uint8ClampedArray.
+ (WebCore::V8ObjectMap::Reader::readArrayBufferView): Creates Uint8ClampedArray instance when the tag represents Uint8ClampedArray.
+ * bindings/v8/custom/V8ArrayBufferViewCustomScript.js:
+ * bindings/v8/custom/V8Uint8ClampedArrayCustom.cpp: Added.
+ (WebCore::V8Uint8ClampedArray::constructorCallback):
+ (WebCore::V8Uint8ClampedArray::setCallback):
+ (WebCore::toV8):
+ * page/Crypto.cpp: Added isUnsignedByteClampedArray() call to isIntegerArray().
+ * page/DOMWindow.idl: Removed ifdefs.
+ * workers/WorkerContext.idl: Added Uint8ArrayConstructor.
+
2012-01-24 Ilya Tikhonovsky <[email protected]>
Unreviewed build fix for GTK Debug build after r105698.
Modified: trunk/Source/WebCore/WebCore.gypi (105704 => 105705)
--- trunk/Source/WebCore/WebCore.gypi 2012-01-24 08:49:47 UTC (rev 105704)
+++ trunk/Source/WebCore/WebCore.gypi 2012-01-24 08:54:47 UTC (rev 105705)
@@ -961,6 +961,7 @@
'html/canvas/Uint16Array.idl',
'html/canvas/Uint32Array.idl',
'html/canvas/Uint8Array.idl',
+ 'html/canvas/Uint8ClampedArray.idl',
'html/canvas/WebGLActiveInfo.idl',
'html/canvas/WebGLBuffer.idl',
'html/canvas/WebGLCompressedTextures.idl',
@@ -1873,6 +1874,7 @@
'bindings/v8/custom/V8Uint16ArrayCustom.cpp',
'bindings/v8/custom/V8Uint32ArrayCustom.cpp',
'bindings/v8/custom/V8Uint8ArrayCustom.cpp',
+ 'bindings/v8/custom/V8Uint8ClampedArrayCustom.cpp',
'bindings/v8/custom/V8WebGLRenderingContextCustom.cpp',
'bindings/v8/custom/V8WebKitAnimationCustom.cpp',
'bindings/v8/custom/V8WebKitMutationObserverCustom.cpp',
Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm (105704 => 105705)
--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2012-01-24 08:49:47 UTC (rev 105704)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2012-01-24 08:54:47 UTC (rev 105705)
@@ -2243,7 +2243,7 @@
{
my $type = shift;
return 1 if (($type eq "ArrayBuffer") or ($type eq "ArrayBufferView"));
- return 1 if (($type eq "Uint8Array") or ($type eq "Uint16Array") or ($type eq "Uint32Array"));
+ return 1 if (($type eq "Uint8Array") or ($type eq "Uint8ClampedArray") or ($type eq "Uint16Array") or ($type eq "Uint32Array"));
return 1 if (($type eq "Int8Array") or ($type eq "Int16Array") or ($type eq "Int32Array"));
return 1 if (($type eq "Float32Array") or ($type eq "Float64Array"));
return 0;
Modified: trunk/Source/WebCore/bindings/v8/SerializedScriptValue.cpp (105704 => 105705)
--- trunk/Source/WebCore/bindings/v8/SerializedScriptValue.cpp 2012-01-24 08:49:47 UTC (rev 105704)
+++ trunk/Source/WebCore/bindings/v8/SerializedScriptValue.cpp 2012-01-24 08:54:47 UTC (rev 105705)
@@ -51,6 +51,7 @@
#include "Uint16Array.h"
#include "Uint32Array.h"
#include "Uint8Array.h"
+#include "Uint8ClampedArray.h"
#include "V8ArrayBuffer.h"
#include "V8ArrayBufferView.h"
#include "V8Binding.h"
@@ -69,6 +70,7 @@
#include "V8Uint16Array.h"
#include "V8Uint32Array.h"
#include "V8Uint8Array.h"
+#include "V8Uint8ClampedArray.h"
#include "V8Utilities.h"
#include <wtf/Assertions.h>
@@ -214,6 +216,7 @@
enum ArrayBufferViewSubTag {
ByteArrayTag = 'b',
UnsignedByteArrayTag = 'B',
+ UnsignedByteClampedArrayTag = 'C',
ShortArrayTag = 'w',
UnsignedShortArrayTag = 'W',
IntArrayTag = 'd',
@@ -396,6 +399,8 @@
append(ByteArrayTag);
else if (arrayBufferView.isUnsignedByteArray())
append(UnsignedByteArrayTag);
+ else if (arrayBufferView.isUnsignedByteClampedArray())
+ append(UnsignedByteClampedArrayTag);
else if (arrayBufferView.isShortArray())
append(ShortArrayTag);
else if (arrayBufferView.isUnsignedShortArray())
@@ -1628,6 +1633,9 @@
case UnsignedByteArrayTag:
*value = toV8(Uint8Array::create(arrayBuffer.release(), byteOffset, byteLength));
break;
+ case UnsignedByteClampedArrayTag:
+ *value = toV8(Uint8ClampedArray::create(arrayBuffer.release(), byteOffset, byteLength));
+ break;
case ShortArrayTag: {
uint32_t shortLength = byteLength / sizeof(int16_t);
if (shortLength * sizeof(int16_t) != byteLength)
Modified: trunk/Source/WebCore/bindings/v8/custom/V8ArrayBufferViewCustomScript.js (105704 => 105705)
--- trunk/Source/WebCore/bindings/v8/custom/V8ArrayBufferViewCustomScript.js 2012-01-24 08:49:47 UTC (rev 105704)
+++ trunk/Source/WebCore/bindings/v8/custom/V8ArrayBufferViewCustomScript.js 2012-01-24 08:54:47 UTC (rev 105705)
@@ -56,6 +56,7 @@
optimizeSetMethod(Int16Array);
optimizeSetMethod(Int32Array);
optimizeSetMethod(Uint8Array);
+optimizeSetMethod(Uint8ClampedArray);
optimizeSetMethod(Uint16Array);
optimizeSetMethod(Uint32Array);
Added: trunk/Source/WebCore/bindings/v8/custom/V8Uint8ClampedArrayCustom.cpp (0 => 105705)
--- trunk/Source/WebCore/bindings/v8/custom/V8Uint8ClampedArrayCustom.cpp (rev 0)
+++ trunk/Source/WebCore/bindings/v8/custom/V8Uint8ClampedArrayCustom.cpp 2012-01-24 08:54:47 UTC (rev 105705)
@@ -0,0 +1,63 @@
+/*
+ * Copyright (C) 2012 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS
+ * IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE
+ * INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "Uint8ClampedArray.h"
+
+#include "ArrayBuffer.h"
+
+#include "V8ArrayBuffer.h"
+#include "V8ArrayBufferViewCustom.h"
+#include "V8Binding.h"
+#include "V8Proxy.h"
+#include "V8Uint8ClampedArray.h"
+
+namespace WebCore {
+
+v8::Handle<v8::Value> V8Uint8ClampedArray::constructorCallback(const v8::Arguments& args)
+{
+ INC_STATS("DOM.Uint8ClampedArray.Contructor");
+
+ return constructWebGLArray<Uint8ClampedArray, unsigned char>(args, &info, v8::kExternalPixelArray);
+}
+
+v8::Handle<v8::Value> V8Uint8ClampedArray::setCallback(const v8::Arguments& args)
+{
+ INC_STATS("DOM.Uint8ClampedArray.set()");
+ return setWebGLArrayHelper<Uint8ClampedArray, V8Uint8ClampedArray>(args);
+}
+
+v8::Handle<v8::Value> toV8(Uint8ClampedArray* impl)
+{
+ if (!impl)
+ return v8::Null();
+ v8::Handle<v8::Object> wrapper = V8Uint8ClampedArray::wrap(impl);
+ if (!wrapper.IsEmpty())
+ wrapper->SetIndexedPropertiesToExternalArrayData(impl->baseAddress(), v8::kExternalPixelArray, impl->length());
+ return wrapper;
+}
+
+} // namespace WebCore
Modified: trunk/Source/WebCore/page/Crypto.cpp (105704 => 105705)
--- trunk/Source/WebCore/page/Crypto.cpp 2012-01-24 08:49:47 UTC (rev 105704)
+++ trunk/Source/WebCore/page/Crypto.cpp 2012-01-24 08:54:47 UTC (rev 105705)
@@ -42,6 +42,7 @@
{
return array->isByteArray()
|| array->isUnsignedByteArray()
+ || array->isUnsignedByteClampedArray()
|| array->isShortArray()
|| array->isUnsignedShortArray()
|| array->isIntArray()
Modified: trunk/Source/WebCore/page/DOMWindow.idl (105704 => 105705)
--- trunk/Source/WebCore/page/DOMWindow.idl 2012-01-24 08:49:47 UTC (rev 105704)
+++ trunk/Source/WebCore/page/DOMWindow.idl 2012-01-24 08:54:47 UTC (rev 105705)
@@ -495,9 +495,7 @@
attribute ArrayBufferConstructor ArrayBuffer; // Usable with new operator
attribute Int8ArrayConstructor Int8Array; // Usable with new operator
attribute Uint8ArrayConstructor Uint8Array; // Usable with new operator
-#if !defined(V8_BINDING) || !V8_BINDING
attribute Uint8ClampedArrayConstructor Uint8ClampedArray; // Usable with new operator
-#endif
attribute Int16ArrayConstructor Int16Array; // Usable with new operator
attribute Uint16ArrayConstructor Uint16Array; // Usable with new operator
attribute Int32ArrayConstructor Int32Array; // Usable with new operator
Modified: trunk/Source/WebCore/workers/WorkerContext.idl (105704 => 105705)
--- trunk/Source/WebCore/workers/WorkerContext.idl 2012-01-24 08:49:47 UTC (rev 105704)
+++ trunk/Source/WebCore/workers/WorkerContext.idl 2012-01-24 08:54:47 UTC (rev 105705)
@@ -118,6 +118,7 @@
attribute ArrayBufferConstructor ArrayBuffer; // Usable with new operator
attribute Int8ArrayConstructor Int8Array; // Usable with new operator
attribute Uint8ArrayConstructor Uint8Array; // Usable with new operator
+ attribute Uint8ArrayConstructor Uint8ClampedArray; // Usable with new operator
attribute Int16ArrayConstructor Int16Array; // Usable with new operator
attribute Uint16ArrayConstructor Uint16Array; // Usable with new operator
attribute Int32ArrayConstructor Int32Array; // Usable with new operator