Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / core / clipboard / DataObjectItem.cpp
index 1ddef3f..8eeb490 100644 (file)
@@ -127,10 +127,8 @@ PassRefPtrWillBeRawPtr<Blob> DataObjectItem::getAsFile() const
         // into the renderer when it's actually read, not when the blob is
         // initially constructed).
         RefPtr<SharedBuffer> data = static_cast<PassRefPtr<SharedBuffer> >(blink::Platform::current()->clipboard()->readImage(blink::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->appendBytes(data->data(), data->size());
         blobData->setContentType(mimeTypeImagePng);
         return Blob::create(BlobDataHandle::create(blobData.release(), data->size()));
     }
@@ -176,4 +174,3 @@ void DataObjectItem::trace(Visitor* visitor)
 }
 
 } // namespace blink
-