| 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 939 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 950 if (!m_searchingForNode) | 950 if (!m_searchingForNode) |
| 951 return false; | 951 return false; |
| 952 | 952 |
| 953 if (Node* node = m_overlay->highlightedNode()) { | 953 if (Node* node = m_overlay->highlightedNode()) { |
| 954 inspect(node); | 954 inspect(node); |
| 955 return true; | 955 return true; |
| 956 } | 956 } |
| 957 return false; | 957 return false; |
| 958 } | 958 } |
| 959 | 959 |
| 960 void InspectorDOMAgent::inspect(Node* node) | 960 void InspectorDOMAgent::inspect(Node* inspectedNode) |
| 961 { | 961 { |
| 962 ErrorString error; | 962 ErrorString error; |
| 963 RefPtr<Node> node = inspectedNode; |
| 963 setSearchingForNode(&error, false, 0); | 964 setSearchingForNode(&error, false, 0); |
| 964 | 965 |
| 965 if (node->nodeType() != Node::ELEMENT_NODE && node->nodeType() != Node::DOCU
MENT_NODE) | 966 if (node->nodeType() != Node::ELEMENT_NODE && node->nodeType() != Node::DOCU
MENT_NODE) |
| 966 node = node->parentNode(); | 967 node = node->parentNode(); |
| 967 m_nodeToFocus = node; | 968 m_nodeToFocus = node; |
| 968 | 969 |
| 969 focusNode(); | 970 focusNode(); |
| 970 } | 971 } |
| 971 | 972 |
| 972 void InspectorDOMAgent::focusNode() | 973 void InspectorDOMAgent::focusNode() |
| (...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1584 InjectedScript injectedScript = m_injectedScriptManager->injectedScriptFor(m
ainWorldScriptState(frame)); | 1585 InjectedScript injectedScript = m_injectedScriptManager->injectedScriptFor(m
ainWorldScriptState(frame)); |
| 1585 if (injectedScript.hasNoValue()) | 1586 if (injectedScript.hasNoValue()) |
| 1586 return 0; | 1587 return 0; |
| 1587 | 1588 |
| 1588 return injectedScript.wrapNode(node, objectGroup); | 1589 return injectedScript.wrapNode(node, objectGroup); |
| 1589 } | 1590 } |
| 1590 | 1591 |
| 1591 } // namespace WebCore | 1592 } // namespace WebCore |
| 1592 | 1593 |
| 1593 #endif // ENABLE(INSPECTOR) | 1594 #endif // ENABLE(INSPECTOR) |
| OLD | NEW |