| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2005 Frerich Raabe <raabe@kde.org> | 2 * Copyright (C) 2005 Frerich Raabe <raabe@kde.org> |
| 3 * Copyright (C) 2006, 2009 Apple Inc. All rights reserved. | 3 * Copyright (C) 2006, 2009 Apple Inc. All rights reserved. |
| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 RefPtrWillBeRawPtr<XPathExpression> expr = XPathExpression::create(); | 51 RefPtrWillBeRawPtr<XPathExpression> expr = XPathExpression::create(); |
| 52 Parser parser; | 52 Parser parser; |
| 53 | 53 |
| 54 expr->m_topExpression = parser.parseStatement(expression, resolver, exceptio
nState); | 54 expr->m_topExpression = parser.parseStatement(expression, resolver, exceptio
nState); |
| 55 if (!expr->m_topExpression) | 55 if (!expr->m_topExpression) |
| 56 return nullptr; | 56 return nullptr; |
| 57 | 57 |
| 58 return expr.release(); | 58 return expr.release(); |
| 59 } | 59 } |
| 60 | 60 |
| 61 void XPathExpression::trace(Visitor* visitor) | 61 DEFINE_TRACE(XPathExpression) |
| 62 { | 62 { |
| 63 visitor->trace(m_topExpression); | 63 visitor->trace(m_topExpression); |
| 64 } | 64 } |
| 65 | 65 |
| 66 PassRefPtrWillBeRawPtr<XPathResult> XPathExpression::evaluate(Node* contextNode,
unsigned short type, XPathResult*, ExceptionState& exceptionState) | 66 PassRefPtrWillBeRawPtr<XPathResult> XPathExpression::evaluate(Node* contextNode,
unsigned short type, XPathResult*, ExceptionState& exceptionState) |
| 67 { | 67 { |
| 68 if (!contextNode) { | 68 if (!contextNode) { |
| 69 exceptionState.throwDOMException(NotSupportedError, "The context node pr
ovided is null."); | 69 exceptionState.throwDOMException(NotSupportedError, "The context node pr
ovided is null."); |
| 70 return nullptr; | 70 return nullptr; |
| 71 } | 71 } |
| (...skipping 15 matching lines...) Expand all Loading... |
| 87 if (type != XPathResult::ANY_TYPE) { | 87 if (type != XPathResult::ANY_TYPE) { |
| 88 result->convertTo(type, exceptionState); | 88 result->convertTo(type, exceptionState); |
| 89 if (exceptionState.hadException()) | 89 if (exceptionState.hadException()) |
| 90 return nullptr; | 90 return nullptr; |
| 91 } | 91 } |
| 92 | 92 |
| 93 return result; | 93 return result; |
| 94 } | 94 } |
| 95 | 95 |
| 96 } | 96 } |
| OLD | NEW |