[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 06:25:20 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 51813345990f2c75ec2070527545187fd60dc6b2
Author: mjs <mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Jul 19 05:10:16 2002 +0000

    	More refactoring: Simplify a bit more by moving more logic into
    	the data source.
    
            * WebView.subproj/WebDataSourcePrivate.h, WebView.subproj/WebDataSourcePrivate.m:
    	(-[WebDataSource _gotFirstByte]): Removed.
    	(-[WebDataSource _setGotFirstByte]): Removed.
            (-[WebDataSource _isReadyForData]): Removed.
            (-[WebDataSource _receivedData:]): Commit if appropriate, and pass data to
    	representation and documentView.
            * WebView.subproj/WebMainResourceClient.m:
            (-[WebMainResourceClient
    	WebResourceHandle:resourceDataDidBecomeAvailable:]): Change the
    	check back to policy != None, because the first chunk will trigger
    	a commit in the policy == Show case, so there is no need to worry
    	about it.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1594 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 9c0bd68..1dfdf6e 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,5 +1,23 @@
 2002-07-18  Maciej Stachowiak  <mjs at apple.com>
 
+	More refactoring: Simplify a bit more by moving more logic into
+	the data source.
+	
+        * WebView.subproj/WebDataSourcePrivate.h, WebView.subproj/WebDataSourcePrivate.m:
+	(-[WebDataSource _gotFirstByte]): Removed.
+	(-[WebDataSource _setGotFirstByte]): Removed.
+        (-[WebDataSource _isReadyForData]): Removed.
+        (-[WebDataSource _receivedData:]): Commit if appropriate, and pass data to
+	representation and documentView.
+        * WebView.subproj/WebMainResourceClient.m:
+        (-[WebMainResourceClient
+	WebResourceHandle:resourceDataDidBecomeAvailable:]): Change the
+	check back to policy != None, because the first chunk will trigger
+	a commit in the policy == Show case, so there is no need to worry
+	about it.
+
+2002-07-18  Maciej Stachowiak  <mjs at apple.com>
+
         Rename some methods for clarity. These two methods are defined by
 	the end state, not the start state (in fact,
 	transitionToLayoutAcceptable does most of it's work when it starts
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 9c0bd68..1dfdf6e 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,5 +1,23 @@
 2002-07-18  Maciej Stachowiak  <mjs at apple.com>
 
+	More refactoring: Simplify a bit more by moving more logic into
+	the data source.
+	
+        * WebView.subproj/WebDataSourcePrivate.h, WebView.subproj/WebDataSourcePrivate.m:
+	(-[WebDataSource _gotFirstByte]): Removed.
+	(-[WebDataSource _setGotFirstByte]): Removed.
+        (-[WebDataSource _isReadyForData]): Removed.
+        (-[WebDataSource _receivedData:]): Commit if appropriate, and pass data to
+	representation and documentView.
+        * WebView.subproj/WebMainResourceClient.m:
+        (-[WebMainResourceClient
+	WebResourceHandle:resourceDataDidBecomeAvailable:]): Change the
+	check back to policy != None, because the first chunk will trigger
+	a commit in the policy == Show case, so there is no need to worry
+	about it.
+
+2002-07-18  Maciej Stachowiak  <mjs at apple.com>
+
         Rename some methods for clarity. These two methods are defined by
 	the end state, not the start state (in fact,
 	transitionToLayoutAcceptable does most of it's work when it starts
diff --git a/WebKit/WebView.subproj/WebDataSourcePrivate.h b/WebKit/WebView.subproj/WebDataSourcePrivate.h
index e1af454..96264e3 100644
--- a/WebKit/WebView.subproj/WebDataSourcePrivate.h
+++ b/WebKit/WebView.subproj/WebDataSourcePrivate.h
@@ -110,7 +110,6 @@
 
 - (void)_commitIfReady;
 - (void)_makeRepresentation;
-- (void)_setGotFirstByte;
-- (BOOL)_gotFirstByte;
-- (BOOL)_isReadyForData;
+- (void)_receivedData:(NSData *)data;
+
 @end
diff --git a/WebKit/WebView.subproj/WebDataSourcePrivate.m b/WebKit/WebView.subproj/WebDataSourcePrivate.m
index f6afbc3..c98e965 100644
--- a/WebKit/WebView.subproj/WebDataSourcePrivate.m
+++ b/WebKit/WebView.subproj/WebDataSourcePrivate.m
@@ -422,18 +422,6 @@
     }
 }
 
--(BOOL)_gotFirstByte
-{
-    return _private->gotFirstByte;
-}
-
--(void)_setGotFirstByte
-{
-    _private->gotFirstByte = TRUE;
-    [self _commitIfReady];
-}
-
-
 -(void)_makeRepresentation
 {
     Class repClass = [self _representationClass];
@@ -456,4 +444,16 @@
 	(_private->committed || _private->contentPolicy != WebContentPolicyShow);
 }
 
+-(void)_receivedData:(NSData *)data
+{
+    if (!_private->gotFirstByte) {
+        WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "got first byte for resource = %s\n", [[[self inputURL] absoluteString] cString]);
+	_private->gotFirstByte = YES;
+	[self _commitIfReady];
+    }
+
+    [[self representation] receivedData:data withDataSource:self];
+    [[[[self webFrame] webView] documentView] dataSourceUpdated:self];
+}
+
 @end
diff --git a/WebKit/WebView.subproj/WebMainResourceClient.m b/WebKit/WebView.subproj/WebMainResourceClient.m
index 595f20a..a9f0102 100644
--- a/WebKit/WebView.subproj/WebMainResourceClient.m
+++ b/WebKit/WebView.subproj/WebMainResourceClient.m
@@ -162,7 +162,6 @@
     WebController *controller = [dataSource controller];
     NSString *contentType = [handle contentType];
     WebFrame *frame = [dataSource webFrame];
-    WebView *view = [frame webView];
 
     NSData *data = nil;
     
@@ -191,18 +190,9 @@
         WEBKITDEBUGLEVEL(WEBKIT_LOG_DOWNLOAD, "main content type: %s", DEBUG_OBJECT(contentType));
     }
 
-    // Check to see if this is these are the first bits of a provisional data source,
-    // if so we need to tell the data source it got the first byte.
-    // It will transition from provisional to committed when and if it gets a policy of
-    // WebContentPolicyShow policy.
-    if(![dataSource _gotFirstByte]) {
-        WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "got first byte for resource = %s\n", [[[dataSource inputURL] absoluteString] cString]);
-	[dataSource _setGotFirstByte];
-    }
-    
     WebContentPolicy contentPolicy = [dataSource contentPolicy];
 
-    if([dataSource _isReadyForData]){
+    if (contentPolicy != WebContentPolicyNone) {
         if (!processedBufferedData && !isFirstChunk) {
             // Process all data that has been received now that we are ready for data
 	    data = [handle resourceData];
@@ -214,8 +204,7 @@
 
 	switch (contentPolicy) {
 	case WebContentPolicyShow:
-	    [[dataSource representation] receivedData:data withDataSource:dataSource];
-	    [[view documentView] dataSourceUpdated:dataSource];
+	    [dataSource _receivedData:data];
 	    break;
 	case WebContentPolicySave:
 	case WebContentPolicySaveAndOpenExternally:
diff --git a/WebKit/WebView.subproj/WebMainResourceLoader.m b/WebKit/WebView.subproj/WebMainResourceLoader.m
index 595f20a..a9f0102 100644
--- a/WebKit/WebView.subproj/WebMainResourceLoader.m
+++ b/WebKit/WebView.subproj/WebMainResourceLoader.m
@@ -162,7 +162,6 @@
     WebController *controller = [dataSource controller];
     NSString *contentType = [handle contentType];
     WebFrame *frame = [dataSource webFrame];
-    WebView *view = [frame webView];
 
     NSData *data = nil;
     
@@ -191,18 +190,9 @@
         WEBKITDEBUGLEVEL(WEBKIT_LOG_DOWNLOAD, "main content type: %s", DEBUG_OBJECT(contentType));
     }
 
-    // Check to see if this is these are the first bits of a provisional data source,
-    // if so we need to tell the data source it got the first byte.
-    // It will transition from provisional to committed when and if it gets a policy of
-    // WebContentPolicyShow policy.
-    if(![dataSource _gotFirstByte]) {
-        WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "got first byte for resource = %s\n", [[[dataSource inputURL] absoluteString] cString]);
-	[dataSource _setGotFirstByte];
-    }
-    
     WebContentPolicy contentPolicy = [dataSource contentPolicy];
 
-    if([dataSource _isReadyForData]){
+    if (contentPolicy != WebContentPolicyNone) {
         if (!processedBufferedData && !isFirstChunk) {
             // Process all data that has been received now that we are ready for data
 	    data = [handle resourceData];
@@ -214,8 +204,7 @@
 
 	switch (contentPolicy) {
 	case WebContentPolicyShow:
-	    [[dataSource representation] receivedData:data withDataSource:dataSource];
-	    [[view documentView] dataSourceUpdated:dataSource];
+	    [dataSource _receivedData:data];
 	    break;
 	case WebContentPolicySave:
 	case WebContentPolicySaveAndOpenExternally:

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list