| 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 26 matching lines...) Expand all Loading... |
| 37 #include "wtf/text/WTFString.h" | 37 #include "wtf/text/WTFString.h" |
| 38 | 38 |
| 39 namespace blink { | 39 namespace blink { |
| 40 | 40 |
| 41 using namespace XPath; | 41 using namespace XPath; |
| 42 | 42 |
| 43 DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(XPathExpression); | 43 DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(XPathExpression); |
| 44 | 44 |
| 45 XPathExpression::XPathExpression() | 45 XPathExpression::XPathExpression() |
| 46 { | 46 { |
| 47 ScriptWrappable::init(this); | |
| 48 } | 47 } |
| 49 | 48 |
| 50 PassRefPtrWillBeRawPtr<XPathExpression> XPathExpression::createExpression(const
String& expression, PassRefPtrWillBeRawPtr<XPathNSResolver> resolver, ExceptionS
tate& exceptionState) | 49 PassRefPtrWillBeRawPtr<XPathExpression> XPathExpression::createExpression(const
String& expression, PassRefPtrWillBeRawPtr<XPathNSResolver> resolver, ExceptionS
tate& exceptionState) |
| 51 { | 50 { |
| 52 RefPtrWillBeRawPtr<XPathExpression> expr = XPathExpression::create(); | 51 RefPtrWillBeRawPtr<XPathExpression> expr = XPathExpression::create(); |
| 53 Parser parser; | 52 Parser parser; |
| 54 | 53 |
| 55 expr->m_topExpression = parser.parseStatement(expression, resolver, exceptio
nState); | 54 expr->m_topExpression = parser.parseStatement(expression, resolver, exceptio
nState); |
| 56 if (!expr->m_topExpression) | 55 if (!expr->m_topExpression) |
| 57 return nullptr; | 56 return nullptr; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 88 if (type != XPathResult::ANY_TYPE) { | 87 if (type != XPathResult::ANY_TYPE) { |
| 89 result->convertTo(type, exceptionState); | 88 result->convertTo(type, exceptionState); |
| 90 if (exceptionState.hadException()) | 89 if (exceptionState.hadException()) |
| 91 return nullptr; | 90 return nullptr; |
| 92 } | 91 } |
| 93 | 92 |
| 94 return result; | 93 return result; |
| 95 } | 94 } |
| 96 | 95 |
| 97 } | 96 } |
| OLD | NEW |