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

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

Issue 1161323007: Use nullptr instead of 0 in xml and xmlhttprequest. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated as per review comment & modified in other files which assigned "0" to ptr. Created 5 years, 6 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/DocumentXSLT.cpp ('k') | Source/core/xml/XPathNodeSet.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. 3 * Copyright (C) 2006, 2009 Apple Inc.
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 578 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 589
590 Value FunTrue::evaluate(EvaluationContext&) const 590 Value FunTrue::evaluate(EvaluationContext&) const
591 { 591 {
592 return true; 592 return true;
593 } 593 }
594 594
595 Value FunLang::evaluate(EvaluationContext& context) const 595 Value FunLang::evaluate(EvaluationContext& context) const
596 { 596 {
597 String lang = arg(0)->evaluate(context).toString(); 597 String lang = arg(0)->evaluate(context).toString();
598 598
599 const Attribute* languageAttribute = 0; 599 const Attribute* languageAttribute = nullptr;
600 Node* node = context.node.get(); 600 Node* node = context.node.get();
601 while (node) { 601 while (node) {
602 if (node->isElementNode()) { 602 if (node->isElementNode()) {
603 Element* element = toElement(node); 603 Element* element = toElement(node);
604 languageAttribute = element->attributes().find(XMLNames::langAttr); 604 languageAttribute = element->attributes().find(XMLNames::langAttr);
605 } 605 }
606 if (languageAttribute) 606 if (languageAttribute)
607 break; 607 break;
608 node = node->parentNode(); 608 node = node->parentNode();
609 } 609 }
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
729 HeapVector<Member<Expression>> args; 729 HeapVector<Member<Expression>> args;
730 return createFunction(name, args); 730 return createFunction(name, args);
731 } 731 }
732 732
733 Function* createFunction(const String& name, HeapVector<Member<Expression>>& arg s) 733 Function* createFunction(const String& name, HeapVector<Member<Expression>>& arg s)
734 { 734 {
735 if (!functionMap) 735 if (!functionMap)
736 createFunctionMap(); 736 createFunctionMap();
737 737
738 HashMap<String, FunctionRec>::iterator functionMapIter = functionMap->find(n ame); 738 HashMap<String, FunctionRec>::iterator functionMapIter = functionMap->find(n ame);
739 FunctionRec* functionRec = 0; 739 FunctionRec* functionRec = nullptr;
740 740
741 if (functionMapIter == functionMap->end() || !(functionRec = &functionMapIte r->value)->args.contains(args.size())) 741 if (functionMapIter == functionMap->end() || !(functionRec = &functionMapIte r->value)->args.contains(args.size()))
742 return 0; 742 return nullptr;
743 743
744 Function* function = functionRec->factoryFn(); 744 Function* function = functionRec->factoryFn();
745 function->setArguments(args); 745 function->setArguments(args);
746 function->setName(name); 746 function->setName(name);
747 return function; 747 return function;
748 } 748 }
749 749
750 } 750 }
751 } 751 }
OLDNEW
« no previous file with comments | « Source/core/xml/DocumentXSLT.cpp ('k') | Source/core/xml/XPathNodeSet.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698