| 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 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 bool Editor::canPaste() const { | 324 bool Editor::canPaste() const { |
| 325 return canEdit(); | 325 return canEdit(); |
| 326 } | 326 } |
| 327 | 327 |
| 328 bool Editor::canDelete() const { | 328 bool Editor::canDelete() const { |
| 329 FrameSelection& selection = frame().selection(); | 329 FrameSelection& selection = frame().selection(); |
| 330 return selection.computeVisibleSelectionInDOMTreeDeprecated().isRange() && | 330 return selection.computeVisibleSelectionInDOMTreeDeprecated().isRange() && |
| 331 selection.computeVisibleSelectionInDOMTree().rootEditableElement(); | 331 selection.computeVisibleSelectionInDOMTree().rootEditableElement(); |
| 332 } | 332 } |
| 333 | 333 |
| 334 bool Editor::canSelectAll() const { |
| 335 return frame().selection().canSelectAll(); |
| 336 } |
| 337 |
| 334 bool Editor::smartInsertDeleteEnabled() const { | 338 bool Editor::smartInsertDeleteEnabled() const { |
| 335 if (Settings* settings = frame().settings()) | 339 if (Settings* settings = frame().settings()) |
| 336 return settings->getSmartInsertDeleteEnabled(); | 340 return settings->getSmartInsertDeleteEnabled(); |
| 337 return false; | 341 return false; |
| 338 } | 342 } |
| 339 | 343 |
| 340 bool Editor::canSmartCopyOrDelete() const { | 344 bool Editor::canSmartCopyOrDelete() const { |
| 341 return smartInsertDeleteEnabled() && | 345 return smartInsertDeleteEnabled() && |
| 342 frame().selection().granularity() == WordGranularity; | 346 frame().selection().granularity() == WordGranularity; |
| 343 } | 347 } |
| (...skipping 1422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1766 | 1770 |
| 1767 DEFINE_TRACE(Editor) { | 1771 DEFINE_TRACE(Editor) { |
| 1768 visitor->trace(m_frame); | 1772 visitor->trace(m_frame); |
| 1769 visitor->trace(m_lastEditCommand); | 1773 visitor->trace(m_lastEditCommand); |
| 1770 visitor->trace(m_undoStack); | 1774 visitor->trace(m_undoStack); |
| 1771 visitor->trace(m_mark); | 1775 visitor->trace(m_mark); |
| 1772 visitor->trace(m_typingStyle); | 1776 visitor->trace(m_typingStyle); |
| 1773 } | 1777 } |
| 1774 | 1778 |
| 1775 } // namespace blink | 1779 } // namespace blink |
| OLD | NEW |