[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:15:01 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 0c8b5c2b69cdc0ebb7b8960fe774bf0db65b5b6f
Author: mjs <mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon May 27 05:01:51 2002 +0000

    WebCore:
    	Webcore part of fix for:
    
    	Radar 2884085 - add support for changing cursor over links
    
    	* Makefile.am: Install tiff of link cursor.
    	* kwq/qt/qcursor.h, kwq/KWQCursor.mm:
    	(QCursor::QCursor): Change QCursor to contain an NSCursor.
    	(QCursor::~QCursor): Likewise.
    	(QCursor::operator=): Likewise.
    	(QCursor::handle): Likewise.
    	* kwq/KWQKCursor.mm:
    	(+[NSCursor _WebCore_linkCursor]): NSCursor extension method that
    	provides the link cursor.
    	(KCursor::handCursor): Use the link cursor instead of the default
    	arrow cursor.
    	* kwq/KWQKHTMLSettings.mm:
    	(KHTMLSettings::changeCursor): Return TRUE; we always want cursor
    	tracking.
    	* kwq/KWQView.h, kwq/KWQView.mm:
    	(-[KWQHTMLView setCursor:]): Remember the new cursor and
    	invalidate cursor rects.
    	(-[KWQHTMLView resetCursorRects]): Establish cursor rect for
    	currently set cursor, if not default.
    	* kwq/KWQWidget.mm:
    	(QWidget::setCursor): Call setCursor: on the underlying
    	NSView, if implemented.
    	(QWidget::cursor): Implemented.
    	(QWidget::unsetCursor): Implemented.
    
    WebKit:
    	WebKit part of fix for:
    
    	Radar 2884085 - add support for changing cursor over links
    
    	Also, fix handling of mouseMoved events.
    
    	* WebView.subproj/IFWebView.mm:
    	(-[IFWebView mouseMovedNotification:]): Clip mouseMoved events to
    	the view rect, otherwise mouseover effects might happen for
    	elements past the edge of the window.
    	(-[IFWebView setCursor:]): Implement.
    	(-[IFWebView resetCursorRects]): Implement.
    	* WebView.subproj/IFWebViewPrivate.h:
    	* WebView.subproj/IFWebViewPrivate.mm:
    	(-[IFWebViewPrivate dealloc]): Added NSCursor *cursor field.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1218 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index f52b298..4a3ee6c 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,34 @@
+2002-05-26  Maciej Stachowiak  <mjs at apple.com>
+
+	Webcore part of fix for:
+
+	Radar 2884085 - add support for changing cursor over links
+
+	* Makefile.am: Install tiff of link cursor.
+	* kwq/qt/qcursor.h, kwq/KWQCursor.mm:
+	(QCursor::QCursor): Change QCursor to contain an NSCursor.
+	(QCursor::~QCursor): Likewise.
+	(QCursor::operator=): Likewise.
+	(QCursor::handle): Likewise.
+	* kwq/KWQKCursor.mm:
+	(+[NSCursor _WebCore_linkCursor]): NSCursor extension method that
+	provides the link cursor.	
+	(KCursor::handCursor): Use the link cursor instead of the default
+	arrow cursor.
+	* kwq/KWQKHTMLSettings.mm:
+	(KHTMLSettings::changeCursor): Return TRUE; we always want cursor
+	tracking.
+	* kwq/KWQView.h, kwq/KWQView.mm:
+	(-[KWQHTMLView setCursor:]): Remember the new cursor and
+	invalidate cursor rects.
+	(-[KWQHTMLView resetCursorRects]): Establish cursor rect for
+	currently set cursor, if not default.
+	* kwq/KWQWidget.mm:
+	(QWidget::setCursor): Call setCursor: on the underlying
+	NSView, if implemented.
+	(QWidget::cursor): Implemented.
+	(QWidget::unsetCursor): Implemented.
+
 2002-05-25  Maciej Stachowiak  <mjs at apple.com>
 
 	Changed WebCore to build as a framework, not a dylib, so resources
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index f52b298..4a3ee6c 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,34 @@
+2002-05-26  Maciej Stachowiak  <mjs at apple.com>
+
+	Webcore part of fix for:
+
+	Radar 2884085 - add support for changing cursor over links
+
+	* Makefile.am: Install tiff of link cursor.
+	* kwq/qt/qcursor.h, kwq/KWQCursor.mm:
+	(QCursor::QCursor): Change QCursor to contain an NSCursor.
+	(QCursor::~QCursor): Likewise.
+	(QCursor::operator=): Likewise.
+	(QCursor::handle): Likewise.
+	* kwq/KWQKCursor.mm:
+	(+[NSCursor _WebCore_linkCursor]): NSCursor extension method that
+	provides the link cursor.	
+	(KCursor::handCursor): Use the link cursor instead of the default
+	arrow cursor.
+	* kwq/KWQKHTMLSettings.mm:
+	(KHTMLSettings::changeCursor): Return TRUE; we always want cursor
+	tracking.
+	* kwq/KWQView.h, kwq/KWQView.mm:
+	(-[KWQHTMLView setCursor:]): Remember the new cursor and
+	invalidate cursor rects.
+	(-[KWQHTMLView resetCursorRects]): Establish cursor rect for
+	currently set cursor, if not default.
+	* kwq/KWQWidget.mm:
+	(QWidget::setCursor): Call setCursor: on the underlying
+	NSView, if implemented.
+	(QWidget::cursor): Implemented.
+	(QWidget::unsetCursor): Implemented.
+
 2002-05-25  Maciej Stachowiak  <mjs at apple.com>
 
 	Changed WebCore to build as a framework, not a dylib, so resources
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index f52b298..4a3ee6c 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,34 @@
+2002-05-26  Maciej Stachowiak  <mjs at apple.com>
+
+	Webcore part of fix for:
+
+	Radar 2884085 - add support for changing cursor over links
+
+	* Makefile.am: Install tiff of link cursor.
+	* kwq/qt/qcursor.h, kwq/KWQCursor.mm:
+	(QCursor::QCursor): Change QCursor to contain an NSCursor.
+	(QCursor::~QCursor): Likewise.
+	(QCursor::operator=): Likewise.
+	(QCursor::handle): Likewise.
+	* kwq/KWQKCursor.mm:
+	(+[NSCursor _WebCore_linkCursor]): NSCursor extension method that
+	provides the link cursor.	
+	(KCursor::handCursor): Use the link cursor instead of the default
+	arrow cursor.
+	* kwq/KWQKHTMLSettings.mm:
+	(KHTMLSettings::changeCursor): Return TRUE; we always want cursor
+	tracking.
+	* kwq/KWQView.h, kwq/KWQView.mm:
+	(-[KWQHTMLView setCursor:]): Remember the new cursor and
+	invalidate cursor rects.
+	(-[KWQHTMLView resetCursorRects]): Establish cursor rect for
+	currently set cursor, if not default.
+	* kwq/KWQWidget.mm:
+	(QWidget::setCursor): Call setCursor: on the underlying
+	NSView, if implemented.
+	(QWidget::cursor): Implemented.
+	(QWidget::unsetCursor): Implemented.
+
 2002-05-25  Maciej Stachowiak  <mjs at apple.com>
 
 	Changed WebCore to build as a framework, not a dylib, so resources
diff --git a/WebCore/Makefile.am b/WebCore/Makefile.am
index b0000ca..d0cc824 100644
--- a/WebCore/Makefile.am
+++ b/WebCore/Makefile.am
@@ -42,7 +42,7 @@ noinst_DATA = framework-stamp framework-resource-stamp framework-dylib-stamp fra
 
 FRAMEWORK_NAME = WebCore
 FRAMEWORK_VERSION = A
-FRAMEWORK_RESOURCES = Resources/Info.plist
+FRAMEWORK_RESOURCES = Resources/Info.plist Resources/linkCursor.tiff
 FRAMEWORK_LOCALIZED_RESOURCES = English.lproj/InfoPlist.strings
 
 
@@ -59,6 +59,7 @@ framework-stamp: framework-dylib-stamp framework-resource-stamp framework-header
 framework-resource-stamp: $(FRAMEWORK_RESOURCES) $(FRAMEWORK_LOCALIZED_RESOURCES)
 	rm -rf $(FRAMEWORK_RESOURCE_DIR)
 	mkdir -p $(FRAMEWORK_RESOURCE_DIR)
+	rm -rf $(FRAMEWORK_DIR)/Resources
 	ln -sf Versions/Current/Resources $(FRAMEWORK_DIR)/Resources
 	@list='$(FRAMEWORK_RESOURCES)'; for p in $$list; do \
 		echo " $(INSTALL_DATA) $$p $(FRAMEWORK_RESOURCE_DIR)/$$p"; \
diff --git a/WebCore/kwq/KWQCursor.h b/WebCore/kwq/KWQCursor.h
index 8b546af..69c8d3f 100644
--- a/WebCore/kwq/KWQCursor.h
+++ b/WebCore/kwq/KWQCursor.h
@@ -33,6 +33,10 @@
 #include <qpixmap.h>
 #include <qpoint.h>
 
+#ifdef __OBJC__
+#import <AppKit/AppKit.h>
+#endif
+
 // class QCursor ===============================================================
 
 class QCursor {
@@ -50,6 +54,9 @@ public:
      QCursor();
      QCursor(const QPixmap &pixmap, int hotX=1, int hotY=1);
      QCursor(const QCursor &);
+#ifdef __OBJC__
+     QCursor(NSCursor *);
+#endif
      ~QCursor();
       
     // member functions --------------------------------------------------------
@@ -62,7 +69,10 @@ public:
 
 // protected -------------------------------------------------------------------
 // private ---------------------------------------------------------------------
-
+ private:
+#ifdef __OBJC__
+    NSCursor *cursor;
+#endif
 }; // class QCursor ============================================================
 
 #endif
diff --git a/WebCore/kwq/KWQCursor.mm b/WebCore/kwq/KWQCursor.mm
index 36727f8..c12df20 100644
--- a/WebCore/kwq/KWQCursor.mm
+++ b/WebCore/kwq/KWQCursor.mm
@@ -33,23 +33,30 @@ const QCursor Qt::sizeHorCursor;
 const QCursor Qt::sizeVerCursor;
 
 QCursor::QCursor()
+    : cursor([[NSCursor arrowCursor] retain])
+{
+}
+
+QCursor::QCursor(NSCursor *cur)
+    : cursor([cur retain])
 {
-    //_logNotYetImplemented();
 }
 
 QCursor::QCursor(const QPixmap &pixmap, int hotX, int hotY)
+    : cursor(nil)
 {
     _logNotYetImplemented();
 }
 
-QCursor::QCursor(const QCursor &)
+QCursor::QCursor(const QCursor &other)
+    : cursor([other.cursor retain])
 {
-    _logNotYetImplemented();
+    
 }
 
 QCursor::~QCursor()
 {
-    //_logNotYetImplemented();
+    [cursor release];
 }
       
 QPoint QCursor::pos()
@@ -58,14 +65,16 @@ QPoint QCursor::pos()
     return QPoint();
 }
 
-QCursor &QCursor::operator=(const QCursor &)
+QCursor &QCursor::operator=(const QCursor &other)
 {
-    _logNotYetImplemented();
+    [other.cursor retain];
+    [cursor release];
+    cursor = other.cursor;
     return *this;
 }
 
 int QCursor::handle()
 {
-    _logNotYetImplemented();
+    return (int)cursor;
     return 0;
 }
diff --git a/WebCore/kwq/KWQKCursor.mm b/WebCore/kwq/KWQKCursor.mm
index f9f1a76..8c170b9 100644
--- a/WebCore/kwq/KWQKCursor.mm
+++ b/WebCore/kwq/KWQKCursor.mm
@@ -25,13 +25,36 @@
 
 #include <kcursor.h>
 
+
+ at interface NSCursor (_WebCoreCursorAdditions)
++ (NSCursor *)_WebCore_linkCursor;
+ at end
+
+ at implementation NSCursor (_WebCoreCursorAdditions)
++ (NSCursor *)_WebCore_linkCursor
+{
+    static NSCursor *linkCursor = nil;
+    
+    if (linkCursor == nil)
+    {
+	NSImage *linkCursorImage = [[NSImage alloc] initWithContentsOfFile:
+			       [[NSBundle bundleWithIdentifier:@"com.apple.WebCore"] pathForResource:@"linkCursor" ofType:@"tiff"]];
+	[linkCursorImage autorelease];
+	
+        linkCursor = [[NSCursor alloc] initWithImage:linkCursorImage hotSpot:NSMakePoint(6.0,1.0)];
+    }
+    
+    return linkCursor;
+}
+ at end
+
 const QCursor &waitCursor = KCursor::waitCursor();
 
 void KCursor::setAutoHideCursor(QWidget *w, bool enable) {}
 
 QCursor KCursor::arrowCursor() { return QCursor(); }
 QCursor KCursor::crossCursor() { return QCursor(); }
-QCursor KCursor::handCursor() { return QCursor(); }
+QCursor KCursor::handCursor() { return QCursor([NSCursor _WebCore_linkCursor]); }
 QCursor KCursor::sizeAllCursor() { return QCursor(); }
 QCursor KCursor::sizeHorCursor() { return QCursor(); }
 QCursor KCursor::sizeVerCursor() { return QCursor(); }
diff --git a/WebCore/kwq/KWQKHTMLSettings.mm b/WebCore/kwq/KWQKHTMLSettings.mm
index 50f973b..50ed298 100644
--- a/WebCore/kwq/KWQKHTMLSettings.mm
+++ b/WebCore/kwq/KWQKHTMLSettings.mm
@@ -105,8 +105,7 @@ void KHTMLSettings::setScript(QFont::CharSet c)
 
 bool KHTMLSettings::changeCursor() const
 {
-    _logNotYetImplemented();
-    return FALSE;
+    return true;
 }
 
 bool KHTMLSettings::isFormCompletionEnabled() const
diff --git a/WebCore/kwq/KWQView.h b/WebCore/kwq/KWQView.h
index e75c611..0112cde 100644
--- a/WebCore/kwq/KWQView.h
+++ b/WebCore/kwq/KWQView.h
@@ -66,11 +66,14 @@ class KHTMLPart;
     KHTMLPart *part;  // FIXME.  This is a temporary reference.
     bool isFlipped;
     bool needsLayout;
+    NSCursor *cursor;
 }
 - initWithFrame: (NSRect)r widget: (QWidget *)w; 
 - (void)setIsFlipped: (bool)flag;
 - (void)setNeedsLayout: (bool)flag;
 - (void)resetView; 
+- (void)setCursor:(NSCursor *)cursor;
+
 @end
 
 
diff --git a/WebCore/kwq/KWQView.mm b/WebCore/kwq/KWQView.mm
index 9234dd6..f98dbc7 100644
--- a/WebCore/kwq/KWQView.mm
+++ b/WebCore/kwq/KWQView.mm
@@ -305,6 +305,19 @@
     KWQDEBUG ("mouseDragged %f, %f\n", p.x, p.y);
 }
 
+- (void)setCursor:(NSCursor *)cur
+{
+    [cursor release];
+    cursor = [cur retain];
+    [[self window] invalidateCursorRectsForView:self];
+}
+
+- (void)resetCursorRects
+{
+    if (cursor != nil && cursor != [NSCursor arrowCursor]) {
+        [self addCursorRect:[self visibleRect] cursor:cursor];
+    }
+}
 
 @end
 
diff --git a/WebCore/kwq/KWQWidget.mm b/WebCore/kwq/KWQWidget.mm
index 2c18ef4..fe5a461 100644
--- a/WebCore/kwq/KWQWidget.mm
+++ b/WebCore/kwq/KWQWidget.mm
@@ -338,20 +338,22 @@ bool QWidget::isVisible() const
 
 void QWidget::setCursor(const QCursor &cur)
 {
-    _logNotYetImplemented();
     data->cursor = cur;
+    
+    id view = data->view;
+    if ([view respondsToSelector:@selector(setCursor:)]) { 
+	[view setCursor:(NSCursor *)data->cursor.handle()];
+    }
 }
 
 QCursor QWidget::cursor()
 {
-    _logNotYetImplemented();
     return data->cursor;
 }
 
 void QWidget::unsetCursor()
 {
-    _logNotYetImplemented();
-    data->cursor = QCursor();
+    setCursor(QCursor());
 }
 
 bool QWidget::event(QEvent *)
diff --git a/WebCore/kwq/qt/qcursor.h b/WebCore/kwq/qt/qcursor.h
index 8b546af..69c8d3f 100644
--- a/WebCore/kwq/qt/qcursor.h
+++ b/WebCore/kwq/qt/qcursor.h
@@ -33,6 +33,10 @@
 #include <qpixmap.h>
 #include <qpoint.h>
 
+#ifdef __OBJC__
+#import <AppKit/AppKit.h>
+#endif
+
 // class QCursor ===============================================================
 
 class QCursor {
@@ -50,6 +54,9 @@ public:
      QCursor();
      QCursor(const QPixmap &pixmap, int hotX=1, int hotY=1);
      QCursor(const QCursor &);
+#ifdef __OBJC__
+     QCursor(NSCursor *);
+#endif
      ~QCursor();
       
     // member functions --------------------------------------------------------
@@ -62,7 +69,10 @@ public:
 
 // protected -------------------------------------------------------------------
 // private ---------------------------------------------------------------------
-
+ private:
+#ifdef __OBJC__
+    NSCursor *cursor;
+#endif
 }; // class QCursor ============================================================
 
 #endif
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index b369761..fedc912 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,21 @@
+2002-05-26  Maciej Stachowiak  <mjs at apple.com>
+
+	WebKit part of fix for:
+
+	Radar 2884085 - add support for changing cursor over links
+
+	Also, fix handling of mouseMoved events.
+	
+	* WebView.subproj/IFWebView.mm:
+	(-[IFWebView mouseMovedNotification:]): Clip mouseMoved events to
+	the view rect, otherwise mouseover effects might happen for
+	elements past the edge of the window.	
+	(-[IFWebView setCursor:]): Implement.
+	(-[IFWebView resetCursorRects]): Implement.
+	* WebView.subproj/IFWebViewPrivate.h:
+	* WebView.subproj/IFWebViewPrivate.mm:
+	(-[IFWebViewPrivate dealloc]): Added NSCursor *cursor field.
+
 2002-05-25  Maciej Stachowiak  <mjs at apple.com>
 
 	* WebKit.pbproj/project.pbxproj: Link against WebCore.framework,
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index b369761..fedc912 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,21 @@
+2002-05-26  Maciej Stachowiak  <mjs at apple.com>
+
+	WebKit part of fix for:
+
+	Radar 2884085 - add support for changing cursor over links
+
+	Also, fix handling of mouseMoved events.
+	
+	* WebView.subproj/IFWebView.mm:
+	(-[IFWebView mouseMovedNotification:]): Clip mouseMoved events to
+	the view rect, otherwise mouseover effects might happen for
+	elements past the edge of the window.	
+	(-[IFWebView setCursor:]): Implement.
+	(-[IFWebView resetCursorRects]): Implement.
+	* WebView.subproj/IFWebViewPrivate.h:
+	* WebView.subproj/IFWebViewPrivate.mm:
+	(-[IFWebViewPrivate dealloc]): Added NSCursor *cursor field.
+
 2002-05-25  Maciej Stachowiak  <mjs at apple.com>
 
 	* WebKit.pbproj/project.pbxproj: Link against WebCore.framework,
diff --git a/WebKit/WebView.subproj/IFWebView.mm b/WebKit/WebView.subproj/IFWebView.mm
index 1325d45..4ea0a82 100644
--- a/WebKit/WebView.subproj/IFWebView.mm
+++ b/WebKit/WebView.subproj/IFWebView.mm
@@ -547,11 +547,14 @@
 {
     NSEvent *event = [(NSDictionary *)[notification userInfo] objectForKey: @"NSEvent"];
     NSPoint p = [event locationInWindow];
-    
-    QMouseEvent kEvent(QEvent::MouseButtonPress, QPoint((int)p.x, (int)p.y), 0, 0);
-    KHTMLView *widget = _private->widget;
-    if (widget != 0l) {
-        widget->viewportMouseMoveEvent(&kEvent);
+    NSRect frame = [self frame];
+
+    if (p.x >= frame.origin.x && frame.origin.y >= 0 && p.x <= frame.size.width && p.y <= frame.size.height ) {
+	QMouseEvent kEvent(QEvent::MouseButtonPress, QPoint((int)p.x, (int)p.y), 0, 0);
+	KHTMLView *widget = _private->widget;
+	if (widget != 0l) {
+	    widget->viewportMouseMoveEvent(&kEvent);
+	}
     }
 }
 
@@ -590,5 +593,18 @@
         widget->keyReleaseEvent(&kEvent);
 }
 
+- (void)setCursor:(NSCursor *)cursor
+{
+    [_private->cursor release];
+    _private->cursor = [cursor retain];
+    [[self window] invalidateCursorRectsForView:self];
+}
+
+- (void)resetCursorRects
+{
+    if (_private->cursor != nil && _private->cursor != [NSCursor arrowCursor]) {
+        [self addCursorRect:[self visibleRect] cursor:_private->cursor];
+    }
+}
 
 @end
diff --git a/WebKit/WebView.subproj/IFWebViewPrivate.h b/WebKit/WebView.subproj/IFWebViewPrivate.h
index df47820..ed102ee 100644
--- a/WebKit/WebView.subproj/IFWebViewPrivate.h
+++ b/WebKit/WebView.subproj/IFWebViewPrivate.h
@@ -24,6 +24,7 @@ class KHTMLView;
     bool canDragTo;
     bool canDragFrom;
     NSArray *draggingTypes;
+    NSCursor *cursor;
 }
 
 @end
diff --git a/WebKit/WebView.subproj/IFWebViewPrivate.mm b/WebKit/WebView.subproj/IFWebViewPrivate.mm
index 01d1b80..c173a37 100644
--- a/WebKit/WebView.subproj/IFWebViewPrivate.mm
+++ b/WebKit/WebView.subproj/IFWebViewPrivate.mm
@@ -22,7 +22,8 @@
     [controller release];
     [frameScrollView release];
     [draggingTypes release];
-    
+    [cursor release];
+
     //if (widget)
     //    delete widget;
 
diff --git a/WebKit/WebView.subproj/WebFrameView.m b/WebKit/WebView.subproj/WebFrameView.m
index 1325d45..4ea0a82 100644
--- a/WebKit/WebView.subproj/WebFrameView.m
+++ b/WebKit/WebView.subproj/WebFrameView.m
@@ -547,11 +547,14 @@
 {
     NSEvent *event = [(NSDictionary *)[notification userInfo] objectForKey: @"NSEvent"];
     NSPoint p = [event locationInWindow];
-    
-    QMouseEvent kEvent(QEvent::MouseButtonPress, QPoint((int)p.x, (int)p.y), 0, 0);
-    KHTMLView *widget = _private->widget;
-    if (widget != 0l) {
-        widget->viewportMouseMoveEvent(&kEvent);
+    NSRect frame = [self frame];
+
+    if (p.x >= frame.origin.x && frame.origin.y >= 0 && p.x <= frame.size.width && p.y <= frame.size.height ) {
+	QMouseEvent kEvent(QEvent::MouseButtonPress, QPoint((int)p.x, (int)p.y), 0, 0);
+	KHTMLView *widget = _private->widget;
+	if (widget != 0l) {
+	    widget->viewportMouseMoveEvent(&kEvent);
+	}
     }
 }
 
@@ -590,5 +593,18 @@
         widget->keyReleaseEvent(&kEvent);
 }
 
+- (void)setCursor:(NSCursor *)cursor
+{
+    [_private->cursor release];
+    _private->cursor = [cursor retain];
+    [[self window] invalidateCursorRectsForView:self];
+}
+
+- (void)resetCursorRects
+{
+    if (_private->cursor != nil && _private->cursor != [NSCursor arrowCursor]) {
+        [self addCursorRect:[self visibleRect] cursor:_private->cursor];
+    }
+}
 
 @end
diff --git a/WebKit/WebView.subproj/WebFrameViewInternal.h b/WebKit/WebView.subproj/WebFrameViewInternal.h
index df47820..ed102ee 100644
--- a/WebKit/WebView.subproj/WebFrameViewInternal.h
+++ b/WebKit/WebView.subproj/WebFrameViewInternal.h
@@ -24,6 +24,7 @@ class KHTMLView;
     bool canDragTo;
     bool canDragFrom;
     NSArray *draggingTypes;
+    NSCursor *cursor;
 }
 
 @end
diff --git a/WebKit/WebView.subproj/WebFrameViewPrivate.h b/WebKit/WebView.subproj/WebFrameViewPrivate.h
index df47820..ed102ee 100644
--- a/WebKit/WebView.subproj/WebFrameViewPrivate.h
+++ b/WebKit/WebView.subproj/WebFrameViewPrivate.h
@@ -24,6 +24,7 @@ class KHTMLView;
     bool canDragTo;
     bool canDragFrom;
     NSArray *draggingTypes;
+    NSCursor *cursor;
 }
 
 @end
diff --git a/WebKit/WebView.subproj/WebFrameViewPrivate.m b/WebKit/WebView.subproj/WebFrameViewPrivate.m
index 01d1b80..c173a37 100644
--- a/WebKit/WebView.subproj/WebFrameViewPrivate.m
+++ b/WebKit/WebView.subproj/WebFrameViewPrivate.m
@@ -22,7 +22,8 @@
     [controller release];
     [frameScrollView release];
     [draggingTypes release];
-    
+    [cursor release];
+
     //if (widget)
     //    delete widget;
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list