| 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 | 69 |
| 70 EvaluationContext evaluationContext(*contextNode); | 70 EvaluationContext evaluationContext(*contextNode); |
| 71 XPathResult* result = XPathResult::create(evaluationContext, m_topExpression
->evaluate(evaluationContext)); | 71 XPathResult* result = XPathResult::create(evaluationContext, m_topExpression
->evaluate(evaluationContext)); |
| 72 | 72 |
| 73 if (evaluationContext.hadTypeConversionError) { | 73 if (evaluationContext.hadTypeConversionError) { |
| 74 // It is not specified what to do if type conversion fails while evaluat
ing an expression. | 74 // It is not specified what to do if type conversion fails while evaluat
ing an expression. |
| 75 exceptionState.throwDOMException(SyntaxError, "Type conversion failed wh
ile evaluating the expression."); | 75 exceptionState.throwDOMException(SyntaxError, "Type conversion failed wh
ile evaluating the expression."); |
| 76 return nullptr; | 76 return nullptr; |
| 77 } | 77 } |
| 78 | 78 |
| 79 if (type != XPathResult::ANY_TYPE) { | 79 if (type != XPathResult::kAnyType) { |
| 80 result->convertTo(type, exceptionState); | 80 result->convertTo(type, exceptionState); |
| 81 if (exceptionState.hadException()) | 81 if (exceptionState.hadException()) |
| 82 return nullptr; | 82 return nullptr; |
| 83 } | 83 } |
| 84 | 84 |
| 85 return result; | 85 return result; |
| 86 } | 86 } |
| 87 | 87 |
| 88 } // namespace blink | 88 } // namespace blink |
| OLD | NEW |