Bug 189114 - Long press on picture/link show menu obscured by keyboard
Summary: Long press on picture/link show menu obscured by keyboard
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-08-29 16:23 PDT by James Savage
Modified: 2018-09-10 15:59 PDT (History)
5 users (show)

See Also:


Attachments
Patch (8.47 KB, patch)
2018-08-29 16:46 PDT, James Savage
no flags Details | Formatted Diff | Diff
Patch (8.36 KB, patch)
2018-08-30 19:05 PDT, James Savage
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description James Savage 2018-08-29 16:23:44 PDT
<rdar://problem/42446498>
Comment 1 James Savage 2018-08-29 16:46:22 PDT
Created attachment 348447 [details]
Patch
Comment 2 Megan Gardner 2018-08-29 17:44:48 PDT
Comment on attachment 348447 [details]
Patch

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

r=me, with comments.

> Source/WebKit/UIProcess/ios/WKActionSheetAssistant.mm:373
> +        CGRect visibleRect = CGRectNull;

See associated next comment.
I think this should be view.window.bounds (or equivalent) not CGRectNull.

> Source/WebKit/UIProcess/ios/WKActionSheetAssistant.mm:402
>  {

Probably rename this to something better if we make the associated changes.

> Source/WebKit/UIProcess/ios/WKActionSheetAssistant.mm:411
> +        visibleRect = view.window.bounds;

Could we move this logic to the calling function? I don't like having to do this compare here, if we just set the visible rect to the default before we even call into here, then we can make this cleaner.

> Source/WebKit/UIProcess/ios/WKActionSheetAssistant.mm:414
> +

remove whitespace

> Source/WebKit/UIProcess/ios/WKActionSheetAssistant.mm:549
> +    CGRect visibleRect = CGRectNull;

Same as above. Should be view.window.bounds
Comment 3 James Savage 2018-08-29 18:39:38 PDT
Comment on attachment 348447 [details]
Patch

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

Will come back with a v2. I think moving the free function to an instance method will address your concerns.

>> Source/WebKit/UIProcess/ios/WKActionSheetAssistant.mm:373
>> +        CGRect visibleRect = CGRectNull;
> 
> See associated next comment.
> I think this should be view.window.bounds (or equivalent) not CGRectNull.

I’m trying to keep the fallback value in one place. If you don’t like using CGRectNull as a sentinel, how about moving presentationStyleForView() to an instance method on WKActionSheetAssistant. That way it could make the delegate call and have the fallback, rather than callers providing it?

>> Source/WebKit/UIProcess/ios/WKActionSheetAssistant.mm:414
>> +
> 
> remove whitespace

This was already here (the diff got out of order), but I can remove it.

>> Source/WebKit/UIProcess/ios/WKActionSheetAssistant.mm:549
>> +    CGRect visibleRect = CGRectNull;
> 
> Same as above. Should be view.window.bounds

Ditto also :P
Comment 4 James Savage 2018-08-30 19:05:25 PDT
Created attachment 348579 [details]
Patch
Comment 5 Megan Gardner 2018-08-30 20:22:40 PDT
Comment on attachment 348579 [details]
Patch

I like this better
Comment 6 WebKit Commit Bot 2018-09-10 15:59:24 PDT
Comment on attachment 348579 [details]
Patch

Clearing flags on attachment: 348579

Committed r235870: <https://trac.webkit.org/changeset/235870>
Comment 7 WebKit Commit Bot 2018-09-10 15:59:25 PDT
All reviewed patches have been landed.  Closing bug.