| 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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 } | 154 } |
| 155 | 155 |
| 156 nodes.markSorted(resultIsSorted); | 156 nodes.markSorted(resultIsSorted); |
| 157 } | 157 } |
| 158 | 158 |
| 159 void LocationPath::appendStep(Step* step) { | 159 void LocationPath::appendStep(Step* step) { |
| 160 unsigned stepCount = m_steps.size(); | 160 unsigned stepCount = m_steps.size(); |
| 161 if (stepCount && optimizeStepPair(m_steps[stepCount - 1], step)) | 161 if (stepCount && optimizeStepPair(m_steps[stepCount - 1], step)) |
| 162 return; | 162 return; |
| 163 step->optimize(); | 163 step->optimize(); |
| 164 m_steps.append(step); | 164 m_steps.push_back(step); |
| 165 } | 165 } |
| 166 | 166 |
| 167 void LocationPath::insertFirstStep(Step* step) { | 167 void LocationPath::insertFirstStep(Step* step) { |
| 168 if (m_steps.size() && optimizeStepPair(step, m_steps[0])) { | 168 if (m_steps.size() && optimizeStepPair(step, m_steps[0])) { |
| 169 m_steps[0] = step; | 169 m_steps[0] = step; |
| 170 return; | 170 return; |
| 171 } | 171 } |
| 172 step->optimize(); | 172 step->optimize(); |
| 173 m_steps.insert(0, step); | 173 m_steps.insert(0, step); |
| 174 } | 174 } |
| (...skipping 18 matching lines...) Expand all Loading... |
| 193 | 193 |
| 194 NodeSet& nodes = v.modifiableNodeSet(context); | 194 NodeSet& nodes = v.modifiableNodeSet(context); |
| 195 m_path->evaluate(context, nodes); | 195 m_path->evaluate(context, nodes); |
| 196 | 196 |
| 197 return v; | 197 return v; |
| 198 } | 198 } |
| 199 | 199 |
| 200 } // namespace XPath | 200 } // namespace XPath |
| 201 | 201 |
| 202 } // namespace blink | 202 } // namespace blink |
| OLD | NEW |