Changeset 83713 in webkit
- Timestamp:
- Apr 13, 2011 2:32:15 AM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r83710 r83713 1 2011-04-06 Pavel Podivilov <podivilov@chromium.org> 2 3 Reviewed by Pavel Feldman. 4 5 Web Inspector: add "De-obfuscate Source" item to source frame text area context menu. 6 https://bugs.webkit.org/show_bug.cgi?id=57942 7 8 * English.lproj/localizedStrings.js: 9 * inspector/front-end/DebuggerPresentationModel.js: 10 (WebInspector.DebuggerPresentationModel.prototype.formatSourceFilesToggled): 11 * inspector/front-end/ScriptsPanel.js: 12 (WebInspector.ScriptsPanel): 13 (WebInspector.ScriptsPanel.prototype._togglePauseOnExceptions): 14 (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.releaseEvaluationResult): 15 (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.toggleFormatSourceFiles): 16 (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.formatSourceFilesToggled): 17 * inspector/front-end/SourceFrame.js: 18 (WebInspector.SourceFrame.prototype._contextMenu): 19 (WebInspector.SourceFrame.prototype._populateLineGutterContextMenu): 20 (WebInspector.SourceFrame.prototype._populateTextAreaContextMenu): 21 (WebInspector.SourceFrameDelegate.prototype.releaseEvaluationResult): 22 (WebInspector.SourceFrameDelegate.prototype.toggleFormatSourceFiles): 23 (WebInspector.SourceFrameDelegate.prototype.formatSourceFilesToggled): 24 1 25 2011-04-13 Nikolas Zimmermann <nzimmermann@rim.com> 2 26 -
trunk/Source/WebCore/inspector/front-end/DebuggerPresentationModel.js
r83294 r83713 227 227 }, 228 228 229 formatSourceFilesToggled: function() 230 { 231 return this._formatSourceFiles; 232 }, 233 229 234 _formatter: function() 230 235 { -
trunk/Source/WebCore/inspector/front-end/ScriptsPanel.js
r83601 r83713 66 66 // this.topStatusBar.appendChild(this.functionsSelectElement); 67 67 68 this.formatButton = document.createElement("button");69 this.formatButton.className = "status-bar-item";70 this.formatButton.id = "format-script";71 this.formatButton.title = WebInspector.UIString("Format script.");72 this.formatButton.appendChild(document.createElement("img"));73 this.formatButton.addEventListener("click", this._toggleFormatSourceFiles.bind(this), false);74 if (Preferences.debugMode)75 this.topStatusBar.appendChild(this.formatButton);76 77 68 this.sidebarButtonsElement = document.createElement("div"); 78 69 this.sidebarButtonsElement.id = "scripts-sidebar-buttons"; … … 782 773 }, 783 774 784 _toggleFormatSourceFiles: function()785 {786 this.reset();787 this._presentationModel.toggleFormatSourceFiles();788 },789 790 775 _enableDebugging: function() 791 776 { … … 814 799 var nextStateMap = {}; 815 800 var stateEnum = WebInspector.ScriptsPanel.PauseOnExceptionsState; 816 nextStateMap[stateEnum.DontPauseOnExceptions] = stateEnum.PauseOnAllExceptions; 817 nextStateMap[stateEnum.PauseOnAllExceptions] = stateEnum.PauseOnUncaughtExceptions; 801 nextStateMap[stateEnum.DontPauseOnExceptions] = stateEnum.PauseOnAllExceptions; 802 nextStateMap[stateEnum.PauseOnAllExceptions] = stateEnum.PauseOnUncaughtExceptions; 818 803 nextStateMap[stateEnum.PauseOnUncaughtExceptions] = stateEnum.DontPauseOnExceptions; 819 804 this._setPauseOnExceptions(nextStateMap[this._pauseOnExceptionButton.state]); … … 1088 1073 { 1089 1074 RuntimeAgent.releaseObjectGroup(this._popoverObjectGroup); 1075 }, 1076 1077 toggleFormatSourceFiles: function() 1078 { 1079 WebInspector.panels.scripts.reset(); 1080 this._model.toggleFormatSourceFiles(); 1081 }, 1082 1083 formatSourceFilesToggled: function() 1084 { 1085 return this._model.formatSourceFilesToggled(); 1090 1086 } 1091 1087 } -
trunk/Source/WebCore/inspector/front-end/SourceFrame.js
r83586 r83713 600 600 _contextMenu: function(event) 601 601 { 602 var contextMenu = new WebInspector.ContextMenu(); 602 603 var target = event.target.enclosingNodeOrSelfWithClass("webkit-line-number"); 603 if (!target) 604 return; 605 var lineNumber = target.lineNumber; 606 607 var contextMenu = new WebInspector.ContextMenu(); 608 604 if (target) 605 this._populateLineGutterContextMenu(target.lineNumber, contextMenu); 606 else 607 this._populateTextAreaContextMenu(contextMenu); 608 contextMenu.show(event); 609 }, 610 611 _populateLineGutterContextMenu: function(lineNumber, contextMenu) 612 { 609 613 contextMenu.appendItem(WebInspector.UIString("Continue to Here"), this._delegate.continueToLine.bind(this._delegate, lineNumber)); 610 614 … … 648 652 contextMenu.appendItem(WebInspector.UIString("Enable Breakpoint"), setBreakpointEnabled.bind(this, true)); 649 653 } 650 contextMenu.show(event); 654 }, 655 656 _populateTextAreaContextMenu: function(contextMenu) 657 { 658 contextMenu.appendCheckboxItem(WebInspector.UIString("De-obfuscate Source"), this._delegate.toggleFormatSourceFiles.bind(this._delegate), this._delegate.formatSourceFilesToggled()); 651 659 }, 652 660 … … 999 1007 { 1000 1008 // Should be implemented by subclasses. 1009 }, 1010 1011 toggleFormatSourceFiles: function() 1012 { 1013 // Should be implemented by subclasses. 1014 }, 1015 1016 formatSourceFilesToggled: function() 1017 { 1018 // Should be implemented by subclasses. 1001 1019 } 1002 1020 }
Note: See TracChangeset
for help on using the changeset viewer.