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


The following commit has been merged in the debian/unstable branch:
commit 452d45d358c1b30549bb8e2bb17b8606b8e46594
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Apr 24 23:02:53 2002 +0000

            Changed ordering of messages so activity viewer doesn't get -1 bytesSoFar
            for cancelled messages.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1072 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 9084bd5..84f1668 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,12 @@
+2002-04-24  Richard Williamson  <rjw at apple.com>
+
+        Changed ordering of messages so activity viewer doesn't get -1 bytesSoFar
+        for cancelled messages.
+        
+	* WebView.subproj/IFBaseWebControllerPrivate.mm:
+	(-[IFBaseWebController _receivedProgress:forResource:fromDataSource:]):
+	(-[IFBaseWebController _mainReceivedProgress:forResource:fromDataSource:]):
+
 === Alexander 0.3c2 (v1) ===
 
 2002-04-23  Chris Blumenberg  <cblu at apple.com>
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 9084bd5..84f1668 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,12 @@
+2002-04-24  Richard Williamson  <rjw at apple.com>
+
+        Changed ordering of messages so activity viewer doesn't get -1 bytesSoFar
+        for cancelled messages.
+        
+	* WebView.subproj/IFBaseWebControllerPrivate.mm:
+	(-[IFBaseWebController _receivedProgress:forResource:fromDataSource:]):
+	(-[IFBaseWebController _mainReceivedProgress:forResource:fromDataSource:]):
+
 === Alexander 0.3c2 (v1) ===
 
 2002-04-23  Chris Blumenberg  <cblu at apple.com>
diff --git a/WebKit/WebView.subproj/IFBaseWebControllerPrivate.mm b/WebKit/WebView.subproj/IFBaseWebControllerPrivate.mm
index 2ea6a00..5220000 100644
--- a/WebKit/WebView.subproj/IFBaseWebControllerPrivate.mm
+++ b/WebKit/WebView.subproj/IFBaseWebControllerPrivate.mm
@@ -65,8 +65,6 @@
     IFWebFrame *frame = [dataSource frame];
     
     WEBKIT_ASSERT (dataSource != nil);
-
-    [self receivedProgress: progress forResource: resourceDescription fromDataSource: dataSource];
     
     if (progress->bytesSoFar == -1 && progress->totalToLoad == -1){
 	WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "cancelled resource = %s\n", [[[dataSource inputURL] absoluteString] cString]);
@@ -76,8 +74,11 @@
         }
         return;
     }
+
+    [self receivedProgress: progress forResource: resourceDescription fromDataSource: dataSource];
+
     // This resouce has completed, so check if the load is complete for all frames.
-    else if (progress->bytesSoFar == progress->totalToLoad){
+    if (progress->bytesSoFar == progress->totalToLoad){
         if (frame != nil){
             [frame _transitionProvisionalToLayoutAcceptable];
             [frame _checkLoadCompleteResource: resourceDescription error: nil isMainDocument: NO];
@@ -91,8 +92,6 @@
     
     WEBKIT_ASSERT (dataSource != nil);
 
-    [self receivedProgress: progress forResource: resourceDescription fromDataSource: dataSource];
-
     if (progress->bytesSoFar == -1 && progress->totalToLoad == -1){
 	WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "cancelled resource = %s\n", [[[dataSource inputURL] absoluteString] cString]);
         [dataSource _setPrimaryLoadComplete: YES];
@@ -103,6 +102,8 @@
         return;
     }
 
+    [self receivedProgress: progress forResource: resourceDescription fromDataSource: dataSource];
+
     // The frame may be nil if a previously cancelled load is still making progress callbacks.
     if (frame == nil)
         return;
@@ -130,7 +131,6 @@
         if (progress->bytesSoFar > timedLayoutSize)
             [frame _transitionProvisionalToLayoutAcceptable];
     }
-    
 }
 
 
diff --git a/WebKit/WebView.subproj/IFWebView.h b/WebKit/WebView.subproj/IFWebView.h
index 245df76..2eecffd 100644
--- a/WebKit/WebView.subproj/IFWebView.h
+++ b/WebKit/WebView.subproj/IFWebView.h
@@ -8,68 +8,7 @@
 #import <Cocoa/Cocoa.h>
 
 /*
-   ============================================================================= 
-
-    Typical usage of a IFWebView.
-    
-    NSURL *url = [NSURL URLWithString: @"http://www.apple.com"];
-    IFWebDataSource *dataSource = [[IFWebDataSource alloc] initWithURL: url];
-    IFWebView *view = [[IFWebView alloc] initWithFrame: myFrame];
-    IFDefaultWebController *controller = [[IFDefaultWebController alloc] initWithView: view dataSource: dataSource];
-
-    [[[view controller] dataSource] startLoading];
-
-    ...
-
-    
-    What is the behaviour of the view after it has been initialized and 
-    startLoading: is called?
-    
-        1.  No IFLocationChangedHandler messages will be sent until 
-            startLoading: is called.  After startLoading is called a loadingStarted
-            message will be sent to the controller.  The view will remain unchanged 
-            until the controller receives a receivedDataForLocation: message 
-            from the data source.  
-                                    
-            If stopLoading is called before receipt of a receivedDataForLocation:, loading will 
-            abort, the view will be unchanged, and the controller will receive a loadingCancelled 
-            message.
-            
-            Controllers should initiate progress indicators upon receipt of loadingStarted,
-            and terminate when either a loadingCancelled or loadingStopped is received.
-        
-        2.  After the controller receives its first receivedDataForLocation: the contents of
-            the view will be cleared and layout may begin.
-            
-        3.  Upon subsequent receipt of receivedDataForLocation: messages the controller
-            may trigger a document layout.  Note that layouts may be coalesced.  If stopLoading
-            is called before the document has fully loaded, the layout will be incomplete, and a
-            loadingStopped message will be sent to the controller
-            
-        4.  When the controller receives a receivedDataForLocation: with a IFLoadProgress that 
-            contains bytesSoFar==totalToLoad the location specified is completely loaded.  Clients
-            may display the location string to indicate completion of a loaded resource.
-            When the controller receives a loadingFinished message the main document and all it
-            resources have been loaded.  Controllers should terminate progress indicators at 
-            this point.
-                    
     ============================================================================= 
-    
-    Changes:
-    
-    2001-12-14
-        
-        Added the following methods:
-            - (void)searchFor: (NSString *)string direction: (BOOL)forward caseSensitive: (BOOL)case
-            - deselectText;
-            - (NSAttributedString *)selectedText;
-       
-        
-        Remove explicit API to get/set the selection range.  This will be postponed until we
-        have a DOM API that allows us to express selection ranges correctly.  Instead we have API
-        that should support searching and getting a NSAttributedString that corresponds to
-        the selected text.
-        
 */
 
 @class IFWebDataSource;
@@ -85,12 +24,6 @@
 
 - initWithFrame: (NSRect)frame;
 
-#ifdef TENTATIVE_API
-// Set and get the delegate.
-- (void)setDelegate: (id <IFWebViewDelegate>)delegate;
-- (id <IFWebViewDelegate>)delegate;
-#endif
-
 // Note that the controller is not retained.
 - (id <IFWebController>)controller;
 
diff --git a/WebKit/WebView.subproj/IFWebView.mm b/WebKit/WebView.subproj/IFWebView.mm
index 8b7b146..85b9197 100644
--- a/WebKit/WebView.subproj/IFWebView.mm
+++ b/WebKit/WebView.subproj/IFWebView.mm
@@ -297,6 +297,9 @@
     //    return;
     //}
 
+    // Ensure that we will receive mouse move events.  Is this the best place to put this?
+    [[self window] setAcceptsMouseMovedEvents: YES];
+    
     // Draw plain white bg in empty case, to avoid redraw weirdness when
     // no page is yet loaded (2890818). We may need to modify this to always
     // draw the background color, in which case we'll have to make sure the
@@ -431,6 +434,35 @@
     }
 }
 
+- (void)mouseMoved: (NSEvent *)event
+{
+    int button, state;
+     
+    if ([event type] == NSLeftMouseDown){
+        button = Qt::LeftButton;
+        state = Qt::LeftButton;
+    }
+    else if ([event type] == NSRightMouseDown){
+        button = Qt::RightButton;
+        state = Qt::RightButton;
+    }
+    else if ([event type] == NSOtherMouseDown){
+        button = Qt::MidButton;
+        state = Qt::MidButton;
+    }
+    else {
+        [NSException raise:IFRuntimeError format:@"IFWebView::mouseUp: unknown button type"];
+        button = 0; state = 0; // Shutup the compiler.
+    }
+    NSPoint p = [event locationInWindow];
+    
+    QMouseEvent *kEvent = new QMouseEvent(QEvent::MouseButtonPress, QPoint((int)p.x, (int)p.y), button, state);
+    KHTMLView *widget = _private->widget;
+    if (widget != 0l) {
+        widget->viewportMouseMoveEvent(kEvent);
+    }
+}
+
 - (void)mouseDragged: (NSEvent *)event
 {
     NSPoint p = [event locationInWindow];
diff --git a/WebKit/WebView.subproj/WebFrameView.h b/WebKit/WebView.subproj/WebFrameView.h
index 245df76..2eecffd 100644
--- a/WebKit/WebView.subproj/WebFrameView.h
+++ b/WebKit/WebView.subproj/WebFrameView.h
@@ -8,68 +8,7 @@
 #import <Cocoa/Cocoa.h>
 
 /*
-   ============================================================================= 
-
-    Typical usage of a IFWebView.
-    
-    NSURL *url = [NSURL URLWithString: @"http://www.apple.com"];
-    IFWebDataSource *dataSource = [[IFWebDataSource alloc] initWithURL: url];
-    IFWebView *view = [[IFWebView alloc] initWithFrame: myFrame];
-    IFDefaultWebController *controller = [[IFDefaultWebController alloc] initWithView: view dataSource: dataSource];
-
-    [[[view controller] dataSource] startLoading];
-
-    ...
-
-    
-    What is the behaviour of the view after it has been initialized and 
-    startLoading: is called?
-    
-        1.  No IFLocationChangedHandler messages will be sent until 
-            startLoading: is called.  After startLoading is called a loadingStarted
-            message will be sent to the controller.  The view will remain unchanged 
-            until the controller receives a receivedDataForLocation: message 
-            from the data source.  
-                                    
-            If stopLoading is called before receipt of a receivedDataForLocation:, loading will 
-            abort, the view will be unchanged, and the controller will receive a loadingCancelled 
-            message.
-            
-            Controllers should initiate progress indicators upon receipt of loadingStarted,
-            and terminate when either a loadingCancelled or loadingStopped is received.
-        
-        2.  After the controller receives its first receivedDataForLocation: the contents of
-            the view will be cleared and layout may begin.
-            
-        3.  Upon subsequent receipt of receivedDataForLocation: messages the controller
-            may trigger a document layout.  Note that layouts may be coalesced.  If stopLoading
-            is called before the document has fully loaded, the layout will be incomplete, and a
-            loadingStopped message will be sent to the controller
-            
-        4.  When the controller receives a receivedDataForLocation: with a IFLoadProgress that 
-            contains bytesSoFar==totalToLoad the location specified is completely loaded.  Clients
-            may display the location string to indicate completion of a loaded resource.
-            When the controller receives a loadingFinished message the main document and all it
-            resources have been loaded.  Controllers should terminate progress indicators at 
-            this point.
-                    
     ============================================================================= 
-    
-    Changes:
-    
-    2001-12-14
-        
-        Added the following methods:
-            - (void)searchFor: (NSString *)string direction: (BOOL)forward caseSensitive: (BOOL)case
-            - deselectText;
-            - (NSAttributedString *)selectedText;
-       
-        
-        Remove explicit API to get/set the selection range.  This will be postponed until we
-        have a DOM API that allows us to express selection ranges correctly.  Instead we have API
-        that should support searching and getting a NSAttributedString that corresponds to
-        the selected text.
-        
 */
 
 @class IFWebDataSource;
@@ -85,12 +24,6 @@
 
 - initWithFrame: (NSRect)frame;
 
-#ifdef TENTATIVE_API
-// Set and get the delegate.
-- (void)setDelegate: (id <IFWebViewDelegate>)delegate;
-- (id <IFWebViewDelegate>)delegate;
-#endif
-
 // Note that the controller is not retained.
 - (id <IFWebController>)controller;
 
diff --git a/WebKit/WebView.subproj/WebFrameView.m b/WebKit/WebView.subproj/WebFrameView.m
index 8b7b146..85b9197 100644
--- a/WebKit/WebView.subproj/WebFrameView.m
+++ b/WebKit/WebView.subproj/WebFrameView.m
@@ -297,6 +297,9 @@
     //    return;
     //}
 
+    // Ensure that we will receive mouse move events.  Is this the best place to put this?
+    [[self window] setAcceptsMouseMovedEvents: YES];
+    
     // Draw plain white bg in empty case, to avoid redraw weirdness when
     // no page is yet loaded (2890818). We may need to modify this to always
     // draw the background color, in which case we'll have to make sure the
@@ -431,6 +434,35 @@
     }
 }
 
+- (void)mouseMoved: (NSEvent *)event
+{
+    int button, state;
+     
+    if ([event type] == NSLeftMouseDown){
+        button = Qt::LeftButton;
+        state = Qt::LeftButton;
+    }
+    else if ([event type] == NSRightMouseDown){
+        button = Qt::RightButton;
+        state = Qt::RightButton;
+    }
+    else if ([event type] == NSOtherMouseDown){
+        button = Qt::MidButton;
+        state = Qt::MidButton;
+    }
+    else {
+        [NSException raise:IFRuntimeError format:@"IFWebView::mouseUp: unknown button type"];
+        button = 0; state = 0; // Shutup the compiler.
+    }
+    NSPoint p = [event locationInWindow];
+    
+    QMouseEvent *kEvent = new QMouseEvent(QEvent::MouseButtonPress, QPoint((int)p.x, (int)p.y), button, state);
+    KHTMLView *widget = _private->widget;
+    if (widget != 0l) {
+        widget->viewportMouseMoveEvent(kEvent);
+    }
+}
+
 - (void)mouseDragged: (NSEvent *)event
 {
     NSPoint p = [event locationInWindow];

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list