summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--DEPS2
-rw-r--r--webkit/build/V8Bindings/SConscript3
-rw-r--r--webkit/build/V8Bindings/V8Bindings.vcproj20
-rw-r--r--webkit/build/port/SConscript1
-rw-r--r--webkit/port/DerivedSources.make1
-rw-r--r--webkit/port/bindings/v8/CanvasPixelArray.cpp82
-rw-r--r--webkit/port/bindings/v8/CanvasPixelArray.h64
-rw-r--r--webkit/port/bindings/v8/CanvasPixelArray.idl35
-rw-r--r--webkit/port/bindings/v8/V8CanvasPixelArrayCustom.cpp74
-rw-r--r--webkit/port/bindings/v8/v8_custom.cpp15
-rw-r--r--webkit/port/bindings/v8/v8_custom.h16
-rw-r--r--webkit/port/bindings/v8/v8_index.cpp1
-rw-r--r--webkit/port/bindings/v8/v8_index.h1
-rw-r--r--webkit/port/bindings/v8/v8_proxy.cpp6
-rw-r--r--webkit/tools/layout_tests/test_lists/tests_fixable.txt29
-rw-r--r--webkit/webkit.xcodeproj/project.pbxproj16
16 files changed, 322 insertions, 44 deletions
diff --git a/DEPS b/DEPS
index 25fc769..d8b2778 100644
--- a/DEPS
+++ b/DEPS
@@ -12,7 +12,7 @@ deps = {
"http://googletest.googlecode.com/svn/trunk@167",
"src/third_party/WebKit":
- "/trunk/deps/third_party/WebKit@8312",
+ "/trunk/deps/third_party/WebKit@8326",
"src/third_party/icu38":
"/trunk/deps/third_party/icu38@7525",
diff --git a/webkit/build/V8Bindings/SConscript b/webkit/build/V8Bindings/SConscript
index e3182c5..11aa400 100644
--- a/webkit/build/V8Bindings/SConscript
+++ b/webkit/build/V8Bindings/SConscript
@@ -53,6 +53,7 @@ inputs = [
'$DERIVED_DIR/V8BarInfo.cpp',
'$DERIVED_DIR/V8CanvasGradient.cpp',
'$DERIVED_DIR/V8CanvasPattern.cpp',
+ '$DERIVED_DIR/V8CanvasPixelArray.cpp',
'$DERIVED_DIR/V8CanvasRenderingContext2D.cpp',
'$DERIVED_DIR/V8CDATASection.cpp',
'$DERIVED_DIR/V8CharacterData.cpp',
@@ -322,6 +323,7 @@ inputs = [
'$DERIVED_DIR/V8XPathResult.cpp',
'$DERIVED_DIR/V8XSLTProcessor.cpp',
+ '$PORT_DIR/bindings/v8/CanvasPixelArray.cpp',
'$PORT_DIR/bindings/v8/JSDOMBinding.cpp',
'$PORT_DIR/bindings/v8/JSXPathNSResolver.cpp',
'$PORT_DIR/bindings/v8/np_v8object.cpp',
@@ -340,6 +342,7 @@ inputs = [
'$PORT_DIR/bindings/v8/v8_npobject.cpp',
'$PORT_DIR/bindings/v8/v8_proxy.cpp',
'$PORT_DIR/bindings/v8/v8_vectornodelist.cpp',
+ '$PORT_DIR/bindings/v8/V8CanvasPixelArrayCustom.cpp',
'$PORT_DIR/bindings/v8/V8MessagePortCustom.cpp',
'$PORT_DIR/bindings/v8/V8XMLHttpRequestCustom.cpp',
]
diff --git a/webkit/build/V8Bindings/V8Bindings.vcproj b/webkit/build/V8Bindings/V8Bindings.vcproj
index 8e37bea..4d038f2 100644
--- a/webkit/build/V8Bindings/V8Bindings.vcproj
+++ b/webkit/build/V8Bindings/V8Bindings.vcproj
@@ -200,6 +200,14 @@
>
</File>
<File
+ RelativePath="$(IntDir)\DerivedSources\V8CanvasPixelArray.cpp"
+ >
+ </File>
+ <File
+ RelativePath="$(IntDir)\DerivedSources\V8CanvasPixelArray.h"
+ >
+ </File>
+ <File
RelativePath="$(IntDir)\DerivedSources\V8CanvasRenderingContext2D.cpp"
>
</File>
@@ -2477,6 +2485,10 @@
>
</File>
<File
+ RelativePath="..\..\port\bindings\v8\CanvasPixelArray.cpp"
+ >
+ </File>
+ <File
RelativePath="..\..\port\bindings\v8\RGBColor.cpp"
>
</File>
@@ -2525,6 +2537,10 @@
>
</File>
<File
+ RelativePath="..\..\port\bindings\v8\CanvasPixelArray.h"
+ >
+ </File>
+ <File
RelativePath="..\..\port\bindings\v8\ScriptSourceCode.h"
>
</File>
@@ -2601,6 +2617,10 @@
>
</File>
<File
+ RelativePath="..\..\port\bindings\v8\V8CanvasPixelArrayCustom.cpp"
+ >
+ </File>
+ <File
RelativePath="..\..\port\bindings\v8\V8MessagePortCustom.cpp"
>
</File>
diff --git a/webkit/build/port/SConscript b/webkit/build/port/SConscript
index e5ccc14..e380b3e 100644
--- a/webkit/build/port/SConscript
+++ b/webkit/build/port/SConscript
@@ -150,6 +150,7 @@ else:
idl_files = [
+ 'bindings/v8/CanvasPixelArray.idl',
'bindings/v8/UndetectableHTMLCollection.idl',
'css/Counter.idl',
diff --git a/webkit/port/DerivedSources.make b/webkit/port/DerivedSources.make
index 77f82da..8e0effa 100644
--- a/webkit/port/DerivedSources.make
+++ b/webkit/port/DerivedSources.make
@@ -620,6 +620,7 @@ all : \
HTMLEntityNames.c \
V8Attr.h \
V8BarInfo.h \
+ V8CanvasPixelArray.h \
V8CDATASection.h \
V8CSSCharsetRule.h \
V8CSSFontFaceRule.h \
diff --git a/webkit/port/bindings/v8/CanvasPixelArray.cpp b/webkit/port/bindings/v8/CanvasPixelArray.cpp
new file mode 100644
index 0000000..ef0f7fd
--- /dev/null
+++ b/webkit/port/bindings/v8/CanvasPixelArray.cpp
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2009, 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:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * 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.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
+ * OWNER OR 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 <CanvasPixelArray.h>
+
+#include <v8_proxy.h>
+#include <wtf/Assertions.h>
+
+namespace WebCore {
+
+ CanvasPixelArray::CanvasPixelArray(size_t length)
+ {
+ ASSERT((length & 3) == 0); // Length must be a multiple of 4.
+ m_length = length;
+ m_data = static_cast<unsigned char*>(fastMalloc(m_length));
+ }
+
+ CanvasPixelArray::~CanvasPixelArray()
+ {
+ fastFree(m_data);
+ // Ensure that accesses after destruction will fail. In case there is a
+ // dangling reference.
+ m_length = 0;
+ m_data = reinterpret_cast<unsigned char*>(-1);
+ }
+
+ size_t CanvasPixelArray::length() const
+ {
+ return m_length;
+ }
+
+ unsigned char* CanvasPixelArray::data()
+ {
+ return m_data;
+ }
+
+ unsigned char CanvasPixelArray::get(size_t index)
+ {
+ ASSERT(index < m_length);
+ return m_data[index];
+ }
+
+ void CanvasPixelArray::set(size_t index, double value)
+ {
+ ASSERT(index < m_length);
+ if (!(value > 0)) { // Test for NaN and less than zero in one go.
+ value = 0;
+ } else if (value > 255) {
+ value = 255;
+ }
+ m_data[index] = static_cast<unsigned char>(value + 0.5);
+ }
+
+} // namespace WebCore
diff --git a/webkit/port/bindings/v8/CanvasPixelArray.h b/webkit/port/bindings/v8/CanvasPixelArray.h
new file mode 100644
index 0000000..53e83bd
--- /dev/null
+++ b/webkit/port/bindings/v8/CanvasPixelArray.h
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2009, 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:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * 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.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
+ * OWNER OR 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.
+ */
+
+#ifndef CanvasPixelArray_h
+#define CanvasPixelArray_h
+
+#include "v8.h"
+#include <wtf/Forward.h>
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefCounted.h>
+
+namespace WebCore {
+
+class CanvasPixelArray : public RefCounted<CanvasPixelArray> {
+public:
+ static PassRefPtr<CanvasPixelArray> create(size_t length)
+ {
+ return adoptRef(new CanvasPixelArray(length));
+ }
+ ~CanvasPixelArray();
+
+ size_t length() const;
+ unsigned char* data();
+
+ unsigned char get(size_t index);
+ void set(size_t index, double value);
+
+private:
+ size_t m_length;
+ unsigned char* m_data;
+
+ CanvasPixelArray(size_t length);
+};
+
+} // namespace WebCore
+
+#endif // CanvasPixelArray_h
diff --git a/webkit/port/bindings/v8/CanvasPixelArray.idl b/webkit/port/bindings/v8/CanvasPixelArray.idl
new file mode 100644
index 0000000..68080dd
--- /dev/null
+++ b/webkit/port/bindings/v8/CanvasPixelArray.idl
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2007 Apple 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 COMPUTER, INC. ``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 COMPUTER, INC. OR
+ * 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.
+ */
+
+module html {
+
+ interface [
+ HasCustomIndexGetter,
+ HasCustomIndexSetter
+ ] CanvasPixelArray {
+ readonly attribute long length;
+ };
+
+}
diff --git a/webkit/port/bindings/v8/V8CanvasPixelArrayCustom.cpp b/webkit/port/bindings/v8/V8CanvasPixelArrayCustom.cpp
new file mode 100644
index 0000000..5e6e185
--- /dev/null
+++ b/webkit/port/bindings/v8/V8CanvasPixelArrayCustom.cpp
@@ -0,0 +1,74 @@
+// Copyright (c) 2009, 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * 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.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
+// OWNER OR 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 "v8_binding.h"
+#include "v8_custom.h"
+#include "v8_events.h"
+#include "v8_proxy.h"
+
+#include "CanvasPixelArray.h"
+
+namespace WebCore {
+
+// Get the specified value from the pixel buffer and return it wrapped as a
+// JavaScript Number object to V8. Accesses outside the valid pixel buffer
+// range return "undefined".
+INDEXED_PROPERTY_GETTER(CanvasPixelArray) {
+ INC_STATS("DOM.CanvasPixelArray.IndexedPropertyGetter");
+ CanvasPixelArray* pixelBuffer =
+ V8Proxy::ToNativeObject<CanvasPixelArray>(
+ V8ClassIndex::CANVASPIXELARRAY,
+ info.Holder());
+
+ if ((index < 0) || (index >= pixelBuffer->length())) {
+ return v8::Undefined();
+ }
+ return v8::Number::New(pixelBuffer->get(index));
+}
+
+
+// Set the specified value in the pixel buffer. Accesses outside the valid pixel
+// buffer range are silently ignored.
+INDEXED_PROPERTY_SETTER(CanvasPixelArray) {
+ INC_STATS("DOM.CanvasPixelArray.IndexedPropertySetter");
+ CanvasPixelArray* pixelBuffer =
+ V8Proxy::ToNativeObject<CanvasPixelArray>(
+ V8ClassIndex::CANVASPIXELARRAY,
+ info.Holder());
+
+ if ((index >= 0) && (index < pixelBuffer->length())) {
+ pixelBuffer->set(index, value->NumberValue());
+ }
+ return value;
+}
+
+
+} // namespace WebCore
diff --git a/webkit/port/bindings/v8/v8_custom.cpp b/webkit/port/bindings/v8/v8_custom.cpp
index 7b5242e..0b2ec6a 100644
--- a/webkit/port/bindings/v8/v8_custom.cpp
+++ b/webkit/port/bindings/v8/v8_custom.cpp
@@ -141,18 +141,6 @@ v8::Handle<v8::Value> V8Custom::v8##NAME##NamedPropertySetter(\
v8::Handle<v8::Boolean> V8Custom::v8##NAME##NamedPropertyDeleter(\
v8::Local<v8::String> name, const v8::AccessorInfo& info)
-#define INDEXED_PROPERTY_GETTER(NAME) \
-v8::Handle<v8::Value> V8Custom::v8##NAME##IndexedPropertyGetter(\
- uint32_t index, const v8::AccessorInfo& info)
-
-#define INDEXED_PROPERTY_SETTER(NAME) \
-v8::Handle<v8::Value> V8Custom::v8##NAME##IndexedPropertySetter(\
- uint32_t index, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
-
-#define INDEXED_PROPERTY_DELETER(NAME) \
-v8::Handle<v8::Boolean> V8Custom::v8##NAME##IndexedPropertyDeleter(\
- uint32_t index, const v8::AccessorInfo& info)
-
#define NAMED_ACCESS_CHECK(NAME) \
bool V8Custom::v8##NAME##NamedSecurityCheck(v8::Local<v8::Object> host, \
v8::Local<v8::Value> key, \
@@ -714,6 +702,7 @@ NAMED_PROPERTY_GETTER(HTMLCollection) {
return HTMLCollectionGetNamedItems(imp, key);
}
+
CALLBACK_FUNC_DECL(HTMLCollectionItem) {
INC_STATS("DOM.HTMLCollection.item()");
HTMLCollection* imp = V8Proxy::ToNativeObject<HTMLCollection>(
@@ -3493,8 +3482,6 @@ NAMED_ACCESS_CHECK(Location) {
#undef NAMED_ACCESS_CHECK
#undef NAMED_PROPERTY_GETTER
#undef NAMED_PROPERTY_SETTER
-#undef INDEXED_PROPERTY_GETTER
-#undef INDEXED_PROPERTY_SETTER
// static
diff --git a/webkit/port/bindings/v8/v8_custom.h b/webkit/port/bindings/v8/v8_custom.h
index 20c53d9..1dd2858 100644
--- a/webkit/port/bindings/v8/v8_custom.h
+++ b/webkit/port/bindings/v8/v8_custom.h
@@ -22,6 +22,18 @@ void V8Custom::v8##NAME##AccessorSetter(v8::Local<v8::String> name, \
v8::Local<v8::Value> value, \
const v8::AccessorInfo& info)
+#define INDEXED_PROPERTY_GETTER(NAME) \
+v8::Handle<v8::Value> V8Custom::v8##NAME##IndexedPropertyGetter(\
+ uint32_t index, const v8::AccessorInfo& info)
+
+#define INDEXED_PROPERTY_SETTER(NAME) \
+v8::Handle<v8::Value> V8Custom::v8##NAME##IndexedPropertySetter(\
+ uint32_t index, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
+
+#define INDEXED_PROPERTY_DELETER(NAME) \
+v8::Handle<v8::Boolean> V8Custom::v8##NAME##IndexedPropertyDeleter(\
+ uint32_t index, const v8::AccessorInfo& info)
+
namespace WebCore {
class Frame;
@@ -373,6 +385,10 @@ DECLARE_INDEXED_PROPERTY_SETTER(HTMLOptionsCollection)
DECLARE_INDEXED_PROPERTY_SETTER(HTMLSelectElementCollection)
DECLARE_NAMED_PROPERTY_GETTER(HTMLCollection)
+// Canvas and supporting classes
+DECLARE_INDEXED_PROPERTY_GETTER(CanvasPixelArray)
+DECLARE_INDEXED_PROPERTY_SETTER(CanvasPixelArray)
+
// MessagePort
DECLARE_PROPERTY_ACCESSOR(MessagePortOnmessage)
DECLARE_PROPERTY_ACCESSOR(MessagePortOnclose)
diff --git a/webkit/port/bindings/v8/v8_index.cpp b/webkit/port/bindings/v8/v8_index.cpp
index 033506a..6f93171 100644
--- a/webkit/port/bindings/v8/v8_index.cpp
+++ b/webkit/port/bindings/v8/v8_index.cpp
@@ -38,6 +38,7 @@
#include "V8CanvasRenderingContext2D.h"
#include "V8CanvasGradient.h"
#include "V8CanvasPattern.h"
+#include "V8CanvasPixelArray.h"
#include "V8CDATASection.h"
#include "V8CharacterData.h"
#include "V8Clipboard.h"
diff --git a/webkit/port/bindings/v8/v8_index.h b/webkit/port/bindings/v8/v8_index.h
index 3e0a5ef1..171f690 100644
--- a/webkit/port/bindings/v8/v8_index.h
+++ b/webkit/port/bindings/v8/v8_index.h
@@ -268,6 +268,7 @@ typedef v8::Persistent<v8::FunctionTemplate> (*FunctionTemplateFactory)();
V(HTMLCOLLECTION, HTMLCollection) \
V(HTMLOPTIONSCOLLECTION, HTMLOptionsCollection) \
V(IMAGEDATA, ImageData) \
+ V(CANVASPIXELARRAY, CanvasPixelArray) \
V(INSPECTORCONTROLLER, InspectorController) \
V(KEYBOARDEVENT, KeyboardEvent) \
V(LOCATION, Location) \
diff --git a/webkit/port/bindings/v8/v8_proxy.cpp b/webkit/port/bindings/v8/v8_proxy.cpp
index 8dae140..b100ae6 100644
--- a/webkit/port/bindings/v8/v8_proxy.cpp
+++ b/webkit/port/bindings/v8/v8_proxy.cpp
@@ -50,6 +50,7 @@
#include "BarInfo.h"
#include "CanvasGradient.h"
#include "CanvasPattern.h"
+#include "CanvasPixelArray.h"
#include "CanvasRenderingContext2D.h"
#include "CanvasStyle.h"
#include "CharacterData.h"
@@ -1659,6 +1660,11 @@ v8::Persistent<v8::FunctionTemplate> V8Proxy::GetTemplate(
NodeCollectionIndexedPropertyEnumerator<HTMLFormElement>,
v8::Integer::New(V8ClassIndex::NODE));
break;
+ case V8ClassIndex::CANVASPIXELARRAY:
+ desc->InstanceTemplate()->SetIndexedPropertyHandler(
+ USE_INDEXED_PROPERTY_GETTER(CanvasPixelArray),
+ USE_INDEXED_PROPERTY_SETTER(CanvasPixelArray));
+ break;
case V8ClassIndex::STYLESHEET: // fall through
case V8ClassIndex::CSSSTYLESHEET: {
// We add an extra internal field to hold a reference to
diff --git a/webkit/tools/layout_tests/test_lists/tests_fixable.txt b/webkit/tools/layout_tests/test_lists/tests_fixable.txt
index 82310ed..34df134 100644
--- a/webkit/tools/layout_tests/test_lists/tests_fixable.txt
+++ b/webkit/tools/layout_tests/test_lists/tests_fixable.txt
@@ -1783,35 +1783,6 @@ LINUX : LayoutTests/fast/transforms/transformed-document-element.html = FAIL
WIN DEBUG : LayoutTests/editing/execCommand/paste-2.html = PASS FAIL
-// Merge 39606:39660 - these tests fail now because inageData.data
-// returns 'undefined'. Upstream change removed the CanvasPixelArray
-// and this property should be implemented anew now.
-// See http://trac.webkit.org/changeset/39625
-LINUX WIN : LayoutTests/fast/canvas/canvas-ImageData-behaviour.html = FAIL
-MAC : LayoutTests/fast/canvas/canvas-ImageData-behaviour.html = FAIL CRASH
-LayoutTests/fast/canvas/canvas-alphaImageData-behavior.html = FAIL
-LayoutTests/fast/canvas/canvas-gradient-without-path.html = FAIL
-LayoutTests/fast/canvas/canvas-invalid-fillstyle.html = FAIL
-LayoutTests/fast/canvas/canvas-invalid-strokestyle.html = FAIL
-LayoutTests/fast/canvas/canvas-longlived-context.html = FAIL
-LayoutTests/fast/canvas/canvas-path-with-inf-nan-dimensions.html = FAIL
-LayoutTests/fast/canvas/canvas-pattern-behaviour.html = FAIL
-LayoutTests/fast/canvas/canvas-putImageData.html = FAIL
-LayoutTests/fast/canvas/canvas-radial-gradient-spreadMethod.html = FAIL
-LayoutTests/fast/canvas/canvas-save-restore-with-path.html = FAIL
-LayoutTests/fast/canvas/canvas-set-properties-with-non-invertible-ctm.html = FAIL
-LayoutTests/fast/canvas/canvas-setTransform.html = FAIL
-LayoutTests/fast/canvas/canvas-stroke-empty-fill.html = FAIL
-LayoutTests/fast/canvas/canvas-strokeRect.html = FAIL
-LayoutTests/fast/canvas/canvas-transparency-and-composite.html = FAIL
-LayoutTests/fast/canvas/drawImage-with-negative-source-destination.html = FAIL
-LayoutTests/fast/canvas/gradient-with-clip.html = FAIL
-LINUX WIN : LayoutTests/fast/canvas/pattern-with-transform.html = FAIL
-WIN : LayoutTests/fast/canvas/set-colors.html = FAIL
-// Crashes from time to time, but probably not because of this test
-// more because of the general problems.
-LINUX MAC : LayoutTests/fast/canvas/set-colors.html = FAIL CRASH
-
// Merge 39606:39660 - new tests
SKIP : LayoutTests/fast/events/pointer-events-2.html = FAIL
SKIP : LayoutTests/fast/events/pointer-events.html = FAIL
diff --git a/webkit/webkit.xcodeproj/project.pbxproj b/webkit/webkit.xcodeproj/project.pbxproj
index fcf2d5c..521a93c 100644
--- a/webkit/webkit.xcodeproj/project.pbxproj
+++ b/webkit/webkit.xcodeproj/project.pbxproj
@@ -75,6 +75,9 @@
8255CEC20F16971600E53C11 /* plugin_string_stream.cc in Sources */ = {isa = PBXBuildFile; fileRef = 825405EB0D92E3FF0006B936 /* plugin_string_stream.cc */; };
8255CEE00F16972C00E53C11 /* plugin_stream_posix.cc in Sources */ = {isa = PBXBuildFile; fileRef = 8255CEDF0F16972C00E53C11 /* plugin_stream_posix.cc */; };
82F14D610ED230E700B36428 /* webcursor_mac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 82F14D600ED230E700B36428 /* webcursor_mac.mm */; };
+ 89F4A0B50F200C17000A326A /* CanvasPixelArray.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 89F4A0AB0F1FAA69000A326A /* CanvasPixelArray.cpp */; };
+ 89F4A0D50F200D5B000A326A /* V8CanvasPixelArray.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 89F4A0D30F200D59000A326A /* V8CanvasPixelArray.cpp */; };
+ 89F4A2090F2106EF000A326A /* V8CanvasPixelArrayCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 89F4A1FC0F2101F8000A326A /* V8CanvasPixelArrayCustom.cpp */; };
934CC0040EBFE0E000A658F2 /* chromium_bridge_impl.cc in Sources */ = {isa = PBXBuildFile; fileRef = 934CC0030EBFE0E000A658F2 /* chromium_bridge_impl.cc */; };
938180500EF3394A00993F02 /* back_forward_list_client_impl.cc in Sources */ = {isa = PBXBuildFile; fileRef = 9381804E0EF3394A00993F02 /* back_forward_list_client_impl.cc */; };
938444080F16B0570075F4C5 /* AccessibilityImageMapLink.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4DB7F1E80E9BAE2900C66CE0 /* AccessibilityImageMapLink.cpp */; };
@@ -3989,6 +3992,11 @@
82761F810E3FAC700030D324 /* AccessibilityObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AccessibilityObject.cpp; sourceTree = "<group>"; };
82761F820E3FAC700030D324 /* AccessibilityObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AccessibilityObject.h; sourceTree = "<group>"; };
82F14D600ED230E700B36428 /* webcursor_mac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = webcursor_mac.mm; sourceTree = "<group>"; };
+ 89F4A0AB0F1FAA69000A326A /* CanvasPixelArray.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CanvasPixelArray.cpp; sourceTree = "<group>"; };
+ 89F4A0D30F200D59000A326A /* V8CanvasPixelArray.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = V8CanvasPixelArray.cpp; sourceTree = "<group>"; };
+ 89F4A0D40F200D59000A326A /* V8CanvasPixelArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = V8CanvasPixelArray.h; sourceTree = "<group>"; };
+ 89F4A1FC0F2101F8000A326A /* V8CanvasPixelArrayCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = V8CanvasPixelArrayCustom.cpp; sourceTree = "<group>"; };
+ 89F5A4650F1ED04A0084BC85 /* CanvasPixelArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CanvasPixelArray.h; sourceTree = "<group>"; };
934CC0030EBFE0E000A658F2 /* chromium_bridge_impl.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = chromium_bridge_impl.cc; sourceTree = "<group>"; };
934CC2270EDCC37600A658F2 /* RGBColor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RGBColor.cpp; sourceTree = "<group>"; };
934CC2290EDCC38400A658F2 /* RGBColor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RGBColor.h; sourceTree = "<group>"; };
@@ -4582,6 +4590,8 @@
7B0095D00DAFF0DC00F72082 /* v8 */ = {
isa = PBXGroup;
children = (
+ 89F4A0AB0F1FAA69000A326A /* CanvasPixelArray.cpp */,
+ 89F5A4650F1ED04A0084BC85 /* CanvasPixelArray.h */,
7B0095D20DAFF0DC00F72082 /* dom_wrapper_map.h */,
B5B0D4190EC8FE4900EA3314 /* JSDOMBinding.h */,
B5B0D41A0EC8FE4900EA3314 /* JSDOMBinding.cpp */,
@@ -4628,6 +4638,7 @@
7B0095EC0DAFF0DD00F72082 /* v8_utility.h */,
7B0095ED0DAFF0DD00F72082 /* v8_vectornodelist.cpp */,
7B0095EE0DAFF0DD00F72082 /* v8_vectornodelist.h */,
+ 89F4A1FC0F2101F8000A326A /* V8CanvasPixelArrayCustom.cpp */,
ABBD24780EB7B31B00BEC658 /* V8MessagePortCustom.cpp */,
4DB7F55A0E9BD66300C66CE0 /* V8SVGPODTypeWrapper.h */,
4DB7F55B0E9BD66300C66CE0 /* V8XMLHttpRequestCustom.cpp */,
@@ -6824,6 +6835,8 @@
7B0091440DAFEFE200F72082 /* V8CanvasGradient.h */,
7B0091450DAFEFE300F72082 /* V8CanvasPattern.cpp */,
7B0091460DAFEFE300F72082 /* V8CanvasPattern.h */,
+ 89F4A0D30F200D59000A326A /* V8CanvasPixelArray.cpp */,
+ 89F4A0D40F200D59000A326A /* V8CanvasPixelArray.h */,
7B0091470DAFEFE300F72082 /* V8CanvasRenderingContext2D.cpp */,
7B0091480DAFEFE300F72082 /* V8CanvasRenderingContext2D.h */,
7B0091490DAFEFE300F72082 /* V8CDATASection.cpp */,
@@ -8204,6 +8217,7 @@
9384478B0F16B06E0075F4C5 /* ScriptCallStack.cpp in Sources */,
9384478C0F16B06E0075F4C5 /* ScriptCallStack.cpp in Sources */,
9384478D0F16B06E0075F4C5 /* ScriptInstance.cpp in Sources */,
+ 89F4A0B50F200C17000A326A /* CanvasPixelArray.cpp in Sources */,
9384478E0F16B06E0075F4C5 /* ScriptValue.cpp in Sources */,
9384478F0F16B06E0075F4C5 /* SVGElementFactory.cpp in Sources */,
938447900F16B06E0075F4C5 /* SVGNames.cpp in Sources */,
@@ -8356,6 +8370,8 @@
938448230F16B06E0075F4C5 /* V8Rect.cpp in Sources */,
938448240F16B06E0075F4C5 /* V8RGBColor.cpp in Sources */,
938448250F16B06E0075F4C5 /* V8Screen.cpp in Sources */,
+ 89F4A0D50F200D5B000A326A /* V8CanvasPixelArray.cpp in Sources */,
+ 89F4A2090F2106EF000A326A /* V8CanvasPixelArrayCustom.cpp in Sources */,
938448260F16B06E0075F4C5 /* V8StyleSheet.cpp in Sources */,
938448270F16B06E0075F4C5 /* V8StyleSheetList.cpp in Sources */,
938448280F16B06E0075F4C5 /* V8SVGAElement.cpp in Sources */,