[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:32:26 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 27875401151b138eeb096400afb22f44412666be
Author: mjs <mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Mar 31 03:36:23 2003 +0000

            Reviewed by Darin.
    
    	- fixed 3204257 - CNN's 'war on iraq' ticker stops on mouseover
    
            * WebView.subproj/WebHTMLViewPrivate.h:
            * WebView.subproj/WebHTMLViewPrivate.m:
            (-[WebHTMLView _updateMouseoverWithEvent:]): When leaving an HTML
    	view, tell it that the mouse moved outside everything in the view,
    	even accounting for scrolled off portions (otherwise khtml gets
    	confused). This makes cross-frame mouse enter/leave work properly.
            (-[WebHTMLView _clearLastHitViewIfSelf]): Method to clear last hit view,
    	so we don't need to retain it.
            * WebView.subproj/WebHTMLView.m:
            (-[WebHTMLView dealloc]): Call _clearLastHitViewIfSelf.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3966 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 2f755a6..c5ecbfa 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,20 @@
+2003-03-30  Maciej Stachowiak  <mjs at apple.com>
+
+        Reviewed by Darin.
+
+	- fixed 3204257 - CNN's 'war on iraq' ticker stops on mouseover
+
+        * WebView.subproj/WebHTMLViewPrivate.h:
+        * WebView.subproj/WebHTMLViewPrivate.m:
+        (-[WebHTMLView _updateMouseoverWithEvent:]): When leaving an HTML
+	view, tell it that the mouse moved outside everything in the view,
+	even accounting for scrolled off portions (otherwise khtml gets
+	confused). This makes cross-frame mouse enter/leave work properly.
+        (-[WebHTMLView _clearLastHitViewIfSelf]): Method to clear last hit view,
+	so we don't need to retain it.
+        * WebView.subproj/WebHTMLView.m:
+        (-[WebHTMLView dealloc]): Call _clearLastHitViewIfSelf.
+
 2003-03-28  Richard Williamson  <rjw at apple.com>
 
         Fix typo in comments that broke headerdoc.
diff --git a/WebKit/WebView.subproj/WebHTMLView.m b/WebKit/WebView.subproj/WebHTMLView.m
index 6167b12..269beee 100644
--- a/WebKit/WebView.subproj/WebHTMLView.m
+++ b/WebKit/WebView.subproj/WebHTMLView.m
@@ -54,6 +54,7 @@
 
 - (void)dealloc
 {
+    [self _clearLastHitViewIfSelf];
     [self _reset];
     [[NSNotificationCenter defaultCenter] removeObserver:self];
     [_private release];
diff --git a/WebKit/WebView.subproj/WebHTMLViewPrivate.h b/WebKit/WebView.subproj/WebHTMLViewPrivate.h
index 5a541d1..1f680c5 100644
--- a/WebKit/WebView.subproj/WebHTMLViewPrivate.h
+++ b/WebKit/WebView.subproj/WebHTMLViewPrivate.h
@@ -55,6 +55,7 @@
 - (void)_restoreSubviews;
 
 - (BOOL)_insideAnotherHTMLView;
+- (void)_clearLastHitViewIfSelf;
 - (void)_updateMouseoverWithEvent:(NSEvent *)event;
 - (BOOL)_interceptKeyEvent:(NSEvent *)event toView:(NSView *)view;
 
diff --git a/WebKit/WebView.subproj/WebHTMLViewPrivate.m b/WebKit/WebView.subproj/WebHTMLViewPrivate.m
index f00759b..d6b374f 100644
--- a/WebKit/WebView.subproj/WebHTMLViewPrivate.m
+++ b/WebKit/WebView.subproj/WebHTMLViewPrivate.m
@@ -321,6 +321,15 @@ static BOOL forceRealHitTest = NO;
     return nil;
 }
 
+static WebHTMLView *lastHitView = nil;
+
+- (void)_clearLastHitViewIfSelf
+{
+    if (lastHitView == self) {
+	lastHitView = nil;
+    }
+}
+
 - (void)_updateMouseoverWithEvent:(NSEvent *)event
 {
     WebHTMLView *view = nil;
@@ -336,6 +345,26 @@ static BOOL forceRealHitTest = NO;
             hitView = [hitView superview];
         }
     }
+
+    if (lastHitView != view && lastHitView != nil) {
+	// If we are moving out of a view (or frame), let's pretend the mouse moved
+	// all the way out of that view. But we have to account for scrolling, because
+	// khtml doesn't understand our clipping.
+	NSRect visibleRect = [[[[lastHitView _frame] frameView] scrollView] documentVisibleRect];
+	float yScroll = visibleRect.origin.y;
+	float xScroll = visibleRect.origin.x;
+
+	event = [NSEvent mouseEventWithType:NSMouseMoved
+			 location:NSMakePoint(-1 - xScroll, -1 - yScroll )
+			 modifierFlags:[[NSApp currentEvent] modifierFlags]
+			 timestamp:[NSDate timeIntervalSinceReferenceDate]
+			 windowNumber:[[self window] windowNumber]
+			 context:[[NSApp currentEvent] context]
+			 eventNumber:0 clickCount:0 pressure:0];
+	[[lastHitView _bridge] mouseMoved:event];
+    }
+
+    lastHitView = view;
     
     if (view == nil) {
         [[self _controller] _mouseDidMoveOverElement:nil modifierFlags:0];

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list