Use Blob URL instead of webkit-fake-url when pasting an image
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 9 Nov 2016 19:14:17 +0000 (19:14 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 9 Nov 2016 19:14:17 +0000 (19:14 +0000)
commit642b443051fb671ec3c7ea741bfa0034fab07557
tree98979ad8eb2adf2760abbc038c37108d1b61ad0b
parente5039a5a4c56e1e3bb39f221ad81d16449f7a0ef
Use Blob URL instead of webkit-fake-url when pasting an image
https://bugs.webkit.org/show_bug.cgi?id=49141

Reviewed by Darin Adler.

Source/WebCore:

Use Blob URL instead of webkit-fake-url when pasting an image.

Tests: editing/pasteboard/paste-image-as-blob-url.html
       editing/pasteboard/paste-image-using-image-data.html

* editing/Editor.h:
* editing/mac/EditorMac.mm:
(WebCore::Editor::WebContentReader::readImage):
(WebCore::Editor::createFragmentForImageAndURL):

LayoutTests:

Add layout test coverage checking that the image shows as expected and that the
resulting URL is indeed a Blob URL.

* editing/pasteboard/paste-image-as-blob-url-expected.txt: Added.
* editing/pasteboard/paste-image-as-blob-url.html: Added.
* editing/pasteboard/paste-image-using-image-data-expected.html: Added.
* editing/pasteboard/paste-image-using-image-data.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@208451 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/editing/pasteboard/paste-image-as-blob-url-expected.txt [new file with mode: 0644]
LayoutTests/editing/pasteboard/paste-image-as-blob-url.html [new file with mode: 0644]
LayoutTests/editing/pasteboard/paste-image-using-image-data-expected.html [new file with mode: 0644]
LayoutTests/editing/pasteboard/paste-image-using-image-data.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/editing/Editor.h
Source/WebCore/editing/mac/EditorMac.mm
Source/WebCore/fileapi/Blob.cpp
Source/WebCore/fileapi/Blob.h
Source/WebCore/platform/network/BlobPart.h