OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. |
3 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com). | 3 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com). |
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 999 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1010 if (object.subtype === "node") { | 1010 if (object.subtype === "node") { |
1011 function callback(nodeId) | 1011 function callback(nodeId) |
1012 { | 1012 { |
1013 WebInspector._updateFocusedNode(nodeId); | 1013 WebInspector._updateFocusedNode(nodeId); |
1014 object.release(); | 1014 object.release(); |
1015 } | 1015 } |
1016 object.pushNodeToFrontend(callback); | 1016 object.pushNodeToFrontend(callback); |
1017 return; | 1017 return; |
1018 } | 1018 } |
1019 | 1019 |
| 1020 if (object.type === "function") { |
| 1021 function didGetDetails(error, response) |
| 1022 { |
| 1023 object.release(); |
| 1024 |
| 1025 if (error) { |
| 1026 console.error(error); |
| 1027 return; |
| 1028 } |
| 1029 |
| 1030 var uiLocation = WebInspector.debuggerModel.rawLocationToUILocation(
response.location); |
| 1031 if (!uiLocation) |
| 1032 return; |
| 1033 |
| 1034 WebInspector.showPanel("scripts").showUILocation(uiLocation); |
| 1035 } |
| 1036 DebuggerAgent.getFunctionDetails(object.objectId, didGetDetails.bind(thi
s)); |
| 1037 return; |
| 1038 } |
| 1039 |
1020 if (hints.databaseId) | 1040 if (hints.databaseId) |
1021 WebInspector.showPanel("resources").selectDatabase(WebInspector.database
Model.databaseForId(hints.databaseId)); | 1041 WebInspector.showPanel("resources").selectDatabase(WebInspector.database
Model.databaseForId(hints.databaseId)); |
1022 else if (hints.domStorageId) | 1042 else if (hints.domStorageId) |
1023 WebInspector.showPanel("resources").selectDOMStorage(WebInspector.domSto
rageModel.storageForId(hints.domStorageId)); | 1043 WebInspector.showPanel("resources").selectDOMStorage(WebInspector.domSto
rageModel.storageForId(hints.domStorageId)); |
1024 else if (hints.copyToClipboard) | 1044 else if (hints.copyToClipboard) |
1025 InspectorFrontendHost.copyText(object.value); | 1045 InspectorFrontendHost.copyText(object.value); |
1026 object.release(); | 1046 object.release(); |
1027 } | 1047 } |
1028 | 1048 |
1029 // Inspector.detached protocol event | 1049 // Inspector.detached protocol event |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1134 | 1154 |
1135 /** | 1155 /** |
1136 * @return {string} | 1156 * @return {string} |
1137 */ | 1157 */ |
1138 WebInspector.getSelectionForegroundColor = function() | 1158 WebInspector.getSelectionForegroundColor = function() |
1139 { | 1159 { |
1140 return InspectorFrontendHost.getSelectionForegroundColor(); | 1160 return InspectorFrontendHost.getSelectionForegroundColor(); |
1141 } | 1161 } |
1142 | 1162 |
1143 window.DEBUG = true; | 1163 window.DEBUG = true; |
OLD | NEW |