| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 2 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 parentMatrix[i].swap(parentMatrix[groupEnd++]); | 141 parentMatrix[i].swap(parentMatrix[groupEnd++]); |
| 142 } | 142 } |
| 143 | 143 |
| 144 if (groupEnd - previousGroupEnd > 1) | 144 if (groupEnd - previousGroupEnd > 1) |
| 145 sortBlock(previousGroupEnd, groupEnd, parentMatrix, | 145 sortBlock(previousGroupEnd, groupEnd, parentMatrix, |
| 146 mayContainAttributeNodes); | 146 mayContainAttributeNodes); |
| 147 | 147 |
| 148 DCHECK_NE(previousGroupEnd, groupEnd); | 148 DCHECK_NE(previousGroupEnd, groupEnd); |
| 149 previousGroupEnd = groupEnd; | 149 previousGroupEnd = groupEnd; |
| 150 #if DCHECK_IS_ON() | 150 #if DCHECK_IS_ON() |
| 151 parentNodes.remove(n); | 151 parentNodes.erase(n); |
| 152 #endif | 152 #endif |
| 153 } | 153 } |
| 154 } | 154 } |
| 155 | 155 |
| 156 DCHECK(parentNodes.isEmpty()); | 156 DCHECK(parentNodes.isEmpty()); |
| 157 } | 157 } |
| 158 | 158 |
| 159 void NodeSet::sort() const { | 159 void NodeSet::sort() const { |
| 160 if (m_isSorted) | 160 if (m_isSorted) |
| 161 return; | 161 return; |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 | 271 |
| 272 Node* NodeSet::anyNode() const { | 272 Node* NodeSet::anyNode() const { |
| 273 if (isEmpty()) | 273 if (isEmpty()) |
| 274 return nullptr; | 274 return nullptr; |
| 275 | 275 |
| 276 return m_nodes.at(0).get(); | 276 return m_nodes.at(0).get(); |
| 277 } | 277 } |
| 278 | 278 |
| 279 } // namespace XPath | 279 } // namespace XPath |
| 280 } // namespace blink | 280 } // namespace blink |
| OLD | NEW |