Reviewed by Darin.
authorharrison <harrison@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 13 Apr 2006 00:18:49 +0000 (00:18 +0000)
committerharrison <harrison@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 13 Apr 2006 00:18:49 +0000 (00:18 +0000)
        <rdar://problem/4386640> AX: AXPreviousSentenceStartTextMarkerForTextMarker does not respect paragraph boundary
        <rdar://problem/4414575> AX: Dictionary popup cannot find some words on Dictionary.app

        (see related changes in WebCore)

        Tests added:
        * editing/selection/extend-by-sentence-001.html: Added.
        * fast/dom/inner-text-001.html: Added.

        * WebView/WebHTMLView.m:
        (-[NSArray validateUserInterfaceItem:]):
        (-[NSArray moveToBeginningOfSentence:]):
        (-[NSArray moveToBeginningOfSentenceAndModifySelection:]):
        (-[NSArray moveToEndOfSentence:]):
        (-[NSArray moveToEndOfSentenceAndModifySelection:]):
        (-[NSArray selectSentence:]):
        * WebView/WebView.m:
        * WebView/WebViewPrivate.h:
        Add sentence navigation and selection.

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

WebKit/ChangeLog
WebKit/WebView/WebHTMLView.m
WebKit/WebView/WebView.m
WebKit/WebView/WebViewPrivate.h

index 7ced0a80815c19d500443580c78aea6e74a7c70a..e04d58088d7cd2a0613c187165d22eff60f4a5f3 100644 (file)
@@ -1,3 +1,27 @@
+2006-04-12  David Harrison  <harrison@apple.com>
+
+        Reviewed by Darin.
+        
+        <rdar://problem/4386640> AX: AXPreviousSentenceStartTextMarkerForTextMarker does not respect paragraph boundary
+        <rdar://problem/4414575> AX: Dictionary popup cannot find some words on Dictionary.app
+        
+        (see related changes in WebCore)
+        
+        Tests added:
+        * editing/selection/extend-by-sentence-001.html: Added.
+        * fast/dom/inner-text-001.html: Added.
+
+        * WebView/WebHTMLView.m:
+        (-[NSArray validateUserInterfaceItem:]):
+        (-[NSArray moveToBeginningOfSentence:]):
+        (-[NSArray moveToBeginningOfSentenceAndModifySelection:]):
+        (-[NSArray moveToEndOfSentence:]):
+        (-[NSArray moveToEndOfSentenceAndModifySelection:]):
+        (-[NSArray selectSentence:]):
+        * WebView/WebView.m:
+        * WebView/WebViewPrivate.h:
+        Add sentence navigation and selection.
+
 2006-04-12  Tim Omernick  <timo@apple.com>
 
         Reviewed by Darin.
index 6764e8220325f79176b1ab442c705f260c71875f..b5cc0067e14d7985acacd908244bd080b0fc18c3 100644 (file)
@@ -1915,12 +1915,16 @@ static WebHTMLView *lastHitView = nil;
             || action == @selector(moveRightAndModifySelection:)
             || action == @selector(moveToBeginningOfDocument:)
             || action == @selector(moveToBeginningOfDocumentAndModifySelection:)
+            || action == @selector(moveToBeginningOfSentence:)
+            || action == @selector(moveToBeginningOfSentenceAndModifySelection:)
             || action == @selector(moveToBeginningOfLine:)
             || action == @selector(moveToBeginningOfLineAndModifySelection:)
             || action == @selector(moveToBeginningOfParagraph:)
             || action == @selector(moveToBeginningOfParagraphAndModifySelection:)
             || action == @selector(moveToEndOfDocument:)
             || action == @selector(moveToEndOfDocumentAndModifySelection:)
+            || action == @selector(moveToEndOfSentence:)
+            || action == @selector(moveToEndOfSentenceAndModifySelection:)
             || action == @selector(moveToEndOfLine:)
             || action == @selector(moveToEndOfLineAndModifySelection:)
             || action == @selector(moveToEndOfParagraph:)
@@ -3463,6 +3467,16 @@ done:
     [self _alterCurrentSelection:WebSelectByExtending direction:WebBridgeSelectBackward granularity:WebBridgeSelectToDocumentBoundary];
 }
 
+- (void)moveToBeginningOfSentence:(id)sender
+{
+    [self _alterCurrentSelection:WebSelectByMoving direction:WebBridgeSelectBackward granularity:WebBridgeSelectToSentenceBoundary];
+}
+
+- (void)moveToBeginningOfSentenceAndModifySelection:(id)sender
+{
+    [self _alterCurrentSelection:WebSelectByExtending direction:WebBridgeSelectBackward granularity:WebBridgeSelectToSentenceBoundary];
+}
+
 - (void)moveToBeginningOfLine:(id)sender
 {
     [self _alterCurrentSelection:WebSelectByMoving direction:WebBridgeSelectBackward granularity:WebBridgeSelectToLineBoundary];
@@ -3493,6 +3507,16 @@ done:
     [self _alterCurrentSelection:WebSelectByExtending direction:WebBridgeSelectForward granularity:WebBridgeSelectToDocumentBoundary];
 }
 
+- (void)moveToEndOfSentence:(id)sender
+{
+    [self _alterCurrentSelection:WebSelectByMoving direction:WebBridgeSelectForward granularity:WebBridgeSelectToSentenceBoundary];
+}
+
+- (void)moveToEndOfSentenceAndModifySelection:(id)sender
+{
+    [self _alterCurrentSelection:WebSelectByExtending direction:WebBridgeSelectForward granularity:WebBridgeSelectToSentenceBoundary];
+}
+
 - (void)moveToEndOfLine:(id)sender
 {
     [self _alterCurrentSelection:WebSelectByMoving direction:WebBridgeSelectForward granularity:WebBridgeSelectToLineBoundary];
@@ -3630,6 +3654,11 @@ done:
     [self _expandSelectionToGranularity:WebBridgeSelectByLine];
 }
 
+- (void)selectSentence:(id)sender
+{
+    [self _expandSelectionToGranularity:WebBridgeSelectBySentence];
+}
+
 - (void)selectWord:(id)sender
 {
     [self _expandSelectionToGranularity:WebBridgeSelectByWord];
index 0a0155e8c625adb7b5cffa2b397c2f77cdeada25..af6d7a19dba1551745fd9565a3e25f8ba6b7c81b 100644 (file)
@@ -150,6 +150,8 @@ macro(moveRight) \
 macro(moveRightAndModifySelection) \
 macro(moveToBeginningOfDocument) \
 macro(moveToBeginningOfDocumentAndModifySelection) \
+macro(moveToBeginningOfSentence) \
+macro(moveToBeginningOfSentenceAndModifySelection) \
 macro(moveToBeginningOfLine) \
 macro(moveToBeginningOfLineAndModifySelection) \
 macro(moveToBeginningOfParagraph) \
@@ -160,6 +162,8 @@ macro(moveToEndOfLine) \
 macro(moveToEndOfLineAndModifySelection) \
 macro(moveToEndOfParagraph) \
 macro(moveToEndOfParagraphAndModifySelection) \
+macro(moveToEndOfSentence) \
+macro(moveToEndOfSentenceAndModifySelection) \
 macro(moveUp) \
 macro(moveUpAndModifySelection) \
 macro(moveWordBackward) \
@@ -184,9 +188,10 @@ macro(scrollPageUp) \
 macro(scrollToBeginningOfDocument) \
 macro(scrollToEndOfDocument) \
 macro(selectAll) \
+macro(selectWord) \
+macro(selectSentence) \
 macro(selectLine) \
 macro(selectParagraph) \
-macro(selectWord) \
 macro(showGuessPanel) \
 macro(startSpeaking) \
 macro(stopSpeaking) \
index a4684e07b0883d75d60600b076be3d0d57639eab..6dbc4edc77a052106d23a1ce6f0eda0359d876d4 100644 (file)
@@ -133,6 +133,16 @@ typedef enum {
 
 @end
 
+@interface WebView (WebViewEditingPendingPublic)
+
+- (void)moveToBeginningOfSentence:(id)sender;
+- (void)moveToBeginningOfSentenceAndModifySelection:(id)sender;
+- (void)moveToEndOfSentence:(id)sender;
+- (void)moveToEndOfSentenceAndModifySelection:(id)sender;
+- (void)selectSentence:(id)sender;
+
+@end
+
 @interface WebView (WebPrivate)
 
 + (BOOL)_viewClass:(Class *)vClass andRepresentationClass:(Class *)rClass forMIMEType:(NSString *)MIMEType;