[webkit-changes] cvs commit: WebKit/WebView.subproj
WebDocumentPrivate.h WebHTMLView.h WebPDFView.h WebTextView.h
WebTextView.m
John
sullivan at opensource.apple.com
Mon Dec 12 11:42:51 PST 2005
sullivan 05/12/12 11:42:51
Modified: . ChangeLog
Misc.subproj WebSearchableTextView.m
WebView.subproj WebDocumentPrivate.h WebHTMLView.h
WebPDFView.h WebTextView.h WebTextView.m
Log:
Reviewed by Tim Omernick.
- Made protocol <WebDocumentSelection> include protocol <WebDocumentText>, for clarity.
This required moving some methods from WebTextView, which conformed to <WebDocumentText>,
up into superclass WebSearchableTextView, which conformed to <WebDocumentSelection>.
* Misc.subproj/WebSearchableTextView.m:
(-[NSString supportsTextEncoding]):
moved this method (unchanged) from subclass WebTextView
(-[NSString string]):
ditto
(-[NSString attributedString]):
ditto
(-[NSString selectedString]):
ditto
(-[NSString selectedAttributedString]):
ditto
(-[NSString selectAll]):
ditto
(-[NSString deselectAll]):
ditto
* WebView.subproj/WebDocumentPrivate.h:
made <WebDocumentSelection> incorporate <WebDocumentText> rather than just <NSObject>
* WebView.subproj/WebHTMLView.h:
removed <WebDocumentText> from protocol list since it's covered by <WebDocumentSelection>
* WebView.subproj/WebPDFView.h:
ditto
* WebView.subproj/WebTextView.h:
ditto
* WebView.subproj/WebTextView.m:
removed the methods that were moved into WebSearchableTextView.m
Revision Changes Path
1.3398 +35 -0 WebKit/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /cvs/root/WebKit/ChangeLog,v
retrieving revision 1.3397
retrieving revision 1.3398
diff -u -r1.3397 -r1.3398
--- ChangeLog 10 Dec 2005 20:40:21 -0000 1.3397
+++ ChangeLog 12 Dec 2005 19:42:40 -0000 1.3398
@@ -1,3 +1,38 @@
+2005-12-12 John Sullivan <sullivan at apple.com>
+
+ Reviewed by Tim Omernick.
+
+ - Made protocol <WebDocumentSelection> include protocol <WebDocumentText>, for clarity.
+ This required moving some methods from WebTextView, which conformed to <WebDocumentText>,
+ up into superclass WebSearchableTextView, which conformed to <WebDocumentSelection>.
+
+ * Misc.subproj/WebSearchableTextView.m:
+ (-[NSString supportsTextEncoding]):
+ moved this method (unchanged) from subclass WebTextView
+ (-[NSString string]):
+ ditto
+ (-[NSString attributedString]):
+ ditto
+ (-[NSString selectedString]):
+ ditto
+ (-[NSString selectedAttributedString]):
+ ditto
+ (-[NSString selectAll]):
+ ditto
+ (-[NSString deselectAll]):
+ ditto
+
+ * WebView.subproj/WebDocumentPrivate.h:
+ made <WebDocumentSelection> incorporate <WebDocumentText> rather than just <NSObject>
+ * WebView.subproj/WebHTMLView.h:
+ removed <WebDocumentText> from protocol list since it's covered by <WebDocumentSelection>
+ * WebView.subproj/WebPDFView.h:
+ ditto
+ * WebView.subproj/WebTextView.h:
+ ditto
+ * WebView.subproj/WebTextView.m:
+ removed the methods that were moved into WebSearchableTextView.m
+
2005-12-10 Darin Adler <darin at apple.com>
Reviewed by John Sullivan.
1.10 +35 -0 WebKit/Misc.subproj/WebSearchableTextView.m
Index: WebSearchableTextView.m
===================================================================
RCS file: /cvs/root/WebKit/Misc.subproj/WebSearchableTextView.m,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- WebSearchableTextView.m 9 Dec 2005 02:12:33 -0000 1.9
+++ WebSearchableTextView.m 12 Dec 2005 19:42:49 -0000 1.10
@@ -123,6 +123,41 @@
[self writeSelectionToPasteboard:pasteboard types:types];
}
+- (BOOL)supportsTextEncoding
+{
+ return YES;
+}
+
+- (NSString *)string
+{
+ return [super string];
+}
+
+- (NSAttributedString *)attributedString
+{
+ return [self attributedSubstringFromRange:NSMakeRange(0, [[self string] length])];
+}
+
+- (NSString *)selectedString
+{
+ return [[self string] substringWithRange:[self selectedRange]];
+}
+
+- (NSAttributedString *)selectedAttributedString
+{
+ return [self attributedSubstringFromRange:[self selectedRange]];
+}
+
+- (void)selectAll
+{
+ [self setSelectedRange:NSMakeRange(0, [[self string] length])];
+}
+
+- (void)deselectAll
+{
+ [self setSelectedRange:NSMakeRange(0,0)];
+}
+
@end
@implementation NSString (_Web_StringTextFinding)
1.11 +1 -1 WebKit/WebView.subproj/WebDocumentPrivate.h
Index: WebDocumentPrivate.h
===================================================================
RCS file: /cvs/root/WebKit/WebView.subproj/WebDocumentPrivate.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- WebDocumentPrivate.h 9 Dec 2005 02:12:34 -0000 1.10
+++ WebDocumentPrivate.h 12 Dec 2005 19:42:49 -0000 1.11
@@ -39,7 +39,7 @@
- (DOMDocument *)DOMDocument;
@end
- at protocol WebDocumentSelection <NSObject>
+ at protocol WebDocumentSelection <WebDocumentText>
- (NSArray *)pasteboardTypesForSelection;
- (void)writeSelectionWithPasteboardTypes:(NSArray *)types toPasteboard:(NSPasteboard *)pasteboard;
1.21 +1 -1 WebKit/WebView.subproj/WebHTMLView.h
Index: WebHTMLView.h
===================================================================
RCS file: /cvs/root/WebKit/WebView.subproj/WebHTMLView.h,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- WebHTMLView.h 26 Jul 2005 20:29:06 -0000 1.20
+++ WebHTMLView.h 12 Dec 2005 19:42:49 -0000 1.21
@@ -41,7 +41,7 @@
WebHTMLView is a NSControl because it hosts NSCells that are painted by WebCore's Aqua theme
renderer (and those cells must be hosted by an enclosing NSControl in order to paint properly).
*/
- at interface WebHTMLView : NSControl <WebDocumentView, WebDocumentSearching, WebDocumentText, WebDocumentDragging, WebDocumentElement, WebDocumentSelection>
+ at interface WebHTMLView : NSControl <WebDocumentView, WebDocumentSearching, WebDocumentDragging, WebDocumentElement, WebDocumentSelection>
{
@private
WebHTMLViewPrivate *_private;
1.15 +1 -1 WebKit/WebView.subproj/WebPDFView.h
Index: WebPDFView.h
===================================================================
RCS file: /cvs/root/WebKit/WebView.subproj/WebPDFView.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- WebPDFView.h 20 Sep 2005 08:33:06 -0000 1.14
+++ WebPDFView.h 12 Dec 2005 19:42:50 -0000 1.15
@@ -35,7 +35,7 @@
@protocol WebDocumentSelection;
@protocol WebDocumentElement;
- at interface WebPDFView : NSView <WebDocumentView, WebDocumentSearching, WebDocumentText, WebDocumentSelection, WebDocumentElement, _WebDocumentViewState, _WebDocumentTextSizing>
+ at interface WebPDFView : NSView <WebDocumentView, WebDocumentSearching, WebDocumentSelection, WebDocumentElement, _WebDocumentViewState, _WebDocumentTextSizing>
{
PDFView *PDFSubview;
WebDataSource *dataSource;
1.22 +1 -1 WebKit/WebView.subproj/WebTextView.h
Index: WebTextView.h
===================================================================
RCS file: /cvs/root/WebKit/WebView.subproj/WebTextView.h,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- WebTextView.h 9 Oct 2005 04:17:42 -0000 1.21
+++ WebTextView.h 12 Dec 2005 19:42:50 -0000 1.22
@@ -32,7 +32,7 @@
@class WebDataSource;
@class WebCoreTextDecoder;
- at interface WebTextView : WebSearchableTextView <WebDocumentView, WebDocumentText, WebDocumentElement>
+ at interface WebTextView : WebSearchableTextView <WebDocumentView, WebDocumentElement>
{
float _textSizeMultiplier;
WebCoreTextDecoder *_decoder;
1.66 +0 -35 WebKit/WebView.subproj/WebTextView.m
Index: WebTextView.m
===================================================================
RCS file: /cvs/root/WebKit/WebView.subproj/WebTextView.m,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -r1.65 -r1.66
--- WebTextView.m 9 Oct 2005 04:17:42 -0000 1.65
+++ WebTextView.m 12 Dec 2005 19:42:50 -0000 1.66
@@ -294,41 +294,6 @@
types:[NSArray arrayWithObject:NSStringPboardType]];
}
-- (BOOL)supportsTextEncoding
-{
- return YES;
-}
-
-- (NSString *)string
-{
- return [super string];
-}
-
-- (NSAttributedString *)attributedString
-{
- return [self attributedSubstringFromRange:NSMakeRange(0, [[self string] length])];
-}
-
-- (NSString *)selectedString
-{
- return [[self string] substringWithRange:[self selectedRange]];
-}
-
-- (NSAttributedString *)selectedAttributedString
-{
- return [self attributedSubstringFromRange:[self selectedRange]];
-}
-
-- (void)selectAll
-{
- [self setSelectedRange:NSMakeRange(0, [[self string] length])];
-}
-
-- (void)deselectAll
-{
- [self setSelectedRange:NSMakeRange(0,0)];
-}
-
- (void)keyDown:(NSEvent *)event
{
[[self nextResponder] keyDown:event];
More information about the webkit-changes
mailing list