OLD | NEW |
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 #ifndef InputEvent_h | 5 #ifndef InputEvent_h |
6 #define InputEvent_h | 6 #define InputEvent_h |
7 | 7 |
8 #include "core/dom/StaticRange.h" | 8 #include "core/dom/StaticRange.h" |
9 #include "core/events/InputEventInit.h" | 9 #include "core/events/InputEventInit.h" |
10 #include "core/events/UIEvent.h" | 10 #include "core/events/UIEvent.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 | 22 |
23 static InputEvent* create(const AtomicString& type, const InputEventInit& in
itializer) | 23 static InputEvent* create(const AtomicString& type, const InputEventInit& in
itializer) |
24 { | 24 { |
25 return new InputEvent(type, initializer); | 25 return new InputEvent(type, initializer); |
26 } | 26 } |
27 | 27 |
28 enum class InputType { | 28 enum class InputType { |
29 None, | 29 None, |
30 // Insertion. | 30 // Insertion. |
31 InsertText, | 31 InsertText, |
32 ReplaceContent, | 32 InsertNonText, |
| 33 InsertLineBreak, |
| 34 InsertParagraph, |
| 35 InsertOrderedList, |
| 36 InsertUnorderedList, |
| 37 InsertHorizontalRule, |
33 // Deletion. | 38 // Deletion. |
34 DeleteContent, | 39 DeleteComposedCharacterForward, |
35 DeleteComposedCharacter, | 40 DeleteComposedCharacterBackward, |
36 // Misc. | 41 DeleteWordBackward, |
| 42 DeleteWordForward, |
| 43 DeleteLineBackward, |
| 44 DeleteLineForward, |
| 45 DeleteContentBackward, |
| 46 DeleteContentForward, |
| 47 // Command. |
37 Undo, | 48 Undo, |
38 Redo, | 49 Redo, |
| 50 Copy, |
| 51 Cut, |
| 52 Paste, |
39 // Styling. | 53 // Styling. |
40 Bold, | 54 Bold, |
41 Italic, | 55 Italic, |
42 Underline, | 56 Underline, |
43 StrikeThrough, | 57 StrikeThrough, |
44 Superscript, | 58 Superscript, |
45 Subscript, | 59 Subscript, |
| 60 // Formatting. |
| 61 JustifyCenter, |
| 62 JustifyRight, |
| 63 JustifyLeft, |
| 64 Indent, |
| 65 Outdent, |
| 66 RemoveFormat, |
| 67 // Not on spec. |
| 68 // TODO(chongz): Drag is not on SPEC but it's not decided how we should
handle it. |
| 69 Drag, |
| 70 JustifyFull, |
| 71 SetColor, |
| 72 SetBackgroundColor, |
| 73 SetFont, |
| 74 ChangeAttributes, |
| 75 SetWritingDirection, |
| 76 Unscript, |
| 77 CreateLink, |
| 78 Unlink, |
| 79 FormatBlock, |
46 | 80 |
47 // Add new input types immediately above this line. | 81 // Add new input types immediately above this line. |
48 NumberOfInputTypes, | 82 NumberOfInputTypes, |
49 }; | 83 }; |
50 | 84 |
51 enum EventCancelable : bool { | 85 enum EventCancelable : bool { |
52 NotCancelable = false, | 86 NotCancelable = false, |
53 IsCancelable = true, | 87 IsCancelable = true, |
54 }; | 88 }; |
55 | 89 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 explicit InputEventDispatchMediator(InputEvent*); | 129 explicit InputEventDispatchMediator(InputEvent*); |
96 InputEvent& event() const; | 130 InputEvent& event() const; |
97 DispatchEventResult dispatchEvent(EventDispatcher&) const override; | 131 DispatchEventResult dispatchEvent(EventDispatcher&) const override; |
98 }; | 132 }; |
99 | 133 |
100 DEFINE_EVENT_TYPE_CASTS(InputEvent); | 134 DEFINE_EVENT_TYPE_CASTS(InputEvent); |
101 | 135 |
102 } // namespace blink | 136 } // namespace blink |
103 | 137 |
104 #endif // InputEvent_h | 138 #endif // InputEvent_h |
OLD | NEW |