| Index: Source/core/xml/XPathStep.cpp
|
| diff --git a/Source/core/xml/XPathStep.cpp b/Source/core/xml/XPathStep.cpp
|
| index 7ef3d677d663d0522417b7f77f6404cc9ab5925e..16662a20c105afb9fe6c324c0da9907989a5f415 100644
|
| --- a/Source/core/xml/XPathStep.cpp
|
| +++ b/Source/core/xml/XPathStep.cpp
|
| @@ -331,9 +331,9 @@ void Step::nodesInAxis(EvaluationContext& evaluationContext, Node* context, Node
|
|
|
| case FollowingAxis:
|
| if (context->isAttributeNode()) {
|
| - for (Node* p = NodeTraversal::next(*toAttr(context)->ownerElement()); p; p = NodeTraversal::next(*p)) {
|
| - if (nodeMatches(evaluationContext, p, FollowingAxis, nodeTest()))
|
| - nodes.append(p);
|
| + for (Node& p : NodeTraversal::fromNext(*toAttr(context)->ownerElement())) {
|
| + if (nodeMatches(evaluationContext, &p, FollowingAxis, nodeTest()))
|
| + nodes.append(&p);
|
| }
|
| } else {
|
| for (Node* p = context; !isRootDomNode(p); p = p->parentNode()) {
|
|
|