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/XPathEvaluator.h | |
parent | 32761a6cee1d0dee366b885b7b9c777e67885688 (diff) | |
download | WebKitGtk-tarball-master.tar.gz |
webkitgtk-2.16.5HEADwebkitgtk-2.16.5master
Diffstat (limited to 'Source/WebCore/xml/XPathEvaluator.h')
-rw-r--r-- | Source/WebCore/xml/XPathEvaluator.h | 40 |
1 files changed, 16 insertions, 24 deletions
diff --git a/Source/WebCore/xml/XPathEvaluator.h b/Source/WebCore/xml/XPathEvaluator.h index ca35f2101..4a478548f 100644 --- a/Source/WebCore/xml/XPathEvaluator.h +++ b/Source/WebCore/xml/XPathEvaluator.h @@ -1,6 +1,6 @@ /* * Copyright 2005 Frerich Raabe <raabe@kde.org> - * Copyright (C) 2006 Apple Computer, Inc. + * Copyright (C) 2006 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -24,35 +24,27 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef XPathEvaluator_h -#define XPathEvaluator_h +#pragma once -#include <wtf/Forward.h> -#include <wtf/RefCounted.h> -#include <wtf/PassRefPtr.h> +#include "ExceptionOr.h" namespace WebCore { - typedef int ExceptionCode; +class Node; +class XPathExpression; +class XPathNSResolver; +class XPathResult; - class Node; - class XPathExpression; - class XPathNSResolver; - class XPathResult; +class XPathEvaluator : public RefCounted<XPathEvaluator> { +public: + static Ref<XPathEvaluator> create() { return adoptRef(*new XPathEvaluator); } - class XPathEvaluator : public RefCounted<XPathEvaluator> { - public: - static PassRefPtr<XPathEvaluator> create() { return adoptRef(new XPathEvaluator); } - - PassRefPtr<XPathExpression> createExpression(const String& expression, XPathNSResolver*, ExceptionCode&); - PassRefPtr<XPathNSResolver> createNSResolver(Node* nodeResolver); - PassRefPtr<XPathResult> evaluate(const String& expression, Node* contextNode, - XPathNSResolver*, unsigned short type, XPathResult*, ExceptionCode&); + ExceptionOr<Ref<XPathExpression>> createExpression(const String& expression, RefPtr<XPathNSResolver>&&); + Ref<XPathNSResolver> createNSResolver(Node* nodeResolver); + ExceptionOr<Ref<XPathResult>> evaluate(const String& expression, Node* contextNode, RefPtr<XPathNSResolver>&&, unsigned short type, XPathResult*); - private: - XPathEvaluator() { } - }; +private: + XPathEvaluator() = default; +}; } - -#endif // XPathEvaluator_h |