Reviewed by Maciej.
authordarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 25 Jan 2007 04:27:31 +0000 (04:27 +0000)
committerdarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 25 Jan 2007 04:27:31 +0000 (04:27 +0000)
        - changed dragMode to be a property instead of a function

        * DumpRenderTree/EventSendingController.h: Renamed inDragMode to dragMode.
        * DumpRenderTree/EventSendingController.m:
        (+[EventSendingController isSelectorExcludedFromWebScript:]): Removed setDragMode.
        (+[EventSendingController isKeyExcludedFromWebScript:]): Added dragMode.
        (-[EventSendingController init]): Updated for name change.
        (-[EventSendingController leapForward:]): Ditto.
        (-[EventSendingController mouseUp]): Ditto.
        (-[EventSendingController mouseMoveToX:Y:]): Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19101 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKitTools/ChangeLog
WebKitTools/DumpRenderTree/EventSendingController.h
WebKitTools/DumpRenderTree/EventSendingController.m

index a7b60bd..0207e99 100644 (file)
@@ -2,6 +2,21 @@
 
         Reviewed by Maciej.
 
+        - changed dragMode to be a property instead of a function
+
+        * DumpRenderTree/EventSendingController.h: Renamed inDragMode to dragMode.
+        * DumpRenderTree/EventSendingController.m:
+        (+[EventSendingController isSelectorExcludedFromWebScript:]): Removed setDragMode.
+        (+[EventSendingController isKeyExcludedFromWebScript:]): Added dragMode.
+        (-[EventSendingController init]): Updated for name change.
+        (-[EventSendingController leapForward:]): Ditto.
+        (-[EventSendingController mouseUp]): Ditto.
+        (-[EventSendingController mouseMoveToX:Y:]): Ditto.
+
+2007-01-24  Darin Adler  <darin@apple.com>
+
+        Reviewed by Maciej.
+
         - made the deferral of mouse events until drag completes conditional
           it's needed for drag testing, and harmful for selection testing
 
index e93df4e..a92eec9 100644 (file)
@@ -32,7 +32,7 @@
 @interface EventSendingController : NSObject <DOMEventListener>
 {
     BOOL down;
-    BOOL inDragMode;
+    BOOL dragMode;
     int clickCount;
     NSTimeInterval lastClick;
     int eventNumber;
index 8476645..933401a 100644 (file)
@@ -107,8 +107,14 @@ BOOL replayingSavedEvents;
             || aSelector == @selector(keyDown:withModifiers:)
             || aSelector == @selector(enableDOMUIEventLogging:)
             || aSelector == @selector(fireKeyboardEventsToElement:)
-            || aSelector == @selector(clearKillRing)
-            || aSelector == @selector(setDragMode:))
+            || aSelector == @selector(clearKillRing))
+        return NO;
+    return YES;
+}
+
++ (BOOL)isKeyExcludedFromWebScript:(const char*)name
+{
+    if (strcmp(name, "dragMode") == 0)
         return NO;
     return YES;
 }
@@ -134,7 +140,7 @@ BOOL replayingSavedEvents;
 {
     self = [super init];
     if (self)
-        inDragMode = YES;
+        dragMode = YES;
     return self;
 }
 
@@ -151,7 +157,7 @@ BOOL replayingSavedEvents;
 
 - (void)leapForward:(int)milliseconds
 {
-    if (inDragMode && down && !replayingSavedEvents) {
+    if (dragMode && down && !replayingSavedEvents) {
         NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:[EventSendingController instanceMethodSignatureForSelector:@selector(leapForward:)]];
         [invocation setTarget:self];
         [invocation setSelector:@selector(leapForward:)];
@@ -170,11 +176,6 @@ BOOL replayingSavedEvents;
     _NSNewKillRingSequence();
 }
 
-- (void)setDragMode:(BOOL)dragMode
-{
-    inDragMode = dragMode;
-}
-
 - (void)mouseDown
 {
     [[[frame frameView] documentView] layout];
@@ -201,7 +202,7 @@ BOOL replayingSavedEvents;
 
 - (void)mouseUp
 {
-    if (inDragMode && !replayingSavedEvents) {
+    if (dragMode && !replayingSavedEvents) {
         NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:[EventSendingController instanceMethodSignatureForSelector:@selector(mouseUp)]];
         [invocation setTarget:self];
         [invocation setSelector:@selector(mouseUp)];
@@ -249,7 +250,7 @@ BOOL replayingSavedEvents;
 
 - (void)mouseMoveToX:(int)x Y:(int)y
 {
-    if (inDragMode && down && !replayingSavedEvents) {
+    if (dragMode && down && !replayingSavedEvents) {
         NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:[EventSendingController instanceMethodSignatureForSelector:@selector(mouseMoveToX:Y:)]];
         [invocation setTarget:self];
         [invocation setSelector:@selector(mouseMoveToX:Y:)];