Bug 208846 - File upload cancels before files can be uploaded.
Summary: File upload cancels before files can be uploaded.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Megan Gardner
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-03-09 19:34 PDT by Megan Gardner
Modified: 2020-03-10 12:16 PDT (History)
4 users (show)

See Also:


Attachments
Patch (4.11 KB, patch)
2020-03-09 20:15 PDT, Megan Gardner
no flags Details | Formatted Diff | Diff
Patch for landing (4.11 KB, patch)
2020-03-10 11:30 PDT, Megan Gardner
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.