diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2011-03-14 03:54:15 -0700 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2011-03-14 05:09:11 -0700 |
commit | 5bb0da03cad6a6a7608aa0e97297a54c751f8abf (patch) | |
tree | e4936f3e8bbf57b91013c44314429cd14644cb82 /CyteKit | |
parent | b3be8c0c05ea03ae25d0128eabc24ee1d160c4c6 (diff) |
Seriously solve the auto-redirect issue.
Diffstat (limited to 'CyteKit')
-rw-r--r-- | CyteKit/WebViewController.h | 3 | ||||
-rw-r--r-- | CyteKit/WebViewController.mm | 14 |
2 files changed, 2 insertions, 15 deletions
diff --git a/CyteKit/WebViewController.h b/CyteKit/WebViewController.h index d779468..2bd5320 100644 --- a/CyteKit/WebViewController.h +++ b/CyteKit/WebViewController.h @@ -73,9 +73,6 @@ _H<NSURLRequest> request_; bool ready_; - _H<NSURLRequest> stage1_; - _H<NSURLRequest> stage2_; - _transient NSNumber *sensitive_; _H<NSString> title_; diff --git a/CyteKit/WebViewController.mm b/CyteKit/WebViewController.mm index 40cd6d1..d347a39 100644 --- a/CyteKit/WebViewController.mm +++ b/CyteKit/WebViewController.mm @@ -354,9 +354,7 @@ float CYScrollViewDecelerationRateNormal; return; if ([[error domain] isEqualToString:WebKitErrorDomain] && [error code] == WebKitErrorFrameLoadInterruptedByPolicyChange) { - request_ = stage2_; - stage1_ = nil; - stage2_ = nil; + request_ = nil; return; } @@ -441,10 +439,8 @@ float CYScrollViewDecelerationRateNormal; - (void) webView:(WebView *)view didDecidePolicy:(CYWebPolicyDecision)decision forNavigationAction:(NSDictionary *)action request:(NSURLRequest *)request frame:(WebFrame *)frame { if ([frame parentFrame] == nil) if (decision == CYWebPolicyDecisionUse) - if (!error_) { - stage1_ = request_; + if (!error_) request_ = request; - } } - (void) webView:(WebView *)view decidePolicyForNewWindowAction:(NSDictionary *)action request:(NSURLRequest *)request newFrameName:(NSString *)frame decisionListener:(id<WebPolicyDecisionListener>)listener { @@ -502,9 +498,6 @@ float CYScrollViewDecelerationRateNormal; [loading_ removeObject:[NSValue valueWithNonretainedObject:frame]]; if ([frame parentFrame] == nil) { - stage1_ = nil; - stage2_ = nil; - if (DOMDocument *document = [frame DOMDocument]) if (DOMNodeList<NSFastEnumeration> *bodies = [document getElementsByTagName:@"body"]) for (DOMHTMLBodyElement *body in (id) bodies) { @@ -565,9 +558,6 @@ float CYScrollViewDecelerationRateNormal; allowsNavigationAction_ = true; - stage2_ = stage1_; - stage1_ = nil; - [self setHidesNavigationBar:NO]; // XXX: do we still need to do this? |