| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 int endOffset() const { return m_end.offset(); } | 61 int endOffset() const { return m_end.offset(); } |
| 62 | 62 |
| 63 Node* startContainer(ExceptionState&) const; | 63 Node* startContainer(ExceptionState&) const; |
| 64 int startOffset(ExceptionState&) const; | 64 int startOffset(ExceptionState&) const; |
| 65 Node* endContainer(ExceptionState&) const; | 65 Node* endContainer(ExceptionState&) const; |
| 66 int endOffset(ExceptionState&) const; | 66 int endOffset(ExceptionState&) const; |
| 67 bool collapsed(ExceptionState&) const; | 67 bool collapsed(ExceptionState&) const; |
| 68 | 68 |
| 69 Node* commonAncestorContainer(ExceptionState&) const; | 69 Node* commonAncestorContainer(ExceptionState&) const; |
| 70 static Node* commonAncestorContainer(Node* containerA, Node* containerB); | 70 static Node* commonAncestorContainer(Node* containerA, Node* containerB); |
| 71 void setStart(PassRefPtr<Node> container, int offset, ExceptionState& = ASSE
RT_NO_EXCEPTION_STATE); | 71 void setStart(PassRefPtr<Node> container, int offset, ExceptionState& = ASSE
RT_NO_EXCEPTION); |
| 72 void setEnd(PassRefPtr<Node> container, int offset, ExceptionState& = ASSERT
_NO_EXCEPTION_STATE); | 72 void setEnd(PassRefPtr<Node> container, int offset, ExceptionState& = ASSERT
_NO_EXCEPTION); |
| 73 void collapse(bool toStart, ExceptionState&); | 73 void collapse(bool toStart, ExceptionState&); |
| 74 bool isPointInRange(Node* refNode, int offset, ExceptionState&); | 74 bool isPointInRange(Node* refNode, int offset, ExceptionState&); |
| 75 short comparePoint(Node* refNode, int offset, ExceptionState&) const; | 75 short comparePoint(Node* refNode, int offset, ExceptionState&) const; |
| 76 enum CompareResults { NODE_BEFORE, NODE_AFTER, NODE_BEFORE_AND_AFTER, NODE_I
NSIDE }; | 76 enum CompareResults { NODE_BEFORE, NODE_AFTER, NODE_BEFORE_AND_AFTER, NODE_I
NSIDE }; |
| 77 CompareResults compareNode(Node* refNode, ExceptionState&) const; | 77 CompareResults compareNode(Node* refNode, ExceptionState&) const; |
| 78 enum CompareHow { START_TO_START, START_TO_END, END_TO_END, END_TO_START }; | 78 enum CompareHow { START_TO_START, START_TO_END, END_TO_END, END_TO_START }; |
| 79 short compareBoundaryPoints(CompareHow, const Range* sourceRange, ExceptionS
tate&) const; | 79 short compareBoundaryPoints(CompareHow, const Range* sourceRange, ExceptionS
tate&) const; |
| 80 static short compareBoundaryPoints(Node* containerA, int offsetA, Node* cont
ainerB, int offsetB, ExceptionState&); | 80 static short compareBoundaryPoints(Node* containerA, int offsetA, Node* cont
ainerB, int offsetB, ExceptionState&); |
| 81 static short compareBoundaryPoints(const RangeBoundaryPoint& boundaryA, cons
t RangeBoundaryPoint& boundaryB, ExceptionState&); | 81 static short compareBoundaryPoints(const RangeBoundaryPoint& boundaryA, cons
t RangeBoundaryPoint& boundaryB, ExceptionState&); |
| 82 bool boundaryPointsValid() const; | 82 bool boundaryPointsValid() const; |
| 83 bool intersectsNode(Node* refNode, ExceptionState&); | 83 bool intersectsNode(Node* refNode, ExceptionState&); |
| 84 void deleteContents(ExceptionState&); | 84 void deleteContents(ExceptionState&); |
| 85 PassRefPtr<DocumentFragment> extractContents(ExceptionState&); | 85 PassRefPtr<DocumentFragment> extractContents(ExceptionState&); |
| 86 PassRefPtr<DocumentFragment> cloneContents(ExceptionState&); | 86 PassRefPtr<DocumentFragment> cloneContents(ExceptionState&); |
| 87 void insertNode(PassRefPtr<Node>, ExceptionState&); | 87 void insertNode(PassRefPtr<Node>, ExceptionState&); |
| 88 String toString(ExceptionState&) const; | 88 String toString(ExceptionState&) const; |
| 89 | 89 |
| 90 String toHTML() const; | 90 String toHTML() const; |
| 91 String text() const; | 91 String text() const; |
| 92 | 92 |
| 93 PassRefPtr<DocumentFragment> createContextualFragment(const String& html, Ex
ceptionState&); | 93 PassRefPtr<DocumentFragment> createContextualFragment(const String& html, Ex
ceptionState&); |
| 94 | 94 |
| 95 void detach(ExceptionState&); | 95 void detach(ExceptionState&); |
| 96 PassRefPtr<Range> cloneRange(ExceptionState&) const; | 96 PassRefPtr<Range> cloneRange(ExceptionState&) const; |
| 97 | 97 |
| 98 void setStartAfter(Node*, ExceptionState& = ASSERT_NO_EXCEPTION_STATE); | 98 void setStartAfter(Node*, ExceptionState& = ASSERT_NO_EXCEPTION); |
| 99 void setEndBefore(Node*, ExceptionState& = ASSERT_NO_EXCEPTION_STATE); | 99 void setEndBefore(Node*, ExceptionState& = ASSERT_NO_EXCEPTION); |
| 100 void setEndAfter(Node*, ExceptionState& = ASSERT_NO_EXCEPTION_STATE); | 100 void setEndAfter(Node*, ExceptionState& = ASSERT_NO_EXCEPTION); |
| 101 void selectNode(Node*, ExceptionState& = ASSERT_NO_EXCEPTION_STATE); | 101 void selectNode(Node*, ExceptionState& = ASSERT_NO_EXCEPTION); |
| 102 void selectNodeContents(Node*, ExceptionState&); | 102 void selectNodeContents(Node*, ExceptionState&); |
| 103 void surroundContents(PassRefPtr<Node>, ExceptionState&); | 103 void surroundContents(PassRefPtr<Node>, ExceptionState&); |
| 104 void setStartBefore(Node*, ExceptionState&); | 104 void setStartBefore(Node*, ExceptionState&); |
| 105 | 105 |
| 106 const Position startPosition() const { return m_start.toPosition(); } | 106 const Position startPosition() const { return m_start.toPosition(); } |
| 107 const Position endPosition() const { return m_end.toPosition(); } | 107 const Position endPosition() const { return m_end.toPosition(); } |
| 108 void setStart(const Position&, ExceptionState& = ASSERT_NO_EXCEPTION_STATE); | 108 void setStart(const Position&, ExceptionState& = ASSERT_NO_EXCEPTION); |
| 109 void setEnd(const Position&, ExceptionState& = ASSERT_NO_EXCEPTION_STATE); | 109 void setEnd(const Position&, ExceptionState& = ASSERT_NO_EXCEPTION); |
| 110 | 110 |
| 111 Node* firstNode() const; | 111 Node* firstNode() const; |
| 112 Node* pastLastNode() const; | 112 Node* pastLastNode() const; |
| 113 | 113 |
| 114 ShadowRoot* shadowRoot() const; | 114 ShadowRoot* shadowRoot() const; |
| 115 | 115 |
| 116 enum RangeInFixedPosition { | 116 enum RangeInFixedPosition { |
| 117 NotFixedPosition, | 117 NotFixedPosition, |
| 118 PartiallyFixedPosition, | 118 PartiallyFixedPosition, |
| 119 EntirelyFixedPosition | 119 EntirelyFixedPosition |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 bool areRangesEqual(const Range*, const Range*); | 178 bool areRangesEqual(const Range*, const Range*); |
| 179 | 179 |
| 180 } // namespace | 180 } // namespace |
| 181 | 181 |
| 182 #ifndef NDEBUG | 182 #ifndef NDEBUG |
| 183 // Outside the WebCore namespace for ease of invocation from gdb. | 183 // Outside the WebCore namespace for ease of invocation from gdb. |
| 184 void showTree(const WebCore::Range*); | 184 void showTree(const WebCore::Range*); |
| 185 #endif | 185 #endif |
| 186 | 186 |
| 187 #endif | 187 #endif |
| OLD | NEW |