<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
+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.
|| 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:)
[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];
[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];
[self _expandSelectionToGranularity:WebBridgeSelectByLine];
}
+- (void)selectSentence:(id)sender
+{
+ [self _expandSelectionToGranularity:WebBridgeSelectBySentence];
+}
+
- (void)selectWord:(id)sender
{
[self _expandSelectionToGranularity:WebBridgeSelectByWord];
macro(moveRightAndModifySelection) \
macro(moveToBeginningOfDocument) \
macro(moveToBeginningOfDocumentAndModifySelection) \
+macro(moveToBeginningOfSentence) \
+macro(moveToBeginningOfSentenceAndModifySelection) \
macro(moveToBeginningOfLine) \
macro(moveToBeginningOfLineAndModifySelection) \
macro(moveToBeginningOfParagraph) \
macro(moveToEndOfLineAndModifySelection) \
macro(moveToEndOfParagraph) \
macro(moveToEndOfParagraphAndModifySelection) \
+macro(moveToEndOfSentence) \
+macro(moveToEndOfSentenceAndModifySelection) \
macro(moveUp) \
macro(moveUpAndModifySelection) \
macro(moveWordBackward) \
macro(scrollToBeginningOfDocument) \
macro(scrollToEndOfDocument) \
macro(selectAll) \
+macro(selectWord) \
+macro(selectSentence) \
macro(selectLine) \
macro(selectParagraph) \
-macro(selectWord) \
macro(showGuessPanel) \
macro(startSpeaking) \
macro(stopSpeaking) \
@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;