LayoutTests:
Reviewed by Maciej.
- test for http://bugs.webkit.org/show_bug.cgi?id=10725
Image data in from RTFD clipboard data thrown away
* editing/pasteboard/paste-RTFD-expected.checksum: Added.
* editing/pasteboard/paste-RTFD-expected.png: Added.
* editing/pasteboard/paste-RTFD-expected.txt: Added.
* editing/pasteboard/paste-RTFD.html: Added.
* editing/pasteboard/paste-TIFF-expected.checksum: Added.
* editing/pasteboard/paste-TIFF-expected.png: Added.
* editing/pasteboard/paste-TIFF-expected.txt: Added.
* editing/pasteboard/paste-TIFF.html: Added.
* editing/resources/RTFD-pasteboard-data.dat: Added.
* editing/resources/TIFF-pasteboard-data.dat: Added.
WebCore:
Reviewed by Maciej.
Part of fix for http://bugs.webkit.org/show_bug.cgi?id=10725
Image data in from RTFD clipboard data thrown away
ResourceHandles no longer need to be able to defer loading as that is
now handled by the ResourceLoader.
* loader/MainResourceLoader.cpp:
(WebCore::MainResourceLoader::loadNow): updated to remove defersLoading argument.
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::releaseResources): release the deferred request.
(WebCore::ResourceLoader::load): defer creating the ResourceHandle instead of
asking the ResourceHandle to defer loading.
(WebCore::ResourceLoader::setDefersLoading): create the ResourceHandle if we have deferred creating it.
* loader/ResourceLoader.h:
* platform/network/ResourceHandle.cpp: ResourceHandle's don't need to know about deferLoading.
(WebCore::ResourceHandle::ResourceHandle):
(WebCore::ResourceHandle::create):
* platform/network/ResourceHandle.h: ditto.
* platform/network/ResourceHandleInternal.h: ditto.
(WebCore::ResourceHandleInternal::ResourceHandleInternal):
* platform/network/mac/ResourceHandleMac.mm: ditto.
(WebCore::ResourceHandle::start):
WebKit:
Reviewed by Maciej.
Part of fix for http://bugs.webkit.org/show_bug.cgi?id=10725
Image data in from RTFD clipboard data thrown away
The URLs for images in RTFD data must not be loaded until the resources
have been added to the WebUnarchivingState. This can't happen until
after the RTFD data has been parsed, so we must delay loading while this
RTFD data is being parsed to a document fragment.
* WebView/WebHTMLView.mm:
(uniqueURLWithRelativePart):
(-[WebHTMLView _documentFragmentFromPasteboard:inContext:allowPlainText:chosePlainText:]): defer loading the resources while RTFD data is being parsed.
(+[NSURL _web_uniqueWebDataURL]): Added this back because AppKit uses it.
* WebView/WebUnarchivingState.m:
(-[WebUnarchivingState archivedResourceForURL:]): orkaround for workaround for rdar://problem/
4699166 so that other people can use archivedResourceForURL: too.
WebKitTools:
Reviewed by Maciej.
Enables layout test for: http://bugs.webkit.org/show_bug.cgi?id=10725
Image data in from RTFD clipboard data thrown away
- This method is needed because NSArray's ar bridged to JS Array's,
which in turn are bridged back to WebScriptObject's when passed from
JS to ObjC. Hence it is not possbile to pass an NSArray from JS.
* DumpRenderTree/DumpRenderTree.m:
(-[DumpRenderTreePasteboard declareType:owner:]): Added a convenience method for JS.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19244
268f45cc-cd09-0410-ab3c-
d52691b4dbfc