Changeset 124769 in webkit
- Timestamp:
- Aug 6, 2012 7:14:24 AM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r124768 r124769 1 2012-08-06 Sergey Rogulenko <rogulenko@google.com> 2 3 Web Inspector: a tiny refactoring of Highlighter in InspectorDOMAgent 4 https://bugs.webkit.org/show_bug.cgi?id=93257 5 6 Reviewed by Pavel Feldman. 7 8 Moving error string setting inside highlightConfigFromInspectorObject. 9 10 * inspector/InspectorDOMAgent.cpp: 11 (WebCore::InspectorDOMAgent::setSearchingForNode): 12 (WebCore::InspectorDOMAgent::highlightConfigFromInspectorObject): 13 (WebCore::InspectorDOMAgent::highlightNode): 14 * inspector/InspectorDOMAgent.h: 15 (InspectorDOMAgent): 16 1 17 2012-08-03 Yury Semikhatsky <yurys@chromium.org> 2 18 -
trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp
r124749 r124769 1006 1006 m_searchingForNode = enabled; 1007 1007 if (enabled) { 1008 if (!highlightInspectorObject) {1009 *errorString = "Internal error: highlight configuration parameter is missing";1008 m_inspectModeHighlightConfig = highlightConfigFromInspectorObject(errorString, highlightInspectorObject); 1009 if (!m_inspectModeHighlightConfig) 1010 1010 return; 1011 }1012 m_inspectModeHighlightConfig = highlightConfigFromInspectorObject(highlightInspectorObject);1013 1014 else { 1015 ErrorString error; 1016 hideHighlight(&error); 1017 }1018 } 1019 1020 PassOwnPtr<HighlightConfig> InspectorDOMAgent::highlightConfigFromInspectorObject(InspectorObject* highlightInspectorObject) 1021 { 1011 } else 1012 hideHighlight(errorString); 1013 } 1014 1015 PassOwnPtr<HighlightConfig> InspectorDOMAgent::highlightConfigFromInspectorObject(ErrorString* errorString, InspectorObject* highlightInspectorObject) 1016 { 1017 if (!highlightInspectorObject) { 1018 *errorString = "Internal error: highlight configuration parameter is missing"; 1019 return nullptr; 1020 } 1021 1022 1022 OwnPtr<HighlightConfig> highlightConfig = adoptPtr(new HighlightConfig()); 1023 1023 bool showInfo = false; // Default: false (do not show a tooltip). … … 1050 1050 const RefPtr<InspectorObject>& highlightInspectorObject) 1051 1051 { 1052 if (Node* node = nodeForId(nodeId)) { 1053 if (!highlightInspectorObject) { 1054 *errorString = "Internal error: highlight configuration parameter is missing"; 1055 return; 1056 } 1057 OwnPtr<HighlightConfig> highlightConfig = highlightConfigFromInspectorObject(highlightInspectorObject.get()); 1058 m_overlay->highlightNode(node, *highlightConfig); 1059 } 1052 Node* node = nodeForId(nodeId); 1053 if (!node) 1054 return; 1055 1056 OwnPtr<HighlightConfig> highlightConfig = highlightConfigFromInspectorObject(errorString, highlightInspectorObject.get()); 1057 if (!highlightConfig) 1058 return; 1059 1060 m_overlay->highlightNode(node, *highlightConfig); 1060 1061 } 1061 1062 -
trunk/Source/WebCore/inspector/InspectorDOMAgent.h
r124749 r124769 203 203 204 204 void setSearchingForNode(ErrorString*, bool enabled, InspectorObject* highlightConfig); 205 PassOwnPtr<HighlightConfig> highlightConfigFromInspectorObject( InspectorObject* highlightInspectorObject);205 PassOwnPtr<HighlightConfig> highlightConfigFromInspectorObject(ErrorString*, InspectorObject* highlightInspectorObject); 206 206 207 207 // Node-related methods.
Note: See TracChangeset
for help on using the changeset viewer.