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