diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
commit | 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch) | |
tree | 46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/xml/XPathExpression.h | |
parent | 32761a6cee1d0dee366b885b7b9c777e67885688 (diff) | |
download | WebKitGtk-tarball-master.tar.gz |
webkitgtk-2.16.5HEADwebkitgtk-2.16.5master
Diffstat (limited to 'Source/WebCore/xml/XPathExpression.h')
-rw-r--r-- | Source/WebCore/xml/XPathExpression.h | 42 |
1 files changed, 18 insertions, 24 deletions
diff --git a/Source/WebCore/xml/XPathExpression.h b/Source/WebCore/xml/XPathExpression.h index 8fd2a3eed..5a478a82e 100644 --- a/Source/WebCore/xml/XPathExpression.h +++ b/Source/WebCore/xml/XPathExpression.h @@ -24,37 +24,31 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef XPathExpression_h -#define XPathExpression_h +#pragma once -#include <wtf/Forward.h> -#include <wtf/RefCounted.h> +#include "ExceptionOr.h" namespace WebCore { - typedef int ExceptionCode; +class Node; +class XPathNSResolver; +class XPathResult; - class Node; - class XPathNSResolver; - class XPathResult; +namespace XPath { +class Expression; +} - namespace XPath { - class Expression; - } +class XPathExpression : public RefCounted<XPathExpression> { +public: + static ExceptionOr<Ref<XPathExpression>> createExpression(const String& expression, RefPtr<XPathNSResolver>&&); + WEBCORE_EXPORT ~XPathExpression(); - class XPathExpression : public RefCounted<XPathExpression> { - public: - static PassRefPtr<XPathExpression> createExpression(const String& expression, XPathNSResolver*, ExceptionCode&); - ~XPathExpression(); - - PassRefPtr<XPathResult> evaluate(Node* contextNode, unsigned short type, XPathResult*, ExceptionCode&); - - private: - explicit XPathExpression(std::unique_ptr<XPath::Expression>); + WEBCORE_EXPORT ExceptionOr<Ref<XPathResult>> evaluate(Node* contextNode, unsigned short type, XPathResult*); - std::unique_ptr<XPath::Expression> m_topExpression; - }; +private: + explicit XPathExpression(std::unique_ptr<XPath::Expression>); -} + std::unique_ptr<XPath::Expression> m_topExpression; +}; -#endif // XPathExpression_h +} |