Added SPI for dashboard to disable wheel scrolling of the WebClipView.
Reviewed by Ken.
* ChangeLog:
* WebView.subproj/WebClipView.m:
(-[WebClipView _focusRingVisibleRect]):
(-[WebClipView scrollWheel:]):
* WebView.subproj/WebView.m:
(-[WebViewPrivate init]):
(-[WebView drawRect:]):
(-[WebView _dashboardBehavior:]):
* WebView.subproj/WebViewInternal.h:
* WebView.subproj/WebViewPrivate.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8619
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2005-02-17 Richard Williamson <rjw@apple.com>
+
+ Fixed <rdar://problem/4007262> Seed: Flight tracker scrolling moves to the left
+
+ Added SPI for dashboard to disable wheel scrolling of the WebClipView.
+
+ Reviewed by Ken.
+
+ * ChangeLog:
+ * WebView.subproj/WebClipView.m:
+ (-[WebClipView _focusRingVisibleRect]):
+ (-[WebClipView scrollWheel:]):
+ * WebView.subproj/WebView.m:
+ (-[WebViewPrivate init]):
+ (-[WebView drawRect:]):
+ (-[WebView _dashboardBehavior:]):
+ * WebView.subproj/WebViewInternal.h:
+ * WebView.subproj/WebViewPrivate.h:
+
=== Safari-187 ===
2005-02-17 Vicki Murley <vicki@apple.com>
#import "WebClipView.h"
#import <WebKit/WebAssertions.h>
+#import <WebKit/WebHTMLView.h>
+#import <WebKit/WebNSViewExtras.h>
+#import <WebKit/WebViewPrivate.h>
// WebClipView's entire reason for existing is to set the clip used by focus ring redrawing.
// There's no easy way to prevent the focus ring from drawing outside the passed-in clip rectangle
return rect;
}
+- (void)scrollWheel:(NSEvent *)event
+{
+ NSView *docView = [self documentView];
+ if ([docView respondsToSelector:@selector(_webView)]) {
+ WebView *wv = [docView _webView];
+ if ([wv _dashboardBehavior:WebDashboardBehaviorAllowWheelScrolling]) {
+ [super scrollWheel:event];
+ }
+ return;
+ }
+ [super scrollWheel:event];
+}
+
@end
progressNotificationInterval = 0.02;
progressNotificationTimeInterval = 0.1;
settings = [[WebCoreSettings alloc] init];
+ dashboardBehaviorAllowWheelScrolling = YES;
return self;
}
@implementation WebView (WebPrivate)
#ifdef DEBUG_WIDGET_DRAWING
-static bool debugWidget = false;
+static bool debugWidget = true;
- (void)drawRect:(NSRect)rect
{
[[NSColor blueColor] set];
NSRect htmlViewRect = [[[[self mainFrame] frameView] documentView] frame];
if (debugWidget) {
- bool flag = false;
- while (flag) {
+ while (debugWidget) {
sleep (1);
}
}
_private->dashboardBehaviorAlwaysAcceptsFirstMouse = flag;
break;
}
+ case WebDashboardBehaviorAllowWheelScrolling: {
+ _private->dashboardBehaviorAllowWheelScrolling = flag;
+ break;
+ }
}
}
case WebDashboardBehaviorAlwaysAcceptsFirstMouse: {
return _private->dashboardBehaviorAlwaysAcceptsFirstMouse;
}
+ case WebDashboardBehaviorAllowWheelScrolling: {
+ return _private->dashboardBehaviorAllowWheelScrolling;
+ }
}
return NO;
}
BOOL dashboardBehaviorAlwaysSendMouseEventsToAllWindows;
BOOL dashboardBehaviorAlwaysSendActiveNullEventsToPlugIns;
BOOL dashboardBehaviorAlwaysAcceptsFirstMouse;
+ BOOL dashboardBehaviorAllowWheelScrolling;
BOOL shouldUseFontSmoothing;
BOOL selectWordBeforeMenuEvent;
typedef enum {
WebDashboardBehaviorAlwaysSendMouseEventsToAllWindows,
WebDashboardBehaviorAlwaysSendActiveNullEventsToPlugIns,
- WebDashboardBehaviorAlwaysAcceptsFirstMouse
+ WebDashboardBehaviorAlwaysAcceptsFirstMouse,
+ WebDashboardBehaviorAllowWheelScrolling
} WebDashboardBehavior;