| 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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 return client; | 197 return client; |
| 198 } | 198 } |
| 199 | 199 |
| 200 EditorClient& Editor::client() const { | 200 EditorClient& Editor::client() const { |
| 201 if (Page* page = frame().page()) | 201 if (Page* page = frame().page()) |
| 202 return page->editorClient(); | 202 return page->editorClient(); |
| 203 return emptyEditorClient(); | 203 return emptyEditorClient(); |
| 204 } | 204 } |
| 205 | 205 |
| 206 static bool isCaretAtStartOfWrappedLine(const FrameSelection& selection) { | 206 static bool isCaretAtStartOfWrappedLine(const FrameSelection& selection) { |
| 207 if (!selection.isCaret()) | 207 if (!selection.computeVisibleSelectionInDOMTreeDeprecated().isCaret()) |
| 208 return false; | 208 return false; |
| 209 if (selection.affinity() != TextAffinity::Downstream) | 209 if (selection.affinity() != TextAffinity::Downstream) |
| 210 return false; | 210 return false; |
| 211 const Position& position = selection.start(); | 211 const Position& position = selection.start(); |
| 212 return !inSameLine(PositionWithAffinity(position, TextAffinity::Upstream), | 212 return !inSameLine(PositionWithAffinity(position, TextAffinity::Upstream), |
| 213 PositionWithAffinity(position, TextAffinity::Downstream)); | 213 PositionWithAffinity(position, TextAffinity::Downstream)); |
| 214 } | 214 } |
| 215 | 215 |
| 216 bool Editor::handleTextEvent(TextEvent* event) { | 216 bool Editor::handleTextEvent(TextEvent* event) { |
| 217 // Default event handling for Drag and Drop will be handled by DragController | 217 // Default event handling for Drag and Drop will be handled by DragController |
| (...skipping 1507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1725 | 1725 |
| 1726 DEFINE_TRACE(Editor) { | 1726 DEFINE_TRACE(Editor) { |
| 1727 visitor->trace(m_frame); | 1727 visitor->trace(m_frame); |
| 1728 visitor->trace(m_lastEditCommand); | 1728 visitor->trace(m_lastEditCommand); |
| 1729 visitor->trace(m_undoStack); | 1729 visitor->trace(m_undoStack); |
| 1730 visitor->trace(m_mark); | 1730 visitor->trace(m_mark); |
| 1731 visitor->trace(m_typingStyle); | 1731 visitor->trace(m_typingStyle); |
| 1732 } | 1732 } |
| 1733 | 1733 |
| 1734 } // namespace blink | 1734 } // namespace blink |
| OLD | NEW |