Commit 3e8d3635 authored by hyatt's avatar hyatt

Add support for custom highlighting to WebKit.

        Reviewed by justin

        * WebCoreSupport/WebFrameBridge.m:
        (-[WebFrameBridge paintCustomHighlight:forBox:onLine:behindText:]):
        * WebView/WebHTMLView.m:
        (-[WebHTMLView _highlighterForType:]):
        * WebView/WebHTMLViewInternal.h:
        * WebView/WebHTMLViewPrivate.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@14767 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 4e6f7fbc
2006-06-07 David Hyatt <hyatt@apple.com>
Add support for custom highlighting to WebKit.
Reviewed by justin
* WebCoreSupport/WebFrameBridge.m:
(-[WebFrameBridge paintCustomHighlight:forBox:onLine:behindText:]):
* WebView/WebHTMLView.m:
(-[WebHTMLView _highlighterForType:]):
* WebView/WebHTMLViewInternal.h:
* WebView/WebHTMLViewPrivate.h:
2006-06-07 Adele Peterson <adele@apple.com>
Reviewed by Hyatt.
......
......@@ -1514,6 +1514,18 @@ - (void)dashboardRegionsChanged:(NSMutableDictionary *)regions
}
}
- (void)paintCustomHighlight:(NSString*)type forBox:(NSRect)boxRect onLine:(NSRect)lineRect behindText:(BOOL)text
{
ASSERT(_frame != nil);
NSView *documentView = [[_frame frameView] documentView];
if (![documentView isKindOfClass:[WebHTMLView class]])
return;
WebHTMLView *webHTMLView = (WebHTMLView *)documentView;
id<WebHTMLHighlighter> highlighter = [webHTMLView _highlighterForType:type];
[highlighter paintHighlightForBox:boxRect onLine:lineRect behindText:text];
}
- (NSString *)nameForUndoAction:(WebUndoAction)undoAction
{
switch (undoAction) {
......
......@@ -5105,6 +5105,11 @@ - (void)_willMakeFirstResponderForNodeFocus
_private->willBecomeFirstResponderForNodeFocus = YES;
}
- (id<WebHTMLHighlighter>)_highlighterForType:(NSString*)type
{
return [_private->highlighters objectForKey:type];
}
- (WebFrame *)_frame
{
return [_private->dataSource webFrame];
......
......@@ -105,6 +105,7 @@
- (void)_pauseNullEventsForAllNetscapePlugins;
- (void)_resumeNullEventsForAllNetscapePlugins;
- (void)_willMakeFirstResponderForNodeFocus;
- (id<WebHTMLHighlighter>)_highlighterForType:(NSString*)type;
- (WebFrame *)_frame;
@end
......@@ -37,7 +37,7 @@
@class WebPluginController;
@protocol WebHTMLHighlighter
- (void)drawHighlight;
- (void)paintHighlightForBox:(NSRect)boxRect onLine:(NSRect)lineRect behindText:(BOOL)text;
@end
@interface WebHTMLView (WebPrivate)
......
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