OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2005 Frerich Raabe <raabe@kde.org> | 2 * Copyright 2005 Frerich Raabe <raabe@kde.org> |
3 * Copyright (C) 2006 Apple Computer, Inc. | 3 * Copyright (C) 2006 Apple Computer, Inc. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 21 matching lines...) Expand all Loading... |
32 #include "core/dom/Node.h" | 32 #include "core/dom/Node.h" |
33 #include "core/xml/NativeXPathNSResolver.h" | 33 #include "core/xml/NativeXPathNSResolver.h" |
34 #include "core/xml/XPathExpression.h" | 34 #include "core/xml/XPathExpression.h" |
35 #include "core/xml/XPathResult.h" | 35 #include "core/xml/XPathResult.h" |
36 #include "core/xml/XPathUtil.h" | 36 #include "core/xml/XPathUtil.h" |
37 | 37 |
38 namespace WebCore { | 38 namespace WebCore { |
39 | 39 |
40 using namespace XPath; | 40 using namespace XPath; |
41 | 41 |
42 DEFINE_GC_INFO(XPathEvaluator); | |
43 | |
44 PassRefPtrWillBeRawPtr<XPathExpression> XPathEvaluator::createExpression(const S
tring& expression, PassRefPtrWillBeRawPtr<XPathNSResolver> resolver, ExceptionSt
ate& exceptionState) | 42 PassRefPtrWillBeRawPtr<XPathExpression> XPathEvaluator::createExpression(const S
tring& expression, PassRefPtrWillBeRawPtr<XPathNSResolver> resolver, ExceptionSt
ate& exceptionState) |
45 { | 43 { |
46 return XPathExpression::createExpression(expression, resolver, exceptionStat
e); | 44 return XPathExpression::createExpression(expression, resolver, exceptionStat
e); |
47 } | 45 } |
48 | 46 |
49 PassRefPtrWillBeRawPtr<XPathNSResolver> XPathEvaluator::createNSResolver(Node* n
odeResolver) | 47 PassRefPtrWillBeRawPtr<XPathNSResolver> XPathEvaluator::createNSResolver(Node* n
odeResolver) |
50 { | 48 { |
51 return NativeXPathNSResolver::create(nodeResolver); | 49 return NativeXPathNSResolver::create(nodeResolver); |
52 } | 50 } |
53 | 51 |
(...skipping 11 matching lines...) Expand all Loading... |
65 } | 63 } |
66 | 64 |
67 RefPtrWillBeRawPtr<XPathExpression> expr = createExpression(expression, reso
lver, exceptionState); | 65 RefPtrWillBeRawPtr<XPathExpression> expr = createExpression(expression, reso
lver, exceptionState); |
68 if (exceptionState.hadException()) | 66 if (exceptionState.hadException()) |
69 return nullptr; | 67 return nullptr; |
70 | 68 |
71 return expr->evaluate(contextNode, type, result, exceptionState); | 69 return expr->evaluate(contextNode, type, result, exceptionState); |
72 } | 70 } |
73 | 71 |
74 } | 72 } |
OLD | NEW |