WebCore:
authorandersca <andersca@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 4 Jun 2006 08:08:31 +0000 (08:08 +0000)
committerandersca <andersca@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 4 Jun 2006 08:08:31 +0000 (08:08 +0000)
commit45cd8c7843f0c60868f9cd7104abe201d653ee23
tree77a1c266ad9e71216c77d50755bb70ec40662806
parentc8d5de0e99596153a8ea8da9f29e2f69b4da0126
WebCore:

2006-06-04  Anders Carlsson  <acarlsson@apple.com>

        Reviewed by Darin.

        http://bugzilla.opendarwin.org/show_bug.cgi?id=9035
        document.evaluate and createNSResolver miss on namespaced elements

        * xpath/XPathExpression.cpp:
        (WebCore::XPathExpression::createExpression):
        Pass the resolver to the parser.

        * xpath/XPathResult.cpp:
        (WebCore::XPathResult::iterateNext):
        Fix off-by-one error.

        * xpath/impl/XPathExpressionNode.h:
        (WebCore::XPath::EvaluationContext::EvaluationContext):
        Get rid of the resolver in the evaluation context.

        * xpath/impl/XPathGrammar.y:
        Fetch the resolver from the parser. Only return the local name.

        * xpath/impl/XPathParser.cpp:
        (WebCore::XPath::Parser::parseStatement):
        * xpath/impl/XPathParser.h:
        (WebCore::XPath::Parser::resolver):
        Update to hold the resolver.

        * xpath/impl/XPathStep.cpp:
        (WebCore::XPath::Step::Step):
        If the parser has stored a namespace URI, set it.

        (WebCore::XPath::Step::nodeTestMatches):
        Check namespace URIs.

        * xpath/impl/XPathStep.h:
        Add m_namespaceURI.

LayoutTests:

2006-06-04  Anders Carlsson  <acarlsson@apple.com>

        Reviewed by Darin.

        http://bugzilla.opendarwin.org/show_bug.cgi?id=9035
        document.evaluate and createNSResolver miss on namespaced elements

        * fast/xpath: Added.
        * fast/xpath/xpath-namespaces-expected.txt: Added.
        * fast/xpath/xpath-namespaces.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@14717 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/xpath/xpath-namespaces-expected.txt [new file with mode: 0644]
LayoutTests/fast/xpath/xpath-namespaces.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/xpath/XPathExpression.cpp
WebCore/xpath/XPathResult.cpp
WebCore/xpath/impl/XPathExpressionNode.h
WebCore/xpath/impl/XPathGrammar.y
WebCore/xpath/impl/XPathParser.cpp
WebCore/xpath/impl/XPathParser.h
WebCore/xpath/impl/XPathStep.cpp
WebCore/xpath/impl/XPathStep.h