OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 { | 304 { |
305 if (!node) | 305 if (!node) |
306 return; | 306 return; |
307 Document* document = node->ownerDocument(); | 307 Document* document = node->ownerDocument(); |
308 if (!document) | 308 if (!document) |
309 return; | 309 return; |
310 LocalFrame* frame = document->frame(); | 310 LocalFrame* frame = document->frame(); |
311 if (!frame) | 311 if (!frame) |
312 return; | 312 return; |
313 | 313 |
314 if (node->nodeType() != Node::ELEMENT_NODE && node->nodeType() != Node::DOCU
MENT_NODE) | 314 if (!node->isElementNode() && !node->isDocumentNode()) |
315 node = node->parentNode(); | 315 node = node->parentNode(); |
316 | 316 |
317 InjectedScript injectedScript = m_injectedScriptManager->injectedScriptFor(S
criptState::forMainWorld(frame)); | 317 InjectedScript injectedScript = m_injectedScriptManager->injectedScriptFor(S
criptState::forMainWorld(frame)); |
318 if (injectedScript.isEmpty()) | 318 if (injectedScript.isEmpty()) |
319 return; | 319 return; |
320 injectedScript.inspectNode(node); | 320 injectedScript.inspectNode(node); |
321 } | 321 } |
322 | 322 |
323 void InspectorController::setInjectedScriptForOrigin(const String& origin, const
String& source) | 323 void InspectorController::setInjectedScriptForOrigin(const String& origin, const
String& source) |
324 { | 324 { |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
474 m_layerTreeAgent->willAddPageOverlay(layer); | 474 m_layerTreeAgent->willAddPageOverlay(layer); |
475 } | 475 } |
476 | 476 |
477 void InspectorController::didRemovePageOverlay(const GraphicsLayer* layer) | 477 void InspectorController::didRemovePageOverlay(const GraphicsLayer* layer) |
478 { | 478 { |
479 if (m_layerTreeAgent) | 479 if (m_layerTreeAgent) |
480 m_layerTreeAgent->didRemovePageOverlay(layer); | 480 m_layerTreeAgent->didRemovePageOverlay(layer); |
481 } | 481 } |
482 | 482 |
483 } // namespace WebCore | 483 } // namespace WebCore |
OLD | NEW |