OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc.
All rights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc.
All rights reserved. |
6 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 6 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
7 * Copyright (C) 2014 Samsung Electronics. All rights reserved. | 7 * Copyright (C) 2014 Samsung Electronics. All rights reserved. |
8 * | 8 * |
9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
(...skipping 27 matching lines...) Expand all Loading... |
38 // This can be used to restrict traversal to a particular sub-tree. | 38 // This can be used to restrict traversal to a particular sub-tree. |
39 static Node* next(const Node& current) { return traverseNextTemplate(current
); } | 39 static Node* next(const Node& current) { return traverseNextTemplate(current
); } |
40 static Node* next(const ContainerNode& current) { return traverseNextTemplat
e(current); } | 40 static Node* next(const ContainerNode& current) { return traverseNextTemplat
e(current); } |
41 static Node* next(const Node& current, const Node* stayWithin) { return trav
erseNextTemplate(current, stayWithin); } | 41 static Node* next(const Node& current, const Node* stayWithin) { return trav
erseNextTemplate(current, stayWithin); } |
42 static Node* next(const ContainerNode& current, const Node* stayWithin) { re
turn traverseNextTemplate(current, stayWithin); } | 42 static Node* next(const ContainerNode& current, const Node* stayWithin) { re
turn traverseNextTemplate(current, stayWithin); } |
43 | 43 |
44 // Like next, but skips children and starts with the next sibling. | 44 // Like next, but skips children and starts with the next sibling. |
45 static Node* nextSkippingChildren(const Node&); | 45 static Node* nextSkippingChildren(const Node&); |
46 static Node* nextSkippingChildren(const Node&, const Node* stayWithin); | 46 static Node* nextSkippingChildren(const Node&, const Node* stayWithin); |
47 | 47 |
| 48 static Node* lastWithin(const ContainerNode&); |
| 49 static Node& lastWithinOrSelf(Node&); |
| 50 |
48 // Does a reverse pre-order traversal to find the node that comes before the
current one in document order | 51 // Does a reverse pre-order traversal to find the node that comes before the
current one in document order |
49 static Node* lastWithin(const ContainerNode&); | |
50 static Node* previous(const Node&, const Node* stayWithin = 0); | 52 static Node* previous(const Node&, const Node* stayWithin = 0); |
51 | 53 |
52 // Like previous, but skips children and starts with the next sibling. | 54 // Like previous, but skips children and starts with the next sibling. |
53 static Node* previousSkippingChildren(const Node&, const Node* stayWithin =
0); | 55 static Node* previousSkippingChildren(const Node&, const Node* stayWithin =
0); |
54 | 56 |
55 // Like next, but visits parents after their children. | 57 // Like next, but visits parents after their children. |
56 static Node* nextPostOrder(const Node&, const Node* stayWithin = 0); | 58 static Node* nextPostOrder(const Node&, const Node* stayWithin = 0); |
57 | 59 |
58 // Like previous, but visits parents before their children. | 60 // Like previous, but visits parents before their children. |
59 static Node* previousPostOrder(const Node&, const Node* stayWithin = 0); | 61 static Node* previousPostOrder(const Node&, const Node* stayWithin = 0); |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 if (current == stayWithin) | 109 if (current == stayWithin) |
108 return 0; | 110 return 0; |
109 if (current.nextSibling()) | 111 if (current.nextSibling()) |
110 return current.nextSibling(); | 112 return current.nextSibling(); |
111 return nextAncestorSibling(current, stayWithin); | 113 return nextAncestorSibling(current, stayWithin); |
112 } | 114 } |
113 | 115 |
114 } // namespace blink | 116 } // namespace blink |
115 | 117 |
116 #endif | 118 #endif |
OLD | NEW |