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 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
424 virtual void replaceSelection(const WebString& text) = 0; | 424 virtual void replaceSelection(const WebString& text) = 0; |
425 | 425 |
426 virtual void insertText(const WebString& text) = 0; | 426 virtual void insertText(const WebString& text) = 0; |
427 | 427 |
428 virtual void setMarkedText(const WebString& text, unsigned location, unsigne
d length) = 0; | 428 virtual void setMarkedText(const WebString& text, unsigned location, unsigne
d length) = 0; |
429 virtual void unmarkText() = 0; | 429 virtual void unmarkText() = 0; |
430 virtual bool hasMarkedText() const = 0; | 430 virtual bool hasMarkedText() const = 0; |
431 | 431 |
432 virtual WebRange markedRange() const = 0; | 432 virtual WebRange markedRange() const = 0; |
433 | 433 |
434 // Returns the frame rectangle in window coordinate space of the given text | 434 // Returns the text range rectangle in the viepwort coordinate space. |
435 // range. | |
436 virtual bool firstRectForCharacterRange(unsigned location, unsigned length,
WebRect&) const = 0; | 435 virtual bool firstRectForCharacterRange(unsigned location, unsigned length,
WebRect&) const = 0; |
437 | 436 |
438 // Returns the index of a character in the Frame's text stream at the given | 437 // Returns the index of a character in the Frame's text stream at the given |
439 // point. The point is in the window coordinate space. Will return | 438 // point. The point is in the viewport coordinate space. Will return |
440 // WTF::notFound if the point is invalid. | 439 // WTF::notFound if the point is invalid. |
441 virtual size_t characterIndexForPoint(const WebPoint&) const = 0; | 440 virtual size_t characterIndexForPoint(const WebPoint&) const = 0; |
442 | 441 |
443 // Supports commands like Undo, Redo, Cut, Copy, Paste, SelectAll, | 442 // Supports commands like Undo, Redo, Cut, Copy, Paste, SelectAll, |
444 // Unselect, etc. See EditorCommand.cpp for the full list of supported | 443 // Unselect, etc. See EditorCommand.cpp for the full list of supported |
445 // commands. | 444 // commands. |
446 virtual bool executeCommand(const WebString&, const WebNode& = WebNode()) =
0; | 445 virtual bool executeCommand(const WebString&, const WebNode& = WebNode()) =
0; |
447 virtual bool executeCommand(const WebString&, const WebString& value, const
WebNode& = WebNode()) = 0; | 446 virtual bool executeCommand(const WebString&, const WebString& value, const
WebNode& = WebNode()) = 0; |
448 virtual bool isCommandEnabled(const WebString&) const = 0; | 447 virtual bool isCommandEnabled(const WebString&) const = 0; |
449 | 448 |
(...skipping 16 matching lines...) Expand all Loading... |
466 // Expands the selection to a word around the caret and returns | 465 // Expands the selection to a word around the caret and returns |
467 // true. Does nothing and returns false if there is no caret or | 466 // true. Does nothing and returns false if there is no caret or |
468 // there is ranged selection. | 467 // there is ranged selection. |
469 virtual bool selectWordAroundCaret() = 0; | 468 virtual bool selectWordAroundCaret() = 0; |
470 | 469 |
471 // DEPRECATED: Use moveRangeSelection. | 470 // DEPRECATED: Use moveRangeSelection. |
472 virtual void selectRange(const WebPoint& base, const WebPoint& extent) = 0; | 471 virtual void selectRange(const WebPoint& base, const WebPoint& extent) = 0; |
473 | 472 |
474 virtual void selectRange(const WebRange&) = 0; | 473 virtual void selectRange(const WebRange&) = 0; |
475 | 474 |
476 // Move the current selection to the provided window point/points. If the | 475 // Move the current selection to the provided viewport point/points. If the |
477 // current selection is editable, the new selection will be restricted to | 476 // current selection is editable, the new selection will be restricted to |
478 // the root editable element. | 477 // the root editable element. |
479 // |TextGranularity| represents character wrapping granularity. If | 478 // |TextGranularity| represents character wrapping granularity. If |
480 // WordGranularity is set, WebFrame extends selection to wrap word. | 479 // WordGranularity is set, WebFrame extends selection to wrap word. |
481 virtual void moveRangeSelection(const WebPoint& base, const WebPoint& extent
, WebFrame::TextGranularity = CharacterGranularity) = 0; | 480 virtual void moveRangeSelection(const WebPoint& base, const WebPoint& extent
, WebFrame::TextGranularity = CharacterGranularity) = 0; |
482 virtual void moveCaretSelection(const WebPoint&) = 0; | 481 virtual void moveCaretSelection(const WebPoint&) = 0; |
483 | 482 |
484 virtual bool setEditableSelectionOffsets(int start, int end) = 0; | 483 virtual bool setEditableSelectionOffsets(int start, int end) = 0; |
485 virtual bool setCompositionFromExistingText(int compositionStart, int compos
itionEnd, const WebVector<WebCompositionUnderline>& underlines) = 0; | 484 virtual bool setCompositionFromExistingText(int compositionStart, int compos
itionEnd, const WebVector<WebCompositionUnderline>& underlines) = 0; |
486 virtual void extendSelectionAndDelete(int before, int after) = 0; | 485 virtual void extendSelectionAndDelete(int before, int after) = 0; |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
724 WebPrivateOwnPtr<OpenedFrameTracker> m_openedFrameTracker; | 723 WebPrivateOwnPtr<OpenedFrameTracker> m_openedFrameTracker; |
725 }; | 724 }; |
726 | 725 |
727 #if BLINK_IMPLEMENTATION | 726 #if BLINK_IMPLEMENTATION |
728 Frame* toCoreFrame(const WebFrame*); | 727 Frame* toCoreFrame(const WebFrame*); |
729 #endif | 728 #endif |
730 | 729 |
731 } // namespace blink | 730 } // namespace blink |
732 | 731 |
733 #endif | 732 #endif |
OLD | NEW |