- Revision
- 117064
- Author
- [email protected]
- Date
- 2012-05-15 07:15:57 -0700 (Tue, 15 May 2012)
Log Message
Web Inspector: add show/hide debugger sidebar button.
https://bugs.webkit.org/show_bug.cgi?id=86478
Reviewed by Vsevolod Vlasov.
As with the navigator, but with no overlay. See the screenshot.
* English.lproj/localizedStrings.js:
* inspector/front-end/NavigatorOverlayController.js:
(WebInspector.NavigatorOverlayController.prototype.set _pinNavigator):
* inspector/front-end/ScriptsPanel.js:
(WebInspector.ScriptsPanel.prototype._debuggerPaused):
(WebInspector.ScriptsPanel.prototype._debuggerResumed):
(WebInspector.ScriptsPanel.prototype._showJavaScriptOutlineDialog):
(WebInspector.ScriptsPanel.prototype._installDebuggerSidebarController.clickHandler):
(WebInspector.ScriptsPanel.prototype._showDebuggerSidebar):
(WebInspector.ScriptsPanel.prototype.set _hideDebuggerSidebar):
* inspector/front-end/scriptsPanel.css:
(#scripts-editor-container-tabbed-pane .tabbed-pane-header-contents):
(button.status-bar-item.scripts-debugger-show-hide-button):
(.status-bar-item.scripts-debugger-show-hide-button > .glyph):
(.status-bar-item.scripts-debugger-show-hide-button.toggled-shown > .glyph):
(.status-bar-item.scripts-debugger-show-hide-button.toggled-hidden > .glyph):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (117063 => 117064)
--- trunk/Source/WebCore/ChangeLog 2012-05-15 14:11:36 UTC (rev 117063)
+++ trunk/Source/WebCore/ChangeLog 2012-05-15 14:15:57 UTC (rev 117064)
@@ -1,3 +1,29 @@
+2012-05-15 Pavel Feldman <[email protected]>
+
+ Web Inspector: add show/hide debugger sidebar button.
+ https://bugs.webkit.org/show_bug.cgi?id=86478
+
+ Reviewed by Vsevolod Vlasov.
+
+ As with the navigator, but with no overlay. See the screenshot.
+
+ * English.lproj/localizedStrings.js:
+ * inspector/front-end/NavigatorOverlayController.js:
+ (WebInspector.NavigatorOverlayController.prototype.set _pinNavigator):
+ * inspector/front-end/ScriptsPanel.js:
+ (WebInspector.ScriptsPanel.prototype._debuggerPaused):
+ (WebInspector.ScriptsPanel.prototype._debuggerResumed):
+ (WebInspector.ScriptsPanel.prototype._showJavaScriptOutlineDialog):
+ (WebInspector.ScriptsPanel.prototype._installDebuggerSidebarController.clickHandler):
+ (WebInspector.ScriptsPanel.prototype._showDebuggerSidebar):
+ (WebInspector.ScriptsPanel.prototype.set _hideDebuggerSidebar):
+ * inspector/front-end/scriptsPanel.css:
+ (#scripts-editor-container-tabbed-pane .tabbed-pane-header-contents):
+ (button.status-bar-item.scripts-debugger-show-hide-button):
+ (.status-bar-item.scripts-debugger-show-hide-button > .glyph):
+ (.status-bar-item.scripts-debugger-show-hide-button.toggled-shown > .glyph):
+ (.status-bar-item.scripts-debugger-show-hide-button.toggled-hidden > .glyph):
+
2012-05-15 Zoltan Herczeg <[email protected]>
NEONizing forceValidPreMultipliedPixels
Modified: trunk/Source/WebCore/English.lproj/localizedStrings.js
(Binary files differ)
Modified: trunk/Source/WebCore/inspector/front-end/NavigatorOverlayController.js (117063 => 117064)
--- trunk/Source/WebCore/inspector/front-end/NavigatorOverlayController.js 2012-05-15 14:11:36 UTC (rev 117063)
+++ trunk/Source/WebCore/inspector/front-end/NavigatorOverlayController.js 2012-05-15 14:15:57 UTC (rev 117064)
@@ -48,7 +48,7 @@
this._navigatorShowHideButton = new WebInspector.StatusBarButton(WebInspector.UIString("Hide navigator"), "scripts-navigator-show-hide-button", 3);
this._navigatorShowHideButton.state = "pinned";
this._navigatorShowHideButton.addEventListener("click", this._toggleNavigator, this);
- this._navigatorView.element.appendChild(this._navigatorShowHideButton.element);
+ this._editorView.element.appendChild(this._navigatorShowHideButton.element);
WebInspector.settings.navigatorHidden = WebInspector.settings.createSetting("navigatorHidden", true);
if (WebInspector.settings.navigatorHidden.get())
@@ -106,6 +106,7 @@
this._editorView.element.removeStyleClass("navigator-hidden");
this._navigatorSidebarResizeWidgetElement.removeStyleClass("hidden");
+ this._editorView.element.appendChild(this._navigatorShowHideButton.element);
this._innerHideNavigatorOverlay();
this._parentSplitView.showSidebarElement();
Modified: trunk/Source/WebCore/inspector/front-end/ScriptsPanel.js (117063 => 117064)
--- trunk/Source/WebCore/inspector/front-end/ScriptsPanel.js 2012-05-15 14:11:36 UTC (rev 117063)
+++ trunk/Source/WebCore/inspector/front-end/ScriptsPanel.js 2012-05-15 14:15:57 UTC (rev 117064)
@@ -36,7 +36,8 @@
WebInspector.settings.pauseOnExceptionStateString = WebInspector.settings.createSetting("pauseOnExceptionStateString", WebInspector.ScriptsPanel.PauseOnExceptionsState.DontPauseOnExceptions);
WebInspector.settings.navigatorWasOnceHidden = WebInspector.settings.createSetting("navigatorWasOnceHidden", false);
-
+ WebInspector.settings.debuggerSidebarHidden = WebInspector.settings.createSetting("debuggerSidebarHidden", false);
+
this._presentationModel = presentationModel;
new WebInspector.PresentationConsoleMessageHelper();
@@ -151,6 +152,7 @@
this._scriptViewStatusBarItemsContainer.style.display = "inline-block";
this._debuggerEnabled = !Capabilities.debuggerCausesRecompilation;
+ this._installDebuggerSidebarController();
this._sourceFramesByUISourceCode = new Map();
this._reset(false);
@@ -317,6 +319,8 @@
details.callFrames[0].createLiveLocation(didGetUILocation.bind(this));
}
+ this._showDebuggerSidebar();
+ this._toggleDebuggerSidebarButton.disabled = true;
window.focus();
InspectorFrontendHost.bringToFront();
},
@@ -328,6 +332,7 @@
this._stepping = false;
this._clearInterface();
+ this._toggleDebuggerSidebarButton.disabled = false;
},
_debuggerWasEnabled: function()
@@ -927,6 +932,46 @@
_showJavaScriptOutlineDialog: function()
{
WebInspector._javascript_OutlineDialog.show(this.visibleView, this.visibleView);
+ },
+
+ _installDebuggerSidebarController: function()
+ {
+ this._toggleDebuggerSidebarButton = new WebInspector.StatusBarButton(WebInspector.UIString("Hide debugger"), "scripts-debugger-show-hide-button", 3);
+ this._toggleDebuggerSidebarButton.state = "shown";
+ this._toggleDebuggerSidebarButton.addEventListener("click", clickHandler, this);
+
+ function clickHandler()
+ {
+ if (this._toggleDebuggerSidebarButton.state === "shown")
+ this._hideDebuggerSidebar();
+ else
+ this._showDebuggerSidebar();
+ }
+ this.editorView.element.appendChild(this._toggleDebuggerSidebarButton.element);
+
+ if (WebInspector.settings.debuggerSidebarHidden.get())
+ this._hideDebuggerSidebar();
+
+ },
+
+ _showDebuggerSidebar: function()
+ {
+ if (this._toggleDebuggerSidebarButton.state === "shown")
+ return;
+ this._toggleDebuggerSidebarButton.state = "shown";
+ this._toggleDebuggerSidebarButton.title = WebInspector.UIString("Hide debugger");
+ this.splitView.showSidebarElement();
+ WebInspector.settings.debuggerSidebarHidden.set(false);
+ },
+
+ _hideDebuggerSidebar: function()
+ {
+ if (this._toggleDebuggerSidebarButton.state === "hidden")
+ return;
+ this._toggleDebuggerSidebarButton.state = "hidden";
+ this._toggleDebuggerSidebarButton.title = WebInspector.UIString("Show debugger");
+ this.splitView.hideSidebarElement();
+ WebInspector.settings.debuggerSidebarHidden.set(true);
}
}
Modified: trunk/Source/WebCore/inspector/front-end/scriptsPanel.css (117063 => 117064)
--- trunk/Source/WebCore/inspector/front-end/scriptsPanel.css 2012-05-15 14:11:36 UTC (rev 117063)
+++ trunk/Source/WebCore/inspector/front-end/scriptsPanel.css 2012-05-15 14:15:57 UTC (rev 117064)
@@ -174,7 +174,6 @@
margin: 3px 2px 2px 2px;
}
-button.status-bar-item.scripts-navigator-show-hide-button.toggled-pinned,
button.status-bar-item.scripts-navigator-show-hide-button.toggled-overlay
{
left: auto;
@@ -222,12 +221,8 @@
}
#scripts-editor-container-tabbed-pane .tabbed-pane-header-contents {
- margin-left: 1px;
- margin-right: 16px;
-}
-
-#scripts-editor-container-tabbed-pane.navigator-hidden .tabbed-pane-header-contents {
margin-left: 20px;
+ margin-right: 36px;
}
#scripts-editor-container-tabbed-pane .tabbed-pane-header-tab {
@@ -248,3 +243,27 @@
.function-popover-title .function-name {
font-weight: bold;
}
+
+button.status-bar-item.scripts-debugger-show-hide-button {
+ position: absolute;
+ top: 0;
+ right: 16px;
+ background-image: none;
+ height: 16px;
+ width: 16px;
+ margin: 3px 2px 2px 2px;
+}
+
+.status-bar-item.scripts-debugger-show-hide-button > .glyph {
+ background-color: rgba(0, 0, 0, 0.5);
+ -webkit-mask-position: 0 0;
+ -webkit-mask-image: url(Images/navigatorShowHideButton.png);
+}
+
+.status-bar-item.scripts-debugger-show-hide-button.toggled-shown > .glyph {
+ -webkit-mask-position: 0 -16px;
+}
+
+.status-bar-item.scripts-debugger-show-hide-button.toggled-hidden > .glyph {
+ -webkit-mask-position: -16px -16px;
+}