RESOLVED FIXED 236478
Implement Reveal methods
https://bugs.webkit.org/show_bug.cgi?id=236478
Summary Implement Reveal methods
Megan Gardner
Reported 2022-02-10 17:49:24 PST
Implement Reveal methods
Attachments
Patch (21.18 KB, patch)
2022-02-10 19:11 PST, Megan Gardner
no flags
Patch (21.31 KB, patch)
2022-02-10 19:52 PST, Megan Gardner
ews-feeder: commit-queue-
Patch (21.33 KB, patch)
2022-02-10 20:09 PST, Megan Gardner
no flags
Patch (21.68 KB, patch)
2022-02-11 15:53 PST, Megan Gardner
no flags
Patch for landing (21.68 KB, patch)
2022-02-11 17:10 PST, Megan Gardner
no flags
Megan Gardner
Comment 1 2022-02-10 19:11:20 PST
Megan Gardner
Comment 2 2022-02-10 19:52:58 PST
Megan Gardner
Comment 3 2022-02-10 20:09:58 PST
Wenson Hsieh
Comment 4 2022-02-11 09:29:55 PST
Comment on attachment 451636 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=451636&action=review > Source/WebKit/Shared/Cocoa/RevealItem.h:27 > +#ifndef RevealItem_h > +#define RevealItem_h Nit - `#pragma once` in new code. > Source/WebKit/Shared/Cocoa/RevealItem.h:44 > + RetainPtr<RVItem> m_item; This should be a private member. > Source/WebKit/Shared/Cocoa/SandboxExtensionCocoa.mm:38 > +#import <wtf/Span.h> Is this needed now that we're including `Span.h` in ArgumentCoders.h? > Source/WebKit/UIProcess/WebPageProxy.h:880 > + void requestRVItemInCurrentSelectedRange(CompletionHandler<void(const WebKit::RevealItem&)>&&); Nit - you can omit the WebKit:: here. > Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:7382 > +- (void)requestRVItemInSelectedRangeWithCompletionHandler:(void(^)(RVItem * item))completionHandler Nit - extra space before "item" > Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:7384 > + _page->requestRVItemInCurrentSelectedRange([revealItemSelectionHandler = makeBlockPtr(completionHandler)](const WebKit::RevealItem& item) { Nit - you can omit the WebKit:: here too. > Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:2342 > + NSRange selectionRange = NSMakeRange(0, 0); Nit - it seems like you can remove this line (and just do `auto selectionRange = NSMakeRange(characterCount(*makeSimpleRange(fullCharacterRange->start, selectionStart)), characterCount(*makeSimpleRange(selectionStart, selectionEnd)));` below) > Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:2354 > + selectionRange = NSMakeRange(characterCount(*makeSimpleRange(fullCharacterRange->start, selectionStart)), > + characterCount(*makeSimpleRange(selectionStart, selectionEnd))); This looks a bit confusing (I thought it was two separate lines at first). Perhaps something like this instead? ``` auto selectionRange = NSMakeRange( characterCount(*makeSimpleRange(fullCharacterRange->start, selectionStart)), characterCount(*makeSimpleRange(selectionStart, selectionEnd)) ); ```
Megan Gardner
Comment 5 2022-02-11 15:53:13 PST
Megan Gardner
Comment 6 2022-02-11 17:10:03 PST
Created attachment 451760 [details] Patch for landing
EWS
Comment 7 2022-02-11 17:47:46 PST
Committed r289685 (247171@main): <https://commits.webkit.org/247171@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 451760 [details].
Radar WebKit Bug Importer
Comment 8 2022-02-11 17:48:19 PST
Note You need to log in before you can comment on or make changes to this bug.