| 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. All rights reserved. | 3 * Copyright (C) 2006, 2009 Apple Inc. All rights reserved. |
| 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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 } | 320 } |
| 321 } | 321 } |
| 322 } | 322 } |
| 323 return; | 323 return; |
| 324 case PrecedingAxis: { | 324 case PrecedingAxis: { |
| 325 if (context->isAttributeNode()) | 325 if (context->isAttributeNode()) |
| 326 context = toAttr(context)->ownerElement(); | 326 context = toAttr(context)->ownerElement(); |
| 327 | 327 |
| 328 Node* n = context; | 328 Node* n = context; |
| 329 while (ContainerNode* parent = n->parentNode()) { | 329 while (ContainerNode* parent = n->parentNode()) { |
| 330 for (n = NodeTraversal::previous(n); n != parent; n = NodeTraver
sal::previous(n)) | 330 for (n = NodeTraversal::previous(*n); n != parent; n = NodeTrave
rsal::previous(*n)) |
| 331 if (nodeMatches(n, PrecedingAxis, m_nodeTest)) | 331 if (nodeMatches(n, PrecedingAxis, m_nodeTest)) |
| 332 nodes.append(n); | 332 nodes.append(n); |
| 333 n = parent; | 333 n = parent; |
| 334 } | 334 } |
| 335 nodes.markSorted(false); | 335 nodes.markSorted(false); |
| 336 return; | 336 return; |
| 337 } | 337 } |
| 338 case AttributeAxis: { | 338 case AttributeAxis: { |
| 339 if (!context->isElementNode()) | 339 if (!context->isElementNode()) |
| 340 return; | 340 return; |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 nodes.markSorted(false); | 394 nodes.markSorted(false); |
| 395 return; | 395 return; |
| 396 } | 396 } |
| 397 } | 397 } |
| 398 ASSERT_NOT_REACHED(); | 398 ASSERT_NOT_REACHED(); |
| 399 } | 399 } |
| 400 | 400 |
| 401 | 401 |
| 402 } | 402 } |
| 403 } | 403 } |
| OLD | NEW |