[iOS simulator] API test WKAttachmentTests.InjectedBundleReplaceURLWhenPastingImage...
authorwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 17 Jan 2018 22:16:03 +0000 (22:16 +0000)
committerwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 17 Jan 2018 22:16:03 +0000 (22:16 +0000)
commit87651c2954e02ed1d90230e57457c8d9a30bdbb5
tree62a87a6112d7dcc6dbe8dc5d38a8f0f08b49b9a1
parentf236c66717c0160b325adade1c026cce9c728b62
[iOS simulator] API test WKAttachmentTests.InjectedBundleReplaceURLWhenPastingImage is failing
https://bugs.webkit.org/show_bug.cgi?id=181758

Reviewed by Tim Horton.

This test is failing because Editor::clientReplacementURLForResource expects a MIME type, but on iOS, the type
paramter passed into WebContentReader::readImage is a UTI; subsequently, the bundle editing delegate receives
a MIME type that's actually a UTI, which is incorrect. To address this, ensure that a MIME type is passed to
bundle SPI by converting the type in WebContentReader::readImage to a MIME type.

* editing/cocoa/WebContentReaderCocoa.mm:
(WebCore::WebContentReader::readImage):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227084 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/editing/cocoa/WebContentReaderCocoa.mm