OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. |
3 * Copyright (C) 2009 Joseph Pecoraro | 3 * Copyright (C) 2009 Joseph Pecoraro |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 1129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1140 parentElement.classList.add("hbox"); | 1140 parentElement.classList.add("hbox"); |
1141 } | 1141 } |
1142 | 1142 |
1143 if (wasThrown) | 1143 if (wasThrown) |
1144 valueElement.classList.add("error"); | 1144 valueElement.classList.add("error"); |
1145 if (subtype || type) | 1145 if (subtype || type) |
1146 valueElement.classList.add("object-value-" + (subtype || type)); | 1146 valueElement.classList.add("object-value-" + (subtype || type)); |
1147 | 1147 |
1148 if (type === "object" && subtype === "node" && description) { | 1148 if (type === "object" && subtype === "node" && description) { |
1149 WebInspector.DOMPresentationUtils.createSpansForNodeTitle(valueElement,
description); | 1149 WebInspector.DOMPresentationUtils.createSpansForNodeTitle(valueElement,
description); |
| 1150 valueElement.addEventListener("click", mouseClick, false); |
1150 valueElement.addEventListener("mousemove", mouseMove, false); | 1151 valueElement.addEventListener("mousemove", mouseMove, false); |
1151 valueElement.addEventListener("mouseleave", mouseLeave, false); | 1152 valueElement.addEventListener("mouseleave", mouseLeave, false); |
1152 } else { | 1153 } else { |
1153 valueElement.title = description || ""; | 1154 valueElement.title = description || ""; |
1154 } | 1155 } |
1155 | 1156 |
1156 function mouseMove() | 1157 function mouseMove() |
1157 { | 1158 { |
1158 WebInspector.DOMModel.highlightObjectAsDOMNode(value); | 1159 WebInspector.DOMModel.highlightObjectAsDOMNode(value); |
1159 } | 1160 } |
1160 | 1161 |
1161 function mouseLeave() | 1162 function mouseLeave() |
1162 { | 1163 { |
1163 WebInspector.DOMModel.hideDOMNodeHighlight(); | 1164 WebInspector.DOMModel.hideDOMNodeHighlight(); |
1164 } | 1165 } |
1165 | 1166 |
| 1167 /** |
| 1168 * @param {!Event} event |
| 1169 */ |
| 1170 function mouseClick(event) |
| 1171 { |
| 1172 WebInspector.Revealer.reveal(value); |
| 1173 event.consume(true); |
| 1174 } |
| 1175 |
1166 return valueElement; | 1176 return valueElement; |
1167 } | 1177 } |
1168 | 1178 |
1169 /** | 1179 /** |
1170 * @param {!WebInspector.RemoteObject} func | 1180 * @param {!WebInspector.RemoteObject} func |
1171 * @param {!Element} element | 1181 * @param {!Element} element |
1172 * @param {boolean} linkify | 1182 * @param {boolean} linkify |
1173 */ | 1183 */ |
1174 WebInspector.ObjectPropertiesSection.formatObjectAsFunction = function(func, ele
ment, linkify) | 1184 WebInspector.ObjectPropertiesSection.formatObjectAsFunction = function(func, ele
ment, linkify) |
1175 { | 1185 { |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1227 return; | 1237 return; |
1228 if (token === "(") { | 1238 if (token === "(") { |
1229 params = []; | 1239 params = []; |
1230 return; | 1240 return; |
1231 } | 1241 } |
1232 if (params && tokenType === "js-def") | 1242 if (params && tokenType === "js-def") |
1233 params.push(token); | 1243 params.push(token); |
1234 } | 1244 } |
1235 } | 1245 } |
1236 } | 1246 } |
OLD | NEW |