| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 30 matching lines...) Expand all Loading... |
| 41 WebInspector.UISourceCodeFrame.call(this, uiSourceCode); | 41 WebInspector.UISourceCodeFrame.call(this, uiSourceCode); |
| 42 if (uiSourceCode.project().type() === WebInspector.projectTypes.Debugger) | 42 if (uiSourceCode.project().type() === WebInspector.projectTypes.Debugger) |
| 43 this.element.classList.add("source-frame-debugger-script"); | 43 this.element.classList.add("source-frame-debugger-script"); |
| 44 | 44 |
| 45 this._popoverHelper = new WebInspector.ObjectPopoverHelper(this._scriptsPane
l.element, | 45 this._popoverHelper = new WebInspector.ObjectPopoverHelper(this._scriptsPane
l.element, |
| 46 this._getPopoverAnchor.bind(this), this._resolveObjectForPopover.bind(th
is), this._onHidePopover.bind(this), true); | 46 this._getPopoverAnchor.bind(this), this._resolveObjectForPopover.bind(th
is), this._onHidePopover.bind(this), true); |
| 47 this._popoverHelper.setTimeout(250, 250); | 47 this._popoverHelper.setTimeout(250, 250); |
| 48 | 48 |
| 49 this.textEditor.element.addEventListener("keydown", this._onKeyDown.bind(thi
s), true); | 49 this.textEditor.element.addEventListener("keydown", this._onKeyDown.bind(thi
s), true); |
| 50 | 50 |
| 51 this.textEditor.addEventListener(WebInspector.CodeMirrorTextEditor.Events.Gu
tterClick, this._handleGutterClick.bind(this), this); | 51 this.textEditor.addEventListener(WebInspector.SourcesTextEditor.Events.Gutte
rClick, this._handleGutterClick.bind(this), this); |
| 52 | 52 |
| 53 this._breakpointManager.addEventListener(WebInspector.BreakpointManager.Even
ts.BreakpointAdded, this._breakpointAdded, this); | 53 this._breakpointManager.addEventListener(WebInspector.BreakpointManager.Even
ts.BreakpointAdded, this._breakpointAdded, this); |
| 54 this._breakpointManager.addEventListener(WebInspector.BreakpointManager.Even
ts.BreakpointRemoved, this._breakpointRemoved, this); | 54 this._breakpointManager.addEventListener(WebInspector.BreakpointManager.Even
ts.BreakpointRemoved, this._breakpointRemoved, this); |
| 55 | 55 |
| 56 this.uiSourceCode().addEventListener(WebInspector.UISourceCode.Events.Source
MappingChanged, this._onSourceMappingChanged, this); | 56 this.uiSourceCode().addEventListener(WebInspector.UISourceCode.Events.Source
MappingChanged, this._onSourceMappingChanged, this); |
| 57 this.uiSourceCode().addEventListener(WebInspector.UISourceCode.Events.Workin
gCopyChanged, this._workingCopyChanged, this); | 57 this.uiSourceCode().addEventListener(WebInspector.UISourceCode.Events.Workin
gCopyChanged, this._workingCopyChanged, this); |
| 58 this.uiSourceCode().addEventListener(WebInspector.UISourceCode.Events.Workin
gCopyCommitted, this._workingCopyCommitted, this); | 58 this.uiSourceCode().addEventListener(WebInspector.UISourceCode.Events.Workin
gCopyCommitted, this._workingCopyCommitted, this); |
| 59 this.uiSourceCode().addEventListener(WebInspector.UISourceCode.Events.TitleC
hanged, this._showBlackboxInfobarIfNeeded, this); | 59 this.uiSourceCode().addEventListener(WebInspector.UISourceCode.Events.TitleC
hanged, this._showBlackboxInfobarIfNeeded, this); |
| 60 | 60 |
| 61 /** @type {!Map.<!WebInspector.Target, !WebInspector.ResourceScriptFile>}*/ | 61 /** @type {!Map.<!WebInspector.Target, !WebInspector.ResourceScriptFile>}*/ |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 delete this._blackboxInfobar; | 190 delete this._blackboxInfobar; |
| 191 }, | 191 }, |
| 192 | 192 |
| 193 /** | 193 /** |
| 194 * @override | 194 * @override |
| 195 */ | 195 */ |
| 196 wasShown: function() | 196 wasShown: function() |
| 197 { | 197 { |
| 198 WebInspector.UISourceCodeFrame.prototype.wasShown.call(this); | 198 WebInspector.UISourceCodeFrame.prototype.wasShown.call(this); |
| 199 if (this._executionLocation && this.loaded) { | 199 if (this._executionLocation && this.loaded) { |
| 200 // We need CodeMirrorTextEditor to be initialized prior to this call
. @see crbug.com/499889 | 200 // We need SourcesTextEditor to be initialized prior to this call. @
see crbug.com/499889 |
| 201 setImmediate(this._generateValuesInSource.bind(this)); | 201 setImmediate(this._generateValuesInSource.bind(this)); |
| 202 } | 202 } |
| 203 }, | 203 }, |
| 204 | 204 |
| 205 /** | 205 /** |
| 206 * @override | 206 * @override |
| 207 */ | 207 */ |
| 208 willHide: function() | 208 willHide: function() |
| 209 { | 209 { |
| 210 WebInspector.UISourceCodeFrame.prototype.willHide.call(this); | 210 WebInspector.UISourceCodeFrame.prototype.willHide.call(this); |
| (...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 641 * @param {!WebInspector.UILocation} uiLocation | 641 * @param {!WebInspector.UILocation} uiLocation |
| 642 */ | 642 */ |
| 643 setExecutionLocation: function(uiLocation) | 643 setExecutionLocation: function(uiLocation) |
| 644 { | 644 { |
| 645 this._executionLocation = uiLocation; | 645 this._executionLocation = uiLocation; |
| 646 if (!this.loaded) | 646 if (!this.loaded) |
| 647 return; | 647 return; |
| 648 | 648 |
| 649 this.textEditor.setExecutionLocation(uiLocation.lineNumber, uiLocation.c
olumnNumber); | 649 this.textEditor.setExecutionLocation(uiLocation.lineNumber, uiLocation.c
olumnNumber); |
| 650 if (this.isShowing()) { | 650 if (this.isShowing()) { |
| 651 // We need CodeMirrorTextEditor to be initialized prior to this call
. @see crbug.com/506566 | 651 // We need SourcesTextEditor to be initialized prior to this call. @
see crbug.com/506566 |
| 652 setImmediate(this._generateValuesInSource.bind(this)); | 652 setImmediate(this._generateValuesInSource.bind(this)); |
| 653 } | 653 } |
| 654 }, | 654 }, |
| 655 | 655 |
| 656 _generateValuesInSource: function() | 656 _generateValuesInSource: function() |
| 657 { | 657 { |
| 658 if (!WebInspector.moduleSetting("inlineVariableValues").get()) | 658 if (!WebInspector.moduleSetting("inlineVariableValues").get()) |
| 659 return; | 659 return; |
| 660 var executionContext = WebInspector.context.flavor(WebInspector.Executio
nContext); | 660 var executionContext = WebInspector.context.flavor(WebInspector.Executio
nContext); |
| 661 if (!executionContext) | 661 if (!executionContext) |
| (...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 990 }, | 990 }, |
| 991 | 991 |
| 992 /** | 992 /** |
| 993 * @param {!WebInspector.Event} event | 993 * @param {!WebInspector.Event} event |
| 994 */ | 994 */ |
| 995 _handleGutterClick: function(event) | 995 _handleGutterClick: function(event) |
| 996 { | 996 { |
| 997 if (this._muted) | 997 if (this._muted) |
| 998 return; | 998 return; |
| 999 | 999 |
| 1000 var eventData = /** @type {!WebInspector.CodeMirrorTextEditor.GutterClic
kEventData} */ (event.data); | 1000 var eventData = /** @type {!WebInspector.SourcesTextEditor.GutterClickEv
entData} */ (event.data); |
| 1001 var lineNumber = eventData.lineNumber; | 1001 var lineNumber = eventData.lineNumber; |
| 1002 var eventObject = eventData.event; | 1002 var eventObject = eventData.event; |
| 1003 | 1003 |
| 1004 if (eventObject.button !== 0 || eventObject.altKey || eventObject.ctrlKe
y || eventObject.metaKey) | 1004 if (eventObject.button !== 0 || eventObject.altKey || eventObject.ctrlKe
y || eventObject.metaKey) |
| 1005 return; | 1005 return; |
| 1006 | 1006 |
| 1007 this._toggleBreakpoint(lineNumber, eventObject.shiftKey); | 1007 this._toggleBreakpoint(lineNumber, eventObject.shiftKey); |
| 1008 eventObject.consume(true); | 1008 eventObject.consume(true); |
| 1009 }, | 1009 }, |
| 1010 | 1010 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1069 this.uiSourceCode().removeEventListener(WebInspector.UISourceCode.Events
.WorkingCopyChanged, this._workingCopyChanged, this); | 1069 this.uiSourceCode().removeEventListener(WebInspector.UISourceCode.Events
.WorkingCopyChanged, this._workingCopyChanged, this); |
| 1070 this.uiSourceCode().removeEventListener(WebInspector.UISourceCode.Events
.WorkingCopyCommitted, this._workingCopyCommitted, this); | 1070 this.uiSourceCode().removeEventListener(WebInspector.UISourceCode.Events
.WorkingCopyCommitted, this._workingCopyCommitted, this); |
| 1071 this.uiSourceCode().removeEventListener(WebInspector.UISourceCode.Events
.TitleChanged, this._showBlackboxInfobarIfNeeded, this); | 1071 this.uiSourceCode().removeEventListener(WebInspector.UISourceCode.Events
.TitleChanged, this._showBlackboxInfobarIfNeeded, this); |
| 1072 WebInspector.moduleSetting("skipStackFramesPattern").removeChangeListene
r(this._showBlackboxInfobarIfNeeded, this); | 1072 WebInspector.moduleSetting("skipStackFramesPattern").removeChangeListene
r(this._showBlackboxInfobarIfNeeded, this); |
| 1073 WebInspector.moduleSetting("skipContentScripts").removeChangeListener(th
is._showBlackboxInfobarIfNeeded, this); | 1073 WebInspector.moduleSetting("skipContentScripts").removeChangeListener(th
is._showBlackboxInfobarIfNeeded, this); |
| 1074 WebInspector.UISourceCodeFrame.prototype.dispose.call(this); | 1074 WebInspector.UISourceCodeFrame.prototype.dispose.call(this); |
| 1075 }, | 1075 }, |
| 1076 | 1076 |
| 1077 __proto__: WebInspector.UISourceCodeFrame.prototype | 1077 __proto__: WebInspector.UISourceCodeFrame.prototype |
| 1078 } | 1078 } |
| OLD | NEW |