RESOLVED FIXED 24594
PolicyDelegate NavigationAction is WebNavigationTypeOther instead of WebNavigationTypeReload
https://bugs.webkit.org/show_bug.cgi?id=24594
Summary PolicyDelegate NavigationAction is WebNavigationTypeOther instead of WebNavig...
Greg Bolsinga
Reported 2009-03-13 18:28:41 PDT
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
Attachments
patch (3.80 KB, patch)
2009-03-30 16:57 PDT, Darin Adler
darin: review+
Greg Bolsinga
Comment 1 2009-03-13 18:38:16 PDT
Darin Adler
Comment 2 2009-03-30 16:57:31 PDT
Darin Adler
Comment 3 2009-03-30 17:19:25 PDT
Comment on attachment 29098 [details] patch Sam reviewed this.
Darin Adler
Comment 4 2009-03-30 17:19:45 PDT
Note You need to log in before you can comment on or make changes to this bug.