OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google, Inc. | 2 * Copyright (C) 2013 Google, Inc. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 10 matching lines...) Expand all Loading... |
21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
24 */ | 24 */ |
25 | 25 |
26 #include "config.h" | 26 #include "config.h" |
27 #include "core/xml/DocumentXPathEvaluator.h" | 27 #include "core/xml/DocumentXPathEvaluator.h" |
28 | 28 |
29 #include "bindings/v8/ExceptionState.h" | 29 #include "bindings/v8/ExceptionState.h" |
30 #include "core/dom/Document.h" | 30 #include "core/dom/Document.h" |
31 #include "core/xml/XPathEvaluator.h" | |
32 #include "core/xml/XPathExpression.h" | 31 #include "core/xml/XPathExpression.h" |
33 #include "core/xml/XPathNSResolver.h" | |
34 #include "core/xml/XPathResult.h" | 32 #include "core/xml/XPathResult.h" |
35 | 33 |
36 namespace WebCore { | 34 namespace WebCore { |
37 | 35 |
38 DocumentXPathEvaluator::DocumentXPathEvaluator() | 36 DocumentXPathEvaluator::DocumentXPathEvaluator() |
39 { | 37 { |
40 } | 38 } |
41 | 39 |
42 DocumentXPathEvaluator::~DocumentXPathEvaluator() | 40 DocumentXPathEvaluator::~DocumentXPathEvaluator() |
43 { | 41 { |
(...skipping 30 matching lines...) Expand all Loading... |
74 Node* contextNode, PassRefPtr<XPathNSResolver> resolver, unsigned short type
, | 72 Node* contextNode, PassRefPtr<XPathNSResolver> resolver, unsigned short type
, |
75 XPathResult* result, ExceptionState& exceptionState) | 73 XPathResult* result, ExceptionState& exceptionState) |
76 { | 74 { |
77 DocumentXPathEvaluator* suplement = from(document); | 75 DocumentXPathEvaluator* suplement = from(document); |
78 if (!suplement->m_xpathEvaluator) | 76 if (!suplement->m_xpathEvaluator) |
79 suplement->m_xpathEvaluator = XPathEvaluator::create(); | 77 suplement->m_xpathEvaluator = XPathEvaluator::create(); |
80 return suplement->m_xpathEvaluator->evaluate(expression, contextNode, resolv
er, type, result, exceptionState); | 78 return suplement->m_xpathEvaluator->evaluate(expression, contextNode, resolv
er, type, result, exceptionState); |
81 } | 79 } |
82 | 80 |
83 } // namespace WebCore | 81 } // namespace WebCore |
OLD | NEW |