FrameLoaderClient::dispatchDecidePolicyForNavigationAction() always called w/ NavigationAction::type() == NavigationTypeOther This causes policy delegates to not be able to determine the action type. It appears that this comes from the code path FrameLoader::loadWithDocumentLoader(), when not scrolling to an anchor. In this code path, the DocumentLoader::triggeringAction().isEmpty is true, and this is where the 'other' comes from. Add the following patch to the MiniBrowser project. You'll see that the WebActionNavigationTypeKey is always 5, which is WebNavigationTypeOther. Index: MyDocument.m =================================================================== --- MyDocument.m (revision 20870) +++ MyDocument.m (working copy) @@ -128,6 +128,7 @@ [webView setFrameLoadDelegate:self]; [webView setUIDelegate:self]; [webView setResourceLoadDelegate:self]; + [webView setPolicyDelegate:self]; // Load a default URL NSURL *URL = URLToLoad != nil ? URLToLoad : [NSURL URLWithString:@"http://www.apple.com"]; @@ -298,7 +299,16 @@ [self updateResourceStatus]; } +- (void)webView:(WebView *)webView decidePolicyForNavigationAction:(NSDictionary *)actionInformation + request:(NSURLRequest *)request + frame:(WebFrame *)frame + decisionListener:(id<WebPolicyDecisionListener>)listener +{ + NSLog(@"%@", actionInformation); + [listener use]; +} + // History Methods - (void)goToHistoryItem:(id)historyItem
<rdar://problem/6682110>
Created attachment 29098 [details] patch
Comment on attachment 29098 [details] patch Sam reviewed this.
http://trac.webkit.org/changeset/42120