[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
cblu
cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:52:39 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit fac0110262b8b976009bfc134862e79fd1f8364b
Author: cblu <cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Jul 26 23:13:19 2004 +0000
Fixed: <rdar://problem/3689734> dragging to an editable WebView does not scroll document
Reviewed by rjw.
* WebView.subproj/WebView.m:
(-[WebView documentViewAtWindowPoint:]): new, factored from draggingDocumentViewAtWindowPoint:
(-[WebView _draggingDocumentViewAtWindowPoint:]): call documentViewAtWindowPoint:
(-[WebView _autoscrollForDraggingInfo:timeDelta:]): forward call to the document view
(-[WebView _shouldAutoscrollForDraggingInfo:]): ditto
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@7126 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index f5dfecc..4e7d41d 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,15 @@
+2004-07-26 Chris Blumenberg <cblu at apple.com>
+
+ Fixed: <rdar://problem/3689734> dragging to an editable WebView does not scroll document
+
+ Reviewed by rjw.
+
+ * WebView.subproj/WebView.m:
+ (-[WebView documentViewAtWindowPoint:]): new, factored from draggingDocumentViewAtWindowPoint:
+ (-[WebView _draggingDocumentViewAtWindowPoint:]): call documentViewAtWindowPoint:
+ (-[WebView _autoscrollForDraggingInfo:timeDelta:]): forward call to the document view
+ (-[WebView _shouldAutoscrollForDraggingInfo:]): ditto
+
=== Safari-153 ===
2004-07-23 Ken Kocienda <kocienda at apple.com>
diff --git a/WebKit/WebView.subproj/WebView.m b/WebKit/WebView.subproj/WebView.m
index 7b0198a..ac03871 100644
--- a/WebKit/WebView.subproj/WebView.m
+++ b/WebKit/WebView.subproj/WebView.m
@@ -75,6 +75,8 @@
@interface NSView (AppKitSecretsIKnow)
- (NSView *)_hitTest:(NSPoint *)aPoint dragTypes:(NSSet *)types;
+- (void)_autoscrollForDraggingInfo:(id)dragInfo timeDelta:(NSTimeInterval)repeatDelta;
+- (BOOL)_shouldAutoscrollForDraggingInfo:(id)dragInfo;
@end
@interface WebView (WebFileInternal)
@@ -1682,9 +1684,14 @@ NS_ENDHANDLER
return _private->hostWindow;
}
+- (NSView <WebDocumentView> *)documentViewAtWindowPoint:(NSPoint)point
+{
+ return [[self _frameViewAtWindowPoint:point] documentView];
+}
+
- (NSView <WebDocumentDragging> *)_draggingDocumentViewAtWindowPoint:(NSPoint)point
{
- NSView <WebDocumentView> *documentView = [[self _frameViewAtWindowPoint:point] documentView];
+ NSView <WebDocumentView> *documentView = [self documentViewAtWindowPoint:point];
if ([documentView conformsToProtocol:@protocol(WebDocumentDragging)]) {
return (NSView <WebDocumentDragging> *)documentView;
}
@@ -1754,6 +1761,22 @@ NS_ENDHANDLER
return operation;
}
+// The following 2 internal NSView methods are called on the drag destination by make scrolling while dragging work.
+// Scrolling while dragging will only work if the drag destination is in a scroll view. The WebView is the drag destination.
+// When dragging to a WebView, the document subview should scroll, but it doesn't because it is not the drag destination.
+// Forward these calls to the document subview to make its scroll view scroll.
+- (void)_autoscrollForDraggingInfo:(id)draggingInfo timeDelta:(NSTimeInterval)repeatDelta
+{
+ NSView <WebDocumentView> *documentView = [self documentViewAtWindowPoint:[draggingInfo draggingLocation]];
+ [documentView _autoscrollForDraggingInfo:draggingInfo timeDelta:repeatDelta];
+}
+
+- (BOOL)_shouldAutoscrollForDraggingInfo:(id)draggingInfo
+{
+ NSView <WebDocumentView> *documentView = [self documentViewAtWindowPoint:[draggingInfo draggingLocation]];
+ return [documentView _shouldAutoscrollForDraggingInfo:draggingInfo];
+}
+
- (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)draggingInfo
{
return [self _delegateDragOperationForDraggingInfo:draggingInfo];
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list