Reviewed by timo and Darin.
<rdar://problem/
4618584> "Paste and Match Style" is not working in Mail (add SPI)
* WebCore.xcodeproj/project.pbxproj:
* bridge/mac/WebCoreFrameBridge.h:
* bridge/mac/WebCoreFrameBridge.mm:
(-[WebCoreFrameBridge replaceSelectionWithNode:selectReplacement:smartReplace:matchStyle:]):
Add matchStyle parameter for use by WebKit.
WebKit:
Reviewed by timo and Darin.
<rdar://problem/
4618584> "Paste and Match Style" is not working in Mail (add SPI)
* WebKit.xcodeproj/project.pbxproj:
* WebView/WebView.m:
(-[WebView replaceSelectionWithNode:]):
(-[WebView _replaceSelectionWithNode:matchStyle:]):
* WebView/WebViewPrivate.h:
(-[WebView _replaceSelectionWithNode:matchStyle::]):
New SPI that is same as replaceSelectionWithNode: with added parameter whether to match existing style.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15633
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2006-07-25 David Harrison <harrison@apple.com>
+
+ Reviewed by timo and Darin.
+
+ <rdar://problem/4618584> "Paste and Match Style" is not working in Mail (add SPI)
+
+ * WebCore.xcodeproj/project.pbxproj:
+ * bridge/mac/WebCoreFrameBridge.h:
+ * bridge/mac/WebCoreFrameBridge.mm:
+ (-[WebCoreFrameBridge replaceSelectionWithNode:selectReplacement:smartReplace:matchStyle:]):
+ Add matchStyle parameter for use by WebKit.
+
2006-07-25 Justin Garcia <justin.garcia@apple.com>
Reviewed by adele
- (DOMDocumentFragment *)documentFragmentWithNodesAsParagraphs:(NSArray *)nodes;
- (void)replaceSelectionWithFragment:(DOMDocumentFragment *)fragment selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace matchStyle:(BOOL)matchStyle;
-- (void)replaceSelectionWithNode:(DOMNode *)node selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace;
+- (void)replaceSelectionWithNode:(DOMNode *)node selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace matchStyle:(BOOL)matchStyle;
- (void)replaceSelectionWithMarkupString:(NSString *)markupString baseURLString:(NSString *)baseURLString selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace;
- (void)replaceSelectionWithText:(NSString *)text selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace;
[self ensureSelectionVisible];
}
-- (void)replaceSelectionWithNode:(DOMNode *)node selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace
+- (void)replaceSelectionWithNode:(DOMNode *)node selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace matchStyle:(BOOL)matchStyle
{
DOMDocumentFragment *fragment = [[self DOMDocument] createDocumentFragment];
[fragment appendChild:node];
- [self replaceSelectionWithFragment:fragment selectReplacement:selectReplacement smartReplace:smartReplace matchStyle:NO];
+ [self replaceSelectionWithFragment:fragment selectReplacement:selectReplacement smartReplace:smartReplace matchStyle:matchStyle];
}
- (void)replaceSelectionWithMarkupString:(NSString *)markupString baseURLString:(NSString *)baseURLString selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace
+2006-07-25 David Harrison <harrison@apple.com>
+
+ Reviewed by timo and Darin.
+
+ <rdar://problem/4618584> "Paste and Match Style" is not working in Mail (add SPI)
+
+ * WebKit.xcodeproj/project.pbxproj:
+ * WebView/WebView.m:
+ (-[WebView replaceSelectionWithNode:]):
+ (-[WebView _replaceSelectionWithNode:matchStyle:]):
+ * WebView/WebViewPrivate.h:
+ (-[WebView _replaceSelectionWithNode:matchStyle::]):
+ New SPI that is same as replaceSelectionWithNode: with added parameter whether to match existing style.
+
2006-07-24 Darin Adler <darin@apple.com>
Reviewed by Adele and Justin.
- (void)replaceSelectionWithNode:(DOMNode *)node
{
- [[self _bridgeForSelectedOrMainFrame] replaceSelectionWithNode:node selectReplacement:YES smartReplace:NO];
+ [[self _bridgeForSelectedOrMainFrame] replaceSelectionWithNode:node selectReplacement:YES smartReplace:NO matchStyle:NO];
}
- (void)replaceSelectionWithText:(NSString *)text
_private->selectWordBeforeMenuEvent = flag;
}
+- (void)_replaceSelectionWithNode:(DOMNode *)node matchStyle:(BOOL)matchStyle
+{
+ [[self _bridgeForSelectedOrMainFrame] replaceSelectionWithNode:node selectReplacement:YES smartReplace:NO matchStyle:matchStyle];
+}
+
@end
static WebFrameView *containingFrameView(NSView *view)
- (void)_insertNewlineInQuotedContent;
- (BOOL)_selectWordBeforeMenuEvent;
- (void)_setSelectWordBeforeMenuEvent:(BOOL)flag;
+- (void)_replaceSelectionWithNode:(DOMNode *)node matchStyle:(BOOL)matchStyle;
@end
@interface _WebSafeForwarder : NSObject