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

Side by Side Diff: Source/core/editing/InputMethodController.h

Issue 593583002: Assert that frame() derefs a non-null pointer. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « Source/core/editing/Editor.h ('k') | Source/core/editing/SpellCheckRequester.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « Source/core/editing/Editor.h ('k') | Source/core/editing/SpellCheckRequester.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698