diff options
-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? |