| 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 1202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1213 | 1213 |
| 1214 if (node && m_inspectModeHighlightConfig) { | 1214 if (node && m_inspectModeHighlightConfig) { |
| 1215 m_hoveredNodeForInspectMode = node; | 1215 m_hoveredNodeForInspectMode = node; |
| 1216 m_overlay->highlightNode(node, eventTarget, *m_inspectModeHighlightConfi
g, event.ctrlKey() || event.metaKey()); | 1216 m_overlay->highlightNode(node, eventTarget, *m_inspectModeHighlightConfi
g, event.ctrlKey() || event.metaKey()); |
| 1217 } | 1217 } |
| 1218 return true; | 1218 return true; |
| 1219 } | 1219 } |
| 1220 | 1220 |
| 1221 void InspectorDOMAgent::setSearchingForNode(ErrorString* errorString, SearchMode
searchMode, JSONObject* highlightInspectorObject) | 1221 void InspectorDOMAgent::setSearchingForNode(ErrorString* errorString, SearchMode
searchMode, JSONObject* highlightInspectorObject) |
| 1222 { | 1222 { |
| 1223 if (m_searchingForNode == searchMode) | |
| 1224 return; | |
| 1225 | |
| 1226 m_searchingForNode = searchMode; | 1223 m_searchingForNode = searchMode; |
| 1227 m_overlay->setInspectModeEnabled(searchMode != NotSearching); | 1224 m_overlay->setInspectModeEnabled(searchMode != NotSearching); |
| 1228 if (searchMode != NotSearching) { | 1225 if (searchMode != NotSearching) { |
| 1229 m_inspectModeHighlightConfig = highlightConfigFromInspectorObject(errorS
tring, highlightInspectorObject); | 1226 m_inspectModeHighlightConfig = highlightConfigFromInspectorObject(errorS
tring, highlightInspectorObject); |
| 1230 if (!m_inspectModeHighlightConfig) | |
| 1231 return; | |
| 1232 } else { | 1227 } else { |
| 1233 m_hoveredNodeForInspectMode.clear(); | 1228 m_hoveredNodeForInspectMode.clear(); |
| 1234 hideHighlight(errorString); | 1229 hideHighlight(errorString); |
| 1235 } | 1230 } |
| 1236 } | 1231 } |
| 1237 | 1232 |
| 1238 PassOwnPtr<InspectorHighlightConfig> InspectorDOMAgent::highlightConfigFromInspe
ctorObject(ErrorString* errorString, JSONObject* highlightInspectorObject) | 1233 PassOwnPtr<InspectorHighlightConfig> InspectorDOMAgent::highlightConfigFromInspe
ctorObject(ErrorString* errorString, JSONObject* highlightInspectorObject) |
| 1239 { | 1234 { |
| 1240 if (!highlightInspectorObject) { | 1235 if (!highlightInspectorObject) { |
| 1241 *errorString = "Internal error: highlight configuration parameter is mis
sing"; | 1236 *errorString = "Internal error: highlight configuration parameter is mis
sing"; |
| (...skipping 999 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2241 visitor->trace(m_revalidateTask); | 2236 visitor->trace(m_revalidateTask); |
| 2242 visitor->trace(m_searchResults); | 2237 visitor->trace(m_searchResults); |
| 2243 #endif | 2238 #endif |
| 2244 visitor->trace(m_hoveredNodeForInspectMode); | 2239 visitor->trace(m_hoveredNodeForInspectMode); |
| 2245 visitor->trace(m_history); | 2240 visitor->trace(m_history); |
| 2246 visitor->trace(m_domEditor); | 2241 visitor->trace(m_domEditor); |
| 2247 InspectorBaseAgent::trace(visitor); | 2242 InspectorBaseAgent::trace(visitor); |
| 2248 } | 2243 } |
| 2249 | 2244 |
| 2250 } // namespace blink | 2245 } // namespace blink |
| OLD | NEW |