OLD | NEW |
1 /* | 1 /* |
2 * (C) 1999 Lars Knoll (knoll@kde.org) | 2 * (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 2000 Gunnstein Lye (gunnstein@netcom.no) | 3 * (C) 2000 Gunnstein Lye (gunnstein@netcom.no) |
4 * (C) 2000 Frederik Holljen (frederik.holljen@hig.no) | 4 * (C) 2000 Frederik Holljen (frederik.holljen@hig.no) |
5 * (C) 2001 Peter Kelly (pmk@post.com) | 5 * (C) 2001 Peter Kelly (pmk@post.com) |
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv
ed. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv
ed. |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 Node* endContainer() const { return m_end.container(); } | 71 Node* endContainer() const { return m_end.container(); } |
72 int endOffset() const { return m_end.offset(); } | 72 int endOffset() const { return m_end.offset(); } |
73 | 73 |
74 bool collapsed() const { return m_start == m_end; } | 74 bool collapsed() const { return m_start == m_end; } |
75 | 75 |
76 Node* commonAncestorContainer() const; | 76 Node* commonAncestorContainer() const; |
77 static Node* commonAncestorContainer(const Node* containerA, const Node* con
tainerB); | 77 static Node* commonAncestorContainer(const Node* containerA, const Node* con
tainerB); |
78 void setStart(PassRefPtrWillBeRawPtr<Node> container, int offset, ExceptionS
tate& = ASSERT_NO_EXCEPTION); | 78 void setStart(PassRefPtrWillBeRawPtr<Node> container, int offset, ExceptionS
tate& = ASSERT_NO_EXCEPTION); |
79 void setEnd(PassRefPtrWillBeRawPtr<Node> container, int offset, ExceptionSta
te& = ASSERT_NO_EXCEPTION); | 79 void setEnd(PassRefPtrWillBeRawPtr<Node> container, int offset, ExceptionSta
te& = ASSERT_NO_EXCEPTION); |
80 void collapse(bool toStart); | 80 void collapse(bool toStart); |
81 bool isPointInRange(Node* refNode, int offset, ExceptionState&); | 81 bool isNodeFullyContained(Node&) const; |
| 82 bool isPointInRange(Node* refNode, int offset, ExceptionState&) const; |
82 short comparePoint(Node* refNode, int offset, ExceptionState&) const; | 83 short comparePoint(Node* refNode, int offset, ExceptionState&) const; |
83 enum CompareResults { NODE_BEFORE, NODE_AFTER, NODE_BEFORE_AND_AFTER, NODE_I
NSIDE }; | 84 enum CompareResults { NODE_BEFORE, NODE_AFTER, NODE_BEFORE_AND_AFTER, NODE_I
NSIDE }; |
84 CompareResults compareNode(Node* refNode, ExceptionState&) const; | |
85 enum CompareHow { START_TO_START, START_TO_END, END_TO_END, END_TO_START }; | 85 enum CompareHow { START_TO_START, START_TO_END, END_TO_END, END_TO_START }; |
86 short compareBoundaryPoints(unsigned how, const Range* sourceRange, Exceptio
nState&) const; | 86 short compareBoundaryPoints(unsigned how, const Range* sourceRange, Exceptio
nState&) const; |
87 static short compareBoundaryPoints(Node* containerA, int offsetA, Node* cont
ainerB, int offsetB, ExceptionState&); | 87 static short compareBoundaryPoints(Node* containerA, int offsetA, Node* cont
ainerB, int offsetB, ExceptionState&); |
88 static short compareBoundaryPoints(const RangeBoundaryPoint& boundaryA, cons
t RangeBoundaryPoint& boundaryB, ExceptionState&); | 88 static short compareBoundaryPoints(const RangeBoundaryPoint& boundaryA, cons
t RangeBoundaryPoint& boundaryB, ExceptionState&); |
89 bool boundaryPointsValid() const; | 89 bool boundaryPointsValid() const; |
90 bool intersectsNode(Node* refNode, ExceptionState&); | 90 bool intersectsNode(Node* refNode, ExceptionState&); |
91 static bool intersectsNode(Node* refNode, const Position& start, const Posit
ion& end, ExceptionState&); | 91 static bool intersectsNode(Node* refNode, const Position& start, const Posit
ion& end, ExceptionState&); |
92 void deleteContents(ExceptionState&); | 92 void deleteContents(ExceptionState&); |
93 PassRefPtrWillBeRawPtr<DocumentFragment> extractContents(ExceptionState&); | 93 PassRefPtrWillBeRawPtr<DocumentFragment> extractContents(ExceptionState&); |
94 PassRefPtrWillBeRawPtr<DocumentFragment> cloneContents(ExceptionState&); | 94 PassRefPtrWillBeRawPtr<DocumentFragment> cloneContents(ExceptionState&); |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 CORE_EXPORT bool areRangesEqual(const Range*, const Range*); | 187 CORE_EXPORT bool areRangesEqual(const Range*, const Range*); |
188 | 188 |
189 } // namespace blink | 189 } // namespace blink |
190 | 190 |
191 #ifndef NDEBUG | 191 #ifndef NDEBUG |
192 // Outside the WebCore namespace for ease of invocation from gdb. | 192 // Outside the WebCore namespace for ease of invocation from gdb. |
193 void showTree(const blink::Range*); | 193 void showTree(const blink::Range*); |
194 #endif | 194 #endif |
195 | 195 |
196 #endif // Range_h | 196 #endif // Range_h |
OLD | NEW |