| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2005 Maksim Orlovich <maksim@kde.org> | 2 * Copyright 2005 Maksim Orlovich <maksim@kde.org> |
| 3 * Copyright (C) 2006 Apple Computer, Inc. | 3 * Copyright (C) 2006 Apple Computer, 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 {"child", Step::ChildAxis}, | 78 {"child", Step::ChildAxis}, |
| 79 {"descendant", Step::DescendantAxis}, | 79 {"descendant", Step::DescendantAxis}, |
| 80 {"descendant-or-self", Step::DescendantOrSelfAxis}, | 80 {"descendant-or-self", Step::DescendantOrSelfAxis}, |
| 81 {"following", Step::FollowingAxis}, | 81 {"following", Step::FollowingAxis}, |
| 82 {"following-sibling", Step::FollowingSiblingAxis}, | 82 {"following-sibling", Step::FollowingSiblingAxis}, |
| 83 {"namespace", Step::NamespaceAxis}, | 83 {"namespace", Step::NamespaceAxis}, |
| 84 {"parent", Step::ParentAxis}, | 84 {"parent", Step::ParentAxis}, |
| 85 {"preceding", Step::PrecedingAxis}, | 85 {"preceding", Step::PrecedingAxis}, |
| 86 {"preceding-sibling", Step::PrecedingSiblingAxis}, | 86 {"preceding-sibling", Step::PrecedingSiblingAxis}, |
| 87 {"self", Step::SelfAxis}}; | 87 {"self", Step::SelfAxis}}; |
| 88 for (unsigned i = 0; i < sizeof(axisNameList) / sizeof(axisNameList[0]); ++i) | 88 for (const auto& axisName : axisNameList) |
| 89 axisNames.set(axisNameList[i].name, axisNameList[i].axis); | 89 axisNames.set(axisName.name, axisName.axis); |
| 90 } | 90 } |
| 91 | 91 |
| 92 static bool isAxisName(const String& name, Step::Axis& type) { | 92 static bool isAxisName(const String& name, Step::Axis& type) { |
| 93 DEFINE_STATIC_LOCAL(AxisNamesMap, axisNames, ()); | 93 DEFINE_STATIC_LOCAL(AxisNamesMap, axisNames, ()); |
| 94 | 94 |
| 95 if (axisNames.isEmpty()) | 95 if (axisNames.isEmpty()) |
| 96 setUpAxisNamesMap(axisNames); | 96 setUpAxisNamesMap(axisNames); |
| 97 | 97 |
| 98 AxisNamesMap::iterator it = axisNames.find(name); | 98 AxisNamesMap::iterator it = axisNames.find(name); |
| 99 if (it == axisNames.end()) | 99 if (it == axisNames.end()) |
| (...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 510 m_strings.add(wrapUnique(s)); | 510 m_strings.add(wrapUnique(s)); |
| 511 } | 511 } |
| 512 | 512 |
| 513 void Parser::deleteString(String* s) { | 513 void Parser::deleteString(String* s) { |
| 514 if (!s) | 514 if (!s) |
| 515 return; | 515 return; |
| 516 | 516 |
| 517 DCHECK(m_strings.contains(s)); | 517 DCHECK(m_strings.contains(s)); |
| 518 m_strings.remove(s); | 518 m_strings.remove(s); |
| 519 } | 519 } |
| OLD | NEW |