Bug 166951

Summary: Add IconLoadingDelegate functionality to WKView
Product: WebKit Reporter: Brady Eidson <beidson>
Component: WebKit APIAssignee: Brady Eidson <beidson>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, thorton
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch none

Brady Eidson
Reported 2017-01-11 16:40:30 PST
Add IconLoadingDelegate functionality to WKView This is a followup to https://trac.webkit.org/changeset/209640
Attachments
Patch (4.31 KB, patch)
2017-01-11 16:44 PST, Brady Eidson
no flags
Patch (5.70 KB, patch)
2017-01-11 17:08 PST, Brady Eidson
no flags
Patch (6.40 KB, patch)
2017-01-11 20:03 PST, Brady Eidson
no flags
Patch (4.39 KB, patch)
2017-01-11 21:38 PST, Brady Eidson
no flags
Brady Eidson
Comment 1 2017-01-11 16:44:43 PST
WebKit Commit Bot
Comment 2 2017-01-11 16:47:40 PST
Attachment 298630 [details] did not pass style-queue: ERROR: Source/WebKit2/UIProcess/API/mac/WKView.mm:872: Place brace on its own line for function definitions. [whitespace/braces] [4] ERROR: Source/WebKit2/UIProcess/API/mac/WKView.mm:872: Extra space before ( in function call [whitespace/parens] [4] ERROR: Source/WebKit2/UIProcess/API/mac/WKView.mm:875: Place brace on its own line for function definitions. [whitespace/braces] [4] ERROR: Source/WebKit2/UIProcess/API/mac/WKView.mm:875: Extra space before ( in function call [whitespace/parens] [4] Total errors found: 4 in 2 files If any of these errors are false positives, please file a bug against check-webkit-style.
Tim Horton
Comment 3 2017-01-11 16:48:50 PST
Comment on attachment 298630 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=298630&action=review > Source/WebKit2/UIProcess/API/mac/WKView.mm:877 > + completionHandler([loadCompletionHandler = Block_copy(loadCompletionHandler)](API::Data* data, WebKit::CallbackBase::Error error) { Plz to BlockPtr.
Brady Eidson
Comment 4 2017-01-11 17:08:46 PST
Brady Eidson
Comment 5 2017-01-11 17:09:25 PST
Running EWS before landing
WebKit Commit Bot
Comment 6 2017-01-11 17:11:11 PST
Attachment 298636 [details] did not pass style-queue: ERROR: Source/WebKit2/UIProcess/API/mac/WKView.mm:873: Place brace on its own line for function definitions. [whitespace/braces] [4] ERROR: Source/WebKit2/UIProcess/API/mac/WKView.mm:873: Extra space before ( in function call [whitespace/parens] [4] ERROR: Source/WebKit2/UIProcess/API/mac/WKView.mm:876: Place brace on its own line for function definitions. [whitespace/braces] [4] ERROR: Source/WebKit2/UIProcess/API/mac/WKView.mm:876: Extra space before ( in function call [whitespace/parens] [4] ERROR: Source/WebKit2/UIProcess/API/mac/WKView.mm:878: Extra space before ( in function call [whitespace/parens] [4] Total errors found: 5 in 2 files If any of these errors are false positives, please file a bug against check-webkit-style.
Brady Eidson
Comment 7 2017-01-11 20:03:47 PST
WebKit Commit Bot
Comment 8 2017-01-11 20:05:41 PST
Attachment 298654 [details] did not pass style-queue: ERROR: Source/WebKit2/UIProcess/API/mac/WKView.mm:873: Place brace on its own line for function definitions. [whitespace/braces] [4] ERROR: Source/WebKit2/UIProcess/API/mac/WKView.mm:873: Extra space before ( in function call [whitespace/parens] [4] ERROR: Source/WebKit2/UIProcess/API/mac/WKView.mm:876: Place brace on its own line for function definitions. [whitespace/braces] [4] ERROR: Source/WebKit2/UIProcess/API/mac/WKView.mm:876: Extra space before ( in function call [whitespace/parens] [4] ERROR: Source/WebKit2/UIProcess/API/mac/WKView.mm:878: Extra space before ( in function call [whitespace/parens] [4] Total errors found: 5 in 2 files If any of these errors are false positives, please file a bug against check-webkit-style.
Brady Eidson
Comment 9 2017-01-11 21:38:41 PST
WebKit Commit Bot
Comment 10 2017-01-11 21:41:06 PST
Attachment 298659 [details] did not pass style-queue: ERROR: Source/WebKit2/UIProcess/API/mac/WKView.mm:874: Place brace on its own line for function definitions. [whitespace/braces] [4] ERROR: Source/WebKit2/UIProcess/API/mac/WKView.mm:874: Extra space before ( in function call [whitespace/parens] [4] ERROR: Source/WebKit2/UIProcess/API/mac/WKView.mm:877: Place brace on its own line for function definitions. [whitespace/braces] [4] ERROR: Source/WebKit2/UIProcess/API/mac/WKView.mm:877: Extra space before ( in function call [whitespace/parens] [4] ERROR: Source/WebKit2/UIProcess/API/mac/WKView.mm:879: Extra space before ( in function call [whitespace/parens] [4] Total errors found: 5 in 2 files If any of these errors are false positives, please file a bug against check-webkit-style.
Brady Eidson
Comment 11 2017-01-11 22:18:00 PST
Darin Adler
Comment 12 2017-01-22 17:12:23 PST
Comment on attachment 298659 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=298659&action=review > Source/WebKit2/UIProcess/API/mac/WKView.mm:868 > + return sel_registerName("_shouldLoadIconWithParameters:completionHandler:"); Doesn’t seem good to keep calling sel_registerName every time this function is called. On a related note, why not use @selector instead of an explicit call to set_registerName? > Source/WebKit2/UIProcess/API/mac/WKView.mm:872 > + typedef void (^IconLoadCompletionHandler)(NSData*); In new code, I suggest using instead of typedef. Also, coding style document says we should use a space between NSData and the *. > Source/WebKit2/UIProcess/API/mac/WKView.mm:875 > + RetainPtr<_WKLinkIconParameters> parameters = adoptNS([[_WKLinkIconParameters alloc] _initWithLinkIcon:linkIcon]); This is an example of a place where auto looks much better to me than writing out RetainPtr<xxx>. > Source/WebKit2/UIProcess/API/mac/WKView.mm:877 > + [m_wkView performSelector:delegateSelector() withObject:parameters.get() withObject:^void (IconLoadCompletionHandler loadCompletionHandler) { Is the ".get() needed here? > Source/WebKit2/UIProcess/API/mac/WKView.mm:890 > + WKView *m_wkView; What guarantees this pointer is not used after the WKView has been deallocated?
Note You need to log in before you can comment on or make changes to this bug.