| 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 1286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1297 false); | 1297 false); |
| 1298 applyParagraphStyleToSelection( | 1298 applyParagraphStyleToSelection( |
| 1299 style, InputEvent::InputType::FormatSetBlockTextDirection); | 1299 style, InputEvent::InputType::FormatSetBlockTextDirection); |
| 1300 } | 1300 } |
| 1301 | 1301 |
| 1302 void Editor::revealSelectionAfterEditingOperation( | 1302 void Editor::revealSelectionAfterEditingOperation( |
| 1303 const ScrollAlignment& alignment, | 1303 const ScrollAlignment& alignment, |
| 1304 RevealExtentOption revealExtentOption) { | 1304 RevealExtentOption revealExtentOption) { |
| 1305 if (m_preventRevealSelection) | 1305 if (m_preventRevealSelection) |
| 1306 return; | 1306 return; |
| 1307 if (!frame().selection().isAvailable()) |
| 1308 return; |
| 1307 frame().selection().revealSelection(alignment, revealExtentOption); | 1309 frame().selection().revealSelection(alignment, revealExtentOption); |
| 1308 } | 1310 } |
| 1309 | 1311 |
| 1310 void Editor::transpose() { | 1312 void Editor::transpose() { |
| 1311 if (!canEdit()) | 1313 if (!canEdit()) |
| 1312 return; | 1314 return; |
| 1313 | 1315 |
| 1314 VisibleSelection selection = frame().selection().selection(); | 1316 VisibleSelection selection = frame().selection().selection(); |
| 1315 if (!selection.isCaret()) | 1317 if (!selection.isCaret()) |
| 1316 return; | 1318 return; |
| (...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1702 } | 1704 } |
| 1703 | 1705 |
| 1704 DEFINE_TRACE(Editor) { | 1706 DEFINE_TRACE(Editor) { |
| 1705 visitor->trace(m_frame); | 1707 visitor->trace(m_frame); |
| 1706 visitor->trace(m_lastEditCommand); | 1708 visitor->trace(m_lastEditCommand); |
| 1707 visitor->trace(m_undoStack); | 1709 visitor->trace(m_undoStack); |
| 1708 visitor->trace(m_mark); | 1710 visitor->trace(m_mark); |
| 1709 } | 1711 } |
| 1710 | 1712 |
| 1711 } // namespace blink | 1713 } // namespace blink |
| OLD | NEW |