Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 = 0; |
|
sof
2015/06/08 07:09:06
s/0/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 Loading... | |
| 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 = 0; |
|
sof
2015/06/08 07:09:06
Change this to use nullptr also.
| |
| 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 } |
| OLD | NEW |