Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(592)

Unified Diff: Source/core/editing/Editor.cpp

Issue 289273002: Oilpan: make DocumentFragment a heap allocated object. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased + add WillBeGarbageCollected FIXME. Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/editing/Editor.h ('k') | Source/core/editing/EditorCommand.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/Editor.cpp
diff --git a/Source/core/editing/Editor.cpp b/Source/core/editing/Editor.cpp
index a91f9e264bb4617b32adb3b991b1cf02e02eb208..4ba7c7b891a6e82f05235292b2d82332176700fc 100644
--- a/Source/core/editing/Editor.cpp
+++ b/Source/core/editing/Editor.cpp
@@ -350,7 +350,7 @@ void Editor::pasteAsPlainText(const String& pastingText, bool smartReplace)
target->dispatchEvent(TextEvent::createForPlainTextPaste(m_frame.domWindow(), pastingText, smartReplace), IGNORE_EXCEPTION);
}
-void Editor::pasteAsFragment(PassRefPtr<DocumentFragment> pastingFragment, bool smartReplace, bool matchStyle)
+void Editor::pasteAsFragment(PassRefPtrWillBeRawPtr<DocumentFragment> pastingFragment, bool smartReplace, bool matchStyle)
{
Node* target = findEventTargetFromSelection();
if (!target)
@@ -388,7 +388,7 @@ void Editor::pasteAsPlainTextWithPasteboard(Pasteboard* pasteboard)
void Editor::pasteWithPasteboard(Pasteboard* pasteboard)
{
RefPtrWillBeRawPtr<Range> range = selectedRange();
- RefPtr<DocumentFragment> fragment;
+ RefPtrWillBeRawPtr<DocumentFragment> fragment = nullptr;
bool chosePlainText = false;
if (pasteboard->isHTMLAvailable()) {
@@ -483,7 +483,7 @@ bool Editor::canSmartReplaceWithPasteboard(Pasteboard* pasteboard)
return smartInsertDeleteEnabled() && pasteboard->canSmartReplace();
}
-void Editor::replaceSelectionWithFragment(PassRefPtr<DocumentFragment> fragment, bool selectReplacement, bool smartReplace, bool matchStyle)
+void Editor::replaceSelectionWithFragment(PassRefPtrWillBeRawPtr<DocumentFragment> fragment, bool selectReplacement, bool smartReplace, bool matchStyle)
{
if (m_frame.selection().isNone() || !m_frame.selection().isContentEditable() || !fragment)
return;
« no previous file with comments | « Source/core/editing/Editor.h ('k') | Source/core/editing/EditorCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698