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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 void trace(Visitor*); | 149 void trace(Visitor*); |
150 | 150 |
151 private: | 151 private: |
152 explicit Range(Document&); | 152 explicit Range(Document&); |
153 Range(Document&, Node* startContainer, int startOffset, Node* endContainer,
int endOffset); | 153 Range(Document&, Node* startContainer, int startOffset, Node* endContainer,
int endOffset); |
154 | 154 |
155 void setDocument(Document&); | 155 void setDocument(Document&); |
156 | 156 |
157 Node* checkNodeWOffset(Node*, int offset, ExceptionState&) const; | 157 Node* checkNodeWOffset(Node*, int offset, ExceptionState&) const; |
158 void checkNodeBA(Node*, ExceptionState&) const; | 158 void checkNodeBA(Node*, ExceptionState&) const; |
159 void checkDeleteExtract(ExceptionState&); | 159 void checkExtractPrecondition(ExceptionState&); |
160 | 160 |
161 enum ActionType { DELETE_CONTENTS, EXTRACT_CONTENTS, CLONE_CONTENTS }; | 161 enum ActionType { DELETE_CONTENTS, EXTRACT_CONTENTS, CLONE_CONTENTS }; |
162 PassRefPtrWillBeRawPtr<DocumentFragment> processContents(ActionType, Excepti
onState&); | 162 PassRefPtrWillBeRawPtr<DocumentFragment> processContents(ActionType, Excepti
onState&); |
163 static PassRefPtrWillBeRawPtr<Node> processContentsBetweenOffsets(ActionType
, PassRefPtrWillBeRawPtr<DocumentFragment>, Node*, unsigned startOffset, unsigne
d endOffset, ExceptionState&); | 163 static PassRefPtrWillBeRawPtr<Node> processContentsBetweenOffsets(ActionType
, PassRefPtrWillBeRawPtr<DocumentFragment>, Node*, unsigned startOffset, unsigne
d endOffset, ExceptionState&); |
164 static void processNodes(ActionType, WillBeHeapVector<RefPtrWillBeMember<Nod
e> >&, PassRefPtrWillBeRawPtr<Node> oldContainer, PassRefPtrWillBeRawPtr<Node> n
ewContainer, ExceptionState&); | 164 static void processNodes(ActionType, WillBeHeapVector<RefPtrWillBeMember<Nod
e> >&, PassRefPtrWillBeRawPtr<Node> oldContainer, PassRefPtrWillBeRawPtr<Node> n
ewContainer, ExceptionState&); |
165 enum ContentsProcessDirection { ProcessContentsForward, ProcessContentsBackw
ard }; | 165 enum ContentsProcessDirection { ProcessContentsForward, ProcessContentsBackw
ard }; |
166 static PassRefPtrWillBeRawPtr<Node> processAncestorsAndTheirSiblings(ActionT
ype, Node* container, ContentsProcessDirection, PassRefPtrWillBeRawPtr<Node> clo
nedContainer, Node* commonRoot, ExceptionState&); | 166 static PassRefPtrWillBeRawPtr<Node> processAncestorsAndTheirSiblings(ActionT
ype, Node* container, ContentsProcessDirection, PassRefPtrWillBeRawPtr<Node> clo
nedContainer, Node* commonRoot, ExceptionState&); |
167 | 167 |
168 RefPtrWillBeMember<Document> m_ownerDocument; // Cannot be null. | 168 RefPtrWillBeMember<Document> m_ownerDocument; // Cannot be null. |
169 RangeBoundaryPoint m_start; | 169 RangeBoundaryPoint m_start; |
170 RangeBoundaryPoint m_end; | 170 RangeBoundaryPoint m_end; |
171 }; | 171 }; |
172 | 172 |
173 PassRefPtrWillBeRawPtr<Range> rangeOfContents(Node*); | 173 PassRefPtrWillBeRawPtr<Range> rangeOfContents(Node*); |
174 | 174 |
175 bool areRangesEqual(const Range*, const Range*); | 175 bool areRangesEqual(const Range*, const Range*); |
176 | 176 |
177 } // namespace | 177 } // namespace |
178 | 178 |
179 #ifndef NDEBUG | 179 #ifndef NDEBUG |
180 // Outside the WebCore namespace for ease of invocation from gdb. | 180 // Outside the WebCore namespace for ease of invocation from gdb. |
181 void showTree(const blink::Range*); | 181 void showTree(const blink::Range*); |
182 #endif | 182 #endif |
183 | 183 |
184 #endif | 184 #endif |
OLD | NEW |