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

darin darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:58:40 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 0770f3e69ebc90b6e04ee2ee579531fc842b236d
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Nov 11 08:31:55 2002 +0000

    WebCore:
    
            * kwq/WebCoreBridge.h: Remove unused modifierTrackingEnabled method.
    
    WebKit:
    
    	- made some improvements to cursor setting for greater speed and correctness
    
            * WebView.subproj/WebDynamicScrollBarsView.m:
            (-[WebDynamicScrollBarsView setCursor:]): Just use setDocumentCursor: instead of
    	our own logic. This allows us to remove code and may fix some bugs or anomalies as well.
            (-[WebDynamicScrollBarsView dealloc]): Release the cursor. I think we were leaking before.
    
            * WebView.subproj/WebHTMLView.m:
            (-[WebHTMLView viewWillMoveToSuperview:]): Use _frameOrBoundsChanged: method now, which
    	has been moved into the private file.
            (-[WebHTMLView dragImage:at:offset:event:pasteboard:source:slideBack:]): Don't bother finding
    	topmost WebHTMLView to call _updateMouseoverWithEvent: on; now it works fine no matter
    	which level it's called at.
    
            * WebView.subproj/WebHTMLViewPrivate.m:
            (-[WebHTMLView _frameOrBoundsChanged:]): Moved the code here that was formerly in the
    	_setNeedsLayoutIfSizeChanged method, also added code that does _updateMouseoverWithEvent:
    	so that we get properly updated cursor when we scroll.
            (-[WebHTMLView _updateMouseoverWithEvent:]): Remove unneeded assert. This method works
    	equally well no matter which WebHTMLView calls it; everything is done at the window and
    	controller level.
    
            * WebView.subproj/WebControllerPrivate.h: Added lastElementWasNotNil field and
    	_mouseDidMoveOverElement:modifierFlags: method.
            * WebView.subproj/WebControllerPrivate.m:
            (-[WebController _mouseDidMoveOverElement:modifierFlags:]): Call through to the delegate,
    	but don't do multiple calls if they are all nil.
    
            * WebCoreSupport.subproj/WebBridge.m: Remove unused modifierTrackingEnabled method.
            * WebView.subproj/WebHTMLViewPrivate.h: Remove unused _setModifierTrackingEnabled and
    	_modifierTrackingEnabled methods.
    
    WebBrowser:
    
            * AppController.m: (-[AppController awakeFromNib]): Remove unneeded call to set
    	unused modifierTrackingEnabled flag. The code that used to care about this flag
            is now in WebBrowser and there's no need to inform WebCore and WebKit about whether
            we are passing in flags-changed events.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2619 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index ed81bf7..c55ad9a 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,7 @@
+2002-11-11  Darin Adler  <darin at apple.com>
+
+        * kwq/WebCoreBridge.h: Remove unused modifierTrackingEnabled method.
+
 2002-11-08  Maciej Stachowiak  <mjs at apple.com>
 
 	- fixed 3096451 - REGRESSION: clicking on link to open window only
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index ed81bf7..c55ad9a 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,7 @@
+2002-11-11  Darin Adler  <darin at apple.com>
+
+        * kwq/WebCoreBridge.h: Remove unused modifierTrackingEnabled method.
+
 2002-11-08  Maciej Stachowiak  <mjs at apple.com>
 
 	- fixed 3096451 - REGRESSION: clicking on link to open window only
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index ed81bf7..c55ad9a 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,7 @@
+2002-11-11  Darin Adler  <darin at apple.com>
+
+        * kwq/WebCoreBridge.h: Remove unused modifierTrackingEnabled method.
+
 2002-11-08  Maciej Stachowiak  <mjs at apple.com>
 
 	- fixed 3096451 - REGRESSION: clicking on link to open window only
diff --git a/WebCore/kwq/WebCoreBridge.h b/WebCore/kwq/WebCoreBridge.h
index 1bf6ee1..886736a 100644
--- a/WebCore/kwq/WebCoreBridge.h
+++ b/WebCore/kwq/WebCoreBridge.h
@@ -215,8 +215,6 @@ enum FrameBorderStyle {
 
 - (void)unfocusWindow;
 
-- (BOOL)modifierTrackingEnabled;
-
 - (NSView *)nextKeyViewOutsideWebViews;
 - (NSView *)previousKeyViewOutsideWebViews;
 
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 413cc77..eb50f00 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,37 @@
+2002-11-11  Darin Adler  <darin at apple.com>
+
+	- made some improvements to cursor setting for greater speed and correctness
+
+        * WebView.subproj/WebDynamicScrollBarsView.m:
+        (-[WebDynamicScrollBarsView setCursor:]): Just use setDocumentCursor: instead of
+	our own logic. This allows us to remove code and may fix some bugs or anomalies as well.
+        (-[WebDynamicScrollBarsView dealloc]): Release the cursor. I think we were leaking before.
+
+        * WebView.subproj/WebHTMLView.m:
+        (-[WebHTMLView viewWillMoveToSuperview:]): Use _frameOrBoundsChanged: method now, which
+	has been moved into the private file.
+        (-[WebHTMLView dragImage:at:offset:event:pasteboard:source:slideBack:]): Don't bother finding
+	topmost WebHTMLView to call _updateMouseoverWithEvent: on; now it works fine no matter
+	which level it's called at.
+
+        * WebView.subproj/WebHTMLViewPrivate.m:
+        (-[WebHTMLView _frameOrBoundsChanged:]): Moved the code here that was formerly in the
+	_setNeedsLayoutIfSizeChanged method, also added code that does _updateMouseoverWithEvent:
+	so that we get properly updated cursor when we scroll.
+        (-[WebHTMLView _updateMouseoverWithEvent:]): Remove unneeded assert. This method works
+	equally well no matter which WebHTMLView calls it; everything is done at the window and
+	controller level.
+
+        * WebView.subproj/WebControllerPrivate.h: Added lastElementWasNotNil field and
+	_mouseDidMoveOverElement:modifierFlags: method.
+        * WebView.subproj/WebControllerPrivate.m:
+        (-[WebController _mouseDidMoveOverElement:modifierFlags:]): Call through to the delegate,
+	but don't do multiple calls if they are all nil.
+
+        * WebCoreSupport.subproj/WebBridge.m: Remove unused modifierTrackingEnabled method.
+        * WebView.subproj/WebHTMLViewPrivate.h: Remove unused _setModifierTrackingEnabled and
+	_modifierTrackingEnabled methods.
+
 2002-11-10  Darin Adler  <darin at apple.com>
 
         * English.lproj/StringsNotToBeLocalized.txt: Updated for recent changes.
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 413cc77..eb50f00 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,37 @@
+2002-11-11  Darin Adler  <darin at apple.com>
+
+	- made some improvements to cursor setting for greater speed and correctness
+
+        * WebView.subproj/WebDynamicScrollBarsView.m:
+        (-[WebDynamicScrollBarsView setCursor:]): Just use setDocumentCursor: instead of
+	our own logic. This allows us to remove code and may fix some bugs or anomalies as well.
+        (-[WebDynamicScrollBarsView dealloc]): Release the cursor. I think we were leaking before.
+
+        * WebView.subproj/WebHTMLView.m:
+        (-[WebHTMLView viewWillMoveToSuperview:]): Use _frameOrBoundsChanged: method now, which
+	has been moved into the private file.
+        (-[WebHTMLView dragImage:at:offset:event:pasteboard:source:slideBack:]): Don't bother finding
+	topmost WebHTMLView to call _updateMouseoverWithEvent: on; now it works fine no matter
+	which level it's called at.
+
+        * WebView.subproj/WebHTMLViewPrivate.m:
+        (-[WebHTMLView _frameOrBoundsChanged:]): Moved the code here that was formerly in the
+	_setNeedsLayoutIfSizeChanged method, also added code that does _updateMouseoverWithEvent:
+	so that we get properly updated cursor when we scroll.
+        (-[WebHTMLView _updateMouseoverWithEvent:]): Remove unneeded assert. This method works
+	equally well no matter which WebHTMLView calls it; everything is done at the window and
+	controller level.
+
+        * WebView.subproj/WebControllerPrivate.h: Added lastElementWasNotNil field and
+	_mouseDidMoveOverElement:modifierFlags: method.
+        * WebView.subproj/WebControllerPrivate.m:
+        (-[WebController _mouseDidMoveOverElement:modifierFlags:]): Call through to the delegate,
+	but don't do multiple calls if they are all nil.
+
+        * WebCoreSupport.subproj/WebBridge.m: Remove unused modifierTrackingEnabled method.
+        * WebView.subproj/WebHTMLViewPrivate.h: Remove unused _setModifierTrackingEnabled and
+	_modifierTrackingEnabled methods.
+
 2002-11-10  Darin Adler  <darin at apple.com>
 
         * English.lproj/StringsNotToBeLocalized.txt: Updated for recent changes.
diff --git a/WebKit/WebCoreSupport.subproj/WebBridge.m b/WebKit/WebCoreSupport.subproj/WebBridge.m
index ca937d4..59363c0 100644
--- a/WebKit/WebCoreSupport.subproj/WebBridge.m
+++ b/WebKit/WebCoreSupport.subproj/WebBridge.m
@@ -266,11 +266,6 @@
     }
 }
 
-- (BOOL)modifierTrackingEnabled
-{
-    return [WebHTMLView _modifierTrackingEnabled];
-}
-
 - (void)setIconURL:(NSURL *)URL
 {
     [[self dataSource] _setIconURL:URL];
diff --git a/WebKit/WebView.subproj/WebControllerPrivate.h b/WebKit/WebView.subproj/WebControllerPrivate.h
index e4227c7..35f3fa4 100644
--- a/WebKit/WebView.subproj/WebControllerPrivate.h
+++ b/WebKit/WebView.subproj/WebControllerPrivate.h
@@ -36,6 +36,8 @@
 
     NSString *controllerSetName;
     NSString *topLevelFrameName;
+    
+    BOOL lastElementWasNonNil;
 }
 @end
 
@@ -61,4 +63,7 @@
 - (WebController *)_openNewWindowWithRequest:(WebResourceRequest *)request behind:(BOOL)behind;
 
 - (NSMenu *)_menuForElement:(NSDictionary *)element;
+
+- (void)_mouseDidMoveOverElement:(NSDictionary *)dictionary modifierFlags:(unsigned)modifierFlags;
+
 @end
diff --git a/WebKit/WebView.subproj/WebControllerPrivate.m b/WebKit/WebView.subproj/WebControllerPrivate.m
index e3fa515..d511b8e 100644
--- a/WebKit/WebView.subproj/WebControllerPrivate.m
+++ b/WebKit/WebView.subproj/WebControllerPrivate.m
@@ -289,4 +289,16 @@
     return menu;
 }
 
+- (void)_mouseDidMoveOverElement:(NSDictionary *)dictionary modifierFlags:(unsigned)modifierFlags
+{
+    // When the mouse isn't over this view at all, we'll get called with a dictionary of nil over
+    // and over again. So it's a good idea to catch that here and not send multiple calls to the delegate
+    // for that case.
+    
+    if (dictionary && _private->lastElementWasNonNil) {
+        [[self windowOperationsDelegate] mouseDidMoveOverElement:dictionary modifierFlags:modifierFlags];
+    }
+    _private->lastElementWasNonNil = dictionary != nil;
+}
+
 @end
diff --git a/WebKit/WebView.subproj/WebDynamicScrollBarsView.m b/WebKit/WebView.subproj/WebDynamicScrollBarsView.m
index ae79e38..100683f 100644
--- a/WebKit/WebView.subproj/WebDynamicScrollBarsView.m
+++ b/WebKit/WebView.subproj/WebDynamicScrollBarsView.m
@@ -77,8 +77,6 @@
 
 - (void)setCursor:(NSCursor *)cur
 {
-    // Do nothing for cases where the cursor isn't changing.
-    // Also turn arrowCursor into nil.
     if (!cur) {
         if (!cursor) {
             return;
@@ -94,25 +92,7 @@
     [cursor release];
     cursor = [cur retain];
 
-    // We have to make both of these calls, because:
-    // - Just setting a cursor rect will have no effect, if the mouse cursor is already
-    //   inside the area of the rect.
-    // - Just calling invalidateCursorRectsForView will not call resetCursorRects if
-    //   there is no cursor rect set currently and the view has no subviews.
-    // Therefore we have to call resetCursorRects to ensure that a cursor rect is set
-    // at all, if we are going to want one, and then invalidateCursorRectsForView: to
-    // call resetCursorRects from the proper context that will actually result in
-    // updating the cursor.
-    [self resetCursorRects];
-    [[self window] invalidateCursorRectsForView:self];
-}
-
-- (void)resetCursorRects
-{
-    [self discardCursorRects];
-    if (cursor) {
-        [self addCursorRect:[self visibleRect] cursor:cursor];
-    }
+    [self setDocumentCursor:cursor];
 }
 
 - (void)setAllowsScrolling:(BOOL)flag
@@ -126,4 +106,10 @@
     return !disallowsScrolling;
 }
 
+- (void)dealloc
+{
+    [cursor release];
+    [super dealloc];
+}
+
 @end
diff --git a/WebKit/WebView.subproj/WebHTMLView.m b/WebKit/WebView.subproj/WebHTMLView.m
index 8d72fae..a52be41 100644
--- a/WebKit/WebView.subproj/WebHTMLView.m
+++ b/WebKit/WebView.subproj/WebHTMLView.m
@@ -158,19 +158,11 @@
 
 - (void)removeMouseMovedObserver
 {
-    [self _mouseOverElement:nil modifierFlags:0];
+    [[self _controller] _mouseDidMoveOverElement:nil modifierFlags:0];
     [[NSNotificationCenter defaultCenter] removeObserver:self
         name:NSMouseMovedNotification object:nil];
 }
 
-- (void)_setNeedsLayoutIfSizeChanged:(NSNotification *)notification
-{
-    if (!NSEqualSizes(_private->lastLayoutSize, [(NSClipView *)[self superview] documentVisibleRect].size)) {
-        [self setNeedsLayout:YES];
-        [self setNeedsDisplay:YES];
-    }
-}
-
 - (void)viewWillMoveToSuperview:(NSView *)newSuperview
 {
     // We watch the bounds of our superview, so that we can do a layout when the size
@@ -190,9 +182,9 @@
     }
 
     if (newSuperview) {
-        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_setNeedsLayoutIfSizeChanged:) 
+        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_frameOrBoundsChanged:) 
             name:NSViewFrameDidChangeNotification object:newSuperview];
-        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_setNeedsLayoutIfSizeChanged:) 
+        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_frameOrBoundsChanged:) 
             name:NSViewBoundsDidChangeNotification object:newSuperview];
     }
 }
@@ -583,7 +575,7 @@
            source:(id)sourceObject
         slideBack:(BOOL)slideBack
 {
-    if(_private->draggingImageElement){
+    if (_private->draggingImageElement) {
         // Subclassing dragImage for image drags let's us change aspects of the drag that the
         // promised file API doesn't provide such as a different drag image, other pboard types etc.
 
@@ -606,15 +598,8 @@
            slideBack:slideBack];
     
     // During a drag, we don't get any mouseMoved or flagsChanged events.
-    // So after the drag we need to explicity update the mouseover state.
-    WebHTMLView *viewForMouseover = self;
-    NSView *view = self;
-    while ((view = [view superview])) {
-        if ([view isKindOfClass:[WebHTMLView class]]) {
-            viewForMouseover = (WebHTMLView *)view;
-        }
-    }
-    [viewForMouseover _updateMouseoverWithEvent:[NSApp currentEvent]];
+    // So after the drag we need to explicitly update the mouseover state.
+    [self _updateMouseoverWithEvent:[NSApp currentEvent]];
 }
 
 - (void)mouseDragged:(NSEvent *)event
diff --git a/WebKit/WebView.subproj/WebHTMLViewPrivate.h b/WebKit/WebView.subproj/WebHTMLViewPrivate.h
index 08f4ed2..2d0a58c 100644
--- a/WebKit/WebView.subproj/WebHTMLViewPrivate.h
+++ b/WebKit/WebView.subproj/WebHTMLViewPrivate.h
@@ -30,8 +30,6 @@
 
     NSDictionary *draggingImageElement;
     
-    BOOL lastMouseOverElementWasNotNil;
-    
     NSSize lastLayoutSize;
 }
 @end
@@ -45,11 +43,9 @@
 - (void)_adjustFrames;
 
 // Modifier (flagsChanged) tracking SPI
-+ (void)_setModifierTrackingEnabled:(BOOL)enabled;
-+ (BOOL)_modifierTrackingEnabled;
 + (void)_postFlagsChangedEvent:(NSEvent *)flagsChangedEvent;
+
 - (NSDictionary *)_elementAtPoint:(NSPoint)point;
-- (void)_mouseOverElement:(NSDictionary *)elementInformation modifierFlags:(unsigned)modifierFlags;
 
 - (void)_setAsideSubviews;
 - (void)_restoreSubviews;
diff --git a/WebKit/WebView.subproj/WebHTMLViewPrivate.m b/WebKit/WebView.subproj/WebHTMLViewPrivate.m
index 38c6a84..2e5b8f1 100644
--- a/WebKit/WebView.subproj/WebHTMLViewPrivate.m
+++ b/WebKit/WebView.subproj/WebHTMLViewPrivate.m
@@ -109,24 +109,38 @@
     return [[self _frame] _bridge];
 }
 
-BOOL _modifierTrackingEnabled = FALSE;
-
-+ (void)_setModifierTrackingEnabled:(BOOL)enabled
-{
-    _modifierTrackingEnabled = enabled;
-}
-
-+ (BOOL)_modifierTrackingEnabled
++ (void)_postFlagsChangedEvent:(NSEvent *)flagsChangedEvent
 {
-    return _modifierTrackingEnabled;
+    NSEvent *fakeEvent = [NSEvent mouseEventWithType:NSMouseMoved
+        location:[[flagsChangedEvent window] convertScreenToBase:[NSEvent mouseLocation]]
+        modifierFlags:[flagsChangedEvent modifierFlags]
+        timestamp:[flagsChangedEvent timestamp]
+        windowNumber:[flagsChangedEvent windowNumber]
+        context:[flagsChangedEvent context]
+        eventNumber:0 clickCount:0 pressure:0];
+
+    // Pretend it's a mouse move.
+    [[NSNotificationCenter defaultCenter]
+        postNotificationName:NSMouseMovedNotification object:self
+        userInfo:[NSDictionary dictionaryWithObject:fakeEvent forKey:@"NSEvent"]];
 }
 
-+ (void)_postFlagsChangedEvent:(NSEvent *)flagsChangedEvent
+- (void)_frameOrBoundsChanged:(NSNotification *)notification
 {
-    NSEvent *fakeEvent = [NSEvent mouseEventWithType:NSMouseMoved location:[[flagsChangedEvent window] convertScreenToBase:[NSEvent mouseLocation]] modifierFlags:[flagsChangedEvent modifierFlags] timestamp:[flagsChangedEvent timestamp] windowNumber:[flagsChangedEvent windowNumber] context:[flagsChangedEvent context] eventNumber:0 clickCount:0 pressure:0];
-
-    // pretend it's a mouse move
-    [[NSNotificationCenter defaultCenter] postNotificationName:NSMouseMovedNotification object:self userInfo:[NSDictionary dictionaryWithObject:fakeEvent forKey:@"NSEvent"]];
+    if (!NSEqualSizes(_private->lastLayoutSize, [(NSClipView *)[self superview] documentVisibleRect].size)) {
+        [self setNeedsLayout:YES];
+        [self setNeedsDisplay:YES];
+    }
+    
+    NSEvent *fakeEvent = [NSEvent mouseEventWithType:NSMouseMoved
+        location:[[self window] convertScreenToBase:[NSEvent mouseLocation]]
+        modifierFlags:[[NSApp currentEvent] modifierFlags]
+        timestamp:[NSDate timeIntervalSinceReferenceDate]
+        windowNumber:[[self window] windowNumber]
+        context:[[NSApp currentEvent] context]
+        eventNumber:0 clickCount:0 pressure:0];
+    
+    [self _updateMouseoverWithEvent:fakeEvent];
 }
 
 - (NSDictionary *)_elementAtPoint:(NSPoint)point
@@ -203,15 +217,6 @@ BOOL _modifierTrackingEnabled = FALSE;
     }
 }
 
-- (void)_mouseOverElement:(NSDictionary *)elementInformation modifierFlags:(unsigned)modifierFlags;
-{
-    if (elementInformation != nil || _private->lastMouseOverElementWasNotNil) {
-        [[[self _controller] windowOperationsDelegate]
-            mouseDidMoveOverElement:elementInformation modifierFlags:modifierFlags];
-    }
-    _private->lastMouseOverElementWasNotNil = elementInformation != nil;
-}
-
 - (BOOL)_insideAnotherHTMLView
 {
     NSView *view = self;
@@ -248,8 +253,6 @@ BOOL _modifierTrackingEnabled = FALSE;
 
 - (void)_updateMouseoverWithEvent:(NSEvent *)event
 {
-    ASSERT(![self _insideAnotherHTMLView]);
-
     WebHTMLView *view = nil;
     if ([event window] == [self window]) {
         NSView *hitView = [[[self window] contentView] hitTest:[event locationInWindow]];
@@ -263,11 +266,11 @@ BOOL _modifierTrackingEnabled = FALSE;
     }
     
     if (view == nil) {
-        [self _mouseOverElement:nil modifierFlags:0];
+        [[self _controller] _mouseDidMoveOverElement:nil modifierFlags:0];
     } else {
         [[view _bridge] mouseMoved:event];
         NSPoint point = [view convertPoint:[event locationInWindow] fromView:nil];
-        [self _mouseOverElement:[view _elementAtPoint:point] modifierFlags:[event modifierFlags]];
+        [[self _controller] _mouseDidMoveOverElement:[view _elementAtPoint:point] modifierFlags:[event modifierFlags]];
     }
 }
 
diff --git a/WebKit/WebView.subproj/WebViewPrivate.h b/WebKit/WebView.subproj/WebViewPrivate.h
index e4227c7..35f3fa4 100644
--- a/WebKit/WebView.subproj/WebViewPrivate.h
+++ b/WebKit/WebView.subproj/WebViewPrivate.h
@@ -36,6 +36,8 @@
 
     NSString *controllerSetName;
     NSString *topLevelFrameName;
+    
+    BOOL lastElementWasNonNil;
 }
 @end
 
@@ -61,4 +63,7 @@
 - (WebController *)_openNewWindowWithRequest:(WebResourceRequest *)request behind:(BOOL)behind;
 
 - (NSMenu *)_menuForElement:(NSDictionary *)element;
+
+- (void)_mouseDidMoveOverElement:(NSDictionary *)dictionary modifierFlags:(unsigned)modifierFlags;
+
 @end
diff --git a/WebKit/WebView.subproj/WebViewPrivate.m b/WebKit/WebView.subproj/WebViewPrivate.m
index e3fa515..d511b8e 100644
--- a/WebKit/WebView.subproj/WebViewPrivate.m
+++ b/WebKit/WebView.subproj/WebViewPrivate.m
@@ -289,4 +289,16 @@
     return menu;
 }
 
+- (void)_mouseDidMoveOverElement:(NSDictionary *)dictionary modifierFlags:(unsigned)modifierFlags
+{
+    // When the mouse isn't over this view at all, we'll get called with a dictionary of nil over
+    // and over again. So it's a good idea to catch that here and not send multiple calls to the delegate
+    // for that case.
+    
+    if (dictionary && _private->lastElementWasNonNil) {
+        [[self windowOperationsDelegate] mouseDidMoveOverElement:dictionary modifierFlags:modifierFlags];
+    }
+    _private->lastElementWasNonNil = dictionary != nil;
+}
+
 @end

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list