Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(679)

Unified Diff: Source/core/html/ImageData.cpp

Issue 606653006: bindings: Adds DOMArrayBuffer, etc. as thin wrappers for ArrayBuffer, etc. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Synced. Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/html/ImageData.h ('k') | Source/core/html/MediaKeyEvent.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/ImageData.cpp
diff --git a/Source/core/html/ImageData.cpp b/Source/core/html/ImageData.cpp
index ceb057ab876f1a34c6ffaa304a353a7cbb28f717..c9254d2eb914eaaa439a927e9227c7510638400c 100644
--- a/Source/core/html/ImageData.cpp
+++ b/Source/core/html/ImageData.cpp
@@ -30,7 +30,7 @@
#include "core/html/ImageData.h"
#include "bindings/core/v8/ExceptionState.h"
-#include "bindings/core/v8/custom/V8Uint8ClampedArrayCustom.h"
+#include "bindings/core/v8/V8Uint8ClampedArray.h"
#include "core/dom/ExceptionCode.h"
#include "platform/RuntimeEnabledFeatures.h"
@@ -59,7 +59,7 @@ PassRefPtrWillBeRawPtr<ImageData> ImageData::create(const IntSize& size, PassRef
|| static_cast<unsigned>(dataSize.unsafeGet()) > byteArray->length())
return nullptr;
- return adoptRefWillBeNoop(new ImageData(size, byteArray));
+ return adoptRefWillBeNoop(new ImageData(size, DOMUint8ClampedArray::create(byteArray)));
}
PassRefPtrWillBeRawPtr<ImageData> ImageData::create(unsigned width, unsigned height, ExceptionState& exceptionState)
@@ -86,7 +86,7 @@ PassRefPtrWillBeRawPtr<ImageData> ImageData::create(unsigned width, unsigned hei
return imageData.release();
}
-PassRefPtrWillBeRawPtr<ImageData> ImageData::create(Uint8ClampedArray* data, unsigned width, unsigned height, ExceptionState& exceptionState)
+PassRefPtrWillBeRawPtr<ImageData> ImageData::create(DOMUint8ClampedArray* data, unsigned width, unsigned height, ExceptionState& exceptionState)
{
if (!RuntimeEnabledFeatures::imageDataConstructorEnabled()) {
exceptionState.throwTypeError("Illegal constructor");
@@ -131,7 +131,7 @@ v8::Handle<v8::Object> ImageData::associateWithWrapper(const WrapperTypeInfo* wr
if (!wrapper.IsEmpty()) {
// Create a V8 Uint8ClampedArray object.
- v8::Handle<v8::Value> pixelArray = toV8(data(), wrapper, isolate);
+ v8::Handle<v8::Value> pixelArray = toV8(m_data.get(), wrapper, isolate);
// Set the "data" property of the ImageData object to
// the created v8 object, eliminating the C++ callback
// when accessing the "data" property.
@@ -143,11 +143,11 @@ v8::Handle<v8::Object> ImageData::associateWithWrapper(const WrapperTypeInfo* wr
ImageData::ImageData(const IntSize& size)
: m_size(size)
- , m_data(Uint8ClampedArray::create(size.width() * size.height() * 4))
+ , m_data(DOMUint8ClampedArray::create(size.width() * size.height() * 4))
{
}
-ImageData::ImageData(const IntSize& size, PassRefPtr<Uint8ClampedArray> byteArray)
+ImageData::ImageData(const IntSize& size, PassRefPtr<DOMUint8ClampedArray> byteArray)
: m_size(size)
, m_data(byteArray)
{
« no previous file with comments | « Source/core/html/ImageData.h ('k') | Source/core/html/MediaKeyEvent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698