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

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

Issue 2530843003: Introduce InsertIncrementalTextCommand to respect existing style for composition (Closed)
Patch Set: Address xiaochengh@'s review Created 4 years 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 /* 1 /*
2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 String data() const { return m_data; } 62 String data() const { return m_data; }
63 63
64 const AtomicString& interfaceName() const override; 64 const AtomicString& interfaceName() const override;
65 65
66 bool isLineBreak() const { return m_inputType == TextEventInputLineBreak; } 66 bool isLineBreak() const { return m_inputType == TextEventInputLineBreak; }
67 bool isComposition() const { 67 bool isComposition() const {
68 return m_inputType == TextEventInputComposition; 68 return m_inputType == TextEventInputComposition;
69 } 69 }
70 bool isPaste() const { return m_inputType == TextEventInputPaste; } 70 bool isPaste() const { return m_inputType == TextEventInputPaste; }
71 bool isDrop() const { return m_inputType == TextEventInputDrop; } 71 bool isDrop() const { return m_inputType == TextEventInputDrop; }
72 bool isIncrementalInsertion() const {
73 return m_inputType == TextEventInputIncrementalInsertion;
74 }
72 75
73 bool shouldSmartReplace() const { return m_shouldSmartReplace; } 76 bool shouldSmartReplace() const { return m_shouldSmartReplace; }
74 bool shouldMatchStyle() const { return m_shouldMatchStyle; } 77 bool shouldMatchStyle() const { return m_shouldMatchStyle; }
75 DocumentFragment* pastingFragment() const { return m_pastingFragment.get(); } 78 DocumentFragment* pastingFragment() const { return m_pastingFragment.get(); }
76 79
77 DECLARE_VIRTUAL_TRACE(); 80 DECLARE_VIRTUAL_TRACE();
78 81
79 private: 82 private:
80 TextEvent(); 83 TextEvent();
81 84
(...skipping 21 matching lines...) Expand all
103 106
104 DEFINE_TYPE_CASTS(TextEvent, 107 DEFINE_TYPE_CASTS(TextEvent,
105 Event, 108 Event,
106 event, 109 event,
107 isTextEvent(*event), 110 isTextEvent(*event),
108 isTextEvent(event)); 111 isTextEvent(event));
109 112
110 } // namespace blink 113 } // namespace blink
111 114
112 #endif // TextEvent_h 115 #endif // TextEvent_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698