| 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 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 | 339 |
| 340 void InspectorDOMAgent::setDocument(Document* doc) | 340 void InspectorDOMAgent::setDocument(Document* doc) |
| 341 { | 341 { |
| 342 if (doc == m_document.get()) | 342 if (doc == m_document.get()) |
| 343 return; | 343 return; |
| 344 | 344 |
| 345 reset(); | 345 reset(); |
| 346 | 346 |
| 347 m_document = doc; | 347 m_document = doc; |
| 348 | 348 |
| 349 if (!doc && m_inspectorState->getBoolean(DOMAgentState::documentRequested)) | 349 if (!m_inspectorState->getBoolean(DOMAgentState::documentRequested)) |
| 350 return; |
| 351 |
| 352 // Immediately communicate 0 document or document that has finished loading. |
| 353 if (!doc || !doc->parsing()) |
| 350 m_frontend->documentUpdated(); | 354 m_frontend->documentUpdated(); |
| 351 } | 355 } |
| 352 | 356 |
| 353 void InspectorDOMAgent::releaseDanglingNodes() | 357 void InspectorDOMAgent::releaseDanglingNodes() |
| 354 { | 358 { |
| 355 deleteAllValues(m_danglingNodeToIdMaps); | 359 deleteAllValues(m_danglingNodeToIdMaps); |
| 356 m_danglingNodeToIdMaps.clear(); | 360 m_danglingNodeToIdMaps.clear(); |
| 357 } | 361 } |
| 358 | 362 |
| 359 int InspectorDOMAgent::bind(Node* node, NodeToIdMap* nodesMap) | 363 int InspectorDOMAgent::bind(Node* node, NodeToIdMap* nodesMap) |
| (...skipping 1034 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1394 { | 1398 { |
| 1395 if (!m_highlightedNode) | 1399 if (!m_highlightedNode) |
| 1396 return; | 1400 return; |
| 1397 | 1401 |
| 1398 DOMNodeHighlighter::DrawNodeHighlight(context, m_highlightedNode.get()); | 1402 DOMNodeHighlighter::DrawNodeHighlight(context, m_highlightedNode.get()); |
| 1399 } | 1403 } |
| 1400 | 1404 |
| 1401 } // namespace WebCore | 1405 } // namespace WebCore |
| 1402 | 1406 |
| 1403 #endif // ENABLE(INSPECTOR) | 1407 #endif // ENABLE(INSPECTOR) |
| OLD | NEW |