Modified: trunk/Source/WebCore/editing/Editor.cpp (154711 => 154712)
--- trunk/Source/WebCore/editing/Editor.cpp 2013-08-27 22:23:16 UTC (rev 154711)
+++ trunk/Source/WebCore/editing/Editor.cpp 2013-08-27 22:25:19 UTC (rev 154712)
@@ -414,7 +414,7 @@
void Editor::pasteAsPlainTextBypassingDHTML()
{
- pasteAsPlainTextWithPasteboard(Pasteboard::generalPasteboard());
+ pasteAsPlainTextWithPasteboard(Pasteboard::createForCopyAndPaste().get());
}
void Editor::pasteAsPlainTextWithPasteboard(Pasteboard* pasteboard)
@@ -706,7 +706,7 @@
target->dispatchEvent(event, IGNORE_EXCEPTION);
bool noDefaultProcessing = event->defaultPrevented();
if (noDefaultProcessing && policy == ClipboardWritable) {
- Pasteboard* pasteboard = Pasteboard::generalPasteboard();
+ OwnPtr<Pasteboard> pasteboard = Pasteboard::createForCopyAndPaste();
pasteboard->clear();
pasteboard->writePasteboard(clipboard->pasteboard());
}
@@ -1041,10 +1041,10 @@
if (shouldDeleteRange(selection.get())) {
updateMarkersForWordsAffectedByEditing(true);
if (enclosingTextFormControl(m_frame.selection().start())) {
- Pasteboard::generalPasteboard()->writePlainText(selectedTextForClipboard(),
+ Pasteboard::createForCopyAndPaste()->writePlainText(selectedTextForClipboard(),
canSmartCopyOrDelete() ? Pasteboard::CanSmartReplace : Pasteboard::CannotSmartReplace);
} else
- Pasteboard::generalPasteboard()->writeSelection(selection.get(), canSmartCopyOrDelete(), &m_frame, IncludeImageAltTextForClipboard);
+ Pasteboard::createForCopyAndPaste()->writeSelection(selection.get(), canSmartCopyOrDelete(), &m_frame, IncludeImageAltTextForClipboard);
didWriteSelectionToPasteboard();
deleteSelectionWithSmartDelete(canSmartCopyOrDelete());
}
@@ -1061,14 +1061,14 @@
willWriteSelectionToPasteboard(selectedRange());
if (enclosingTextFormControl(m_frame.selection().start())) {
- Pasteboard::generalPasteboard()->writePlainText(selectedTextForClipboard(),
+ Pasteboard::createForCopyAndPaste()->writePlainText(selectedTextForClipboard(),
canSmartCopyOrDelete() ? Pasteboard::CanSmartReplace : Pasteboard::CannotSmartReplace);
} else {
Document* document = m_frame.document();
if (HTMLImageElement* imageElement = imageElementFromImageDocument(document))
- Pasteboard::generalPasteboard()->writeImage(imageElement, document->url(), document->title());
+ Pasteboard::createForCopyAndPaste()->writeImage(imageElement, document->url(), document->title());
else
- Pasteboard::generalPasteboard()->writeSelection(selectedRange().get(), canSmartCopyOrDelete(), &m_frame, IncludeImageAltTextForClipboard);
+ Pasteboard::createForCopyAndPaste()->writeSelection(selectedRange().get(), canSmartCopyOrDelete(), &m_frame, IncludeImageAltTextForClipboard);
}
didWriteSelectionToPasteboard();
@@ -1085,9 +1085,9 @@
CachedResourceLoader* loader = m_frame.document()->cachedResourceLoader();
ResourceCacheValidationSuppressor validationSuppressor(loader);
if (m_frame.selection().isContentRichlyEditable())
- pasteWithPasteboard(Pasteboard::generalPasteboard(), true);
+ pasteWithPasteboard(Pasteboard::createForCopyAndPaste().get(), true);
else
- pasteAsPlainTextWithPasteboard(Pasteboard::generalPasteboard());
+ pasteAsPlainTextWithPasteboard(Pasteboard::createForCopyAndPaste().get());
}
void Editor::pasteAsPlainText()
@@ -1097,7 +1097,7 @@
if (!canPaste())
return;
updateMarkersForWordsAffectedByEditing(false);
- pasteAsPlainTextWithPasteboard(Pasteboard::generalPasteboard());
+ pasteAsPlainTextWithPasteboard(Pasteboard::createForCopyAndPaste().get());
}
void Editor::performDelete()
@@ -1135,7 +1135,7 @@
void Editor::copyURL(const KURL& url, const String& title)
{
- Pasteboard::generalPasteboard()->writeURL(url, title, &m_frame);
+ Pasteboard::createForCopyAndPaste()->writeURL(url, title, &m_frame);
}
void Editor::copyImage(const HitTestResult& result)
@@ -1144,7 +1144,7 @@
if (url.isEmpty())
url = ""
- Pasteboard::generalPasteboard()->writeImage(result.innerNonSharedNode(), url, result.altDisplayString());
+ Pasteboard::createForCopyAndPaste()->writeImage(result.innerNonSharedNode(), url, result.altDisplayString());
}
bool Editor::isContinuousSpellCheckingEnabled() const