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

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


The following commit has been merged in the debian/unstable branch:
commit 19053db5570a0bfc464d5f6fb5538457c6b32863
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Jun 4 22:59:56 2003 +0000

    	Fixed 3277775.  Send less notifications.  Notifcations suck!
    
            Reviewed by David.
    
            * WebView.subproj/WebViewPrivate.h:
            * WebView.subproj/WebViewPrivate.m:
            (-[WebViewPrivate init]):
            (-[WebView _progressStarted]):
            (-[WebView _progressCompleted]):
            (-[WebView _incrementProgressForConnection:data:]):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4481 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 99ba6db..b1b4613 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,16 @@
+2003-06-04  Richard Williamson   <rjw at apple.com>
+
+	Fixed 3277775.  Send less notifications.  Notifcations suck!
+
+        Reviewed by David.
+
+        * WebView.subproj/WebViewPrivate.h:
+        * WebView.subproj/WebViewPrivate.m:
+        (-[WebViewPrivate init]):
+        (-[WebView _progressStarted]):
+        (-[WebView _progressCompleted]):
+        (-[WebView _incrementProgressForConnection:data:]):
+
 2003-06-04  Darin Adler  <darin at apple.com>
 
         Reviewed by John.
diff --git a/WebKit/WebView.subproj/WebViewPrivate.h b/WebKit/WebView.subproj/WebViewPrivate.h
index 439d9d4..72a67b2 100644
--- a/WebKit/WebView.subproj/WebViewPrivate.h
+++ b/WebKit/WebView.subproj/WebViewPrivate.h
@@ -71,6 +71,8 @@ typedef struct _WebResourceDelegateImplementationCache {
     long long totalPageAndResourceBytesToLoad;
     long long totalBytesReceived;
     double progressValue;
+    double lastNotifiedProgressValue;
+    double progressNotificationInterval;
     
     int numProgressTrackedFrames;
     NSMutableDictionary *progressItems;
diff --git a/WebKit/WebView.subproj/WebViewPrivate.m b/WebKit/WebView.subproj/WebViewPrivate.m
index 8f020f5..62ee4aa 100644
--- a/WebKit/WebView.subproj/WebViewPrivate.m
+++ b/WebKit/WebView.subproj/WebViewPrivate.m
@@ -56,7 +56,7 @@ static NSMutableSet *schemesWithRepresentationsSet;
 {
     backForwardList = [[WebBackForwardList alloc] init];
     textSizeMultiplier = 1;
-
+    progressNotificationInterval = 0.02;
     settings = [[WebCoreSettings alloc] init];
 
     return self;
@@ -643,6 +643,7 @@ static NSMutableSet *schemesWithRepresentationsSet;
         _private->totalPageAndResourceBytesToLoad = 0;
         _private->totalBytesReceived = 0;
         _private->progressValue = 0;
+        _private->lastNotifiedProgressValue = 0;
         [[NSNotificationCenter defaultCenter] postNotificationName:WebViewProgressStartedNotification object:self];
     }
     _private->numProgressTrackedFrames++;
@@ -650,8 +651,9 @@ static NSMutableSet *schemesWithRepresentationsSet;
 
 - (void)_progressCompleted
 {
-    _private->numProgressTrackedFrames--;
-    ASSERT (_private->numProgressTrackedFrames >= 0);
+    if (![[[self mainFrame] dataSource] isLoading])
+        _private->numProgressTrackedFrames = 0;
+        
     if (_private->numProgressTrackedFrames == 0){
         [_private->progressItems release];
         _private->progressItems = nil;
@@ -720,7 +722,11 @@ static NSMutableSet *schemesWithRepresentationsSet;
     if (_private->progressValue > 1.0)
         _private->progressValue = 1.0;
 
-    [[NSNotificationCenter defaultCenter] postNotificationName:WebViewProgressEstimateChangedNotification object:self];
+    double notificationProgressDelta = _private->progressValue - _private->lastNotifiedProgressValue;
+    if (notificationProgressDelta >= _private->progressNotificationInterval){
+        [[NSNotificationCenter defaultCenter] postNotificationName:WebViewProgressEstimateChangedNotification object:self];
+        _private->lastNotifiedProgressValue = _private->progressValue;
+    }
 }
 
 - (void)_completeProgressForConnection:(NSURLConnection *)con

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list