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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 methods for accessors, does not check m_frame present. | 111 // Convenience methods for accessors, does not check m_frame present. |
112 const VisibleSelection& visibleSelection() const; | 112 const VisibleSelection& visibleSelection() const; |
113 bool isBaseFirstInSelection() const; | 113 bool isBaseFirstInSelection() const; |
| 114 const Position& anchorPosition() const; |
| 115 const Position& focusPosition() const; |
114 | 116 |
115 Node* shadowAdjustedNode(const Position&) const; | 117 Node* shadowAdjustedNode(const Position&) const; |
116 int shadowAdjustedOffset(const Position&) const; | 118 int shadowAdjustedOffset(const Position&) const; |
117 | 119 |
118 bool isValidForPosition(Node*) const; | 120 bool isValidForPosition(Node*) const; |
119 | 121 |
120 void addConsoleError(const String& message); | 122 void addConsoleError(const String& message); |
121 Range* primaryRangeOrNull() const; | 123 Range* primaryRangeOrNull() const; |
122 Range* createRangeFromSelectionEditor() const; | 124 Range* createRangeFromSelectionEditor() const; |
123 | 125 |
124 bool isSelectionOfDocument() const; | 126 bool isSelectionOfDocument() const; |
125 void cacheRangeIfSelectionOfDocument(Range*) const; | 127 void cacheRangeIfSelectionOfDocument(Range*) const; |
126 Range* documentCachedRange() const; | 128 Range* documentCachedRange() const; |
127 void clearCachedRangeIfSelectionOfDocument(); | 129 void clearCachedRangeIfSelectionOfDocument(); |
128 | 130 |
129 Member<const TreeScope> m_treeScope; | 131 Member<const TreeScope> m_treeScope; |
130 }; | 132 }; |
131 | 133 |
132 } // namespace blink | 134 } // namespace blink |
133 | 135 |
134 #endif // DOMSelection_h | 136 #endif // DOMSelection_h |
OLD | NEW |