OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Neither the name of Google Inc. nor the names of its | 10 * * Neither the name of Google Inc. nor the names of its |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 static Node* traverseBackToYoungerShadowRoot(const Node*, TraversalDirection
); | 108 static Node* traverseBackToYoungerShadowRoot(const Node*, TraversalDirection
); |
109 | 109 |
110 Node* traverseParentOrHost(const Node*, ParentTraversalDetails* = 0) const; | 110 Node* traverseParentOrHost(const Node*, ParentTraversalDetails* = 0) const; |
111 | 111 |
112 const Node* m_node; | 112 const Node* m_node; |
113 }; | 113 }; |
114 | 114 |
115 inline ComposedTreeWalker::ComposedTreeWalker(const Node* node, StartPolicy star
tPolicy) | 115 inline ComposedTreeWalker::ComposedTreeWalker(const Node* node, StartPolicy star
tPolicy) |
116 : m_node(node) | 116 : m_node(node) |
117 { | 117 { |
118 UNUSED_PARAM(startPolicy); | |
119 #ifndef NDEBUG | 118 #ifndef NDEBUG |
120 if (m_node && startPolicy == CannotStartFromShadowBoundary) | 119 if (m_node && startPolicy == CannotStartFromShadowBoundary) |
121 assertPrecondition(); | 120 assertPrecondition(); |
122 #endif | 121 #endif |
123 } | 122 } |
124 | 123 |
125 inline void ComposedTreeWalker::parent() | 124 inline void ComposedTreeWalker::parent() |
126 { | 125 { |
127 assertPrecondition(); | 126 assertPrecondition(); |
128 m_node = traverseParent(m_node); | 127 m_node = traverseParent(m_node); |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 | 206 |
208 inline Node* ComposedTreeWalker::traverseLastChild(const Node* node) const | 207 inline Node* ComposedTreeWalker::traverseLastChild(const Node* node) const |
209 { | 208 { |
210 ASSERT(node); | 209 ASSERT(node); |
211 return traverseChild(node, TraversalDirectionBackward); | 210 return traverseChild(node, TraversalDirectionBackward); |
212 } | 211 } |
213 | 212 |
214 } // namespace | 213 } // namespace |
215 | 214 |
216 #endif | 215 #endif |
OLD | NEW |