diff options
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 |