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

mjs mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:00:51 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 7a17f0c42c66c84bf307c457f393974335b97b89
Author: mjs <mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Nov 15 05:48:20 2002 +0000

    	Refactor things a bit so all loads bottleneck through a single
    	method (_loadDataSource:withLoadType:).
    
            * WebView.subproj/WebFrame.m:
            (-[WebFrame loadRequest:]):
            (-[WebFrame reload]):
            * WebView.subproj/WebFramePrivate.h:
            * WebView.subproj/WebFramePrivate.m:
            (-[WebFrame _loadItem:fromItem:withLoadType:]):
            (-[WebFrame _loadRequest:triggeringAction:loadType:]):
            (-[WebFrame _loadURL:loadType:triggeringEvent:isFormSubmission:]):
            (-[WebFrame _postWithURL:data:contentType:triggeringEvent:]):
            (-[WebFrame _reloadAllowingStaleDataWithOverrideEncoding:]):
            (-[WebFrame _loadDataSource:withLoadType:]):
            (-[WebFrame _downloadRequest:toPath:]):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2684 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index aa53ef1..f40f9df 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,5 +1,23 @@
 2002-11-14  Maciej Stachowiak  <mjs at apple.com>
 
+	Refactor things a bit so all loads bottleneck through a single
+	method (_loadDataSource:withLoadType:).
+	
+        * WebView.subproj/WebFrame.m:
+        (-[WebFrame loadRequest:]):
+        (-[WebFrame reload]):
+        * WebView.subproj/WebFramePrivate.h:
+        * WebView.subproj/WebFramePrivate.m:
+        (-[WebFrame _loadItem:fromItem:withLoadType:]):
+        (-[WebFrame _loadRequest:triggeringAction:loadType:]):
+        (-[WebFrame _loadURL:loadType:triggeringEvent:isFormSubmission:]):
+        (-[WebFrame _postWithURL:data:contentType:triggeringEvent:]):
+        (-[WebFrame _reloadAllowingStaleDataWithOverrideEncoding:]):
+        (-[WebFrame _loadDataSource:withLoadType:]):
+        (-[WebFrame _downloadRequest:toPath:]):
+
+2002-11-14  Maciej Stachowiak  <mjs at apple.com>
+
 	Change things so the public interface to loading is loadRequest:
 	and everything else is private.
 	
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index aa53ef1..f40f9df 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,5 +1,23 @@
 2002-11-14  Maciej Stachowiak  <mjs at apple.com>
 
+	Refactor things a bit so all loads bottleneck through a single
+	method (_loadDataSource:withLoadType:).
+	
+        * WebView.subproj/WebFrame.m:
+        (-[WebFrame loadRequest:]):
+        (-[WebFrame reload]):
+        * WebView.subproj/WebFramePrivate.h:
+        * WebView.subproj/WebFramePrivate.m:
+        (-[WebFrame _loadItem:fromItem:withLoadType:]):
+        (-[WebFrame _loadRequest:triggeringAction:loadType:]):
+        (-[WebFrame _loadURL:loadType:triggeringEvent:isFormSubmission:]):
+        (-[WebFrame _postWithURL:data:contentType:triggeringEvent:]):
+        (-[WebFrame _reloadAllowingStaleDataWithOverrideEncoding:]):
+        (-[WebFrame _loadDataSource:withLoadType:]):
+        (-[WebFrame _downloadRequest:toPath:]):
+
+2002-11-14  Maciej Stachowiak  <mjs at apple.com>
+
 	Change things so the public interface to loading is loadRequest:
 	and everything else is private.
 	
diff --git a/WebKit/WebView.subproj/WebFrame.m b/WebKit/WebView.subproj/WebFrame.m
index 2f72546..f3b8b19 100644
--- a/WebKit/WebView.subproj/WebFrame.m
+++ b/WebKit/WebView.subproj/WebFrame.m
@@ -106,9 +106,7 @@
 - (void)loadRequest:(WebResourceRequest *)request
 {
     WebDataSource *newDataSource = [[WebDataSource alloc] initWithRequest:request];
-    if ([self _setProvisionalDataSource:newDataSource]) {
-	[self _startLoading];
-    }
+    [self _loadDataSource:newDataSource withLoadType:WebFrameLoadTypeStandard];
     [newDataSource release];
 }
 
@@ -137,11 +135,8 @@
     
     [newDataSource _setOverrideEncoding:[dataSource _overrideEncoding]];
     
-    if ([self _setProvisionalDataSource:newDataSource]) {
-	[self _setLoadType:WebFrameLoadTypeReload];
-        [self _startLoading];
-    }
-    
+    [self _loadDataSource:newDataSource withLoadType:WebFrameLoadTypeReload];
+
     [newDataSource release];
 }
 
diff --git a/WebKit/WebView.subproj/WebFramePrivate.h b/WebKit/WebView.subproj/WebFramePrivate.h
index daf228a..3f239e1 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.h
+++ b/WebKit/WebView.subproj/WebFramePrivate.h
@@ -139,8 +139,9 @@ typedef enum {
 - (WebHistoryItem *)_itemForRestoringDocState;
 - (void)_handleUnimplementablePolicy:(WebPolicyAction)policy errorCode:(int)code forURL:(NSURL *)URL;
 
-- (BOOL)_setProvisionalDataSource: (WebDataSource *)dataSource;
-- (void)_startLoading;
+- (void)_loadDataSource:(WebDataSource *)dataSource withLoadType:(WebFrameLoadType)type;
+
 - (void)_downloadRequest:(WebResourceRequest *)request toPath:(NSString *)path;
 
+
 @end
diff --git a/WebKit/WebView.subproj/WebFramePrivate.m b/WebKit/WebView.subproj/WebFramePrivate.m
index ac8a834..6f9b836 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.m
+++ b/WebKit/WebView.subproj/WebFramePrivate.m
@@ -812,13 +812,12 @@ static const char * const stateNames[] = {
             }
         }
 
-        WebDataSource *newDataSource = [[WebDataSource alloc] initWithRequest:request];
-        [request release];
-        [self _setProvisionalDataSource:newDataSource];
         // Remember this item so we can traverse any child items as child frames load
         [_private setProvisionalItem:item];
-        [self _setLoadType:type];
-        [self _startLoading];
+
+        WebDataSource *newDataSource = [[WebDataSource alloc] initWithRequest:request];
+        [request release];
+	[self _loadDataSource:newDataSource withLoadType:type];
         [newDataSource release];
     }
 }
@@ -889,14 +888,11 @@ static const char * const stateNames[] = {
     [self _recursiveGoToItem:item fromItem:currItem withLoadType:type];
 }
 
-- (void)_loadRequest:(WebResourceRequest *)request triggeringAction:(NSDictionary *)action
+- (void)_loadRequest:(WebResourceRequest *)request triggeringAction:(NSDictionary *)action loadType:(WebFrameLoadType)loadType
 {
     WebDataSource *newDataSource = [[WebDataSource alloc] initWithRequest:request];
     [newDataSource _setTriggeringAction:action];
-
-    if ([self _setProvisionalDataSource:newDataSource]) {
-        [self _startLoading];
-    }
+    [self _loadDataSource:newDataSource withLoadType:loadType];
     [newDataSource release];
 }
 
@@ -1041,10 +1037,7 @@ static const char * const stateNames[] = {
         WebFrameLoadType previousLoadType = [self _loadType];
         WebDataSource *oldDataSource = [[self dataSource] retain];
 
-        [self _loadRequest:request triggeringAction:action];
-        // NB: must be done after loadRequest:, which sets the provDataSource, which
-        //     inits the load type to Standard
-        [self _setLoadType:loadType];
+        [self _loadRequest:request triggeringAction:action loadType:loadType];
         if (_private->instantRedirectComing) {
             _private->instantRedirectComing = NO;
             
@@ -1115,7 +1108,7 @@ static const char * const stateNames[] = {
 
     NSDictionary *action = [self _actionInformationForNavigationType:WebNavigationTypeFormSubmitted event:event];
 
-    [self _loadRequest:request triggeringAction:action];
+    [self _loadRequest:request triggeringAction:action loadType:WebFrameLoadTypeStandard];
 
     [request release];
 }
@@ -1187,10 +1180,8 @@ static const char * const stateNames[] = {
     
     [newDataSource _setOverrideEncoding:encoding];
     
-    if ([self _setProvisionalDataSource:newDataSource]) {
-	[self _setLoadType:WebFrameLoadTypeReloadAllowingStaleData];
-        [self _startLoading];
-    }
+    [self _loadDataSource:newDataSource 
+	  withLoadType:WebFrameLoadTypeReloadAllowingStaleData];
     
     [newDataSource release];
 }
@@ -1268,10 +1259,7 @@ static const char * const stateNames[] = {
     return [_private currentItem];
 }
 
-
-//    Will return NO and not set the provisional data source if the controller
-//    disallows by returning a WebURLPolicyIgnore.
-- (BOOL)_setProvisionalDataSource: (WebDataSource *)newDataSource
+- (void)_loadDataSource:(WebDataSource *)newDataSource withLoadType: (WebFrameLoadType)loadType
 {
     ASSERT([self controller] != nil);
 
@@ -1291,7 +1279,7 @@ static const char * const stateNames[] = {
     // returns YES if we should show the data source
 
     if (![self _continueAfterNavigationPolicyForRequest:[newDataSource request] dataSource:newDataSource]) {
-        return NO;
+        return;
     }
     
     if ([self parent]) {
@@ -1307,12 +1295,8 @@ static const char * const stateNames[] = {
     
     [self _setState: WebFrameStateProvisional];
     
-    return YES;
-}
+    [self _setLoadType:loadType];
 
-
-- (void)_startLoading
-{
     if (self == [[self controller] mainFrame])
         LOG(DocumentLoad, "loading %@", [[[self provisionalDataSource] request] URL]);
 
@@ -1322,12 +1306,11 @@ static const char * const stateNames[] = {
 - (void)_downloadRequest:(WebResourceRequest *)request toPath:(NSString *)path
 {
     WebDataSource *dataSource = [[WebDataSource alloc] initWithRequest:request];
-
     [dataSource _setIsDownloading:YES];
     [dataSource _setDownloadPath:path];
-    if([self _setProvisionalDataSource:dataSource]){
-        [self _startLoading];
-    }
+
+    [self _loadDataSource:dataSource withLoadType:WebFrameLoadTypeStandard];
+
     [dataSource release];
 }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list