| 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 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |