| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 | 46 |
| 47 PassRefPtr<XPathNSResolver> XPathEvaluator::createNSResolver(Node* nodeResolver) | 47 PassRefPtr<XPathNSResolver> XPathEvaluator::createNSResolver(Node* nodeResolver) |
| 48 { | 48 { |
| 49 return NativeXPathNSResolver::create(nodeResolver); | 49 return NativeXPathNSResolver::create(nodeResolver); |
| 50 } | 50 } |
| 51 | 51 |
| 52 PassRefPtr<XPathResult> XPathEvaluator::evaluate(const String& expression, Node*
contextNode, | 52 PassRefPtr<XPathResult> XPathEvaluator::evaluate(const String& expression, Node*
contextNode, |
| 53 XPathNSResolver* resolver, unsigned short type, XPathResult* result, Excepti
onState& es) | 53 XPathNSResolver* resolver, unsigned short type, XPathResult* result, Excepti
onState& es) |
| 54 { | 54 { |
| 55 if (!isValidContextNode(contextNode)) { | 55 if (!isValidContextNode(contextNode)) { |
| 56 es.throwDOMException(NotSupportedError); | 56 es.throwUninformativeAndGenericDOMException(NotSupportedError); |
| 57 return 0; | 57 return 0; |
| 58 } | 58 } |
| 59 | 59 |
| 60 RefPtr<XPathExpression> expr = createExpression(expression, resolver, es); | 60 RefPtr<XPathExpression> expr = createExpression(expression, resolver, es); |
| 61 if (es.hadException()) | 61 if (es.hadException()) |
| 62 return 0; | 62 return 0; |
| 63 | 63 |
| 64 return expr->evaluate(contextNode, type, result, es); | 64 return expr->evaluate(contextNode, type, result, es); |
| 65 } | 65 } |
| 66 | 66 |
| 67 } | 67 } |
| OLD | NEW |