OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 // We don't use PlainTextRange which is immutable, for composition range. | 100 // We don't use PlainTextRange which is immutable, for composition range. |
101 unsigned m_compositionStart; | 101 unsigned m_compositionStart; |
102 unsigned m_compositionEnd; | 102 unsigned m_compositionEnd; |
103 // startOffset and endOffset of CompositionUnderline are based on | 103 // startOffset and endOffset of CompositionUnderline are based on |
104 // m_compositionNode. | 104 // m_compositionNode. |
105 Vector<CompositionUnderline> m_customCompositionUnderlines; | 105 Vector<CompositionUnderline> m_customCompositionUnderlines; |
106 | 106 |
107 explicit InputMethodController(LocalFrame&); | 107 explicit InputMethodController(LocalFrame&); |
108 | 108 |
109 Editor& editor() const; | 109 Editor& editor() const; |
110 LocalFrame& frame() const { return *m_frame; } | 110 LocalFrame& frame() const |
| 111 { |
| 112 ASSERT(m_frame); |
| 113 return *m_frame; |
| 114 } |
111 | 115 |
112 bool insertTextForConfirmedComposition(const String& text); | 116 bool insertTextForConfirmedComposition(const String& text); |
113 void selectComposition() const; | 117 void selectComposition() const; |
114 enum FinishCompositionMode { ConfirmComposition, CancelComposition }; | 118 enum FinishCompositionMode { ConfirmComposition, CancelComposition }; |
115 // Returns true if composition exists. | 119 // Returns true if composition exists. |
116 bool finishComposition(const String&, FinishCompositionMode); | 120 bool finishComposition(const String&, FinishCompositionMode); |
117 bool setSelectionOffsets(const PlainTextRange&); | 121 bool setSelectionOffsets(const PlainTextRange&); |
118 }; | 122 }; |
119 | 123 |
120 } // namespace blink | 124 } // namespace blink |
121 | 125 |
122 #endif // InputMethodController_h | 126 #endif // InputMethodController_h |
OLD | NEW |