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

Unified Diff: Source/core/page/DragController.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/inspector/InspectorDOMAgent.cpp ('k') | Source/core/page/DragData.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/DragController.cpp
diff --git a/Source/core/page/DragController.cpp b/Source/core/page/DragController.cpp
index d2990cb7747d16a08e43b6b994d9435df01fc33f..16f8afff1c21cc42a57a4f32e23bf9c5cd6467a2 100644
--- a/Source/core/page/DragController.cpp
+++ b/Source/core/page/DragController.cpp
@@ -148,15 +148,14 @@ PassOwnPtr<DragController> DragController::create(Page* page, DragClient* client
return adoptPtr(new DragController(page, client));
}
-static PassRefPtr<DocumentFragment> documentFragmentFromDragData(DragData* dragData, LocalFrame* frame, RefPtrWillBeRawPtr<Range> context,
- bool allowPlainText, bool& chosePlainText)
+static PassRefPtrWillBeRawPtr<DocumentFragment> documentFragmentFromDragData(DragData* dragData, LocalFrame* frame, RefPtrWillBeRawPtr<Range> context, bool allowPlainText, bool& chosePlainText)
{
ASSERT(dragData);
chosePlainText = false;
Document& document = context->ownerDocument();
if (dragData->containsCompatibleContent()) {
- if (PassRefPtr<DocumentFragment> fragment = dragData->asFragment(frame, context, allowPlainText, chosePlainText))
+ if (PassRefPtrWillBeRawPtr<DocumentFragment> fragment = dragData->asFragment(frame, context, allowPlainText, chosePlainText))
return fragment;
if (dragData->containsURL(DragData::DoNotConvertFilenames)) {
@@ -174,7 +173,7 @@ static PassRefPtr<DocumentFragment> documentFragmentFromDragData(DragData* dragD
}
RefPtr<Node> anchorText = document.createTextNode(title);
anchor->appendChild(anchorText);
- RefPtr<DocumentFragment> fragment = document.createDocumentFragment();
+ RefPtrWillBeRawPtr<DocumentFragment> fragment = document.createDocumentFragment();
fragment->appendChild(anchor);
return fragment.release();
}
@@ -494,7 +493,7 @@ bool DragController::concludeEditDrag(DragData* dragData)
ResourceCacheValidationSuppressor validationSuppressor(fetcher);
if (dragIsMove(innerFrame->selection(), dragData) || dragCaret.isContentRichlyEditable()) {
bool chosePlainText = false;
- RefPtr<DocumentFragment> fragment = documentFragmentFromDragData(dragData, innerFrame.get(), range, true, chosePlainText);
+ RefPtrWillBeRawPtr<DocumentFragment> fragment = documentFragmentFromDragData(dragData, innerFrame.get(), range, true, chosePlainText);
if (!fragment)
return false;
« no previous file with comments | « Source/core/inspector/InspectorDOMAgent.cpp ('k') | Source/core/page/DragData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698