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

Unified Diff: Source/WebCore/page/DragController.cpp

Issue 10757006: Merge 121031 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1132/
Patch Set: Created 8 years, 5 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 | « LayoutTests/editing/pasteboard/drop-text-events-sideeffect-crash-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/page/DragController.cpp
===================================================================
--- Source/WebCore/page/DragController.cpp (revision 122136)
+++ Source/WebCore/page/DragController.cpp (working copy)
@@ -436,10 +436,10 @@
Element* element = elementUnderMouse(m_documentUnderMouse.get(), point);
if (!element)
return false;
- Frame* innerFrame = element->ownerDocument()->frame();
+ RefPtr<Frame> innerFrame = element->ownerDocument()->frame();
ASSERT(innerFrame);
- if (m_page->dragCaretController()->hasCaret() && !dispatchTextInputEventFor(innerFrame, dragData))
+ if (m_page->dragCaretController()->hasCaret() && !dispatchTextInputEventFor(innerFrame.get(), dragData))
return true;
if (dragData->containsColor()) {
@@ -490,7 +490,7 @@
ResourceCacheValidationSuppressor validationSuppressor(cachedResourceLoader);
if (dragIsMove(innerFrame->selection(), dragData) || dragCaret.isContentRichlyEditable()) {
bool chosePlainText = false;
- RefPtr<DocumentFragment> fragment = documentFragmentFromDragData(dragData, innerFrame, range, true, chosePlainText);
+ RefPtr<DocumentFragment> fragment = documentFragmentFromDragData(dragData, innerFrame.get(), range, true, chosePlainText);
if (!fragment || !innerFrame->editor()->shouldInsertFragment(fragment, range, EditorInsertActionDropped)) {
return false;
}
@@ -503,7 +503,7 @@
bool smartInsert = smartDelete && innerFrame->selection()->granularity() == WordGranularity && dragData->canSmartReplace();
applyCommand(MoveSelectionCommand::create(fragment, dragCaret.base(), smartInsert, smartDelete));
} else {
- if (setSelectionToDragCaret(innerFrame, dragCaret, range, point)) {
+ if (setSelectionToDragCaret(innerFrame.get(), dragCaret, range, point)) {
ReplaceSelectionCommand::CommandOptions options = ReplaceSelectionCommand::SelectReplacement | ReplaceSelectionCommand::PreventNesting;
if (dragData->canSmartReplace())
options |= ReplaceSelectionCommand::SmartReplace;
@@ -513,13 +513,13 @@
}
}
} else {
- String text = dragData->asPlainText(innerFrame);
+ String text = dragData->asPlainText(innerFrame.get());
if (text.isEmpty() || !innerFrame->editor()->shouldInsertText(text, range.get(), EditorInsertActionDropped)) {
return false;
}
m_client->willPerformDragDestinationAction(DragDestinationActionEdit, dragData);
- if (setSelectionToDragCaret(innerFrame, dragCaret, range, point))
+ if (setSelectionToDragCaret(innerFrame.get(), dragCaret, range, point))
applyCommand(ReplaceSelectionCommand::create(m_documentUnderMouse.get(), createFragmentFromText(range.get(), text), ReplaceSelectionCommand::SelectReplacement | ReplaceSelectionCommand::MatchStyle | ReplaceSelectionCommand::PreventNesting));
}
« no previous file with comments | « LayoutTests/editing/pasteboard/drop-text-events-sideeffect-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698