| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2011 Google Inc. All rights reserved. | 3 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 4 * Copyright (C) 2009 Joseph Pecoraro | 4 * Copyright (C) 2009 Joseph Pecoraro |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * | 9 * |
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
| (...skipping 990 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1001 } | 1001 } |
| 1002 default: | 1002 default: |
| 1003 break; | 1003 break; |
| 1004 } | 1004 } |
| 1005 } | 1005 } |
| 1006 | 1006 |
| 1007 // XPath evaluation | 1007 // XPath evaluation |
| 1008 for (Vector<Document*>::iterator it = docs.begin(); it != docs.end(); ++
it) { | 1008 for (Vector<Document*>::iterator it = docs.begin(); it != docs.end(); ++
it) { |
| 1009 Document* document = *it; | 1009 Document* document = *it; |
| 1010 TrackExceptionState exceptionState; | 1010 TrackExceptionState exceptionState; |
| 1011 RefPtr<XPathResult> result = DocumentXPathEvaluator::evaluate(docume
nt, whitespaceTrimmedQuery, document, 0, XPathResult::ORDERED_NODE_SNAPSHOT_TYPE
, 0, exceptionState); | 1011 RefPtrWillBeRawPtr<XPathResult> result = DocumentXPathEvaluator::eva
luate(document, whitespaceTrimmedQuery, document, 0, XPathResult::ORDERED_NODE_S
NAPSHOT_TYPE, 0, exceptionState); |
| 1012 if (exceptionState.hadException() || !result) | 1012 if (exceptionState.hadException() || !result) |
| 1013 continue; | 1013 continue; |
| 1014 | 1014 |
| 1015 unsigned long size = result->snapshotLength(exceptionState); | 1015 unsigned long size = result->snapshotLength(exceptionState); |
| 1016 for (unsigned long i = 0; !exceptionState.hadException() && i < size
; ++i) { | 1016 for (unsigned long i = 0; !exceptionState.hadException() && i < size
; ++i) { |
| 1017 Node* node = result->snapshotItem(i, exceptionState); | 1017 Node* node = result->snapshotItem(i, exceptionState); |
| 1018 if (exceptionState.hadException()) | 1018 if (exceptionState.hadException()) |
| 1019 break; | 1019 break; |
| 1020 | 1020 |
| 1021 if (node->nodeType() == Node::ATTRIBUTE_NODE) | 1021 if (node->nodeType() == Node::ATTRIBUTE_NODE) |
| (...skipping 1028 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2050 if (!m_documentNodeToIdMap.contains(m_document)) { | 2050 if (!m_documentNodeToIdMap.contains(m_document)) { |
| 2051 RefPtr<TypeBuilder::DOM::Node> root; | 2051 RefPtr<TypeBuilder::DOM::Node> root; |
| 2052 getDocument(errorString, root); | 2052 getDocument(errorString, root); |
| 2053 return errorString->isEmpty(); | 2053 return errorString->isEmpty(); |
| 2054 } | 2054 } |
| 2055 return true; | 2055 return true; |
| 2056 } | 2056 } |
| 2057 | 2057 |
| 2058 } // namespace WebCore | 2058 } // namespace WebCore |
| 2059 | 2059 |
| OLD | NEW |