| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 RefPtr<Range> range = selectedRange(); | 82 RefPtr<Range> range = selectedRange(); |
| 83 bool choosePlainText; | 83 bool choosePlainText; |
| 84 | 84 |
| 85 m_frame->editor()->client()->setInsertionPasteboard(NSGeneralPboard); | 85 m_frame->editor()->client()->setInsertionPasteboard(NSGeneralPboard); |
| 86 RefPtr<DocumentFragment> fragment = pasteboard->documentFragment(m_frame, ra
nge, allowPlainText, choosePlainText); | 86 RefPtr<DocumentFragment> fragment = pasteboard->documentFragment(m_frame, ra
nge, allowPlainText, choosePlainText); |
| 87 if (fragment && shouldInsertFragment(fragment, range, EditorInsertActionPast
ed)) | 87 if (fragment && shouldInsertFragment(fragment, range, EditorInsertActionPast
ed)) |
| 88 pasteAsFragment(fragment, canSmartReplaceWithPasteboard(pasteboard), fal
se); | 88 pasteAsFragment(fragment, canSmartReplaceWithPasteboard(pasteboard), fal
se); |
| 89 m_frame->editor()->client()->setInsertionPasteboard(String()); | 89 m_frame->editor()->client()->setInsertionPasteboard(String()); |
| 90 } | 90 } |
| 91 | 91 |
| 92 bool Editor::insertParagraphSeparatorInQuotedContent() | |
| 93 { | |
| 94 // FIXME: Why is this missing calls to canEdit, canEditRichly, etc... | |
| 95 TypingCommand::insertParagraphSeparatorInQuotedContent(m_frame->document()); | |
| 96 revealSelectionAfterEditingOperation(); | |
| 97 return true; | |
| 98 } | |
| 99 | |
| 100 static RenderStyle* styleForSelectionStart(Frame* frame, Node *&nodeToRemove) | 92 static RenderStyle* styleForSelectionStart(Frame* frame, Node *&nodeToRemove) |
| 101 { | 93 { |
| 102 nodeToRemove = 0; | 94 nodeToRemove = 0; |
| 103 | 95 |
| 104 if (frame->selection()->isNone()) | 96 if (frame->selection()->isNone()) |
| 105 return 0; | 97 return 0; |
| 106 | 98 |
| 107 Position position = frame->selection()->selection().visibleStart().deepEquiv
alent(); | 99 Position position = frame->selection()->selection().visibleStart().deepEquiv
alent(); |
| 108 if (!position.isCandidate() || position.isNull()) | 100 if (!position.isCandidate() || position.isNull()) |
| 109 return 0; | 101 return 0; |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 { | 259 { |
| 268 return Pasteboard::getStringSelection(m_frame, DefaultSelectedTextType); | 260 return Pasteboard::getStringSelection(m_frame, DefaultSelectedTextType); |
| 269 } | 261 } |
| 270 | 262 |
| 271 PassRefPtr<SharedBuffer> Editor::dataSelectionForPasteboard(const String& pasteb
oardType) | 263 PassRefPtr<SharedBuffer> Editor::dataSelectionForPasteboard(const String& pasteb
oardType) |
| 272 { | 264 { |
| 273 return Pasteboard::getDataSelection(m_frame, pasteboardType); | 265 return Pasteboard::getDataSelection(m_frame, pasteboardType); |
| 274 } | 266 } |
| 275 | 267 |
| 276 } // namespace WebCore | 268 } // namespace WebCore |
| OLD | NEW |