| Index: WebCore/platform/chromium/ChromiumDataObjectItem.cpp
|
| ===================================================================
|
| --- WebCore/platform/chromium/ChromiumDataObjectItem.cpp (revision 132804)
|
| +++ WebCore/platform/chromium/ChromiumDataObjectItem.cpp (working copy)
|
| @@ -143,13 +143,14 @@
|
| // method to the blob registry; that way the data is only copied over
|
| // into the renderer when it's actually read, not when the blob is
|
| // initially constructed).
|
| + // TODO: Could use a BlobRegistry interface to create a blobDataHandle directly from the clipboard data w/o having to read it?
|
| RefPtr<SharedBuffer> data = static_cast<PassRefPtr<SharedBuffer> >(WebKit::Platform::current()->clipboard()->readImage(WebKit::WebClipboard::BufferStandard));
|
| RefPtr<RawData> rawData = RawData::create();
|
| rawData->mutableData()->append(data->data(), data->size());
|
| OwnPtr<BlobData> blobData = BlobData::create();
|
| blobData->appendData(rawData, 0, -1);
|
| blobData->setContentType(mimeTypeImagePng);
|
| - return Blob::create(blobData.release(), data->size());
|
| + return Blob::create(BlobDataHandle::create(blobData.release(), data->size()));
|
| }
|
|
|
| return 0;
|
|
|