WebCore:

        Reviewed by Darin Adler.
        
        <rdar://problem/5708115> REGRESSION: Words selected with a double click and copied won't paste into Mail

        * page/mac/WebCoreFrameBridge.h: Re-exposed smartInsertForString:, it's used by a WebKit method used by Mail.

WebKit/mac:

        Reviewed by Darin Adler.
        
        <rdar://problem/5708115> REGRESSION: Words selected with a double click and copied won't paste into Mail

        * WebView/WebHTMLView.mm:
        (-[WebHTMLView _smartInsertForString:replacingRange:beforeString:afterString:]): Brought 
        this back, it's used by Mail.
        (-[WebHTMLView _canSmartReplaceWithPasteboard:]): This WebInternal method is
        also used by Mail.  Moved to WebPrivate.
        * WebView/WebHTMLViewPrivate.h: Expose two methods that Mail uses here, so that we don't
        accidently remove them in the future.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@29889 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 1c699690
2008-01-30 Justin Garcia <justin.garcia@apple.com>
Reviewed by Darin Adler.
<rdar://problem/5708115> REGRESSION: Words selected with a double click and copied won't paste into Mail
* page/mac/WebCoreFrameBridge.h: Re-exposed smartInsertForString:, it's used by a WebKit method used by Mail.
2008-01-31 Adam Roben <aroben@apple.com>
Add line box drawing code to InspectorController::drawNodeHighlight
......@@ -175,6 +175,7 @@ enum WebScrollGranularity {
- (DOMRange *)rangeByAlteringCurrentSelection:(WebCore::SelectionController::EAlteration)alteration direction:(WebCore::SelectionController::EDirection)direction granularity:(WebCore::TextGranularity)granularity;
- (WebCore::TextGranularity)selectionGranularity;
- (void)smartInsertForString:(NSString *)pasteString replacingRange:(DOMRange *)charRangeToReplace beforeString:(NSString **)beforeString afterString:(NSString **)afterString;
- (void)selectNSRange:(NSRange)range;
- (NSRange)selectedNSRange;
- (NSRange)markedTextNSRange;
......
2008-01-30 Justin Garcia <justin.garcia@apple.com>
Reviewed by Darin Adler.
<rdar://problem/5708115> REGRESSION: Words selected with a double click and copied won't paste into Mail
* WebView/WebHTMLView.mm:
(-[WebHTMLView _smartInsertForString:replacingRange:beforeString:afterString:]): Brought
this back, it's used by Mail.
(-[WebHTMLView _canSmartReplaceWithPasteboard:]): This WebInternal method is
also used by Mail. Moved to WebPrivate.
* WebView/WebHTMLViewPrivate.h: Expose two methods that Mail uses here, so that we don't
accidently remove them in the future.
2008-01-30 Mark Rowe <mrowe@apple.com>
Reviewed by Oliver Hunt.
......
......@@ -295,7 +295,6 @@ static CachedResourceClient* promisedDataClient()
- (void)_updateTextSizeMultiplier;
- (DOMRange *)_selectedRange;
- (BOOL)_shouldDeleteRange:(DOMRange *)range;
- (BOOL)_canSmartReplaceWithPasteboard:(NSPasteboard *)pasteboard;
- (NSView *)_hitViewForEvent:(NSEvent *)event;
- (void)_writeSelectionWithPasteboardTypes:(NSArray *)types toPasteboard:(NSPasteboard *)pasteboard cachedAttributedString:(NSAttributedString *)attributedString;
- (DOMRange *)_documentRange;
......@@ -730,11 +729,6 @@ static NSURL* uniqueURLWithRelativePart(NSString *relativePart)
return coreFrame && coreFrame->editor()->shouldDeleteRange(core(range));
}
- (BOOL)_canSmartReplaceWithPasteboard:(NSPasteboard *)pasteboard
{
return [[self _webView] smartInsertDeleteEnabled] && [[pasteboard types] containsObject:WebSmartPastePboardType];
}
- (NSView *)_hitViewForEvent:(NSEvent *)event
{
// Usually, we hack AK's hitTest method to catch all events at the topmost WebHTMLView.
......@@ -1518,6 +1512,24 @@ static void _updateMouseoverTimerCallback(CFRunLoopTimerRef timer, void *info)
[self _web_clearPrintingModeRecursive];
}
- (void)_smartInsertForString:(NSString *)pasteString replacingRange:(DOMRange *)rangeToReplace beforeString:(NSString **)beforeString afterString:(NSString **)afterString
{
if (!pasteString || !rangeToReplace || ![[self _webView] smartInsertDeleteEnabled]) {
if (beforeString)
*beforeString = nil;
if (afterString)
*afterString = nil;
return;
}
[[self _bridge] smartInsertForString:pasteString replacingRange:rangeToReplace beforeString:beforeString afterString:afterString];
}
- (BOOL)_canSmartReplaceWithPasteboard:(NSPasteboard *)pasteboard
{
return [[self _webView] smartInsertDeleteEnabled] && [[pasteboard types] containsObject:WebSmartPastePboardType];
}
- (void)_startAutoscrollTimer: (NSEvent *)triggerEvent
{
if (_private->autoscrollTimer == nil) {
......
......@@ -120,4 +120,7 @@
// Typically this would be called from inside an override of -[NSView knowsPageRange:].
- (void)_layoutForPrinting;
- (BOOL)_canSmartReplaceWithPasteboard:(NSPasteboard *)pasteboard;
@end
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