| 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 30 matching lines...) Expand all Loading... |
| 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& current) { return traverseNext
SkippingChildrenTemplate(current); } | 45 static Node* nextSkippingChildren(const Node& current) { return traverseNext
SkippingChildrenTemplate(current); } |
| 46 static Node* nextSkippingChildren(const ContainerNode& current) { return tra
verseNextSkippingChildrenTemplate(current); } | 46 static Node* nextSkippingChildren(const ContainerNode& current) { return tra
verseNextSkippingChildrenTemplate(current); } |
| 47 static Node* nextSkippingChildren(const Node& current, const Node* stayWithi
n) { return traverseNextSkippingChildrenTemplate(current, stayWithin); } | 47 static Node* nextSkippingChildren(const Node& current, const Node* stayWithi
n) { return traverseNextSkippingChildrenTemplate(current, stayWithin); } |
| 48 static Node* nextSkippingChildren(const ContainerNode& current, const Node*
stayWithin) { return traverseNextSkippingChildrenTemplate(current, stayWithin);
} | 48 static Node* nextSkippingChildren(const ContainerNode& current, const Node*
stayWithin) { return traverseNextSkippingChildrenTemplate(current, stayWithin);
} |
| 49 | 49 |
| 50 // Does a reverse pre-order traversal to find the node that comes before the
current one in document order | 50 // Does a reverse pre-order traversal to find the node that comes before the
current one in document order |
| 51 static Node* lastWithin(const ContainerNode&); |
| 51 static Node* previous(const Node&, const Node* stayWithin = 0); | 52 static Node* previous(const Node&, const Node* stayWithin = 0); |
| 52 | 53 |
| 53 // Like previous, but skips children and starts with the next sibling. | 54 // Like previous, but skips children and starts with the next sibling. |
| 54 static Node* previousSkippingChildren(const Node&, const Node* stayWithin =
0); | 55 static Node* previousSkippingChildren(const Node&, const Node* stayWithin =
0); |
| 55 | 56 |
| 56 // Like next, but visits parents after their children. | 57 // Like next, but visits parents after their children. |
| 57 static Node* nextPostOrder(const Node&, const Node* stayWithin = 0); | 58 static Node* nextPostOrder(const Node&, const Node* stayWithin = 0); |
| 58 | 59 |
| 59 // Like previous, but visits parents before their children. | 60 // Like previous, but visits parents before their children. |
| 60 static Node* previousPostOrder(const Node&, const Node* stayWithin = 0); | 61 static Node* previousPostOrder(const Node&, const Node* stayWithin = 0); |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 if (current == stayWithin) | 115 if (current == stayWithin) |
| 115 return 0; | 116 return 0; |
| 116 if (current.nextSibling()) | 117 if (current.nextSibling()) |
| 117 return current.nextSibling(); | 118 return current.nextSibling(); |
| 118 return nextAncestorSibling(current, stayWithin); | 119 return nextAncestorSibling(current, stayWithin); |
| 119 } | 120 } |
| 120 | 121 |
| 121 } // namespace WebCore | 122 } // namespace WebCore |
| 122 | 123 |
| 123 #endif | 124 #endif |
| OLD | NEW |