| 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 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 return client; | 221 return client; |
| 222 } | 222 } |
| 223 | 223 |
| 224 EditorClient& Editor::Client() const { | 224 EditorClient& Editor::Client() const { |
| 225 if (Page* page = GetFrame().GetPage()) | 225 if (Page* page = GetFrame().GetPage()) |
| 226 return page->GetEditorClient(); | 226 return page->GetEditorClient(); |
| 227 return GetEmptyEditorClient(); | 227 return GetEmptyEditorClient(); |
| 228 } | 228 } |
| 229 | 229 |
| 230 static bool IsCaretAtStartOfWrappedLine(const FrameSelection& selection) { | 230 static bool IsCaretAtStartOfWrappedLine(const FrameSelection& selection) { |
| 231 if (!selection.ComputeVisibleSelectionInDOMTreeDeprecated().IsCaret()) | 231 if (!selection.ComputeVisibleSelectionInDOMTree().IsCaret()) |
| 232 return false; | 232 return false; |
| 233 if (selection.GetSelectionInDOMTree().Affinity() != TextAffinity::kDownstream) | 233 if (selection.GetSelectionInDOMTree().Affinity() != TextAffinity::kDownstream) |
| 234 return false; | 234 return false; |
| 235 const Position& position = | 235 const Position& position = |
| 236 selection.ComputeVisibleSelectionInDOMTreeDeprecated().Start(); | 236 selection.ComputeVisibleSelectionInDOMTree().Start(); |
| 237 return !InSameLine(PositionWithAffinity(position, TextAffinity::kUpstream), | 237 return !InSameLine(PositionWithAffinity(position, TextAffinity::kUpstream), |
| 238 PositionWithAffinity(position, TextAffinity::kDownstream)); | 238 PositionWithAffinity(position, TextAffinity::kDownstream)); |
| 239 } | 239 } |
| 240 | 240 |
| 241 bool Editor::HandleTextEvent(TextEvent* event) { | 241 bool Editor::HandleTextEvent(TextEvent* event) { |
| 242 // Default event handling for Drag and Drop will be handled by DragController | 242 // Default event handling for Drag and Drop will be handled by DragController |
| 243 // so we leave the event for it. | 243 // so we leave the event for it. |
| 244 if (event->IsDrop()) | 244 if (event->IsDrop()) |
| 245 return false; | 245 return false; |
| 246 | 246 |
| (...skipping 1572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1819 | 1819 |
| 1820 DEFINE_TRACE(Editor) { | 1820 DEFINE_TRACE(Editor) { |
| 1821 visitor->Trace(frame_); | 1821 visitor->Trace(frame_); |
| 1822 visitor->Trace(last_edit_command_); | 1822 visitor->Trace(last_edit_command_); |
| 1823 visitor->Trace(undo_stack_); | 1823 visitor->Trace(undo_stack_); |
| 1824 visitor->Trace(mark_); | 1824 visitor->Trace(mark_); |
| 1825 visitor->Trace(typing_style_); | 1825 visitor->Trace(typing_style_); |
| 1826 } | 1826 } |
| 1827 | 1827 |
| 1828 } // namespace blink | 1828 } // namespace blink |
| OLD | NEW |