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

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

Issue 180723006: Have ElementData::attributeItem() return a reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/xml/XPathNodeSet.cpp ('k') | Source/core/xml/parser/XMLDocumentParser.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 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 nodes.append(n.release()); 345 nodes.append(n.release());
346 } 346 }
347 return; 347 return;
348 } 348 }
349 349
350 if (!contextElement->hasAttributes()) 350 if (!contextElement->hasAttributes())
351 return; 351 return;
352 352
353 unsigned attributeCount = contextElement->attributeCount(); 353 unsigned attributeCount = contextElement->attributeCount();
354 for (unsigned i = 0; i < attributeCount; ++i) { 354 for (unsigned i = 0; i < attributeCount; ++i) {
355 RefPtr<Attr> attr = contextElement->ensureAttr(contextElement->a ttributeItem(i)->name()); 355 RefPtr<Attr> attr = contextElement->ensureAttr(contextElement->a ttributeItem(i).name());
356 if (nodeMatches(attr.get(), AttributeAxis, m_nodeTest)) 356 if (nodeMatches(attr.get(), AttributeAxis, m_nodeTest))
357 nodes.append(attr.release()); 357 nodes.append(attr.release());
358 } 358 }
359 return; 359 return;
360 } 360 }
361 case NamespaceAxis: 361 case NamespaceAxis:
362 // XPath namespace nodes are not implemented. 362 // XPath namespace nodes are not implemented.
363 return; 363 return;
364 case SelfAxis: 364 case SelfAxis:
365 if (nodeMatches(context, SelfAxis, m_nodeTest)) 365 if (nodeMatches(context, SelfAxis, m_nodeTest))
(...skipping 25 matching lines...) Expand all
391 nodes.markSorted(false); 391 nodes.markSorted(false);
392 return; 392 return;
393 } 393 }
394 } 394 }
395 ASSERT_NOT_REACHED(); 395 ASSERT_NOT_REACHED();
396 } 396 }
397 397
398 398
399 } 399 }
400 } 400 }
OLDNEW
« no previous file with comments | « Source/core/xml/XPathNodeSet.cpp ('k') | Source/core/xml/parser/XMLDocumentParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698