| 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 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 if (n && n->namespaceURI() != XMLNSNames::xmlnsNamespaceURI) { /
/ In XPath land, namespace nodes are not accessible on the attribute axis. | 350 if (n && n->namespaceURI() != XMLNSNames::xmlnsNamespaceURI) { /
/ In XPath land, namespace nodes are not accessible on the attribute axis. |
| 351 if (nodeMatches(n.get(), AttributeAxis, nodeTest())) // Stil
l need to check merged predicates. | 351 if (nodeMatches(n.get(), AttributeAxis, nodeTest())) // Stil
l need to check merged predicates. |
| 352 nodes.append(n.release()); | 352 nodes.append(n.release()); |
| 353 } | 353 } |
| 354 return; | 354 return; |
| 355 } | 355 } |
| 356 | 356 |
| 357 if (!contextElement->hasAttributes()) | 357 if (!contextElement->hasAttributes()) |
| 358 return; | 358 return; |
| 359 | 359 |
| 360 unsigned attributeCount = contextElement->attributeCount(); | 360 AttributeIteratorAccessor attributes = contextElement->attributesIte
rator(); |
| 361 for (unsigned i = 0; i < attributeCount; ++i) { | 361 AttributeConstIterator end = attributes.end(); |
| 362 RefPtrWillBeRawPtr<Attr> attr = contextElement->ensureAttr(conte
xtElement->attributeItem(i).name()); | 362 for (AttributeConstIterator it = attributes.begin(); it != end; ++it
) { |
| 363 RefPtrWillBeRawPtr<Attr> attr = contextElement->ensureAttr(it->n
ame()); |
| 363 if (nodeMatches(attr.get(), AttributeAxis, nodeTest())) | 364 if (nodeMatches(attr.get(), AttributeAxis, nodeTest())) |
| 364 nodes.append(attr.release()); | 365 nodes.append(attr.release()); |
| 365 } | 366 } |
| 366 return; | 367 return; |
| 367 } | 368 } |
| 368 case NamespaceAxis: | 369 case NamespaceAxis: |
| 369 // XPath namespace nodes are not implemented. | 370 // XPath namespace nodes are not implemented. |
| 370 return; | 371 return; |
| 371 case SelfAxis: | 372 case SelfAxis: |
| 372 if (nodeMatches(context, SelfAxis, nodeTest())) | 373 if (nodeMatches(context, SelfAxis, nodeTest())) |
| (...skipping 26 matching lines...) Expand all Loading... |
| 399 nodes.markSorted(false); | 400 nodes.markSorted(false); |
| 400 return; | 401 return; |
| 401 } | 402 } |
| 402 } | 403 } |
| 403 ASSERT_NOT_REACHED(); | 404 ASSERT_NOT_REACHED(); |
| 404 } | 405 } |
| 405 | 406 |
| 406 | 407 |
| 407 } | 408 } |
| 408 } | 409 } |
| OLD | NEW |