Index: third_party/WebKit/public/web/WebLocalFrame.h |
diff --git a/third_party/WebKit/public/web/WebLocalFrame.h b/third_party/WebKit/public/web/WebLocalFrame.h |
index a3c89488a9b3f14812cd325856be4947e9b6dba7..eceed95ed8cfec2b8f27ca49e79f5b8aa25baa4d 100644 |
--- a/third_party/WebKit/public/web/WebLocalFrame.h |
+++ b/third_party/WebKit/public/web/WebLocalFrame.h |
@@ -191,8 +191,63 @@ public: |
// extension debugging. |
virtual void setIsolatedWorldHumanReadableName(int worldID, const WebString&) = 0; |
+ // Editing ------------------------------------------------------------- |
- // Selection -------------------------------------------------------------- |
+ virtual void insertText(const WebString& text) = 0; |
+ |
+ virtual void setMarkedText(const WebString& text, unsigned location, unsigned length) = 0; |
+ virtual void unmarkText() = 0; |
+ virtual bool hasMarkedText() const = 0; |
+ |
+ virtual WebRange markedRange() const = 0; |
+ |
+ // Returns the text range rectangle in the viepwort coordinate space. |
+ virtual bool firstRectForCharacterRange(unsigned location, unsigned length, WebRect&) const = 0; |
+ |
+ // Returns the index of a character in the Frame's text stream at the given |
+ // point. The point is in the viewport coordinate space. Will return |
+ // WTF::notFound if the point is invalid. |
+ virtual size_t characterIndexForPoint(const WebPoint&) const = 0; |
+ |
+ // Supports commands like Undo, Redo, Cut, Copy, Paste, SelectAll, |
+ // Unselect, etc. See EditorCommand.cpp for the full list of supported |
+ // commands. |
+ virtual bool executeCommand(const WebString&) = 0; |
+ virtual bool executeCommand(const WebString&, const WebString& value) = 0; |
+ virtual bool isCommandEnabled(const WebString&) const = 0; |
+ |
+ // Selection ----------------------------------------------------------- |
+ |
+ virtual bool hasSelection() const = 0; |
+ |
+ virtual WebRange selectionRange() const = 0; |
+ |
+ virtual WebString selectionAsText() const = 0; |
+ virtual WebString selectionAsMarkup() const = 0; |
+ |
+ // Expands the selection to a word around the caret and returns |
+ // true. Does nothing and returns false if there is no caret or |
+ // there is ranged selection. |
+ virtual bool selectWordAroundCaret() = 0; |
+ |
+ // DEPRECATED: Use moveRangeSelection. |
+ virtual void selectRange(const WebPoint& base, const WebPoint& extent) = 0; |
+ |
+ virtual void selectRange(const WebRange&) = 0; |
+ |
+ // Move the current selection to the provided viewport point/points. If the |
+ // current selection is editable, the new selection will be restricted to |
+ // the root editable element. |
+ // |TextGranularity| represents character wrapping granularity. If |
+ // WordGranularity is set, WebFrame extends selection to wrap word. |
+ virtual void moveRangeSelection(const WebPoint& base, const WebPoint& extent, WebFrame::TextGranularity = CharacterGranularity) = 0; |
+ virtual void moveCaretSelection(const WebPoint&) = 0; |
+ |
+ virtual bool setEditableSelectionOffsets(int start, int end) = 0; |
+ virtual bool setCompositionFromExistingText(int compositionStart, int compositionEnd, const WebVector<WebCompositionUnderline>& underlines) = 0; |
+ virtual void extendSelectionAndDelete(int before, int after) = 0; |
+ |
+ virtual void setCaretVisible(bool) = 0; |
// Moves the selection extent point. This function does not allow the |
// selection to collapse. If the new extent is set to the same position as |
@@ -203,6 +258,10 @@ public: |
// Spell-checking support ------------------------------------------------- |
virtual void replaceMisspelledRange(const WebString&) = 0; |
+ virtual void enableContinuousSpellChecking(bool) = 0; |
+ virtual bool isContinuousSpellCheckingEnabled() const = 0; |
+ virtual void requestTextChecking(const WebElement&) = 0; |
+ virtual void removeSpellingMarkers() = 0; |
// Content Settings ------------------------------------------------------- |