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

Side by Side Diff: Source/core/dom/TreeWalker.cpp

Issue 69543007: Have NodeTraversal::nextSkippingChildren() take a reference (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase on master Created 7 years, 1 month 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 | « Source/core/dom/SelectorQuery.cpp ('k') | Source/core/editing/ApplyStyleCommand.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 * Copyright (C) 2000 Frederik Holljen (frederik.holljen@hig.no) 3 * Copyright (C) 2000 Frederik Holljen (frederik.holljen@hig.no)
4 * Copyright (C) 2001 Peter Kelly (pmk@post.com) 4 * Copyright (C) 2001 Peter Kelly (pmk@post.com)
5 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) 5 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
6 * Copyright (C) 2004, 2008 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2008 Apple Inc. All rights reserved.
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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 while (Node* firstChild = node->firstChild()) { 260 while (Node* firstChild = node->firstChild()) {
261 node = firstChild; 261 node = firstChild;
262 short acceptNodeResult = acceptNode(state, node.get()); 262 short acceptNodeResult = acceptNode(state, node.get());
263 if (state && state->hadException()) 263 if (state && state->hadException())
264 return 0; 264 return 0;
265 if (acceptNodeResult == NodeFilter::FILTER_ACCEPT) 265 if (acceptNodeResult == NodeFilter::FILTER_ACCEPT)
266 return setCurrent(node.release()); 266 return setCurrent(node.release());
267 if (acceptNodeResult == NodeFilter::FILTER_REJECT) 267 if (acceptNodeResult == NodeFilter::FILTER_REJECT)
268 break; 268 break;
269 } 269 }
270 while (Node* nextSibling = NodeTraversal::nextSkippingChildren(node.get(), r oot())) { 270 while (Node* nextSibling = NodeTraversal::nextSkippingChildren(*node, root() )) {
271 node = nextSibling; 271 node = nextSibling;
272 short acceptNodeResult = acceptNode(state, node.get()); 272 short acceptNodeResult = acceptNode(state, node.get());
273 if (state && state->hadException()) 273 if (state && state->hadException())
274 return 0; 274 return 0;
275 if (acceptNodeResult == NodeFilter::FILTER_ACCEPT) 275 if (acceptNodeResult == NodeFilter::FILTER_ACCEPT)
276 return setCurrent(node.release()); 276 return setCurrent(node.release());
277 if (acceptNodeResult == NodeFilter::FILTER_SKIP) 277 if (acceptNodeResult == NodeFilter::FILTER_SKIP)
278 goto Children; 278 goto Children;
279 } 279 }
280 return 0; 280 return 0;
281 } 281 }
282 282
283 } // namespace WebCore 283 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/dom/SelectorQuery.cpp ('k') | Source/core/editing/ApplyStyleCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698