| 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 bool isCollapsed() const; | 78 bool isCollapsed() const; |
| 79 int rangeCount() const; | 79 int rangeCount() const; |
| 80 void collapse(Node*, int offset, ExceptionCode&); | 80 void collapse(Node*, int offset, ExceptionCode&); |
| 81 void collapseToEnd(ExceptionCode&); | 81 void collapseToEnd(ExceptionCode&); |
| 82 void collapseToStart(ExceptionCode&); | 82 void collapseToStart(ExceptionCode&); |
| 83 void extend(Node*, int offset, ExceptionCode&); | 83 void extend(Node*, int offset, ExceptionCode&); |
| 84 PassRefPtr<Range> getRangeAt(int, ExceptionCode&); | 84 PassRefPtr<Range> getRangeAt(int, ExceptionCode&); |
| 85 void removeAllRanges(); | 85 void removeAllRanges(); |
| 86 void addRange(Range*); | 86 void addRange(Range*); |
| 87 void deleteFromDocument(); | 87 void deleteFromDocument(); |
| 88 bool containsNode(const Node*, bool partlyContained) const; | 88 bool containsNode(Node*, bool partlyContained) const; |
| 89 void selectAllChildren(Node*, ExceptionCode&); | 89 void selectAllChildren(Node*, ExceptionCode&); |
| 90 | 90 |
| 91 String toString(); | 91 String toString(); |
| 92 | 92 |
| 93 // Microsoft Selection Object API | 93 // Microsoft Selection Object API |
| 94 void empty(); | 94 void empty(); |
| 95 | 95 |
| 96 private: | 96 private: |
| 97 const TreeScope* m_treeScope; | 97 const TreeScope* m_treeScope; |
| 98 | 98 |
| 99 explicit DOMSelection(const TreeScope*); | 99 explicit DOMSelection(const TreeScope*); |
| 100 | 100 |
| 101 // Convenience method for accessors, does not check m_frame present. | 101 // Convenience method for accessors, does not check m_frame present. |
| 102 const VisibleSelection& visibleSelection() const; | 102 const VisibleSelection& visibleSelection() const; |
| 103 | 103 |
| 104 Node* shadowAdjustedNode(const Position&) const; | 104 Node* shadowAdjustedNode(const Position&) const; |
| 105 int shadowAdjustedOffset(const Position&) const; | 105 int shadowAdjustedOffset(const Position&) const; |
| 106 | 106 |
| 107 bool isValidForPosition(Node*) const; | 107 bool isValidForPosition(Node*) const; |
| 108 }; | 108 }; |
| 109 | 109 |
| 110 } // namespace WebCore | 110 } // namespace WebCore |
| 111 | 111 |
| 112 #endif // DOMSelection_h | 112 #endif // DOMSelection_h |
| OLD | NEW |