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 2093 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2104 if (node && node->document().frame() && node->document().frame()->instru
mentingAgents() == m_pageAgent->inspectedFrame()->instrumentingAgents()) | 2104 if (node && node->document().frame() && node->document().frame()->instru
mentingAgents() == m_pageAgent->inspectedFrame()->instrumentingAgents()) |
2105 result->addItem(pushNodePathToFrontend(node)); | 2105 result->addItem(pushNodePathToFrontend(node)); |
2106 else | 2106 else |
2107 result->addItem(0); | 2107 result->addItem(0); |
2108 } | 2108 } |
2109 } | 2109 } |
2110 | 2110 |
2111 class InspectableNode final : public InjectedScriptHost::InspectableObject { | 2111 class InspectableNode final : public InjectedScriptHost::InspectableObject { |
2112 public: | 2112 public: |
2113 explicit InspectableNode(Node* node) : m_node(node) { } | 2113 explicit InspectableNode(Node* node) : m_node(node) { } |
2114 virtual ScriptValue get(ScriptState* state) override | 2114 ScriptValue get(ScriptState* state) override |
2115 { | 2115 { |
2116 return InjectedScriptHost::nodeAsScriptValue(state, m_node); | 2116 return InjectedScriptHost::nodeAsScriptValue(state, m_node); |
2117 } | 2117 } |
2118 private: | 2118 private: |
2119 Node* m_node; | 2119 Node* m_node; |
2120 }; | 2120 }; |
2121 | 2121 |
2122 void InspectorDOMAgent::setInspectedNode(ErrorString* errorString, int nodeId) | 2122 void InspectorDOMAgent::setInspectedNode(ErrorString* errorString, int nodeId) |
2123 { | 2123 { |
2124 Node* node = assertNode(errorString, nodeId); | 2124 Node* node = assertNode(errorString, nodeId); |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2192 visitor->trace(m_searchResults); | 2192 visitor->trace(m_searchResults); |
2193 #endif | 2193 #endif |
2194 visitor->trace(m_hoveredNodeForInspectMode); | 2194 visitor->trace(m_hoveredNodeForInspectMode); |
2195 visitor->trace(m_history); | 2195 visitor->trace(m_history); |
2196 visitor->trace(m_domEditor); | 2196 visitor->trace(m_domEditor); |
2197 visitor->trace(m_listener); | 2197 visitor->trace(m_listener); |
2198 InspectorBaseAgent::trace(visitor); | 2198 InspectorBaseAgent::trace(visitor); |
2199 } | 2199 } |
2200 | 2200 |
2201 } // namespace blink | 2201 } // namespace blink |
OLD | NEW |