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

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

Issue 781673002: Use C++11 range-based loop for core/xml and core/loader (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: remove unnecessary curly brackets Created 5 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
« no previous file with comments | « Source/core/xml/XPathParser.cpp ('k') | Source/core/xml/XSLTProcessorLibxslt.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) 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 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 // In XPath land, namespace nodes are not accessible on the attribut e axis. 377 // In XPath land, namespace nodes are not accessible on the attribut e axis.
378 if (n && n->namespaceURI() != XMLNSNames::xmlnsNamespaceURI) { 378 if (n && n->namespaceURI() != XMLNSNames::xmlnsNamespaceURI) {
379 // Still need to check merged predicates. 379 // Still need to check merged predicates.
380 if (nodeMatches(evaluationContext, n.get(), AttributeAxis, nodeT est())) 380 if (nodeMatches(evaluationContext, n.get(), AttributeAxis, nodeT est()))
381 nodes.append(n.release()); 381 nodes.append(n.release());
382 } 382 }
383 return; 383 return;
384 } 384 }
385 385
386 AttributeCollection attributes = contextElement->attributes(); 386 AttributeCollection attributes = contextElement->attributes();
387 AttributeCollection::iterator end = attributes.end(); 387 for (auto& attribute : attributes) {
388 for (AttributeCollection::iterator it = attributes.begin(); it != end; + +it) { 388 RefPtrWillBeRawPtr<Attr> attr = contextElement->ensureAttr(attribute .name());
389 RefPtrWillBeRawPtr<Attr> attr = contextElement->ensureAttr(it->name( ));
390 if (nodeMatches(evaluationContext, attr.get(), AttributeAxis, nodeTe st())) 389 if (nodeMatches(evaluationContext, attr.get(), AttributeAxis, nodeTe st()))
391 nodes.append(attr.release()); 390 nodes.append(attr.release());
392 } 391 }
393 return; 392 return;
394 } 393 }
395 394
396 case NamespaceAxis: 395 case NamespaceAxis:
397 // XPath namespace nodes are not implemented. 396 // XPath namespace nodes are not implemented.
398 return; 397 return;
399 398
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 nodes.markSorted(false); 430 nodes.markSorted(false);
432 return; 431 return;
433 } 432 }
434 } 433 }
435 ASSERT_NOT_REACHED(); 434 ASSERT_NOT_REACHED();
436 } 435 }
437 436
438 } 437 }
439 438
440 } 439 }
OLDNEW
« no previous file with comments | « Source/core/xml/XPathParser.cpp ('k') | Source/core/xml/XSLTProcessorLibxslt.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698