Bug 208846

Summary: File upload cancels before files can be uploaded.
Product: WebKit Reporter: Megan Gardner <megan_gardner>
Component: New BugsAssignee: Megan Gardner <megan_gardner>
Status: RESOLVED FIXED    
Severity: Normal CC: bdakin, commit-queue, thorton, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch for landing none

Description Megan Gardner 2020-03-09 19:34:20 PDT
File upload cancels before files can be uploaded.
Comment 1 Megan Gardner 2020-03-09 20:15:23 PDT
Created attachment 393117 [details]
Patch
Comment 2 Tim Horton 2020-03-09 20:32:09 PDT
Comment on attachment 393117 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=393117&action=review

> Source/WebKit/ChangeLog:11
> +        With the new UIContextMenus, we needed to cancel in order for everything to be 
> +        reset correclty in WebCore. But this can only be done in the animation completetion
> +        handler, but we only want to cancel if we aren't presenting a different picker.

Spelling: "correctly"
Spelling: "completetion"

We should figure out how to test this (though I have a feeling any way we test this would probably bypass exactly the parts that are a problem here).

> Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm:442
> +            self->_isPresentingSubMenu = YES;

Should this be held weakly? Is it possible for WKFileUploadPanel to go away before the handler is called?

> Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm:473
> +            [self _cancel];

Who cancels after the submenu is dismissed? If it's really necessary, it seems like a problem that it doesn't happen.
Comment 3 Tim Horton 2020-03-10 11:16:24 PDT
Comment on attachment 393117 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=393117&action=review

>> Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm:473
>> +            [self _cancel];
> 
> Who cancels after the submenu is dismissed? If it's really necessary, it seems like a problem that it doesn't happen.

Megan notes that the submenus themselves already call _cancel, so this should be OK
Comment 4 Megan Gardner 2020-03-10 11:30:15 PDT
Created attachment 393168 [details]
Patch for landing
Comment 5 Megan Gardner 2020-03-10 11:31:16 PDT
<rdar://problem/60244249>
Comment 6 WebKit Commit Bot 2020-03-10 12:16:28 PDT
Comment on attachment 393168 [details]
Patch for landing

Clearing flags on attachment: 393168

Committed r258225: <https://trac.webkit.org/changeset/258225>
Comment 7 WebKit Commit Bot 2020-03-10 12:16:29 PDT
All reviewed patches have been landed.  Closing bug.