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

Side by Side Diff: third_party/WebKit/Source/core/dom/shadow/FlatTreeTraversal.cpp

Issue 2802723002: Rename duplicate symbols inside core/dom (Closed)
Patch Set: Created 3 years, 8 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 | « third_party/WebKit/Source/core/dom/shadow/FlatTreeTraversal.h ('k') | no next file » | 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) 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 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 } 281 }
282 return false; 282 return false;
283 } 283 }
284 284
285 Node* FlatTreeTraversal::previousSkippingChildren(const Node& node) { 285 Node* FlatTreeTraversal::previousSkippingChildren(const Node& node) {
286 if (Node* previousSibling = traversePreviousSibling(node)) 286 if (Node* previousSibling = traversePreviousSibling(node))
287 return previousSibling; 287 return previousSibling;
288 return traversePreviousAncestorSibling(node); 288 return traversePreviousAncestorSibling(node);
289 } 289 }
290 290
291 static Node* previousAncestorSiblingPostOrder(const Node& current, 291 Node* FlatTreeTraversal::previousAncestorSiblingPostOrder(
292 const Node* stayWithin) { 292 const Node& current,
293 const Node* stayWithin) {
293 DCHECK(!FlatTreeTraversal::previousSibling(current)); 294 DCHECK(!FlatTreeTraversal::previousSibling(current));
294 for (Node* parent = FlatTreeTraversal::parent(current); parent; 295 for (Node* parent = FlatTreeTraversal::parent(current); parent;
295 parent = FlatTreeTraversal::parent(*parent)) { 296 parent = FlatTreeTraversal::parent(*parent)) {
296 if (parent == stayWithin) 297 if (parent == stayWithin)
297 return nullptr; 298 return nullptr;
298 if (Node* previousSibling = FlatTreeTraversal::previousSibling(*parent)) 299 if (Node* previousSibling = FlatTreeTraversal::previousSibling(*parent))
299 return previousSibling; 300 return previousSibling;
300 } 301 }
301 return nullptr; 302 return nullptr;
302 } 303 }
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 393
393 Node& FlatTreeTraversal::lastWithinOrSelf(const Node& node) { 394 Node& FlatTreeTraversal::lastWithinOrSelf(const Node& node) {
394 assertPrecondition(node); 395 assertPrecondition(node);
395 Node* lastDescendant = lastWithin(node); 396 Node* lastDescendant = lastWithin(node);
396 Node& result = lastDescendant ? *lastDescendant : const_cast<Node&>(node); 397 Node& result = lastDescendant ? *lastDescendant : const_cast<Node&>(node);
397 assertPostcondition(&result); 398 assertPostcondition(&result);
398 return result; 399 return result;
399 } 400 }
400 401
401 } // namespace blink 402 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/shadow/FlatTreeTraversal.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698