Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Side by Side Diff: third_party/WebKit/Source/core/events/InputEvent.cpp

Issue 2777863003: [InputEvent] Distinguish between soft line and hard line (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/events/InputEvent.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/events/InputEvent.h" 5 #include "core/events/InputEvent.h"
6 6
7 #include "core/dom/Range.h" 7 #include "core/dom/Range.h"
8 #include "core/events/EventDispatcher.h" 8 #include "core/events/EventDispatcher.h"
9 #include "public/platform/WebEditingCommandType.h" 9 #include "public/platform/WebEditingCommandType.h"
10 10
(...skipping 13 matching lines...) Expand all
24 {InputEvent::InputType::InsertUnorderedList, "insertUnorderedList"}, 24 {InputEvent::InputType::InsertUnorderedList, "insertUnorderedList"},
25 {InputEvent::InputType::InsertHorizontalRule, "insertHorizontalRule"}, 25 {InputEvent::InputType::InsertHorizontalRule, "insertHorizontalRule"},
26 {InputEvent::InputType::InsertFromPaste, "insertFromPaste"}, 26 {InputEvent::InputType::InsertFromPaste, "insertFromPaste"},
27 {InputEvent::InputType::InsertFromDrop, "insertFromDrop"}, 27 {InputEvent::InputType::InsertFromDrop, "insertFromDrop"},
28 {InputEvent::InputType::InsertFromYank, "insertFromYank"}, 28 {InputEvent::InputType::InsertFromYank, "insertFromYank"},
29 {InputEvent::InputType::InsertTranspose, "insertTranspose"}, 29 {InputEvent::InputType::InsertTranspose, "insertTranspose"},
30 {InputEvent::InputType::InsertReplacementText, "insertReplacementText"}, 30 {InputEvent::InputType::InsertReplacementText, "insertReplacementText"},
31 {InputEvent::InputType::InsertCompositionText, "insertCompositionText"}, 31 {InputEvent::InputType::InsertCompositionText, "insertCompositionText"},
32 {InputEvent::InputType::DeleteWordBackward, "deleteWordBackward"}, 32 {InputEvent::InputType::DeleteWordBackward, "deleteWordBackward"},
33 {InputEvent::InputType::DeleteWordForward, "deleteWordForward"}, 33 {InputEvent::InputType::DeleteWordForward, "deleteWordForward"},
34 {InputEvent::InputType::DeleteLineBackward, "deleteLineBackward"}, 34 {InputEvent::InputType::DeleteSoftLineBackward, "deleteSoftLineBackward"},
35 {InputEvent::InputType::DeleteLineForward, "deleteLineForward"}, 35 {InputEvent::InputType::DeleteSoftLineForward, "deleteSoftLineForward"},
36 {InputEvent::InputType::DeleteHardLineBackward, "deleteHardLineBackward"},
37 {InputEvent::InputType::DeleteHardLineForward, "deleteHardLineForward"},
36 {InputEvent::InputType::DeleteContentBackward, "deleteContentBackward"}, 38 {InputEvent::InputType::DeleteContentBackward, "deleteContentBackward"},
37 {InputEvent::InputType::DeleteContentForward, "deleteContentForward"}, 39 {InputEvent::InputType::DeleteContentForward, "deleteContentForward"},
38 {InputEvent::InputType::DeleteByCut, "deleteByCut"}, 40 {InputEvent::InputType::DeleteByCut, "deleteByCut"},
39 {InputEvent::InputType::DeleteByDrag, "deleteByDrag"}, 41 {InputEvent::InputType::DeleteByDrag, "deleteByDrag"},
40 {InputEvent::InputType::HistoryUndo, "historyUndo"}, 42 {InputEvent::InputType::HistoryUndo, "historyUndo"},
41 {InputEvent::InputType::HistoryRedo, "historyRedo"}, 43 {InputEvent::InputType::HistoryRedo, "historyRedo"},
42 {InputEvent::InputType::FormatBold, "formatBold"}, 44 {InputEvent::InputType::FormatBold, "formatBold"},
43 {InputEvent::InputType::FormatItalic, "formatItalic"}, 45 {InputEvent::InputType::FormatItalic, "formatItalic"},
44 {InputEvent::InputType::FormatUnderline, "formatUnderline"}, 46 {InputEvent::InputType::FormatUnderline, "formatUnderline"},
45 {InputEvent::InputType::FormatStrikeThrough, "formatStrikeThrough"}, 47 {InputEvent::InputType::FormatStrikeThrough, "formatStrikeThrough"},
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 // 3. We don't want authors to hold live |Range| indefinitely by holding 218 // 3. We don't want authors to hold live |Range| indefinitely by holding
217 // |InputEvent|, so we clear them after dispatch. 219 // |InputEvent|, so we clear them after dispatch.
218 // Authors should explicitly call |getTargetRanges()|->|toRange()| if they 220 // Authors should explicitly call |getTargetRanges()|->|toRange()| if they
219 // want to keep a copy of |Range|. See Editing TF meeting notes: 221 // want to keep a copy of |Range|. See Editing TF meeting notes:
220 // https://docs.google.com/document/d/1hCj6QX77NYIVY0RWrMHT1Yra6t8_Qu8PopaWLG0 AM58/edit?usp=sharing 222 // https://docs.google.com/document/d/1hCj6QX77NYIVY0RWrMHT1Yra6t8_Qu8PopaWLG0 AM58/edit?usp=sharing
221 event().m_ranges.clear(); 223 event().m_ranges.clear();
222 return result; 224 return result;
223 } 225 }
224 226
225 } // namespace blink 227 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/events/InputEvent.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698