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

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

Issue 2074423004: [InputEvent] Dispatch 'input' event for ContentEditable and typing on Input element (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tkent's review Created 4 years, 6 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"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 NotCancelable = false, 42 NotCancelable = false,
43 IsCancelable = true, 43 IsCancelable = true,
44 }; 44 };
45 45
46 enum EventIsComposing : bool { 46 enum EventIsComposing : bool {
47 NotComposing = false, 47 NotComposing = false,
48 IsComposing = true, 48 IsComposing = true,
49 }; 49 };
50 50
51 static InputEvent* createBeforeInput(InputType, const String& data, EventCan celable, EventIsComposing, const RangeVector*); 51 static InputEvent* createBeforeInput(InputType, const String& data, EventCan celable, EventIsComposing, const RangeVector*);
52 static InputEvent* createInput(InputType, const String& data, EventIsComposi ng, const RangeVector*);
52 53
53 String inputType() const; 54 String inputType() const;
54 const String& data() const { return m_data; } 55 const String& data() const { return m_data; }
55 bool isComposing() const { return m_isComposing; } 56 bool isComposing() const { return m_isComposing; }
56 // Returns a copy of target ranges during event dispatch, and returns an emp ty 57 // Returns a copy of target ranges during event dispatch, and returns an emp ty
57 // vector after dispatch. 58 // vector after dispatch.
58 StaticRangeVector getRanges() const; 59 StaticRangeVector getRanges() const;
59 60
60 bool isInputEvent() const override; 61 bool isInputEvent() const override;
61 62
(...skipping 22 matching lines...) Expand all
84 explicit InputEventDispatchMediator(InputEvent*); 85 explicit InputEventDispatchMediator(InputEvent*);
85 InputEvent& event() const; 86 InputEvent& event() const;
86 DispatchEventResult dispatchEvent(EventDispatcher&) const override; 87 DispatchEventResult dispatchEvent(EventDispatcher&) const override;
87 }; 88 };
88 89
89 DEFINE_EVENT_TYPE_CASTS(InputEvent); 90 DEFINE_EVENT_TYPE_CASTS(InputEvent);
90 91
91 } // namespace blink 92 } // namespace blink
92 93
93 #endif // InputEvent_h 94 #endif // InputEvent_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698