OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 | 141 |
142 // Replaces the selection with the given text. | 142 // Replaces the selection with the given text. |
143 virtual void replaceSelection(const WebString& text) = 0; | 143 virtual void replaceSelection(const WebString& text) = 0; |
144 | 144 |
145 virtual void insertText(const WebString& text) = 0; | 145 virtual void insertText(const WebString& text) = 0; |
146 | 146 |
147 virtual void setMarkedText(const WebString& text, unsigned location, unsigne
d length) = 0; | 147 virtual void setMarkedText(const WebString& text, unsigned location, unsigne
d length) = 0; |
148 virtual void unmarkText() = 0; | 148 virtual void unmarkText() = 0; |
149 virtual bool hasMarkedText() const = 0; | 149 virtual bool hasMarkedText() const = 0; |
150 | 150 |
151 virtual WebRange markedRange() const = 0; | |
152 | |
153 // Returns the frame rectangle in window coordinate space of the given text | |
154 // range. | |
155 virtual bool firstRectForCharacterRange(unsigned location, unsigned length,
WebRect&) const = 0; | |
156 | |
157 // Returns the index of a character in the Frame's text stream at the given | |
158 // point. The point is in the window coordinate space. Will return | |
159 // WTF::notFound if the point is invalid. | |
160 virtual size_t characterIndexForPoint(const WebPoint&) const = 0; | |
161 | |
162 // Supports commands like Undo, Redo, Cut, Copy, Paste, SelectAll, | 151 // Supports commands like Undo, Redo, Cut, Copy, Paste, SelectAll, |
163 // Unselect, etc. See EditorCommand.cpp for the full list of supported | 152 // Unselect, etc. See EditorCommand.cpp for the full list of supported |
164 // commands. | 153 // commands. |
165 virtual bool executeCommand(const WebString&, const WebNode& = WebNode()) =
0; | 154 virtual bool executeCommand(const WebString&, const WebNode& = WebNode()) =
0; |
166 virtual bool executeCommand(const WebString&, const WebString& value, const
WebNode& = WebNode()) = 0; | 155 virtual bool executeCommand(const WebString&, const WebString& value, const
WebNode& = WebNode()) = 0; |
167 virtual bool isCommandEnabled(const WebString&) const = 0; | 156 virtual bool isCommandEnabled(const WebString&) const = 0; |
168 | 157 |
169 // Spell-checking support. | 158 // Spell-checking support. |
170 virtual void enableContinuousSpellChecking(bool) = 0; | 159 virtual void enableContinuousSpellChecking(bool) = 0; |
171 virtual bool isContinuousSpellCheckingEnabled() const = 0; | 160 virtual bool isContinuousSpellCheckingEnabled() const = 0; |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 private: | 224 private: |
236 }; | 225 }; |
237 | 226 |
238 #if BLINK_IMPLEMENTATION | 227 #if BLINK_IMPLEMENTATION |
239 Frame* toCoreFrame(const WebFrame*); | 228 Frame* toCoreFrame(const WebFrame*); |
240 #endif | 229 #endif |
241 | 230 |
242 } // namespace blink | 231 } // namespace blink |
243 | 232 |
244 #endif // SKY_ENGINE_PUBLIC_WEB_WEBFRAME_H_ | 233 #endif // SKY_ENGINE_PUBLIC_WEB_WEBFRAME_H_ |
OLD | NEW |