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

Side by Side Diff: third_party/WebKit/Source/core/dom/shadow/ComposedTreeTraversal.h

Issue 1562743002: Revert of Support slot element's fallback content feature (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
OLDNEW
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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 133
134 static void assertPostcondition(const Node* node) 134 static void assertPostcondition(const Node* node)
135 { 135 {
136 #if ENABLE(ASSERT) 136 #if ENABLE(ASSERT)
137 if (node) 137 if (node)
138 assertPrecondition(*node); 138 assertPrecondition(*node);
139 #endif 139 #endif
140 } 140 }
141 141
142 static Node* resolveDistributionStartingAt(const Node*, TraversalDirection); 142 static Node* resolveDistributionStartingAt(const Node*, TraversalDirection);
143 static Node* v1ResolveDistributionStartingAt(const Node&, TraversalDirection );
143 static Node* v0ResolveDistributionStartingAt(const Node&, TraversalDirection ); 144 static Node* v0ResolveDistributionStartingAt(const Node&, TraversalDirection );
144 145
145 static Node* traverseNext(const Node&); 146 static Node* traverseNext(const Node&);
146 static Node* traverseNext(const Node&, const Node* stayWithin); 147 static Node* traverseNext(const Node&, const Node* stayWithin);
147 static Node* traverseNextSkippingChildren(const Node&, const Node* stayWithi n); 148 static Node* traverseNextSkippingChildren(const Node&, const Node* stayWithi n);
148 static Node* traversePrevious(const Node&); 149 static Node* traversePrevious(const Node&);
149 150
150 static Node* traverseFirstChild(const Node&); 151 static Node* traverseFirstChild(const Node&);
151 static Node* traverseLastChild(const Node&); 152 static Node* traverseLastChild(const Node&);
152 static Node* traverseChild(const Node&, TraversalDirection); 153 static Node* traverseChild(const Node&, TraversalDirection);
153 154
154 static ContainerNode* traverseParent(const Node&, ParentTraversalDetails* = 0); 155 static ContainerNode* traverseParent(const Node&, ParentTraversalDetails* = 0);
155 // TODO(hayato): Make ParentTraversalDetails be aware of slot elements too. 156 // TODO(hayato): Make ParentTraversalDetails be aware of slot elements too.
156 static ContainerNode* traverseParentForV0(const Node&, ParentTraversalDetai ls* = 0); 157 static ContainerNode* v1TraverseParent(const Node&);
157 static ContainerNode* traverseParentOrHost(const Node&); 158 static ContainerNode* v0TraverseParent(const Node&, ParentTraversalDetails* = 0);
158 159
159 static Node* traverseNextSibling(const Node&); 160 static Node* traverseNextSibling(const Node&);
160 static Node* traversePreviousSibling(const Node&); 161 static Node* traversePreviousSibling(const Node&);
161 162
162 static Node* traverseSiblings(const Node&, TraversalDirection); 163 static Node* traverseSiblings(const Node&, TraversalDirection);
163 static Node* traverseSiblingsForV1HostChild(const Node&, TraversalDirection) ; 164 static Node* v1TraverseSiblings(const Node&, TraversalDirection);
164 static Node* traverseSiblingsForV0Distribution(const Node&, TraversalDirecti on); 165 static Node* v0TraverseSiblings(const Node&, TraversalDirection);
165 166
167 static Node* traverseSiblingsOrShadowInsertionPointSiblings(const Node&, Tra versalDirection);
168
169 static ContainerNode* traverseParentOrHost(const Node&);
166 static Node* traverseNextAncestorSibling(const Node&); 170 static Node* traverseNextAncestorSibling(const Node&);
167 static Node* traversePreviousAncestorSibling(const Node&); 171 static Node* traversePreviousAncestorSibling(const Node&);
168 }; 172 };
169 173
170 inline ContainerNode* ComposedTreeTraversal::parent(const Node& node, ParentTrav ersalDetails* details) 174 inline ContainerNode* ComposedTreeTraversal::parent(const Node& node, ParentTrav ersalDetails* details)
171 { 175 {
172 assertPrecondition(node); 176 assertPrecondition(node);
173 ContainerNode* result = traverseParent(node, details); 177 ContainerNode* result = traverseParent(node, details);
174 assertPostcondition(result); 178 assertPostcondition(result);
175 return result; 179 return result;
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 } 309 }
306 310
307 inline Node* ComposedTreeTraversal::traverseLastChild(const Node& node) 311 inline Node* ComposedTreeTraversal::traverseLastChild(const Node& node)
308 { 312 {
309 return traverseChild(node, TraversalDirectionBackward); 313 return traverseChild(node, TraversalDirectionBackward);
310 } 314 }
311 315
312 } // namespace 316 } // namespace
313 317
314 #endif 318 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Node.cpp ('k') | third_party/WebKit/Source/core/dom/shadow/ComposedTreeTraversal.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698