diff options
Diffstat (limited to 'WebKit/mac/WebView/WebHTMLView.mm')
| -rw-r--r-- | WebKit/mac/WebView/WebHTMLView.mm | 36 |
1 files changed, 1 insertions, 35 deletions
diff --git a/WebKit/mac/WebView/WebHTMLView.mm b/WebKit/mac/WebView/WebHTMLView.mm index a60ae12..e40500c 100644 --- a/WebKit/mac/WebView/WebHTMLView.mm +++ b/WebKit/mac/WebView/WebHTMLView.mm @@ -353,7 +353,6 @@ static CachedResourceClient* promisedDataClient() - (DOMDocumentFragment *)_documentFragmentFromPasteboard:(NSPasteboard *)pasteboard inContext:(DOMRange *)context allowPlainText:(BOOL)allowPlainText; - (NSString *)_plainTextFromPasteboard:(NSPasteboard *)pasteboard; - (void)_pasteWithPasteboard:(NSPasteboard *)pasteboard allowPlainText:(BOOL)allowPlainText; -- (void)_pasteAsPlainTextWithPasteboard:(NSPasteboard *)pasteboard; - (void)_removeMouseMovedObserverUnconditionally; - (void)_removeSuperviewObservers; - (void)_removeWindowObservers; @@ -874,19 +873,6 @@ static NSURL* uniqueURLWithRelativePart(NSString *relativePart) [webView release]; } -- (void)_pasteAsPlainTextWithPasteboard:(NSPasteboard *)pasteboard -{ - WebView *webView = [[self _webView] retain]; - [webView _setInsertionPasteboard:pasteboard]; - - NSString *text = [self _plainTextFromPasteboard:pasteboard]; - if ([self _shouldReplaceSelectionWithText:text givenAction:WebViewInsertActionPasted]) - [[self _frame] _replaceSelectionWithText:text selectReplacement:NO smartReplace:[self _canSmartReplaceWithPasteboard:pasteboard]]; - - [webView _setInsertionPasteboard:nil]; - [webView release]; -} - - (void)_removeMouseMovedObserverUnconditionally { if (!_private || !_private->observingMouseMovedNotifications) @@ -2576,6 +2562,7 @@ WEBCORE_COMMAND(pageDown) WEBCORE_COMMAND(pageDownAndModifySelection) WEBCORE_COMMAND(pageUp) WEBCORE_COMMAND(pageUpAndModifySelection) +WEBCORE_COMMAND(pasteAsPlainText) WEBCORE_COMMAND(selectAll) WEBCORE_COMMAND(selectLine) WEBCORE_COMMAND(selectParagraph) @@ -2615,18 +2602,6 @@ WEBCORE_COMMAND(yankAndSelect) return YES; } -- (BOOL)readSelectionFromPasteboard:(NSPasteboard *)pasteboard -{ - Frame* coreFrame = core([self _frame]); - if (!coreFrame) - return NO; - if (coreFrame->selection()->isContentRichlyEditable()) - [self _pasteWithPasteboard:pasteboard allowPlainText:YES]; - else - [self _pasteAsPlainTextWithPasteboard:pasteboard]; - return YES; -} - - (id)validRequestorForSendType:(NSString *)sendType returnType:(NSString *)returnType { BOOL isSendTypeOK = !sendType || ([[self pasteboardTypesForSelection] containsObject:sendType] && [self _hasSelection]); @@ -5162,15 +5137,6 @@ static BOOL writingDirectionKeyBindingsEnabled() coreFrame->editor()->pasteAsPlainText(); } -- (void)pasteAsPlainText:(id)sender -{ - COMMAND_PROLOGUE - - if (![self _canEdit]) - return; - [self _pasteAsPlainTextWithPasteboard:[NSPasteboard generalPasteboard]]; -} - - (void)closeIfNotCurrentView { if ([[[self _frame] frameView] documentView] != self) |
