| 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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 !selection.isInPasswordField(); | 320 !selection.isInPasswordField(); |
| 321 } | 321 } |
| 322 | 322 |
| 323 bool Editor::canPaste() const { | 323 bool Editor::canPaste() const { |
| 324 return canEdit(); | 324 return canEdit(); |
| 325 } | 325 } |
| 326 | 326 |
| 327 bool Editor::canDelete() const { | 327 bool Editor::canDelete() const { |
| 328 FrameSelection& selection = frame().selection(); | 328 FrameSelection& selection = frame().selection(); |
| 329 return selection.computeVisibleSelectionInDOMTreeDeprecated().isRange() && | 329 return selection.computeVisibleSelectionInDOMTreeDeprecated().isRange() && |
| 330 selection.rootEditableElement(); | 330 selection.computeVisibleSelectionInDOMTree().rootEditableElement(); |
| 331 } | 331 } |
| 332 | 332 |
| 333 bool Editor::smartInsertDeleteEnabled() const { | 333 bool Editor::smartInsertDeleteEnabled() const { |
| 334 if (Settings* settings = frame().settings()) | 334 if (Settings* settings = frame().settings()) |
| 335 return settings->getSmartInsertDeleteEnabled(); | 335 return settings->getSmartInsertDeleteEnabled(); |
| 336 return false; | 336 return false; |
| 337 } | 337 } |
| 338 | 338 |
| 339 bool Editor::canSmartCopyOrDelete() const { | 339 bool Editor::canSmartCopyOrDelete() const { |
| 340 return smartInsertDeleteEnabled() && | 340 return smartInsertDeleteEnabled() && |
| (...skipping 1399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1740 | 1740 |
| 1741 DEFINE_TRACE(Editor) { | 1741 DEFINE_TRACE(Editor) { |
| 1742 visitor->trace(m_frame); | 1742 visitor->trace(m_frame); |
| 1743 visitor->trace(m_lastEditCommand); | 1743 visitor->trace(m_lastEditCommand); |
| 1744 visitor->trace(m_undoStack); | 1744 visitor->trace(m_undoStack); |
| 1745 visitor->trace(m_mark); | 1745 visitor->trace(m_mark); |
| 1746 visitor->trace(m_typingStyle); | 1746 visitor->trace(m_typingStyle); |
| 1747 } | 1747 } |
| 1748 | 1748 |
| 1749 } // namespace blink | 1749 } // namespace blink |
| OLD | NEW |