| 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) 2011 Google Inc. All rights reserved. | 3 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 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 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 var uiSourceCode = WebInspector.workspace.uiSourceCodeForURL(anchor.href
); | 379 var uiSourceCode = WebInspector.workspace.uiSourceCodeForURL(anchor.href
); |
| 380 if (uiSourceCode) { | 380 if (uiSourceCode) { |
| 381 anchor.uiSourceCode = uiSourceCode; | 381 anchor.uiSourceCode = uiSourceCode; |
| 382 return true; | 382 return true; |
| 383 } | 383 } |
| 384 return false; | 384 return false; |
| 385 }, | 385 }, |
| 386 | 386 |
| 387 showAnchorLocation: function(anchor) | 387 showAnchorLocation: function(anchor) |
| 388 { | 388 { |
| 389 this._showSourceLine(anchor.uiSourceCode, anchor.lineNumber); | 389 this._showSourceLine(anchor.uiSourceCode, anchor.lineNumber, !!anchor.om
itFocus); |
| 390 }, | 390 }, |
| 391 | 391 |
| 392 /** | 392 /** |
| 393 * @param {WebInspector.UISourceCode} uiSourceCode | 393 * @param {WebInspector.UISourceCode} uiSourceCode |
| 394 * @param {number=} lineNumber | 394 * @param {number=} lineNumber |
| 395 */ | 395 */ |
| 396 showUISourceCode: function(uiSourceCode, lineNumber) | 396 showUISourceCode: function(uiSourceCode, lineNumber) |
| 397 { | 397 { |
| 398 this._showSourceLine(uiSourceCode, lineNumber); | 398 this._showSourceLine(uiSourceCode, lineNumber); |
| 399 }, | 399 }, |
| 400 | 400 |
| 401 /** | 401 /** |
| 402 * @param {WebInspector.UISourceCode} uiSourceCode | 402 * @param {WebInspector.UISourceCode} uiSourceCode |
| 403 * @param {number=} lineNumber | 403 * @param {number=} lineNumber |
| 404 * @param {boolean=} omitFocus |
| 404 */ | 405 */ |
| 405 _showSourceLine: function(uiSourceCode, lineNumber) | 406 _showSourceLine: function(uiSourceCode, lineNumber, omitFocus) |
| 406 { | 407 { |
| 407 var sourceFrame = this._showFile(uiSourceCode); | 408 var sourceFrame = this._showFile(uiSourceCode); |
| 408 if (typeof lineNumber === "number") | 409 if (typeof lineNumber === "number") |
| 409 sourceFrame.highlightLine(lineNumber); | 410 sourceFrame.highlightLine(lineNumber); |
| 410 sourceFrame.focus(); | 411 |
| 412 if (!omitFocus) |
| 413 sourceFrame.focus(); |
| 411 | 414 |
| 412 WebInspector.notifications.dispatchEventToListeners(WebInspector.UserMet
rics.UserAction, { | 415 WebInspector.notifications.dispatchEventToListeners(WebInspector.UserMet
rics.UserAction, { |
| 413 action: WebInspector.UserMetrics.UserActionNames.OpenSourceLink, | 416 action: WebInspector.UserMetrics.UserActionNames.OpenSourceLink, |
| 414 url: uiSourceCode.originURL(), | 417 url: uiSourceCode.originURL(), |
| 415 lineNumber: lineNumber | 418 lineNumber: lineNumber |
| 416 }); | 419 }); |
| 417 }, | 420 }, |
| 418 | 421 |
| 419 /** | 422 /** |
| 420 * @param {WebInspector.UISourceCode} uiSourceCode | 423 * @param {WebInspector.UISourceCode} uiSourceCode |
| (...skipping 898 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1319 this.sidebarPanes.scopechain.expand(); | 1322 this.sidebarPanes.scopechain.expand(); |
| 1320 this.sidebarPanes.jsBreakpoints.expand(); | 1323 this.sidebarPanes.jsBreakpoints.expand(); |
| 1321 this.sidebarPanes.callstack.expand(); | 1324 this.sidebarPanes.callstack.expand(); |
| 1322 | 1325 |
| 1323 if (WebInspector.settings.watchExpressions.get().length > 0) | 1326 if (WebInspector.settings.watchExpressions.get().length > 0) |
| 1324 this.sidebarPanes.watchExpressions.expand(); | 1327 this.sidebarPanes.watchExpressions.expand(); |
| 1325 }, | 1328 }, |
| 1326 | 1329 |
| 1327 __proto__: WebInspector.Panel.prototype | 1330 __proto__: WebInspector.Panel.prototype |
| 1328 } | 1331 } |
| OLD | NEW |