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

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

Issue 1854543002: Oilpan: Remove WillBe types (part 7) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 } 364 }
365 365
366 case AttributeAxis: { 366 case AttributeAxis: {
367 if (!context->isElementNode()) 367 if (!context->isElementNode())
368 return; 368 return;
369 369
370 Element* contextElement = toElement(context); 370 Element* contextElement = toElement(context);
371 // Avoid lazily creating attribute nodes for attributes that we do not 371 // Avoid lazily creating attribute nodes for attributes that we do not
372 // need anyway. 372 // need anyway.
373 if (nodeTest().getKind() == NodeTest::NameTest && nodeTest().data() != s tarAtom) { 373 if (nodeTest().getKind() == NodeTest::NameTest && nodeTest().data() != s tarAtom) {
374 RefPtrWillBeRawPtr<Attr> attr = contextElement->getAttributeNodeNS(n odeTest().namespaceURI(), nodeTest().data()); 374 RawPtr<Attr> attr = contextElement->getAttributeNodeNS(nodeTest().na mespaceURI(), nodeTest().data());
375 // In XPath land, namespace nodes are not accessible on the attribut e axis. 375 // In XPath land, namespace nodes are not accessible on the attribut e axis.
376 if (attr && attr->namespaceURI() != XMLNSNames::xmlnsNamespaceURI) { 376 if (attr && attr->namespaceURI() != XMLNSNames::xmlnsNamespaceURI) {
377 // Still need to check merged predicates. 377 // Still need to check merged predicates.
378 if (nodeMatches(evaluationContext, attr.get(), AttributeAxis, no deTest())) 378 if (nodeMatches(evaluationContext, attr.get(), AttributeAxis, no deTest()))
379 nodes.append(attr.release()); 379 nodes.append(attr.release());
380 } 380 }
381 return; 381 return;
382 } 382 }
383 383
384 AttributeCollection attributes = contextElement->attributes(); 384 AttributeCollection attributes = contextElement->attributes();
385 for (auto& attribute : attributes) { 385 for (auto& attribute : attributes) {
386 RefPtrWillBeRawPtr<Attr> attr = contextElement->ensureAttr(attribute .name()); 386 RawPtr<Attr> attr = contextElement->ensureAttr(attribute.name());
387 if (nodeMatches(evaluationContext, attr.get(), AttributeAxis, nodeTe st())) 387 if (nodeMatches(evaluationContext, attr.get(), AttributeAxis, nodeTe st()))
388 nodes.append(attr.release()); 388 nodes.append(attr.release());
389 } 389 }
390 return; 390 return;
391 } 391 }
392 392
393 case NamespaceAxis: 393 case NamespaceAxis:
394 // XPath namespace nodes are not implemented. 394 // XPath namespace nodes are not implemented.
395 return; 395 return;
396 396
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 nodes.markSorted(false); 428 nodes.markSorted(false);
429 return; 429 return;
430 } 430 }
431 } 431 }
432 ASSERT_NOT_REACHED(); 432 ASSERT_NOT_REACHED();
433 } 433 }
434 434
435 } // namespace XPath 435 } // namespace XPath
436 436
437 } // namespace blink 437 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/xml/XPathResult.cpp ('k') | third_party/WebKit/Source/core/xml/XSLImportRule.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698