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 |
11 * notice, this list of conditions and the following disclaimer in the | 11 * notice, this list of conditions and the following disclaimer in the |
12 * documentation and/or other materials provided with the distribution. | 12 * documentation and/or other materials provided with the distribution. |
13 * | 13 * |
14 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY | 14 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY |
15 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | 15 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | 16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
17 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR | 17 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR |
18 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | 18 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
19 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | 19 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
20 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | 20 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
21 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | 21 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY |
22 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 22 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
25 */ | 25 */ |
26 | 26 |
27 importScript("BreakpointsSidebarPane.js"); | 27 importScript("BreakpointsSidebarPane.js"); |
28 importScript("CallStackSidebarPane.js"); | 28 importScript("CallStackSidebarPane.js"); |
29 importScript("SimpleHistoryManager.js"); | |
30 importScript("EditingLocationHistoryManager.js"); | |
29 importScript("FilePathScoreFunction.js"); | 31 importScript("FilePathScoreFunction.js"); |
30 importScript("FilteredItemSelectionDialog.js"); | 32 importScript("FilteredItemSelectionDialog.js"); |
31 importScript("UISourceCodeFrame.js"); | 33 importScript("UISourceCodeFrame.js"); |
32 importScript("JavaScriptSourceFrame.js"); | 34 importScript("JavaScriptSourceFrame.js"); |
33 importScript("CSSSourceFrame.js"); | 35 importScript("CSSSourceFrame.js"); |
34 importScript("NavigatorOverlayController.js"); | 36 importScript("NavigatorOverlayController.js"); |
35 importScript("NavigatorView.js"); | 37 importScript("NavigatorView.js"); |
36 importScript("RevisionHistoryView.js"); | 38 importScript("RevisionHistoryView.js"); |
37 importScript("ScopeChainSidebarPane.js"); | 39 importScript("ScopeChainSidebarPane.js"); |
38 importScript("SourcesNavigator.js"); | 40 importScript("SourcesNavigator.js"); |
(...skipping 22 matching lines...) Expand all Loading... | |
61 WebInspector.settings.showEditorInDrawer = WebInspector.settings.createSetti ng("showEditorInDrawer", true); | 63 WebInspector.settings.showEditorInDrawer = WebInspector.settings.createSetti ng("showEditorInDrawer", true); |
62 | 64 |
63 this._workspace = workspaceForTest || WebInspector.workspace; | 65 this._workspace = workspaceForTest || WebInspector.workspace; |
64 | 66 |
65 /** | 67 /** |
66 * @return {!WebInspector.View} | 68 * @return {!WebInspector.View} |
67 * @this {WebInspector.SourcesPanel} | 69 * @this {WebInspector.SourcesPanel} |
68 */ | 70 */ |
69 function viewGetter() | 71 function viewGetter() |
70 { | 72 { |
71 return this.visibleView; | 73 return this; |
72 } | 74 } |
73 WebInspector.GoToLineDialog.install(this, viewGetter.bind(this)); | 75 WebInspector.GoToLineDialog.install(this, viewGetter.bind(this)); |
74 | 76 |
75 var helpSection = WebInspector.shortcutsScreen.section(WebInspector.UIString ("Sources Panel")); | 77 var helpSection = WebInspector.shortcutsScreen.section(WebInspector.UIString ("Sources Panel")); |
76 this.debugToolbar = this._createDebugToolbar(); | 78 this.debugToolbar = this._createDebugToolbar(); |
77 | 79 |
78 const initialDebugSidebarWidth = 225; | 80 const initialDebugSidebarWidth = 225; |
79 const minimumDebugSidebarWidthPercent = 0.5; | 81 const minimumDebugSidebarWidthPercent = 0.5; |
80 this.createSidebarView(this.element, WebInspector.SidebarView.SidebarPositio n.End, initialDebugSidebarWidth); | 82 this.createSidebarView(this.element, WebInspector.SidebarView.SidebarPositio n.End, initialDebugSidebarWidth); |
81 this.splitView.element.id = "scripts-split-view"; | 83 this.splitView.element.id = "scripts-split-view"; |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
134 this.sidebarPanes.jsBreakpoints = new WebInspector.JavaScriptBreakpointsSide barPane(WebInspector.breakpointManager, this._showSourceLocation.bind(this)); | 136 this.sidebarPanes.jsBreakpoints = new WebInspector.JavaScriptBreakpointsSide barPane(WebInspector.breakpointManager, this._showSourceLocation.bind(this)); |
135 this.sidebarPanes.domBreakpoints = WebInspector.domBreakpointsSidebarPane.cr eateProxy(this); | 137 this.sidebarPanes.domBreakpoints = WebInspector.domBreakpointsSidebarPane.cr eateProxy(this); |
136 this.sidebarPanes.xhrBreakpoints = new WebInspector.XHRBreakpointsSidebarPan e(); | 138 this.sidebarPanes.xhrBreakpoints = new WebInspector.XHRBreakpointsSidebarPan e(); |
137 this.sidebarPanes.eventListenerBreakpoints = new WebInspector.EventListenerB reakpointsSidebarPane(); | 139 this.sidebarPanes.eventListenerBreakpoints = new WebInspector.EventListenerB reakpointsSidebarPane(); |
138 | 140 |
139 if (Capabilities.canInspectWorkers && !WebInspector.WorkerManager.isWorkerFr ontend()) { | 141 if (Capabilities.canInspectWorkers && !WebInspector.WorkerManager.isWorkerFr ontend()) { |
140 WorkerAgent.enable(); | 142 WorkerAgent.enable(); |
141 this.sidebarPanes.workerList = new WebInspector.WorkersSidebarPane(WebIn spector.workerManager); | 143 this.sidebarPanes.workerList = new WebInspector.WorkersSidebarPane(WebIn spector.workerManager); |
142 } | 144 } |
143 | 145 |
146 /** | |
147 * @this {WebInspector.SourcesPanel} | |
148 */ | |
149 function currentSourceFrame() | |
150 { | |
151 var uiSourceCode = this.currentUISourceCode(); | |
152 if (!uiSourceCode) | |
153 return null; | |
154 return this._sourceFramesByUISourceCode.get(uiSourceCode); | |
155 } | |
156 this._historyManager = new WebInspector.EditingLocationHistoryManager(this, currentSourceFrame.bind(this)); | |
157 | |
144 this.sidebarPanes.callstack.registerShortcuts(this.registerShortcuts.bind(th is)); | 158 this.sidebarPanes.callstack.registerShortcuts(this.registerShortcuts.bind(th is)); |
145 this.registerShortcuts(WebInspector.SourcesPanelDescriptor.ShortcutKeys.GoTo Member, this._showOutlineDialog.bind(this)); | 159 this.registerShortcuts(WebInspector.SourcesPanelDescriptor.ShortcutKeys.GoTo Member, this._showOutlineDialog.bind(this)); |
146 this.registerShortcuts(WebInspector.SourcesPanelDescriptor.ShortcutKeys.Togg leBreakpoint, this._toggleBreakpoint.bind(this)); | 160 this.registerShortcuts(WebInspector.SourcesPanelDescriptor.ShortcutKeys.Togg leBreakpoint, this._toggleBreakpoint.bind(this)); |
147 | 161 |
148 this._extensionSidebarPanes = []; | 162 this._extensionSidebarPanes = []; |
149 | 163 |
150 this._toggleFormatSourceButton = new WebInspector.StatusBarButton(WebInspect or.UIString("Pretty print"), "sources-toggle-pretty-print-status-bar-item"); | 164 this._toggleFormatSourceButton = new WebInspector.StatusBarButton(WebInspect or.UIString("Pretty print"), "sources-toggle-pretty-print-status-bar-item"); |
151 this._toggleFormatSourceButton.toggled = false; | 165 this._toggleFormatSourceButton.toggled = false; |
152 this._toggleFormatSourceButton.addEventListener("click", this._toggleFormatS ource, this); | 166 this._toggleFormatSourceButton.addEventListener("click", this._toggleFormatS ource, this); |
153 | 167 |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
290 }, | 304 }, |
291 | 305 |
292 /** | 306 /** |
293 * @param {!Array.<!WebInspector.UISourceCode>} uiSourceCodes | 307 * @param {!Array.<!WebInspector.UISourceCode>} uiSourceCodes |
294 */ | 308 */ |
295 _removeUISourceCodes: function(uiSourceCodes) | 309 _removeUISourceCodes: function(uiSourceCodes) |
296 { | 310 { |
297 for (var i = 0; i < uiSourceCodes.length; ++i) { | 311 for (var i = 0; i < uiSourceCodes.length; ++i) { |
298 this._navigator.removeUISourceCode(uiSourceCodes[i]); | 312 this._navigator.removeUISourceCode(uiSourceCodes[i]); |
299 this._removeSourceFrame(uiSourceCodes[i]); | 313 this._removeSourceFrame(uiSourceCodes[i]); |
314 this._historyManager.removeHistoryForSourceCode(uiSourceCodes[i]); | |
300 } | 315 } |
301 this._editorContainer.removeUISourceCodes(uiSourceCodes); | 316 this._editorContainer.removeUISourceCodes(uiSourceCodes); |
302 }, | 317 }, |
303 | 318 |
304 _consoleCommandEvaluatedInSelectedCallFrame: function(event) | 319 _consoleCommandEvaluatedInSelectedCallFrame: function(event) |
305 { | 320 { |
306 this.sidebarPanes.scopechain.update(WebInspector.debuggerModel.selectedC allFrame()); | 321 this.sidebarPanes.scopechain.update(WebInspector.debuggerModel.selectedC allFrame()); |
307 }, | 322 }, |
308 | 323 |
309 _debuggerPaused: function() | 324 _debuggerPaused: function() |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
506 }, | 521 }, |
507 | 522 |
508 /** | 523 /** |
509 * @param {!WebInspector.UISourceCode} uiSourceCode | 524 * @param {!WebInspector.UISourceCode} uiSourceCode |
510 * @param {number=} lineNumber | 525 * @param {number=} lineNumber |
511 * @param {number=} columnNumber | 526 * @param {number=} columnNumber |
512 * @param {boolean=} forceShowInPanel | 527 * @param {boolean=} forceShowInPanel |
513 */ | 528 */ |
514 _showSourceLocation: function(uiSourceCode, lineNumber, columnNumber, forceS howInPanel) | 529 _showSourceLocation: function(uiSourceCode, lineNumber, columnNumber, forceS howInPanel) |
515 { | 530 { |
531 if (uiSourceCode === this._currentUISourceCode && typeof lineNumber === "number") { | |
vsevik
2014/01/15 16:19:05
This looks redundant.
Please remove these lines un
lushnikov
2014/01/16 17:10:29
Done.
| |
532 this.highlightPosition(lineNumber, columnNumber); | |
533 return; | |
534 } | |
516 this._showEditor(forceShowInPanel); | 535 this._showEditor(forceShowInPanel); |
517 var sourceFrame = this._showFile(uiSourceCode); | 536 var sourceFrame = this._showFile(uiSourceCode); |
518 if (typeof lineNumber === "number") | 537 if (typeof lineNumber === "number") |
519 sourceFrame.highlightPosition(lineNumber, columnNumber); | 538 sourceFrame.highlightPosition(lineNumber, columnNumber); |
520 sourceFrame.focus(); | 539 sourceFrame.focus(); |
521 | 540 this._historyManager.updateCurrentState(); |
522 WebInspector.notifications.dispatchEventToListeners(WebInspector.UserMet rics.UserAction, { | 541 WebInspector.notifications.dispatchEventToListeners(WebInspector.UserMet rics.UserAction, { |
523 action: WebInspector.UserMetrics.UserActionNames.OpenSourceLink, | 542 action: WebInspector.UserMetrics.UserActionNames.OpenSourceLink, |
524 url: uiSourceCode.originURL(), | 543 url: uiSourceCode.originURL(), |
525 lineNumber: lineNumber | 544 lineNumber: lineNumber |
526 }); | 545 }); |
527 }, | 546 }, |
528 | 547 |
529 /** | 548 /** |
530 * @param {!WebInspector.UISourceCode} uiSourceCode | 549 * @param {!WebInspector.UISourceCode} uiSourceCode |
531 * @return {!WebInspector.SourceFrame} | 550 * @return {!WebInspector.SourceFrame} |
532 */ | 551 */ |
533 _showFile: function(uiSourceCode) | 552 _showFile: function(uiSourceCode) |
vsevik
2014/01/16 12:24:26
I think you should move your calls out of this met
lushnikov
2014/01/16 17:10:29
Done.
| |
534 { | 553 { |
535 var sourceFrame = this._getOrCreateSourceFrame(uiSourceCode); | 554 var sourceFrame = this._getOrCreateSourceFrame(uiSourceCode); |
536 if (this._currentUISourceCode === uiSourceCode) | 555 if (this._currentUISourceCode === uiSourceCode) |
537 return sourceFrame; | 556 return sourceFrame; |
557 | |
558 this._historyManager.updateCurrentState(); | |
vsevik
2014/01/15 16:19:05
You wrap incorrect line with your calls here and t
lushnikov
2014/01/16 17:10:29
Moved these lines out of the method
| |
538 this._currentUISourceCode = uiSourceCode; | 559 this._currentUISourceCode = uiSourceCode; |
539 if (!uiSourceCode.project().isServiceProject()) | 560 if (!uiSourceCode.project().isServiceProject()) |
540 this._navigator.revealUISourceCode(uiSourceCode, true); | 561 this._navigator.revealUISourceCode(uiSourceCode, true); |
562 this._historyManager.pushNewState(); | |
563 | |
541 this._editorContainer.showFile(uiSourceCode); | 564 this._editorContainer.showFile(uiSourceCode); |
542 this._updateScriptViewStatusBarItems(); | 565 this._updateScriptViewStatusBarItems(); |
543 | 566 |
544 if (this._currentUISourceCode.project().type() === WebInspector.projectT ypes.Snippets) | 567 if (this._currentUISourceCode.project().type() === WebInspector.projectT ypes.Snippets) |
545 this._runSnippetButton.element.classList.remove("hidden"); | 568 this._runSnippetButton.element.classList.remove("hidden"); |
546 else | 569 else |
547 this._runSnippetButton.element.classList.add("hidden"); | 570 this._runSnippetButton.element.classList.add("hidden"); |
548 | 571 |
549 return sourceFrame; | 572 return sourceFrame; |
550 }, | 573 }, |
(...skipping 14 matching lines...) Expand all Loading... | |
565 break; | 588 break; |
566 case WebInspector.resourceTypes.Stylesheet: | 589 case WebInspector.resourceTypes.Stylesheet: |
567 sourceFrame = new WebInspector.CSSSourceFrame(uiSourceCode); | 590 sourceFrame = new WebInspector.CSSSourceFrame(uiSourceCode); |
568 break; | 591 break; |
569 default: | 592 default: |
570 sourceFrame = new WebInspector.UISourceCodeFrame(uiSourceCode); | 593 sourceFrame = new WebInspector.UISourceCodeFrame(uiSourceCode); |
571 break; | 594 break; |
572 } | 595 } |
573 sourceFrame.setHighlighterType(uiSourceCode.highlighterType()); | 596 sourceFrame.setHighlighterType(uiSourceCode.highlighterType()); |
574 this._sourceFramesByUISourceCode.put(uiSourceCode, sourceFrame); | 597 this._sourceFramesByUISourceCode.put(uiSourceCode, sourceFrame); |
598 this._historyManager.trackSourceFrameCursorJumps(sourceFrame); | |
575 return sourceFrame; | 599 return sourceFrame; |
576 }, | 600 }, |
577 | 601 |
578 /** | 602 /** |
579 * @param {!WebInspector.UISourceCode} uiSourceCode | 603 * @param {!WebInspector.UISourceCode} uiSourceCode |
580 * @return {!WebInspector.SourceFrame} | 604 * @return {!WebInspector.SourceFrame} |
581 */ | 605 */ |
582 _getOrCreateSourceFrame: function(uiSourceCode) | 606 _getOrCreateSourceFrame: function(uiSourceCode) |
583 { | 607 { |
584 return this._sourceFramesByUISourceCode.get(uiSourceCode) || this._creat eSourceFrame(uiSourceCode); | 608 return this._sourceFramesByUISourceCode.get(uiSourceCode) || this._creat eSourceFrame(uiSourceCode); |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
681 this.sidebarPanes.scopechain.update(callFrame); | 705 this.sidebarPanes.scopechain.update(callFrame); |
682 this.sidebarPanes.watchExpressions.refreshExpressions(); | 706 this.sidebarPanes.watchExpressions.refreshExpressions(); |
683 this.sidebarPanes.callstack.setSelectedCallFrame(callFrame); | 707 this.sidebarPanes.callstack.setSelectedCallFrame(callFrame); |
684 callFrame.createLiveLocation(this._executionLineChanged.bind(this)); | 708 callFrame.createLiveLocation(this._executionLineChanged.bind(this)); |
685 }, | 709 }, |
686 | 710 |
687 _editorClosed: function(event) | 711 _editorClosed: function(event) |
688 { | 712 { |
689 this._navigatorController.hideNavigatorOverlay(); | 713 this._navigatorController.hideNavigatorOverlay(); |
690 var uiSourceCode = /** @type {!WebInspector.UISourceCode} */ (event.data ); | 714 var uiSourceCode = /** @type {!WebInspector.UISourceCode} */ (event.data ); |
715 this._historyManager.removeHistoryForSourceCode(uiSourceCode); | |
691 | 716 |
692 if (this._currentUISourceCode === uiSourceCode) | 717 if (this._currentUISourceCode === uiSourceCode) |
693 delete this._currentUISourceCode; | 718 delete this._currentUISourceCode; |
694 | 719 |
695 // SourcesNavigator does not need to update on EditorClosed. | 720 // SourcesNavigator does not need to update on EditorClosed. |
696 this._updateScriptViewStatusBarItems(); | 721 this._updateScriptViewStatusBarItems(); |
697 this._searchableView.resetSearch(); | 722 this._searchableView.resetSearch(); |
698 }, | 723 }, |
699 | 724 |
700 _editorSelected: function(event) | 725 _editorSelected: function(event) |
701 { | 726 { |
702 var uiSourceCode = /** @type {!WebInspector.UISourceCode} */ (event.data ); | 727 var uiSourceCode = /** @type {!WebInspector.UISourceCode} */ (event.data .currentFile); |
728 if (!event.data.userGesture) | |
729 this._historyManager.readOnlyLock(); | |
vsevik
2014/01/16 12:24:26
Can we remove these?
lushnikov
2014/01/16 17:10:29
Not really; test fails.
| |
703 var sourceFrame = this._showFile(uiSourceCode); | 730 var sourceFrame = this._showFile(uiSourceCode); |
731 if (!event.data.userGesture) | |
732 this._historyManager.releaseReadOnlyLock(); | |
733 | |
704 this._navigatorController.hideNavigatorOverlay(); | 734 this._navigatorController.hideNavigatorOverlay(); |
705 if (!this._navigatorController.isNavigatorPinned()) | 735 if (!this._navigatorController.isNavigatorPinned()) |
706 sourceFrame.focus(); | 736 sourceFrame.focus(); |
707 this._searchableView.setCanReplace(!!sourceFrame && sourceFrame.canEditS ource()); | 737 this._searchableView.setCanReplace(!!sourceFrame && sourceFrame.canEditS ource()); |
708 this._searchableView.resetSearch(); | 738 this._searchableView.resetSearch(); |
709 }, | 739 }, |
710 | 740 |
711 _sourceSelected: function(event) | 741 _sourceSelected: function(event) |
712 { | 742 { |
713 var uiSourceCode = /** @type {!WebInspector.UISourceCode} */ (event.data .uiSourceCode); | 743 var uiSourceCode = /** @type {!WebInspector.UISourceCode} */ (event.data .uiSourceCode); |
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1153 /** | 1183 /** |
1154 * @param {string} query | 1184 * @param {string} query |
1155 * @param {string} text | 1185 * @param {string} text |
1156 */ | 1186 */ |
1157 replaceAllWith: function(query, text) | 1187 replaceAllWith: function(query, text) |
1158 { | 1188 { |
1159 var view = /** @type {!WebInspector.SourceFrame} */ (this.visibleView); | 1189 var view = /** @type {!WebInspector.SourceFrame} */ (this.visibleView); |
1160 view.replaceAllWith(query, text); | 1190 view.replaceAllWith(query, text); |
1161 }, | 1191 }, |
1162 | 1192 |
1193 /** | |
1194 * @param {!KeyboardEvent} event | |
1195 */ | |
1196 handleShortcut: function(event) | |
vsevik
2014/01/15 16:19:05
Please register and handle this shortcuts on the p
lushnikov
2014/01/16 17:10:29
Done.
| |
1197 { | |
1198 if (this._historyManager.handleShortcut(event)) { | |
1199 event.handled = true; | |
1200 return; | |
1201 } | |
1202 WebInspector.Panel.prototype.handleShortcut.call(this, event); | |
1203 }, | |
1204 | |
1163 _onKeyDown: function(event) | 1205 _onKeyDown: function(event) |
1164 { | 1206 { |
1165 if (event.keyCode !== WebInspector.KeyboardShortcut.Keys.CtrlOrMeta.code ) | 1207 if (event.keyCode !== WebInspector.KeyboardShortcut.Keys.CtrlOrMeta.code ) |
1166 return; | 1208 return; |
1167 if (!this._paused || !this._executionSourceFrame) | 1209 if (!this._paused || !this._executionSourceFrame) |
1168 return; | 1210 return; |
1169 var stepIntoMarkup = this._executionSourceFrame.stepIntoMarkup(); | 1211 var stepIntoMarkup = this._executionSourceFrame.stepIntoMarkup(); |
1170 if (stepIntoMarkup) | 1212 if (stepIntoMarkup) |
1171 stepIntoMarkup.startIteratingSelection(); | 1213 stepIntoMarkup.startIteratingSelection(); |
1172 }, | 1214 }, |
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1623 }, | 1665 }, |
1624 | 1666 |
1625 /** | 1667 /** |
1626 * @param {number} line | 1668 * @param {number} line |
1627 * @param {number=} column | 1669 * @param {number=} column |
1628 */ | 1670 */ |
1629 highlightPosition: function(line, column) | 1671 highlightPosition: function(line, column) |
1630 { | 1672 { |
1631 if (!this.canHighlightPosition()) | 1673 if (!this.canHighlightPosition()) |
1632 return; | 1674 return; |
1675 this._historyManager.updateCurrentState(); | |
1633 this.visibleView.highlightPosition(line, column); | 1676 this.visibleView.highlightPosition(line, column); |
1677 this._historyManager.pushNewState(); | |
1634 }, | 1678 }, |
1635 | 1679 |
1636 /** | 1680 /** |
1637 * @param {string} id | 1681 * @param {string} id |
1638 * @param {!WebInspector.SidebarPane} pane | 1682 * @param {!WebInspector.SidebarPane} pane |
1639 */ | 1683 */ |
1640 addExtensionSidebarPane: function(id, pane) | 1684 addExtensionSidebarPane: function(id, pane) |
1641 { | 1685 { |
1642 this._extensionSidebarPanes.push(pane); | 1686 this._extensionSidebarPanes.push(pane); |
1643 this._extensionSidebarPanesContainer.addPane(pane); | 1687 this._extensionSidebarPanesContainer.addPane(pane); |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1726 WebInspector.DrawerEditorView = function() | 1770 WebInspector.DrawerEditorView = function() |
1727 { | 1771 { |
1728 WebInspector.View.call(this); | 1772 WebInspector.View.call(this); |
1729 this.element.id = "drawer-editor-view"; | 1773 this.element.id = "drawer-editor-view"; |
1730 this.element.classList.add("vbox"); | 1774 this.element.classList.add("vbox"); |
1731 } | 1775 } |
1732 | 1776 |
1733 WebInspector.DrawerEditorView.prototype = { | 1777 WebInspector.DrawerEditorView.prototype = { |
1734 __proto__: WebInspector.View.prototype | 1778 __proto__: WebInspector.View.prototype |
1735 } | 1779 } |
OLD | NEW |