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

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

Issue 33353003: Have Frame::tree() return a reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 2 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 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 void InspectorDOMAgent::restore() 279 void InspectorDOMAgent::restore()
280 { 280 {
281 // Reset document to avoid early return from setDocument. 281 // Reset document to avoid early return from setDocument.
282 m_document = 0; 282 m_document = 0;
283 setDocument(m_pageAgent->mainFrame()->document()); 283 setDocument(m_pageAgent->mainFrame()->document());
284 } 284 }
285 285
286 Vector<Document*> InspectorDOMAgent::documents() 286 Vector<Document*> InspectorDOMAgent::documents()
287 { 287 {
288 Vector<Document*> result; 288 Vector<Document*> result;
289 for (Frame* frame = m_document->frame(); frame; frame = frame->tree()->trave rseNext()) { 289 for (Frame* frame = m_document->frame(); frame; frame = frame->tree().traver seNext()) {
290 Document* document = frame->document(); 290 Document* document = frame->document();
291 if (!document) 291 if (!document)
292 continue; 292 continue;
293 result.append(document); 293 result.append(document);
294 } 294 }
295 return result; 295 return result;
296 } 296 }
297 297
298 void InspectorDOMAgent::reset() 298 void InspectorDOMAgent::reset()
299 { 299 {
(...skipping 1717 matching lines...) Expand 10 before | Expand all | Expand 10 after
2017 if (!m_documentNodeToIdMap.contains(m_document)) { 2017 if (!m_documentNodeToIdMap.contains(m_document)) {
2018 RefPtr<TypeBuilder::DOM::Node> root; 2018 RefPtr<TypeBuilder::DOM::Node> root;
2019 getDocument(errorString, root); 2019 getDocument(errorString, root);
2020 return errorString->isEmpty(); 2020 return errorString->isEmpty();
2021 } 2021 }
2022 return true; 2022 return true;
2023 } 2023 }
2024 2024
2025 } // namespace WebCore 2025 } // namespace WebCore
2026 2026
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorCanvasAgent.cpp ('k') | Source/core/inspector/InspectorFileSystemAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698