| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2011 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 798 | 798 |
| 799 // Insert the text | 799 // Insert the text |
| 800 TypingCommand::Options options = 0; | 800 TypingCommand::Options options = 0; |
| 801 if (selectInsertedText) | 801 if (selectInsertedText) |
| 802 options |= TypingCommand::SelectInsertedText; | 802 options |= TypingCommand::SelectInsertedText; |
| 803 TypingCommand::insertText(*document.get(), text, selection, options,
triggeringEvent && triggeringEvent->isComposition() ? TypingCommand::TextCompos
itionConfirm : TypingCommand::TextCompositionNone); | 803 TypingCommand::insertText(*document.get(), text, selection, options,
triggeringEvent && triggeringEvent->isComposition() ? TypingCommand::TextCompos
itionConfirm : TypingCommand::TextCompositionNone); |
| 804 | 804 |
| 805 // Reveal the current selection | 805 // Reveal the current selection |
| 806 if (LocalFrame* editedFrame = document->frame()) { | 806 if (LocalFrame* editedFrame = document->frame()) { |
| 807 if (Page* page = editedFrame->page()) | 807 if (Page* page = editedFrame->page()) |
| 808 page->focusController().focusedOrMainFrame()->selection().re
vealSelection(ScrollAlignment::alignCenterIfNeeded); | 808 toLocalFrame(page->focusController().focusedOrMainFrame())->
selection().revealSelection(ScrollAlignment::alignCenterIfNeeded); |
| 809 } | 809 } |
| 810 } | 810 } |
| 811 } | 811 } |
| 812 | 812 |
| 813 return true; | 813 return true; |
| 814 } | 814 } |
| 815 | 815 |
| 816 bool Editor::insertLineBreak() | 816 bool Editor::insertLineBreak() |
| 817 { | 817 { |
| 818 if (!canEdit()) | 818 if (!canEdit()) |
| (...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1229 return m_frame.spellChecker(); | 1229 return m_frame.spellChecker(); |
| 1230 } | 1230 } |
| 1231 | 1231 |
| 1232 void Editor::toggleOverwriteModeEnabled() | 1232 void Editor::toggleOverwriteModeEnabled() |
| 1233 { | 1233 { |
| 1234 m_overwriteModeEnabled = !m_overwriteModeEnabled; | 1234 m_overwriteModeEnabled = !m_overwriteModeEnabled; |
| 1235 frame().selection().setShouldShowBlockCursor(m_overwriteModeEnabled); | 1235 frame().selection().setShouldShowBlockCursor(m_overwriteModeEnabled); |
| 1236 } | 1236 } |
| 1237 | 1237 |
| 1238 } // namespace WebCore | 1238 } // namespace WebCore |
| OLD | NEW |