[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

cblu cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:44:24 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 0bd9f13a5761ecd2fbb5aa43cd5394dc336920c7
Author: cblu <cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Jun 6 23:22:15 2003 +0000

    	Fixed: <rdar://problem/3156169>: cmd-click opens new win but stops loading in prev win
    
            Reviewed by darin.
    
            * WebView.subproj/WebFramePrivate.h: added policyDataSource and policyLoadType as ivars
            * WebView.subproj/WebFramePrivate.m:
            (-[WebFramePrivate dealloc]): added ASSERT
            (-[WebFramePrivate setProvisionalDataSource:]): added ASSERT
            (-[WebFrame _isLoadComplete]): formatting tweak
            (-[WebFrame _invalidatePendingPolicyDecisionCallingDefaultAction:]): clear policyDataSource
            (-[WebFrame _checkNewWindowPolicyForRequest:action:frameName:formState:andCall:withSelector:]): formatting tweak
            (-[WebFrame _checkNavigationPolicyForRequest:dataSource:formState:andCall:withSelector:]): retain policyDataSource
            (-[WebFrame _continueAfterNavigationPolicy:]): stop the load, set the load type, set the provisional data source in the "use" case
            (-[WebFrame _loadURL:referrer:loadType:target:triggeringEvent:form:formValues:]): formatting tweak
            (-[WebFrame _continueLoadRequestAfterNavigationPolicy:formState:]): don't reset things if something other than "use" has been chosen
            (-[WebFrame _loadDataSource:withLoadType:formState:]): DON'T stop the load, set the load type, set the provisional data source
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4494 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 0b7697e..bc2ef7a 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,7 +1,27 @@
 2003-06-06  Chris Blumenberg  <cblu at apple.com>
 
+	Fixed: <rdar://problem/3156169>: cmd-click opens new win but stops loading in prev win
+
+        Reviewed by darin.
+
+        * WebView.subproj/WebFramePrivate.h: added policyDataSource and policyLoadType as ivars
+        * WebView.subproj/WebFramePrivate.m:
+        (-[WebFramePrivate dealloc]): added ASSERT
+        (-[WebFramePrivate setProvisionalDataSource:]): added ASSERT
+        (-[WebFrame _isLoadComplete]): formatting tweak
+        (-[WebFrame _invalidatePendingPolicyDecisionCallingDefaultAction:]): clear policyDataSource
+        (-[WebFrame _checkNewWindowPolicyForRequest:action:frameName:formState:andCall:withSelector:]): formatting tweak
+        (-[WebFrame _checkNavigationPolicyForRequest:dataSource:formState:andCall:withSelector:]): retain policyDataSource
+        (-[WebFrame _continueAfterNavigationPolicy:]): stop the load, set the load type, set the provisional data source in the "use" case
+        (-[WebFrame _loadURL:referrer:loadType:target:triggeringEvent:form:formValues:]): formatting tweak
+        (-[WebFrame _continueLoadRequestAfterNavigationPolicy:formState:]): don't reset things if something other than "use" has been chosen
+        (-[WebFrame _loadDataSource:withLoadType:formState:]): DON'T stop the load, set the load type, set the provisional data source
+
+2003-06-06  Chris Blumenberg  <cblu at apple.com>
+
 	Fixed: <rdar://problem/3282881>: Java plugin fails in carbon WebKit apps
 
+
         Fixed by Mike Hay, reviewed by me.
 
         * Plugins.subproj/WebPluginDatabase.m:
diff --git a/WebKit/WebView.subproj/WebFramePrivate.h b/WebKit/WebView.subproj/WebFramePrivate.h
index 53cb543..bb6cfd0 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.h
+++ b/WebKit/WebView.subproj/WebFramePrivate.h
@@ -82,6 +82,8 @@ extern NSString *WebCorePageCacheStateKey;
     id policyTarget;
     SEL policySelector;
     WebFormState *policyFormState;
+    WebDataSource *policyDataSource;
+    WebFrameLoadType policyLoadType;
 
     BOOL justOpenedForTargetedLink;
     BOOL quickRedirectComing;
diff --git a/WebKit/WebView.subproj/WebFramePrivate.m b/WebKit/WebView.subproj/WebFramePrivate.m
index 14de4c2..bb8196b 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.m
+++ b/WebKit/WebView.subproj/WebFramePrivate.m
@@ -182,6 +182,7 @@ NSString *WebCorePageCacheStateKey = @"WebCorePageCacheState";
     ASSERT(policyFrameName == nil);
     ASSERT(policyTarget == nil);
     ASSERT(policyFormState == nil);
+    ASSERT(policyDataSource == nil);
 
     [super dealloc];
 }
@@ -218,7 +219,8 @@ NSString *WebCorePageCacheStateKey = @"WebCorePageCacheState";
 
 - (WebDataSource *)provisionalDataSource { return provisionalDataSource; }
 - (void)setProvisionalDataSource: (WebDataSource *)d
-{ 
+{
+    ASSERT(!d || !provisionalDataSource);
     [d retain];
     [provisionalDataSource release];
     provisionalDataSource = d;
@@ -923,8 +925,8 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
                     LOG(Loading, "%@:  checking complete in WebFrameStateProvisional, load done", [self name]);
 
                     [[[self webView] _frameLoadDelegateForwarder] webView:_private->webView
-                                               didFailProvisionalLoadWithError:[pd _mainDocumentError]
-                                                                      forFrame:self];
+                                          didFailProvisionalLoadWithError:[pd _mainDocumentError]
+                                                                 forFrame:self];
 
                     // We know the provisional data source didn't cut the muster, release it.
                     [self _setProvisionalDataSource:nil];
@@ -1422,12 +1424,14 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
     id target = _private->policyTarget;
     SEL selector = _private->policySelector;
     WebFormState *formState = _private->policyFormState;
+    WebDataSource *dataSource = _private->policyDataSource;
 
     _private->policyRequest = nil;
     _private->policyFrameName = nil;
     _private->policyTarget = nil;
     _private->policySelector = nil;
     _private->policyFormState = nil;
+    _private->policyDataSource = nil;
 
     if (call) {
 	if (frameName) {
@@ -1441,6 +1445,7 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
     [frameName release];
     [target release];
     [formState release];
+    [dataSource release];
 }
 
 - (void)_checkNewWindowPolicyForRequest:(NSURLRequest *)request action:(NSDictionary *)action frameName:(NSString *)frameName formState:(WebFormState *)formState andCall:(id)target withSelector:(SEL)selector
@@ -1456,10 +1461,11 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
     _private->policyFormState = [formState retain];
 
     WebView *wv = [self webView];
-    [[wv _policyDelegateForwarder] webView:wv decidePolicyForNewWindowAction:action
-                                                                   request:request
-                                                              newFrameName:frameName
-                                                          decisionListener:listener];
+    [[wv _policyDelegateForwarder] webView:wv
+            decidePolicyForNewWindowAction:action
+                                   request:request
+                              newFrameName:frameName
+                          decisionListener:listener];
     
     [listener release];
 }
@@ -1495,7 +1501,11 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
 }
 
 
-- (void)_checkNavigationPolicyForRequest:(NSURLRequest *)request dataSource:(WebDataSource *)dataSource formState:(WebFormState *)formState andCall:(id)target withSelector:(SEL)selector
+- (void)_checkNavigationPolicyForRequest:(NSURLRequest *)request
+                              dataSource:(WebDataSource *)dataSource
+                               formState:(WebFormState *)formState
+                                 andCall:(id)target
+                            withSelector:(SEL)selector
 {
     NSDictionary *action = [dataSource _triggeringAction];
     if (action == nil) {
@@ -1518,20 +1528,22 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
 
     [dataSource _setLastCheckedRequest:request];
 
-    WebPolicyDecisionListener *listener = [[WebPolicyDecisionListener alloc]
-        _initWithTarget:self action:@selector(_continueAfterNavigationPolicy:)];
-
+    WebPolicyDecisionListener *listener;
+    listener = [[WebPolicyDecisionListener alloc] _initWithTarget:self action:@selector(_continueAfterNavigationPolicy:)];
+    
     _private->policyRequest = [request retain];
     _private->policyTarget = [target retain];
     _private->policySelector = selector;
     _private->listener = [listener retain];
     _private->policyFormState = [formState retain];
+    _private->policyDataSource = [dataSource retain];
 
     WebView *wv = [self webView];
-    [[wv _policyDelegateForwarder] webView:wv decidePolicyForNavigationAction:action
-                                                                    request:request
-                                                                      frame:self
-                                                           decisionListener:listener];
+    [[wv _policyDelegateForwarder] webView:wv
+           decidePolicyForNavigationAction:action
+                                   request:request
+                                     frame:self
+                          decisionListener:listener];
     
     [listener release];
 }
@@ -1542,7 +1554,9 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
     id target = [[_private->policyTarget retain] autorelease];
     SEL selector = _private->policySelector;
     WebFormState *formState = [[_private->policyFormState retain] autorelease];
-
+    WebDataSource *dataSource = [[_private->policyDataSource retain] autorelease];
+    WebFrameLoadType loadType = _private->policyLoadType;
+    
     // will release _private->policy* objects, hence the above retains
     [self _invalidatePendingPolicyDecisionCallingDefaultAction:NO];
 
@@ -1559,6 +1573,9 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
         if (![WebView _canHandleRequest:request]) {
             [self _handleUnimplementablePolicyWithErrorCode:WebKitErrorCannotShowURL forURL:[request URL]];
         } else {
+            [self stopLoading];
+            [self _setLoadType:loadType];
+            [self _setProvisionalDataSource:dataSource];
             shouldContinue = YES;
         }
         break;
@@ -1708,7 +1725,11 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
 
         [oldDataSource _setTriggeringAction:action];
         [self _invalidatePendingPolicyDecisionCallingDefaultAction:YES];
-        [self _checkNavigationPolicyForRequest:request dataSource:oldDataSource formState:formState andCall:self withSelector:@selector(_continueFragmentScrollAfterNavigationPolicy:formState:)];
+        [self _checkNavigationPolicyForRequest:request
+                                    dataSource:oldDataSource
+                                     formState:formState
+                                       andCall:self
+                                  withSelector:@selector(_continueFragmentScrollAfterNavigationPolicy:formState:)];
     } else {
         [self _loadRequest:request triggeringAction:action loadType:loadType formState:formState];
         if (_private->quickRedirectComing) {
@@ -2035,9 +2056,6 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
 -(void)_continueLoadRequestAfterNavigationPolicy:(NSURLRequest *)request formState:(WebFormState *)formState
 {
     if (!request) {
-        [self _resetBackForwardListToCurrent];
-        [self _setLoadType: WebFrameLoadTypeStandard];
-        [self _setProvisionalDataSource:nil];
         return;
     }
     
@@ -2084,9 +2102,7 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
 
     ASSERT([self frameView] != nil);
 
-    [self stopLoading];
-
-    [self _setLoadType:loadType];
+    _private->policyLoadType = loadType;
 
     WebFrame *parentFrame = [self parentFrame];
     if (parentFrame) {
@@ -2096,11 +2112,11 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
     [newDataSource _setJustOpenedForTargetedLink:_private->justOpenedForTargetedLink];
     _private->justOpenedForTargetedLink = NO;
 
-    [self _setProvisionalDataSource:newDataSource];
-    
-    ASSERT([newDataSource webFrame] == self);
-
-    [self _checkNavigationPolicyForRequest:[newDataSource request] dataSource:newDataSource formState:formState andCall:self withSelector:@selector(_continueLoadRequestAfterNavigationPolicy:formState:)];
+    [self _checkNavigationPolicyForRequest:[newDataSource request]
+                                dataSource:newDataSource
+                                 formState:formState
+                                   andCall:self
+                              withSelector:@selector(_continueLoadRequestAfterNavigationPolicy:formState:)];
 }
 
 - (void)_setJustOpenedForTargetedLink:(BOOL)justOpened

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list