Commit c07fee0a authored by hyatt's avatar hyatt

Add SPI for setting and removing custom highlighters.

        Reviewed by Tim H

        * WebView/WebHTMLView.m:
        (-[WebTextCompleteController dealloc]):
        (-[WebHTMLView _setHighlighter:ofType:]):
        (-[WebHTMLView _removeHighlighterOfType:]):
        * WebView/WebHTMLViewInternal.h:
        * WebView/WebHTMLViewPrivate.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@14764 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent cc8a860d
2006-06-07 David Hyatt <hyatt@apple.com>
Add SPI for setting and removing custom highlighters.
Reviewed by Tim H
* WebView/WebHTMLView.m:
(-[WebTextCompleteController dealloc]):
(-[WebHTMLView _setHighlighter:ofType:]):
(-[WebHTMLView _removeHighlighterOfType:]):
* WebView/WebHTMLViewInternal.h:
* WebView/WebHTMLViewPrivate.h:
2006-06-06 Adele Peterson <adele@apple.com>
Reviewed by Justin.
......
......@@ -255,6 +255,7 @@ - (void)dealloc
[compController release];
[firstResponderAtMouseDownTime release];
[dataSource release];
[highlighters release];
[super dealloc];
}
......@@ -1726,6 +1727,18 @@ - (void)_decreaseSelectionListLevel
[bridge decreaseSelectionListLevel];
}
- (void)_setHighlighter:(id<WebHTMLHighlighter>)highlighter ofType:(NSString*)type
{
if (!_private->highlighters)
_private->highlighters = [[NSMutableDictionary alloc] init];
[_private->highlighters setObject:highlighter forKey:type];
}
- (void)_removeHighlighterOfType:(NSString*)type
{
[_private->highlighters removeObjectForKey:type];
}
- (BOOL)_web_firstResponderCausesFocusDisplay
{
return [self _web_firstResponderIsSelfOrDescendantView] || [[self window] firstResponder] == [self _frameView];
......
......@@ -75,6 +75,8 @@
NSArray* pageRects;
NSMutableDictionary* highlighters;
BOOL descendantBecomingFirstResponder;
BOOL resigningFirstResponder;
BOOL ignoreMarkedTextSelectionChange;
......
......@@ -35,6 +35,10 @@
@class WebView;
@class WebFrame;
@class WebPluginController;
@protocol WebHTMLHighlighter
- (void)drawHighlight;
@end
@interface WebHTMLView (WebPrivate)
......@@ -100,6 +104,8 @@
- (DOMNode *)_increaseSelectionListLevelOrdered;
- (DOMNode *)_increaseSelectionListLevelUnordered;
- (void)_decreaseSelectionListLevel;
- (void)_setHighlighter:(id<WebHTMLHighlighter>)highlighter ofType:(NSString*)type;
- (void)_removeHighlighterOfType:(NSString*)type;
// SPI for DumpRenderTree
- (void)_updateFocusState;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment