-
ap authored
http://bugs.webkit.org/show_bug.cgi?id=8791 XPath should support custom node resolvers WebCore: * bindings/js/JSCustomXPathNSResolver.cpp: Added. (WebCore::JSCustomXPathNSResolver::create): (WebCore::JSCustomXPathNSResolver::JSCustomXPathNSResolver): (WebCore::JSCustomXPathNSResolver::~JSCustomXPathNSResolver): (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI): * bindings/js/JSCustomXPathNSResolver.h: Added. * bindings/objc/DOMCustomXPathNSResolver.h: Added. * bindings/objc/DOMCustomXPathNSResolver.mm: Added. (WebCore::DOMCustomXPathNSResolver::DOMCustomXPathNSResolver): (WebCore::DOMCustomXPathNSResolver::~DOMCustomXPathNSResolver): (WebCore::DOMCustomXPathNSResolver::lookupNamespaceURI): Wrappers for JS/ObjC objects that can be used as resolvers. * bindings/scripts/CodeGeneratorJS.pm: * bindings/scripts/CodeGeneratorObjC.pm: Use the above wrappers to support custom resolvers. * xml/XPathNSResolver.cpp: * xml/XPathNSResolver.h: Turned this class into an abstract one. * xml/NativeXPathNSResolver.cpp: Added. (WebCore::NativeXPathNSResolver::NativeXPathNSResolver): (WebCore::NativeXPathNSResolver::~NativeXPathNSResolver): (WebCore::NativeXPathNSResolver::lookupNamespaceURI): * xml/NativeXPathNSResolver.h: Added. A XPathNSResolver subclass, doing what XPathNSResolver used to do. * xml/XPathEvaluator.cpp: (WebCore::XPathEvaluator::createNSResolver): Create a NativeXPathNSResolver. * WebCore.xcodeproj/project.pbxproj: Added new files. LayoutTests: * fast/xpath/nsresolver-bad-object-expected.txt: Added. * fast/xpath/nsresolver-bad-object.xhtml: Added. * fast/xpath/nsresolver-exception-expected.txt: Added. * fast/xpath/nsresolver-exception.xhtml: Added. * fast/xpath/nsresolver-function-expected.txt: Added. * fast/xpath/nsresolver-function.xhtml: Added. * fast/xpath/nsresolver-object-expected.txt: Added. * fast/xpath/nsresolver-object.xhtml: Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19398 268f45cc-cd09-0410-ab3c-d52691b4dbfc
10cb0092