Bug 140410

Summary: [WK2][iOS] Add Cocoa delegate for logging diagnostic messages
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: WebKit2Assignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, barraclough, benjamin, commit-queue, jer.noble, kling, mitz, sam
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 140486    
Bug Blocks: 140463    
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch
none
Patch none

Description Chris Dumez 2015-01-13 14:11:51 PST
Add Cocoa delegate for logging diagnostic messages. Right now, there is only a WK2 C API client.
Comment 1 Chris Dumez 2015-01-14 13:09:43 PST
Created attachment 244630 [details]
Patch
Comment 2 Chris Dumez 2015-01-14 13:48:36 PST
Created attachment 244634 [details]
Patch
Comment 3 Sam Weinig 2015-01-14 15:47:12 PST
Unless we really need this code to run in the WebProcess, I would rather we IPC this over to the UIProcess and do it there.
Comment 4 Chris Dumez 2015-01-15 21:41:00 PST
Created attachment 244751 [details]
Patch
Comment 5 Chris Dumez 2015-01-16 11:26:24 PST
Created attachment 244777 [details]
Patch
Comment 6 Chris Dumez 2015-01-16 12:58:16 PST
Sam, could you please take another look? I updated the patch now that diagnostic messages go through the UIProcess.
Comment 7 Anders Carlsson 2015-01-16 13:02:36 PST
Comment on attachment 244777 [details]
Patch

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

> Source/WebKit2/UIProcess/API/Cocoa/_WKDiagnosticLoggingDelegate.h:38
> +- (void)_webView:(WKWebView *)webView logDiagnosticMessage:(NSString *)message inDescription:(NSString *)description;
> +- (void)_webView:(WKWebView *)webView logDiagnosticMessageWithResult:(NSString *)message inDescription:(NSString *)description inResult:(WKDiagnosticLoggingResultType)result;
> +- (void)_webView:(WKWebView *)webView logDiagnosticMessageWithValue:(NSString *)message inDescription:(NSString *)description inValue:(NSString *) value;

I think these read a little weird, especially the "inDescription" and "inValue" parts.
Comment 8 Chris Dumez 2015-01-16 13:06:42 PST
Created attachment 244796 [details]
Patch
Comment 9 Chris Dumez 2015-01-16 13:08:08 PST
(In reply to comment #7)
> Comment on attachment 244777 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=244777&action=review
> 
> > Source/WebKit2/UIProcess/API/Cocoa/_WKDiagnosticLoggingDelegate.h:38
> > +- (void)_webView:(WKWebView *)webView logDiagnosticMessage:(NSString *)message inDescription:(NSString *)description;
> > +- (void)_webView:(WKWebView *)webView logDiagnosticMessageWithResult:(NSString *)message inDescription:(NSString *)description inResult:(WKDiagnosticLoggingResultType)result;
> > +- (void)_webView:(WKWebView *)webView logDiagnosticMessageWithValue:(NSString *)message inDescription:(NSString *)description inValue:(NSString *) value;
> 
> I think these read a little weird, especially the "inDescription" and
> "inValue" parts.

Ok, I am really not familiar with ObjC and its conventions. I switched to description/value/result instead of inDescription/inValue/inResult. Let me know if you have other suggestions so that these read better.
Comment 10 WebKit Commit Bot 2015-01-17 17:41:14 PST
Comment on attachment 244796 [details]
Patch

Clearing flags on attachment: 244796

Committed r178630: <http://trac.webkit.org/changeset/178630>
Comment 11 WebKit Commit Bot 2015-01-17 17:41:19 PST
All reviewed patches have been landed.  Closing bug.