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 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 if (n && n->namespaceURI() != XMLNSNames::xmlnsNamespaceURI) { /
/ In XPath land, namespace nodes are not accessible on the attribute axis. | 343 if (n && n->namespaceURI() != XMLNSNames::xmlnsNamespaceURI) { /
/ In XPath land, namespace nodes are not accessible on the attribute axis. |
344 if (nodeMatches(n.get(), AttributeAxis, m_nodeTest)) // Stil
l need to check merged predicates. | 344 if (nodeMatches(n.get(), AttributeAxis, m_nodeTest)) // Stil
l need to check merged predicates. |
345 nodes.append(n.release()); | 345 nodes.append(n.release()); |
346 } | 346 } |
347 return; | 347 return; |
348 } | 348 } |
349 | 349 |
350 if (!contextElement->hasAttributes()) | 350 if (!contextElement->hasAttributes()) |
351 return; | 351 return; |
352 | 352 |
353 for (unsigned i = 0; i < contextElement->attributeCount(); ++i) { | 353 unsigned attributeCount = contextElement->attributeCount(); |
| 354 for (unsigned i = 0; i < attributeCount; ++i) { |
354 RefPtr<Attr> attr = contextElement->ensureAttr(contextElement->a
ttributeItem(i)->name()); | 355 RefPtr<Attr> attr = contextElement->ensureAttr(contextElement->a
ttributeItem(i)->name()); |
355 if (nodeMatches(attr.get(), AttributeAxis, m_nodeTest)) | 356 if (nodeMatches(attr.get(), AttributeAxis, m_nodeTest)) |
356 nodes.append(attr.release()); | 357 nodes.append(attr.release()); |
357 } | 358 } |
358 return; | 359 return; |
359 } | 360 } |
360 case NamespaceAxis: | 361 case NamespaceAxis: |
361 // XPath namespace nodes are not implemented. | 362 // XPath namespace nodes are not implemented. |
362 return; | 363 return; |
363 case SelfAxis: | 364 case SelfAxis: |
(...skipping 26 matching lines...) Expand all Loading... |
390 nodes.markSorted(false); | 391 nodes.markSorted(false); |
391 return; | 392 return; |
392 } | 393 } |
393 } | 394 } |
394 ASSERT_NOT_REACHED(); | 395 ASSERT_NOT_REACHED(); |
395 } | 396 } |
396 | 397 |
397 | 398 |
398 } | 399 } |
399 } | 400 } |
OLD | NEW |