Reviewed by Ken and John.
authordarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 19 Mar 2005 17:09:07 +0000 (17:09 +0000)
committerdarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 19 Mar 2005 17:09:07 +0000 (17:09 +0000)
        - fixed <rdar://problem/4059123> REGRESSION (402-403): deleteWordForward: and deleteWordBackward: start deleting single characters after the first delete

        * WebView.subproj/WebHTMLView.m: (-[WebHTMLView _deleteWithDirection:granularity:killRing:isTypingAction:]):
        Fixed backwards logic in here and added missing check. Set action to one of the two typing actions only
        if isTypingAction is YES.

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

WebKit/ChangeLog
WebKit/WebView.subproj/WebHTMLView.m

index 01f87cc8d7f49669ec4a65d93b7415030160cb2c..06095b093f594b562ce722048173c1cd76e8cbd1 100644 (file)
@@ -1,3 +1,13 @@
+2005-03-19  Darin Adler  <darin@apple.com>
+
+        Reviewed by Ken and John.
+
+        - fixed <rdar://problem/4059123> REGRESSION (402-403): deleteWordForward: and deleteWordBackward: start deleting single characters after the first delete
+
+        * WebView.subproj/WebHTMLView.m: (-[WebHTMLView _deleteWithDirection:granularity:killRing:isTypingAction:]):
+        Fixed backwards logic in here and added missing check. Set action to one of the two typing actions only
+        if isTypingAction is YES.
+
 2005-03-19  David Harrison  <harrison@apple.com>
 
         Reviewed by me (written by Patti Yeh).
index 7c9d2cf6a39842953e680a0187fc722d6976ae23..8bf88a72355545cc0d77fe314ebf5dc4a2b4d451 100644 (file)
@@ -4266,19 +4266,21 @@ NSStrokeColorAttributeName        /* NSColor, default nil: same as foreground co
 
     if ([self _hasSelection]) {
         range = [self _selectedRange];
-        deletionAction = isTypingAction ? deleteSelectionAction : deleteKeyAction;
+        if (isTypingAction)
+            deletionAction = deleteKeyAction;
     } else {
         range = [[self _bridge] rangeByAlteringCurrentSelection:WebSelectByExtending direction:direction granularity:granularity];
-        switch (direction) {
-            case WebSelectForward:
-            case WebSelectRight:
-                deletionAction = forwardDeleteKeyAction;
-                break;
-            case WebSelectBackward:
-            case WebSelectLeft:
-                deletionAction = deleteKeyAction;
-                break;
-        }
+        if (isTypingAction)
+            switch (direction) {
+                case WebSelectForward:
+                case WebSelectRight:
+                    deletionAction = forwardDeleteKeyAction;
+                    break;
+                case WebSelectBackward:
+                case WebSelectLeft:
+                    deletionAction = deleteKeyAction;
+                    break;
+            }
     }
 
     if (range == nil || [range collapsed] || ![self _shouldDeleteRange:range])