| 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 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 void InspectorDOMAgent::restore() | 275 void InspectorDOMAgent::restore() |
| 276 { | 276 { |
| 277 // Reset document to avoid early return from setDocument. | 277 // Reset document to avoid early return from setDocument. |
| 278 m_document = nullptr; | 278 m_document = nullptr; |
| 279 setDocument(m_pageAgent->mainFrame()->document()); | 279 setDocument(m_pageAgent->mainFrame()->document()); |
| 280 } | 280 } |
| 281 | 281 |
| 282 Vector<Document*> InspectorDOMAgent::documents() | 282 Vector<Document*> InspectorDOMAgent::documents() |
| 283 { | 283 { |
| 284 Vector<Document*> result; | 284 Vector<Document*> result; |
| 285 for (LocalFrame* frame = m_document->frame(); frame; frame = frame->tree().t
raverseNext()) { | 285 for (Frame* frame = m_document->frame(); frame; frame = frame->tree().traver
seNext()) { |
| 286 Document* document = frame->document(); | 286 if (!frame->isLocalFrame()) |
| 287 continue; |
| 288 Document* document = toLocalFrame(frame)->document(); |
| 287 if (!document) | 289 if (!document) |
| 288 continue; | 290 continue; |
| 289 result.append(document); | 291 result.append(document); |
| 290 } | 292 } |
| 291 return result; | 293 return result; |
| 292 } | 294 } |
| 293 | 295 |
| 294 void InspectorDOMAgent::reset() | 296 void InspectorDOMAgent::reset() |
| 295 { | 297 { |
| 296 discardFrontendBindings(); | 298 discardFrontendBindings(); |
| (...skipping 1766 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2063 if (!m_documentNodeToIdMap.contains(m_document)) { | 2065 if (!m_documentNodeToIdMap.contains(m_document)) { |
| 2064 RefPtr<TypeBuilder::DOM::Node> root; | 2066 RefPtr<TypeBuilder::DOM::Node> root; |
| 2065 getDocument(errorString, root); | 2067 getDocument(errorString, root); |
| 2066 return errorString->isEmpty(); | 2068 return errorString->isEmpty(); |
| 2067 } | 2069 } |
| 2068 return true; | 2070 return true; |
| 2069 } | 2071 } |
| 2070 | 2072 |
| 2071 } // namespace WebCore | 2073 } // namespace WebCore |
| 2072 | 2074 |
| OLD | NEW |