| 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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 /** | 235 /** |
| 236 * @param {!Element} element | 236 * @param {!Element} element |
| 237 * @this {WebInspector.SourcesPanel} | 237 * @this {WebInspector.SourcesPanel} |
| 238 */ | 238 */ |
| 239 function didCreateBreakpointHitStatusMessage(element) | 239 function didCreateBreakpointHitStatusMessage(element) |
| 240 { | 240 { |
| 241 this.sidebarPanes.callstack.setStatus(element); | 241 this.sidebarPanes.callstack.setStatus(element); |
| 242 } | 242 } |
| 243 | 243 |
| 244 /** | 244 /** |
| 245 * @param {!WebInspector.UILocation} uiLocation | 245 * @param {!WebInspector.LiveLocation} liveLocation |
| 246 * @this {WebInspector.SourcesPanel} | 246 * @this {WebInspector.SourcesPanel} |
| 247 */ | 247 */ |
| 248 function didGetUILocation(uiLocation) | 248 function didGetUILocation(liveLocation) |
| 249 { | 249 { |
| 250 var uiLocation = liveLocation.uiLocation(); |
| 251 if (!uiLocation) |
| 252 return; |
| 250 var breakpoint = WebInspector.breakpointManager.findBreakpointOnLine
(uiLocation.uiSourceCode, uiLocation.lineNumber); | 253 var breakpoint = WebInspector.breakpointManager.findBreakpointOnLine
(uiLocation.uiSourceCode, uiLocation.lineNumber); |
| 251 if (!breakpoint) | 254 if (!breakpoint) |
| 252 return; | 255 return; |
| 253 this.sidebarPanes.jsBreakpoints.highlightBreakpoint(breakpoint); | 256 this.sidebarPanes.jsBreakpoints.highlightBreakpoint(breakpoint); |
| 254 this.sidebarPanes.callstack.setStatus(WebInspector.UIString("Paused
on a JavaScript breakpoint.")); | 257 this.sidebarPanes.callstack.setStatus(WebInspector.UIString("Paused
on a JavaScript breakpoint.")); |
| 255 } | 258 } |
| 256 | 259 |
| 257 if (details.reason === WebInspector.DebuggerModel.BreakReason.DOM) { | 260 if (details.reason === WebInspector.DebuggerModel.BreakReason.DOM) { |
| 258 WebInspector.domBreakpointsSidebarPane.highlightBreakpoint(details.a
uxData); | 261 WebInspector.domBreakpointsSidebarPane.highlightBreakpoint(details.a
uxData); |
| 259 WebInspector.domBreakpointsSidebarPane.createBreakpointHitStatusMess
age(details, didCreateBreakpointHitStatusMessage.bind(this)); | 262 WebInspector.domBreakpointsSidebarPane.createBreakpointHitStatusMess
age(details, didCreateBreakpointHitStatusMessage.bind(this)); |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 381 { | 384 { |
| 382 this._ignoreExecutionLineEvents = ignoreExecutionLineEvents; | 385 this._ignoreExecutionLineEvents = ignoreExecutionLineEvents; |
| 383 }, | 386 }, |
| 384 | 387 |
| 385 updateLastModificationTime: function() | 388 updateLastModificationTime: function() |
| 386 { | 389 { |
| 387 this._lastModificationTime = window.performance.now(); | 390 this._lastModificationTime = window.performance.now(); |
| 388 }, | 391 }, |
| 389 | 392 |
| 390 /** | 393 /** |
| 391 * @param {!WebInspector.UILocation} uiLocation | 394 * @param {!WebInspector.LiveLocation} liveLocation |
| 392 */ | 395 */ |
| 393 _executionLineChanged: function(uiLocation) | 396 _executionLineChanged: function(liveLocation) |
| 394 { | 397 { |
| 398 var uiLocation = liveLocation.uiLocation(); |
| 399 if (!uiLocation) |
| 400 return; |
| 395 this._sourcesView.clearCurrentExecutionLine(); | 401 this._sourcesView.clearCurrentExecutionLine(); |
| 396 this._sourcesView.setExecutionLocation(uiLocation); | 402 this._sourcesView.setExecutionLocation(uiLocation); |
| 397 if (window.performance.now() - this._lastModificationTime < WebInspector
.SourcesPanel._lastModificationTimeout) | 403 if (window.performance.now() - this._lastModificationTime < WebInspector
.SourcesPanel._lastModificationTimeout) |
| 398 return; | 404 return; |
| 399 this._sourcesView.showSourceLocation(uiLocation.uiSourceCode, uiLocation
.lineNumber, uiLocation.columnNumber, undefined, true); | 405 this._sourcesView.showSourceLocation(uiLocation.uiSourceCode, uiLocation
.lineNumber, uiLocation.columnNumber, undefined, true); |
| 400 }, | 406 }, |
| 401 | 407 |
| 402 _lastModificationTimeoutPassedForTest: function() | 408 _lastModificationTimeoutPassedForTest: function() |
| 403 { | 409 { |
| 404 WebInspector.SourcesPanel._lastModificationTimeout = Number.MIN_VALUE; | 410 WebInspector.SourcesPanel._lastModificationTimeout = Number.MIN_VALUE; |
| (...skipping 1015 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1420 WebInspector.SourcesPanelFactory.prototype = { | 1426 WebInspector.SourcesPanelFactory.prototype = { |
| 1421 /** | 1427 /** |
| 1422 * @override | 1428 * @override |
| 1423 * @return {!WebInspector.Panel} | 1429 * @return {!WebInspector.Panel} |
| 1424 */ | 1430 */ |
| 1425 createPanel: function() | 1431 createPanel: function() |
| 1426 { | 1432 { |
| 1427 return WebInspector.SourcesPanel.instance(); | 1433 return WebInspector.SourcesPanel.instance(); |
| 1428 } | 1434 } |
| 1429 } | 1435 } |
| OLD | NEW |