diff options
Diffstat (limited to 'WebCore/xml/XPathStep.cpp')
-rw-r--r-- | WebCore/xml/XPathStep.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/WebCore/xml/XPathStep.cpp b/WebCore/xml/XPathStep.cpp index abdcba5..ae8d9c4 100644 --- a/WebCore/xml/XPathStep.cpp +++ b/WebCore/xml/XPathStep.cpp @@ -191,10 +191,10 @@ void Step::nodesInAxis(Node* context, NodeSet& nodes) const if (!attrs) return; - for (unsigned long i = 0; i < attrs->length(); ++i) { - RefPtr<Node> n = attrs->item(i); - if (nodeMatches(n.get())) - nodes.append(n.release()); + for (unsigned i = 0; i < attrs->length(); ++i) { + RefPtr<Attr> attr = attrs->attributeItem(i)->createAttrIfNeeded(static_cast<Element*>(context)); + if (nodeMatches(attr.get())) + nodes.append(attr.release()); } return; } |