Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(61)

Side by Side Diff: Source/core/inspector/InspectorDOMAgent.cpp

Issue 171333003: Pass implementation object to supplemental classes by reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 989 matching lines...) Expand 10 before | Expand all | Expand 10 after
1000 break; 1000 break;
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 ASSERT(document);
1010 TrackExceptionState exceptionState; 1011 TrackExceptionState exceptionState;
1011 RefPtrWillBeRawPtr<XPathResult> result = DocumentXPathEvaluator::eva luate(document, whitespaceTrimmedQuery, document, 0, XPathResult::ORDERED_NODE_S NAPSHOT_TYPE, 0, exceptionState); 1012 RefPtrWillBeRawPtr<XPathResult> result = DocumentXPathEvaluator::eva luate(*document, whitespaceTrimmedQuery, document, 0, XPathResult::ORDERED_NODE_ SNAPSHOT_TYPE, 0, exceptionState);
1012 if (exceptionState.hadException() || !result) 1013 if (exceptionState.hadException() || !result)
1013 continue; 1014 continue;
1014 1015
1015 unsigned long size = result->snapshotLength(exceptionState); 1016 unsigned long size = result->snapshotLength(exceptionState);
1016 for (unsigned long i = 0; !exceptionState.hadException() && i < size ; ++i) { 1017 for (unsigned long i = 0; !exceptionState.hadException() && i < size ; ++i) {
1017 Node* node = result->snapshotItem(i, exceptionState); 1018 Node* node = result->snapshotItem(i, exceptionState);
1018 if (exceptionState.hadException()) 1019 if (exceptionState.hadException())
1019 break; 1020 break;
1020 1021
1021 if (node->nodeType() == Node::ATTRIBUTE_NODE) 1022 if (node->nodeType() == Node::ATTRIBUTE_NODE)
(...skipping 1028 matching lines...) Expand 10 before | Expand all | Expand 10 after
2050 if (!m_documentNodeToIdMap.contains(m_document)) { 2051 if (!m_documentNodeToIdMap.contains(m_document)) {
2051 RefPtr<TypeBuilder::DOM::Node> root; 2052 RefPtr<TypeBuilder::DOM::Node> root;
2052 getDocument(errorString, root); 2053 getDocument(errorString, root);
2053 return errorString->isEmpty(); 2054 return errorString->isEmpty();
2054 } 2055 }
2055 return true; 2056 return true;
2056 } 2057 }
2057 2058
2058 } // namespace WebCore 2059 } // namespace WebCore
2059 2060
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698