Summary: | [Cocoa] Exception (fileType 'dyn.agq8u' is not a valid UTI) raised when dragging an attachment whose file wrapper is a directory | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | mitz | ||||||||||
Component: | HTML Editing | Assignee: | Wenson Hsieh <wenson_hsieh> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | aestes, bdakin, commit-queue, mitz, thorton, webkit-bug-importer, wenson_hsieh | ||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||
Version: | Other | ||||||||||||
Hardware: | Unspecified | ||||||||||||
OS: | Unspecified | ||||||||||||
Bug Depends on: | 188933 | ||||||||||||
Bug Blocks: | |||||||||||||
Attachments: |
|
Description
mitz
2018-08-23 15:30:41 PDT
s/WebView/WKWebView/ in the description, of course. This is probably a result of failing to map kUTTypeFolder to a MIME type :( (I learned from thorton that RenderThemeMac.mm understands MIME types "multipart/x-folder" and "application/vnd.apple.folder") Note: this is also reproducible when dropping a folder, or any file with an extension that WebKit doesn't recognize (e.g. *.crash). Created attachment 348089 [details] Depends on webkit.org/b/188933 Created attachment 348112 [details]
Rebase on trunk
Created attachment 348155 [details]
Rebase on trunk
Comment on attachment 348155 [details] Rebase on trunk View in context: https://bugs.webkit.org/attachment.cgi?id=348155&action=review > Tools/TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:385 > - [self setFileWrapper:fileWrapper.get() contentType:newContentType completion:^(NSError *error) { > + [self setFileWrapper:(__bridge NSFileWrapper *)fileWrapper.get() contentType:newContentType completion:^(NSError *error) { What is going on with all the 🌉? Other than that, r+, but please get rid of bridges for casts not between CF and NS objects. (In reply to Tim Horton from comment #9) > Comment on attachment 348155 [details] > Rebase on trunk > > View in context: > https://bugs.webkit.org/attachment.cgi?id=348155&action=review > > > Tools/TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:385 > > - [self setFileWrapper:fileWrapper.get() contentType:newContentType completion:^(NSError *error) { > > + [self setFileWrapper:(__bridge NSFileWrapper *)fileWrapper.get() contentType:newContentType completion:^(NSError *error) { > > What is going on with all the 🌉? Other than that, r+, but please get rid of > bridges for casts not between CF and NS objects. Oh...yeah, most of this bridging (with the exception of CFStringRef <=> NSString) is a mistake. I'll fix this before landing! Created attachment 348187 [details]
Patch for landing
Comment on attachment 348187 [details] Patch for landing Clearing flags on attachment: 348187 Committed r235392: <https://trac.webkit.org/changeset/235392> |