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

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

Issue 2141133003: [InputEvent] Fire 'beforeinput'/'input' for 6 text styling actions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
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 #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"
11 11
12 namespace blink { 12 namespace blink {
13 13
14 class InputEvent final : public UIEvent { 14 class InputEvent final : public UIEvent {
15 DEFINE_WRAPPERTYPEINFO(); 15 DEFINE_WRAPPERTYPEINFO();
16 16
17 public: 17 public:
18 static InputEvent* create() 18 static InputEvent* create()
19 { 19 {
20 return new InputEvent; 20 return new InputEvent;
21 } 21 }
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 InsertText, 31 InsertText,
31 ReplaceContent, 32 ReplaceContent,
33 // Deletion.
32 DeleteContent, 34 DeleteContent,
33 DeleteComposedCharacter, 35 DeleteComposedCharacter,
36 // Misc.
34 Undo, 37 Undo,
35 Redo, 38 Redo,
39 // Styling.
40 Bold,
41 Italic,
42 Underline,
43 StrikeThrough,
44 Superscript,
45 Subscript,
36 46
37 // Add new input types immediately above this line. 47 // Add new input types immediately above this line.
38 NumberOfInputTypes, 48 NumberOfInputTypes,
39 }; 49 };
40 50
41 enum EventCancelable : bool { 51 enum EventCancelable : bool {
42 NotCancelable = false, 52 NotCancelable = false,
43 IsCancelable = true, 53 IsCancelable = true,
44 }; 54 };
45 55
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 explicit InputEventDispatchMediator(InputEvent*); 95 explicit InputEventDispatchMediator(InputEvent*);
86 InputEvent& event() const; 96 InputEvent& event() const;
87 DispatchEventResult dispatchEvent(EventDispatcher&) const override; 97 DispatchEventResult dispatchEvent(EventDispatcher&) const override;
88 }; 98 };
89 99
90 DEFINE_EVENT_TYPE_CASTS(InputEvent); 100 DEFINE_EVENT_TYPE_CASTS(InputEvent);
91 101
92 } // namespace blink 102 } // namespace blink
93 103
94 #endif // InputEvent_h 104 #endif // InputEvent_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698