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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 | 151 |
152 private: | 152 private: |
153 explicit Range(PassRefPtr<Document>); | 153 explicit Range(PassRefPtr<Document>); |
154 Range(PassRefPtr<Document>, PassRefPtr<Node> startContainer, int startOffset
, PassRefPtr<Node> endContainer, int endOffset); | 154 Range(PassRefPtr<Document>, PassRefPtr<Node> startContainer, int startOffset
, PassRefPtr<Node> endContainer, int endOffset); |
155 | 155 |
156 void setDocument(Document*); | 156 void setDocument(Document*); |
157 | 157 |
158 Node* checkNodeWOffset(Node*, int offset, ExceptionCode&) const; | 158 Node* checkNodeWOffset(Node*, int offset, ExceptionCode&) const; |
159 void checkNodeBA(Node*, ExceptionCode&) const; | 159 void checkNodeBA(Node*, ExceptionCode&) const; |
160 void checkDeleteExtract(ExceptionCode&); | 160 void checkDeleteExtract(ExceptionCode&); |
161 bool containedByReadOnly() const; | |
162 int maxStartOffset() const; | 161 int maxStartOffset() const; |
163 int maxEndOffset() const; | 162 int maxEndOffset() const; |
164 | 163 |
165 enum ActionType { DELETE_CONTENTS, EXTRACT_CONTENTS, CLONE_CONTENTS }; | 164 enum ActionType { DELETE_CONTENTS, EXTRACT_CONTENTS, CLONE_CONTENTS }; |
166 PassRefPtr<DocumentFragment> processContents(ActionType, ExceptionCode&); | 165 PassRefPtr<DocumentFragment> processContents(ActionType, ExceptionCode&); |
167 static PassRefPtr<Node> processContentsBetweenOffsets(ActionType, PassRefPtr
<DocumentFragment>, Node*, unsigned startOffset, unsigned endOffset, ExceptionCo
de&); | 166 static PassRefPtr<Node> processContentsBetweenOffsets(ActionType, PassRefPtr
<DocumentFragment>, Node*, unsigned startOffset, unsigned endOffset, ExceptionCo
de&); |
168 static void processNodes(ActionType, Vector<RefPtr<Node> >&, PassRefPtr<Node
> oldContainer, PassRefPtr<Node> newContainer, ExceptionCode&); | 167 static void processNodes(ActionType, Vector<RefPtr<Node> >&, PassRefPtr<Node
> oldContainer, PassRefPtr<Node> newContainer, ExceptionCode&); |
169 enum ContentsProcessDirection { ProcessContentsForward, ProcessContentsBackw
ard }; | 168 enum ContentsProcessDirection { ProcessContentsForward, ProcessContentsBackw
ard }; |
170 static PassRefPtr<Node> processAncestorsAndTheirSiblings(ActionType, Node* c
ontainer, ContentsProcessDirection, PassRefPtr<Node> clonedContainer, Node* comm
onRoot, ExceptionCode&); | 169 static PassRefPtr<Node> processAncestorsAndTheirSiblings(ActionType, Node* c
ontainer, ContentsProcessDirection, PassRefPtr<Node> clonedContainer, Node* comm
onRoot, ExceptionCode&); |
171 | 170 |
172 RefPtr<Document> m_ownerDocument; | 171 RefPtr<Document> m_ownerDocument; |
173 RangeBoundaryPoint m_start; | 172 RangeBoundaryPoint m_start; |
174 RangeBoundaryPoint m_end; | 173 RangeBoundaryPoint m_end; |
175 }; | 174 }; |
176 | 175 |
177 PassRefPtr<Range> rangeOfContents(Node*); | 176 PassRefPtr<Range> rangeOfContents(Node*); |
178 | 177 |
179 bool areRangesEqual(const Range*, const Range*); | 178 bool areRangesEqual(const Range*, const Range*); |
180 | 179 |
181 } // namespace | 180 } // namespace |
182 | 181 |
183 #ifndef NDEBUG | 182 #ifndef NDEBUG |
184 // Outside the WebCore namespace for ease of invocation from gdb. | 183 // Outside the WebCore namespace for ease of invocation from gdb. |
185 void showTree(const WebCore::Range*); | 184 void showTree(const WebCore::Range*); |
186 #endif | 185 #endif |
187 | 186 |
188 #endif | 187 #endif |
OLD | NEW |