Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(98)

Side by Side Diff: Source/core/dom/NodeTraversal.h

Issue 128823002: Get rid of the overloads on templated traversal methods for clarity and safety (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | Source/core/dom/StyleEngine.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 * 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 Node* nextPostOrder(const Node&, const Node* stayWithin = 0); 57 Node* nextPostOrder(const Node&, const Node* stayWithin = 0);
58 58
59 // Like previous, but visits parents before their children. 59 // Like previous, but visits parents before their children.
60 Node* previousPostOrder(const Node&, const Node* stayWithin = 0); 60 Node* previousPostOrder(const Node&, const Node* stayWithin = 0);
61 61
62 // Pre-order traversal including the pseudo-elements. 62 // Pre-order traversal including the pseudo-elements.
63 Node* previousIncludingPseudo(const Node&, const Node* stayWithin = 0); 63 Node* previousIncludingPseudo(const Node&, const Node* stayWithin = 0);
64 Node* nextIncludingPseudo(const Node&, const Node* stayWithin = 0); 64 Node* nextIncludingPseudo(const Node&, const Node* stayWithin = 0);
65 Node* nextIncludingPseudoSkippingChildren(const Node&, const Node* stayWithin = 0); 65 Node* nextIncludingPseudoSkippingChildren(const Node&, const Node* stayWithin = 0);
66 66
67 inline Node* next(const Node& current) { return traverseNext(current); } 67 inline Node* next(const Node& current) { return traverseNext<Node>(current); }
68 inline Node* next(const ContainerNode& current) { return traverseNext<Node>(curr ent); } 68 inline Node* next(const ContainerNode& current) { return traverseNext<Node, Cont ainerNode>(current); }
69 69
70 inline Node* next(const Node& current, const Node* stayWithin) { return traverse Next(current, stayWithin); } 70 inline Node* next(const Node& current, const Node* stayWithin) { return traverse Next<Node>(current, stayWithin); }
71 inline Node* next(const ContainerNode& current, const Node* stayWithin) { return traverseNext<Node>(current, stayWithin); } 71 inline Node* next(const ContainerNode& current, const Node* stayWithin) { return traverseNext<Node, ContainerNode>(current, stayWithin); }
72 72
73 inline Node* nextSkippingChildren(const Node& current) { return traverseNextSkip pingChildren(current); } 73 inline Node* nextSkippingChildren(const Node& current) { return traverseNextSkip pingChildren<Node>(current); }
74 inline Node* nextSkippingChildren(const ContainerNode& current) { return travers eNextSkippingChildren<Node>(current); } 74 inline Node* nextSkippingChildren(const ContainerNode& current) { return travers eNextSkippingChildren<Node, ContainerNode>(current); }
75 75
76 inline Node* nextSkippingChildren(const Node& current, const Node* stayWithin) { return traverseNextSkippingChildren(current, stayWithin); } 76 inline Node* nextSkippingChildren(const Node& current, const Node* stayWithin) { return traverseNextSkippingChildren<Node>(current, stayWithin); }
77 inline Node* nextSkippingChildren(const ContainerNode& current, const Node* stay Within) { return traverseNextSkippingChildren<Node>(current, stayWithin); } 77 inline Node* nextSkippingChildren(const ContainerNode& current, const Node* stay Within) { return traverseNextSkippingChildren<Node, ContainerNode>(current, stay Within); }
78 78
79 } 79 }
80 80
81 } 81 }
82 82
83 #endif 83 #endif
OLDNEW
« no previous file with comments | « no previous file | Source/core/dom/StyleEngine.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698