| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2012 Google Inc. All rights reserved. | 3 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 Node* anchorNode() const; | 82 Node* anchorNode() const; |
| 83 int anchorOffset() const; | 83 int anchorOffset() const; |
| 84 Node* focusNode() const; | 84 Node* focusNode() const; |
| 85 int focusOffset() const; | 85 int focusOffset() const; |
| 86 bool isCollapsed() const; | 86 bool isCollapsed() const; |
| 87 int rangeCount() const; | 87 int rangeCount() const; |
| 88 void collapse(Node*, int offset, ExceptionState&); | 88 void collapse(Node*, int offset, ExceptionState&); |
| 89 void collapseToEnd(ExceptionState&); | 89 void collapseToEnd(ExceptionState&); |
| 90 void collapseToStart(ExceptionState&); | 90 void collapseToStart(ExceptionState&); |
| 91 void extend(Node*, int offset, ExceptionState&); | 91 void extend(Node*, int offset, ExceptionState&); |
| 92 Range* getRangeAt(int, ExceptionState&); | 92 Range* getRangeAt(int, ExceptionState&) const; |
| 93 void removeAllRanges(); | 93 void removeAllRanges(); |
| 94 void addRange(Range*); | 94 void addRange(Range*); |
| 95 void deleteFromDocument(); | 95 void deleteFromDocument(); |
| 96 bool containsNode(const Node*, bool partlyContained) const; | 96 bool containsNode(const Node*, bool partlyContained) const; |
| 97 void selectAllChildren(Node*, ExceptionState&); | 97 void selectAllChildren(Node*, ExceptionState&); |
| 98 | 98 |
| 99 String toString(); | 99 String toString(); |
| 100 | 100 |
| 101 // Microsoft Selection Object API | 101 // Microsoft Selection Object API |
| 102 void empty(); | 102 void empty(); |
| 103 | 103 |
| 104 DECLARE_VIRTUAL_TRACE(); | 104 DECLARE_VIRTUAL_TRACE(); |
| 105 | 105 |
| 106 private: | 106 private: |
| 107 explicit DOMSelection(const TreeScope*); | 107 explicit DOMSelection(const TreeScope*); |
| 108 | 108 |
| 109 bool isAvailable() const; | 109 bool isAvailable() const; |
| 110 | 110 |
| 111 // Convenience method for accessors, does not check m_frame present. | 111 // Convenience method for accessors, does not check m_frame present. |
| 112 const VisibleSelection& visibleSelection() const; | 112 const VisibleSelection& visibleSelection() const; |
| 113 | 113 |
| 114 Node* shadowAdjustedNode(const Position&) const; | 114 Node* shadowAdjustedNode(const Position&) const; |
| 115 int shadowAdjustedOffset(const Position&) const; | 115 int shadowAdjustedOffset(const Position&) const; |
| 116 | 116 |
| 117 bool isValidForPosition(Node*) const; | 117 bool isValidForPosition(Node*) const; |
| 118 | 118 |
| 119 void addConsoleError(const String& message); | 119 void addConsoleError(const String& message); |
| 120 | 120 Range* primaryRangeOrNull() const; |
| 121 Range* createRangeFromSelectionEditor(); | 121 Range* createRangeFromSelectionEditor() const; |
| 122 | 122 |
| 123 bool isSelectionOfDocument() const; | 123 bool isSelectionOfDocument() const; |
| 124 void cacheRangeIfSelectionOfDocument(Range*); | 124 void cacheRangeIfSelectionOfDocument(Range*) const; |
| 125 Range* documentCachedRange() const; | 125 Range* documentCachedRange() const; |
| 126 void clearCachedRangeIfSelectionOfDocument(); | 126 void clearCachedRangeIfSelectionOfDocument(); |
| 127 | 127 |
| 128 Member<const TreeScope> m_treeScope; | 128 Member<const TreeScope> m_treeScope; |
| 129 }; | 129 }; |
| 130 | 130 |
| 131 } // namespace blink | 131 } // namespace blink |
| 132 | 132 |
| 133 #endif // DOMSelection_h | 133 #endif // DOMSelection_h |
| OLD | NEW |