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 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
377 // In XPath land, namespace nodes are not accessible on the attribut
e axis. | 377 // In XPath land, namespace nodes are not accessible on the attribut
e axis. |
378 if (n && n->namespaceURI() != XMLNSNames::xmlnsNamespaceURI) { | 378 if (n && n->namespaceURI() != XMLNSNames::xmlnsNamespaceURI) { |
379 // Still need to check merged predicates. | 379 // Still need to check merged predicates. |
380 if (nodeMatches(evaluationContext, n.get(), AttributeAxis, nodeT
est())) | 380 if (nodeMatches(evaluationContext, n.get(), AttributeAxis, nodeT
est())) |
381 nodes.append(n.release()); | 381 nodes.append(n.release()); |
382 } | 382 } |
383 return; | 383 return; |
384 } | 384 } |
385 | 385 |
386 AttributeCollection attributes = contextElement->attributes(); | 386 AttributeCollection attributes = contextElement->attributes(); |
387 AttributeCollection::const_iterator end = attributes.end(); | 387 AttributeCollection::iterator end = attributes.end(); |
388 for (AttributeCollection::const_iterator it = attributes.begin(); it !=
end; ++it) { | 388 for (AttributeCollection::iterator it = attributes.begin(); it != end; +
+it) { |
389 RefPtrWillBeRawPtr<Attr> attr = contextElement->ensureAttr(it->name(
)); | 389 RefPtrWillBeRawPtr<Attr> attr = contextElement->ensureAttr(it->name(
)); |
390 if (nodeMatches(evaluationContext, attr.get(), AttributeAxis, nodeTe
st())) | 390 if (nodeMatches(evaluationContext, attr.get(), AttributeAxis, nodeTe
st())) |
391 nodes.append(attr.release()); | 391 nodes.append(attr.release()); |
392 } | 392 } |
393 return; | 393 return; |
394 } | 394 } |
395 | 395 |
396 case NamespaceAxis: | 396 case NamespaceAxis: |
397 // XPath namespace nodes are not implemented. | 397 // XPath namespace nodes are not implemented. |
398 return; | 398 return; |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
431 nodes.markSorted(false); | 431 nodes.markSorted(false); |
432 return; | 432 return; |
433 } | 433 } |
434 } | 434 } |
435 ASSERT_NOT_REACHED(); | 435 ASSERT_NOT_REACHED(); |
436 } | 436 } |
437 | 437 |
438 } | 438 } |
439 | 439 |
440 } | 440 } |
OLD | NEW |