OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 * @param {!ConsoleAgent.CallFrame} callFrame | 180 * @param {!ConsoleAgent.CallFrame} callFrame |
181 * @param {string=} classes | 181 * @param {string=} classes |
182 * @return {!Element} | 182 * @return {!Element} |
183 */ | 183 */ |
184 linkifyConsoleCallFrame: function(target, callFrame, classes) | 184 linkifyConsoleCallFrame: function(target, callFrame, classes) |
185 { | 185 { |
186 // FIXME(62725): console stack trace line/column numbers are one-based. | 186 // FIXME(62725): console stack trace line/column numbers are one-based. |
187 var lineNumber = callFrame.lineNumber ? callFrame.lineNumber - 1 : 0; | 187 var lineNumber = callFrame.lineNumber ? callFrame.lineNumber - 1 : 0; |
188 var columnNumber = callFrame.columnNumber ? callFrame.columnNumber - 1 :
0; | 188 var columnNumber = callFrame.columnNumber ? callFrame.columnNumber - 1 :
0; |
189 var anchor = this.linkifyScriptLocation(target, callFrame.scriptId, call
Frame.url, lineNumber, columnNumber, classes); | 189 var anchor = this.linkifyScriptLocation(target, callFrame.scriptId, call
Frame.url, lineNumber, columnNumber, classes); |
190 if (WebInspector.BlackboxSupport.isBlackboxedURL(callFrame.url)) | 190 |
| 191 var script = target && target.debuggerModel.scriptForId(callFrame.script
Id); |
| 192 var blackboxed = script ? |
| 193 WebInspector.BlackboxSupport.isBlackboxed(script.sourceURL, script.i
sContentScript()) : |
| 194 WebInspector.BlackboxSupport.isBlackboxedURL(callFrame.url); |
| 195 if (blackboxed) |
191 anchor.classList.add("webkit-html-blackbox-link"); | 196 anchor.classList.add("webkit-html-blackbox-link"); |
| 197 |
192 return anchor; | 198 return anchor; |
193 }, | 199 }, |
194 | 200 |
195 /** | 201 /** |
196 * @param {!WebInspector.CSSLocation} rawLocation | 202 * @param {!WebInspector.CSSLocation} rawLocation |
197 * @param {string=} classes | 203 * @param {string=} classes |
198 * @return {?Element} | 204 * @return {?Element} |
199 */ | 205 */ |
200 linkifyCSSLocation: function(rawLocation, classes) | 206 linkifyCSSLocation: function(rawLocation, classes) |
201 { | 207 { |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 */ | 361 */ |
356 WebInspector.Linkifier.liveLocationText = function(target, scriptId, lineNumber,
columnNumber) | 362 WebInspector.Linkifier.liveLocationText = function(target, scriptId, lineNumber,
columnNumber) |
357 { | 363 { |
358 var script = target.debuggerModel.scriptForId(scriptId); | 364 var script = target.debuggerModel.scriptForId(scriptId); |
359 if (!script) | 365 if (!script) |
360 return ""; | 366 return ""; |
361 var location = /** @type {!WebInspector.DebuggerModel.Location} */ (target.d
ebuggerModel.createRawLocation(script, lineNumber, columnNumber || 0)); | 367 var location = /** @type {!WebInspector.DebuggerModel.Location} */ (target.d
ebuggerModel.createRawLocation(script, lineNumber, columnNumber || 0)); |
362 var uiLocation = /** @type {!WebInspector.UILocation} */ (WebInspector.debug
gerWorkspaceBinding.rawLocationToUILocation(location)); | 368 var uiLocation = /** @type {!WebInspector.UILocation} */ (WebInspector.debug
gerWorkspaceBinding.rawLocationToUILocation(location)); |
363 return uiLocation.linkText(); | 369 return uiLocation.linkText(); |
364 } | 370 } |
OLD | NEW |