| 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 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 RefPtrWillBeRawPtr<Node> n = contextElement->getAttributeNodeNS(node
Test().namespaceURI(), nodeTest().data()); | 376 RefPtrWillBeRawPtr<Node> n = contextElement->getAttributeNodeNS(node
Test().namespaceURI(), nodeTest().data()); |
| 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 if (!contextElement->hasAttributes()) | |
| 387 return; | |
| 388 | |
| 389 AttributeCollection attributes = contextElement->attributes(); | 386 AttributeCollection attributes = contextElement->attributes(); |
| 390 AttributeCollection::const_iterator end = attributes.end(); | 387 AttributeCollection::const_iterator end = attributes.end(); |
| 391 for (AttributeCollection::const_iterator it = attributes.begin(); it !=
end; ++it) { | 388 for (AttributeCollection::const_iterator it = attributes.begin(); it !=
end; ++it) { |
| 392 RefPtrWillBeRawPtr<Attr> attr = contextElement->ensureAttr(it->name(
)); | 389 RefPtrWillBeRawPtr<Attr> attr = contextElement->ensureAttr(it->name(
)); |
| 393 if (nodeMatches(evaluationContext, attr.get(), AttributeAxis, nodeTe
st())) | 390 if (nodeMatches(evaluationContext, attr.get(), AttributeAxis, nodeTe
st())) |
| 394 nodes.append(attr.release()); | 391 nodes.append(attr.release()); |
| 395 } | 392 } |
| 396 return; | 393 return; |
| 397 } | 394 } |
| 398 | 395 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 434 nodes.markSorted(false); | 431 nodes.markSorted(false); |
| 435 return; | 432 return; |
| 436 } | 433 } |
| 437 } | 434 } |
| 438 ASSERT_NOT_REACHED(); | 435 ASSERT_NOT_REACHED(); |
| 439 } | 436 } |
| 440 | 437 |
| 441 } | 438 } |
| 442 | 439 |
| 443 } | 440 } |
| OLD | NEW |