WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
128930
Add history delegate to WKWebView
https://bugs.webkit.org/show_bug.cgi?id=128930
Summary
Add history delegate to WKWebView
Anders Carlsson
Reported
2014-02-17 13:20:45 PST
Add history delegate to WKWebView
Attachments
Patch
(26.96 KB, patch)
2014-02-17 13:21 PST
,
Anders Carlsson
mitz: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Anders Carlsson
Comment 1
2014-02-17 13:21:03 PST
Created
attachment 224416
[details]
Patch
WebKit Commit Bot
Comment 2
2014-02-17 13:21:46 PST
Attachment 224416
[details]
did not pass style-queue: ERROR: Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h:46: Missing spaces around = [whitespace/operators] [4] Total errors found: 1 in 10 files If any of these errors are false positives, please file a bug against check-webkit-style.
mitz
Comment 3
2014-02-17 15:50:44 PST
Comment on
attachment 224416
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=224416&action=review
r=me but there is a critical typo
> Source/WebKit2/UIProcess/API/Cocoa/WKHistoryDelegatePrivate.h:40 > +- (void)webView:(WKWebView *)webView didNavigateWithNavigationData:(WKNavigationData *)navigationData; > +- (void)webView:(WKWebView *)webView didPerformClientRedirectFromURL:(NSURL *)sourceURL toURL:(NSURL *)destinationURL; > +- (void)webView:(WKWebView *)webView didPerformServerRedirectFromURL:(NSURL *)sourceURL toURL:(NSURL *)destinationURL; > +- (void)webView:(WKWebView *)webView didUpdateHistoryTitle:(NSString *)title forURL:(NSURL *)URL;
Let’s prefix all methods in private delegates with _.
> Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:465 > +- (id<WKHistoryDelegatePrivate>)_historyDelegate
Missing space after id
> Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:470 > +- (void)_setHistoryDelegate:(id<WKHistoryDelegatePrivate>)historyDelegate
Ditto
> Source/WebKit2/UIProcess/Cocoa/NavigationState.mm:174 > + [historyDelegate webView:m_webView didPerformClientRedirectFromURL:wrapper(*API::URL::create(sourceURL)) toURL:wrapper(*API::URL::create(destinationURL))];
Let’s avoid wrappers here and use +[NSURL _web_URLWithWTFString:].
> Source/WebKit2/UIProcess/Cocoa/NavigationState.mm:186 > + [historyDelegate webView:m_webView didPerformClientRedirectFromURL:wrapper(*API::URL::create(sourceURL)) toURL:wrapper(*API::URL::create(destinationURL))];
Typo: s/Client/Server/! Let’s avoid wrappers here and use +[NSURL _web_URLWithWTFString:].
> Source/WebKit2/UIProcess/Cocoa/NavigationState.mm:198 > + [historyDelegate.get() webView:m_webView didUpdateHistoryTitle:wrapper(*API::String::create(title)) forURL:wrapper(*API::URL::create(url))];
Let’s avoid wrappers here and use the ability of WTF::String to turn into an NSString (and _web_URLWithWTFString:).
Anders Carlsson
Comment 4
2014-02-17 16:39:15 PST
Committed
r164258
: <
http://trac.webkit.org/changeset/164258
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug