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

Side by Side Diff: Source/core/xml/XPathStep.cpp

Issue 69003004: Have NodeTraversal::previous*() take a reference (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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/rendering/RenderListItem.cpp ('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) 2005 Frerich Raabe <raabe@kde.org> 2 * Copyright (C) 2005 Frerich Raabe <raabe@kde.org>
3 * Copyright (C) 2006, 2009 Apple Inc. All rights reserved. 3 * Copyright (C) 2006, 2009 Apple Inc. All rights reserved.
4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 } 320 }
321 } 321 }
322 } 322 }
323 return; 323 return;
324 case PrecedingAxis: { 324 case PrecedingAxis: {
325 if (context->isAttributeNode()) 325 if (context->isAttributeNode())
326 context = toAttr(context)->ownerElement(); 326 context = toAttr(context)->ownerElement();
327 327
328 Node* n = context; 328 Node* n = context;
329 while (ContainerNode* parent = n->parentNode()) { 329 while (ContainerNode* parent = n->parentNode()) {
330 for (n = NodeTraversal::previous(n); n != parent; n = NodeTraver sal::previous(n)) 330 for (n = NodeTraversal::previous(*n); n != parent; n = NodeTrave rsal::previous(*n))
331 if (nodeMatches(n, PrecedingAxis, m_nodeTest)) 331 if (nodeMatches(n, PrecedingAxis, m_nodeTest))
332 nodes.append(n); 332 nodes.append(n);
333 n = parent; 333 n = parent;
334 } 334 }
335 nodes.markSorted(false); 335 nodes.markSorted(false);
336 return; 336 return;
337 } 337 }
338 case AttributeAxis: { 338 case AttributeAxis: {
339 if (!context->isElementNode()) 339 if (!context->isElementNode())
340 return; 340 return;
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 nodes.markSorted(false); 394 nodes.markSorted(false);
395 return; 395 return;
396 } 396 }
397 } 397 }
398 ASSERT_NOT_REACHED(); 398 ASSERT_NOT_REACHED();
399 } 399 }
400 400
401 401
402 } 402 }
403 } 403 }
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderListItem.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698