Changeset 117064 in webkit
- Timestamp:
- May 15, 2012 7:15:57 AM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r117058 r117064 1 2012-05-15 Pavel Feldman <pfeldman@chromium.org> 2 3 Web Inspector: add show/hide debugger sidebar button. 4 https://bugs.webkit.org/show_bug.cgi?id=86478 5 6 Reviewed by Vsevolod Vlasov. 7 8 As with the navigator, but with no overlay. See the screenshot. 9 10 * English.lproj/localizedStrings.js: 11 * inspector/front-end/NavigatorOverlayController.js: 12 (WebInspector.NavigatorOverlayController.prototype.set _pinNavigator): 13 * inspector/front-end/ScriptsPanel.js: 14 (WebInspector.ScriptsPanel.prototype._debuggerPaused): 15 (WebInspector.ScriptsPanel.prototype._debuggerResumed): 16 (WebInspector.ScriptsPanel.prototype._showJavaScriptOutlineDialog): 17 (WebInspector.ScriptsPanel.prototype._installDebuggerSidebarController.clickHandler): 18 (WebInspector.ScriptsPanel.prototype._showDebuggerSidebar): 19 (WebInspector.ScriptsPanel.prototype.set _hideDebuggerSidebar): 20 * inspector/front-end/scriptsPanel.css: 21 (#scripts-editor-container-tabbed-pane .tabbed-pane-header-contents): 22 (button.status-bar-item.scripts-debugger-show-hide-button): 23 (.status-bar-item.scripts-debugger-show-hide-button > .glyph): 24 (.status-bar-item.scripts-debugger-show-hide-button.toggled-shown > .glyph): 25 (.status-bar-item.scripts-debugger-show-hide-button.toggled-hidden > .glyph): 26 1 27 2012-05-15 Zoltan Herczeg <zherczeg@webkit.org> 2 28 -
trunk/Source/WebCore/inspector/front-end/NavigatorOverlayController.js
r117055 r117064 49 49 this._navigatorShowHideButton.state = "pinned"; 50 50 this._navigatorShowHideButton.addEventListener("click", this._toggleNavigator, this); 51 this._ navigatorView.element.appendChild(this._navigatorShowHideButton.element);51 this._editorView.element.appendChild(this._navigatorShowHideButton.element); 52 52 53 53 WebInspector.settings.navigatorHidden = WebInspector.settings.createSetting("navigatorHidden", true); … … 107 107 this._editorView.element.removeStyleClass("navigator-hidden"); 108 108 this._navigatorSidebarResizeWidgetElement.removeStyleClass("hidden"); 109 this._editorView.element.appendChild(this._navigatorShowHideButton.element); 109 110 110 111 this._innerHideNavigatorOverlay(); -
trunk/Source/WebCore/inspector/front-end/ScriptsPanel.js
r116843 r117064 37 37 WebInspector.settings.pauseOnExceptionStateString = WebInspector.settings.createSetting("pauseOnExceptionStateString", WebInspector.ScriptsPanel.PauseOnExceptionsState.DontPauseOnExceptions); 38 38 WebInspector.settings.navigatorWasOnceHidden = WebInspector.settings.createSetting("navigatorWasOnceHidden", false); 39 39 WebInspector.settings.debuggerSidebarHidden = WebInspector.settings.createSetting("debuggerSidebarHidden", false); 40 40 41 this._presentationModel = presentationModel; 41 42 new WebInspector.PresentationConsoleMessageHelper(); … … 152 153 153 154 this._debuggerEnabled = !Capabilities.debuggerCausesRecompilation; 155 this._installDebuggerSidebarController(); 154 156 155 157 this._sourceFramesByUISourceCode = new Map(); … … 318 320 } 319 321 322 this._showDebuggerSidebar(); 323 this._toggleDebuggerSidebarButton.disabled = true; 320 324 window.focus(); 321 325 InspectorFrontendHost.bringToFront(); … … 329 333 330 334 this._clearInterface(); 335 this._toggleDebuggerSidebarButton.disabled = false; 331 336 }, 332 337 … … 928 933 { 929 934 WebInspector.JavaScriptOutlineDialog.show(this.visibleView, this.visibleView); 935 }, 936 937 _installDebuggerSidebarController: function() 938 { 939 this._toggleDebuggerSidebarButton = new WebInspector.StatusBarButton(WebInspector.UIString("Hide debugger"), "scripts-debugger-show-hide-button", 3); 940 this._toggleDebuggerSidebarButton.state = "shown"; 941 this._toggleDebuggerSidebarButton.addEventListener("click", clickHandler, this); 942 943 function clickHandler() 944 { 945 if (this._toggleDebuggerSidebarButton.state === "shown") 946 this._hideDebuggerSidebar(); 947 else 948 this._showDebuggerSidebar(); 949 } 950 this.editorView.element.appendChild(this._toggleDebuggerSidebarButton.element); 951 952 if (WebInspector.settings.debuggerSidebarHidden.get()) 953 this._hideDebuggerSidebar(); 954 955 }, 956 957 _showDebuggerSidebar: function() 958 { 959 if (this._toggleDebuggerSidebarButton.state === "shown") 960 return; 961 this._toggleDebuggerSidebarButton.state = "shown"; 962 this._toggleDebuggerSidebarButton.title = WebInspector.UIString("Hide debugger"); 963 this.splitView.showSidebarElement(); 964 WebInspector.settings.debuggerSidebarHidden.set(false); 965 }, 966 967 _hideDebuggerSidebar: function() 968 { 969 if (this._toggleDebuggerSidebarButton.state === "hidden") 970 return; 971 this._toggleDebuggerSidebarButton.state = "hidden"; 972 this._toggleDebuggerSidebarButton.title = WebInspector.UIString("Show debugger"); 973 this.splitView.hideSidebarElement(); 974 WebInspector.settings.debuggerSidebarHidden.set(true); 930 975 } 931 976 } -
trunk/Source/WebCore/inspector/front-end/scriptsPanel.css
r117055 r117064 175 175 } 176 176 177 button.status-bar-item.scripts-navigator-show-hide-button.toggled-pinned,178 177 button.status-bar-item.scripts-navigator-show-hide-button.toggled-overlay 179 178 { … … 223 222 224 223 #scripts-editor-container-tabbed-pane .tabbed-pane-header-contents { 225 margin-left: 1px;226 margin-right: 16px;227 }228 229 #scripts-editor-container-tabbed-pane.navigator-hidden .tabbed-pane-header-contents {230 224 margin-left: 20px; 225 margin-right: 36px; 231 226 } 232 227 … … 249 244 font-weight: bold; 250 245 } 246 247 button.status-bar-item.scripts-debugger-show-hide-button { 248 position: absolute; 249 top: 0; 250 right: 16px; 251 background-image: none; 252 height: 16px; 253 width: 16px; 254 margin: 3px 2px 2px 2px; 255 } 256 257 .status-bar-item.scripts-debugger-show-hide-button > .glyph { 258 background-color: rgba(0, 0, 0, 0.5); 259 -webkit-mask-position: 0 0; 260 -webkit-mask-image: url(Images/navigatorShowHideButton.png); 261 } 262 263 .status-bar-item.scripts-debugger-show-hide-button.toggled-shown > .glyph { 264 -webkit-mask-position: 0 -16px; 265 } 266 267 .status-bar-item.scripts-debugger-show-hide-button.toggled-hidden > .glyph { 268 -webkit-mask-position: -16px -16px; 269 }
Note: See TracChangeset
for help on using the changeset viewer.