RESOLVED FIXED Bug 181294
[Attachment Support] Support dragging attachment elements out as files on macOS
https://bugs.webkit.org/show_bug.cgi?id=181294
Summary [Attachment Support] Support dragging attachment elements out as files on macOS
Wenson Hsieh
Reported 2018-01-04 09:25:52 PST
Attachments
Patch (14.62 KB, patch)
2018-01-11 22:54 PST, Wenson Hsieh
no flags
Blocked on webkit.org/b/181574 (15.01 KB, patch)
2018-01-11 23:06 PST, Wenson Hsieh
no flags
Depends on 188496 (41.22 KB, patch)
2018-08-19 22:05 PDT, Wenson Hsieh
no flags
Rebase on trunk (41.25 KB, patch)
2018-08-21 20:36 PDT, Wenson Hsieh
no flags
Fix 32-bit macOS build (41.49 KB, patch)
2018-08-21 21:37 PDT, Wenson Hsieh
no flags
Archive of layout-test-results from ews206 for win-future (12.78 MB, application/zip)
2018-08-22 09:04 PDT, EWS Watchlist
no flags
Fix 32-bit macOS build (2) (42.57 KB, patch)
2018-08-22 09:09 PDT, Wenson Hsieh
no flags
Fix OpenSource macOS builds (42.22 KB, patch)
2018-08-22 09:45 PDT, Wenson Hsieh
thorton: review+
Patch for EWS (41.28 KB, patch)
2018-08-22 13:28 PDT, Wenson Hsieh
no flags
Patch for EWS (41.28 KB, patch)
2018-08-22 13:29 PDT, Wenson Hsieh
no flags
Radar WebKit Bug Importer
Comment 1 2018-01-04 09:27:21 PST
Wenson Hsieh
Comment 2 2018-01-11 22:54:32 PST
Wenson Hsieh
Comment 3 2018-01-11 23:06:09 PST
Wenson Hsieh
Comment 4 2018-08-19 22:05:29 PDT
Created attachment 347481 [details] Depends on 188496
Wenson Hsieh
Comment 5 2018-08-21 20:36:33 PDT
Created attachment 347760 [details] Rebase on trunk
Wenson Hsieh
Comment 6 2018-08-21 21:37:18 PDT
Created attachment 347764 [details] Fix 32-bit macOS build
EWS Watchlist
Comment 7 2018-08-22 09:04:09 PDT
Comment hidden (obsolete)
EWS Watchlist
Comment 8 2018-08-22 09:04:20 PDT
Comment hidden (obsolete)
Wenson Hsieh
Comment 9 2018-08-22 09:09:14 PDT
Created attachment 347802 [details] Fix 32-bit macOS build (2)
Wenson Hsieh
Comment 10 2018-08-22 09:45:27 PDT
Created attachment 347811 [details] Fix OpenSource macOS builds
Tim Horton
Comment 11 2018-08-22 12:47:05 PDT
Comment on attachment 347811 [details] Fix OpenSource macOS builds View in context: https://bugs.webkit.org/attachment.cgi?id=347811&action=review > Source/WebCore/editing/cocoa/EditorCocoa.mm:173 > + // On macOS, we currently write the attachment as a web archive; we can't do the same for iOS and remove the platform guard below s/below/above/? > Source/WebKit/UIProcess/API/mac/WKView.mm:1096 > +- (NSString *)filePromiseProvider:(NSFilePromiseProvider*)filePromiseProvider fileNameForType:(NSString *)fileType Stars on the wrong side > Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm:3925 > + return [NSError errorWithDomain:WKErrorDomain code:WKErrorUnknown userInfo:nil]; > +#else > + return [NSError errorWithDomain:@"WebKitErrorDomain" code:1 userInfo:nil]; This is weird. Have we ever done this before? > Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm:4003 > +#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200 Do we still build back to 10.11? What's up with all of this. Should/can it be a specific HAVE() or USE() instead?
Wenson Hsieh
Comment 12 2018-08-22 13:14:11 PDT
Comment on attachment 347811 [details] Fix OpenSource macOS builds View in context: https://bugs.webkit.org/attachment.cgi?id=347811&action=review >> Source/WebCore/editing/cocoa/EditorCocoa.mm:173 >> + // On macOS, we currently write the attachment as a web archive; we can't do the same for iOS and remove the platform guard below > > s/below/above/? Fixed! >> Source/WebKit/UIProcess/API/mac/WKView.mm:1096 >> +- (NSString *)filePromiseProvider:(NSFilePromiseProvider*)filePromiseProvider fileNameForType:(NSString *)fileType > > Stars on the wrong side Fixed! >> Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm:3925 >> + return [NSError errorWithDomain:@"WebKitErrorDomain" code:1 userInfo:nil]; > > This is weird. Have we ever done this before? Good point. The ways in which we handle errors is pretty inconsistent already (some places in WKWebView use [[NSError alloc] init], and other places in attachments code use WKErrorDomain, but with error codes that are not exposed anywhere). I filed <https://bugs.webkit.org/show_bug.cgi?id=188860> to clean this up. >> Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm:4003 >> +#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200 > > Do we still build back to 10.11? What's up with all of this. Should/can it be a specific HAVE() or USE() instead? You're right! It looks like there are no more El Capitan bots on build.webkit.org, so I should be able to just remove all of these version checks.
Wenson Hsieh
Comment 13 2018-08-22 13:28:01 PDT
Comment hidden (obsolete)
Wenson Hsieh
Comment 14 2018-08-22 13:29:59 PDT
Created attachment 347836 [details] Patch for EWS
WebKit Commit Bot
Comment 15 2018-08-22 14:35:10 PDT
Comment on attachment 347836 [details] Patch for EWS Clearing flags on attachment: 347836 Committed r235202: <https://trac.webkit.org/changeset/235202>
Note You need to log in before you can comment on or make changes to this bug.