Web Inspector: Debugger sidebar header should say "Scripts" instead of "Breakpoints...
authorjonowells@apple.com <jonowells@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Mar 2015 23:52:13 +0000 (23:52 +0000)
committerjonowells@apple.com <jonowells@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Mar 2015 23:52:13 +0000 (23:52 +0000)
https://bugs.webkit.org/show_bug.cgi?id=142847

Reviewed by Timothy Hatcher.

Add a `paused` class on the debugger sidebar panel. Use that class to adjust the sidebar styles so that, when
the debugger is not paused: there is no header for the scripts section, there is no border beneath the scripts
section, and the scripts section cannot be collapsed (which could be done while the debugger is paused). The
header has changed to say "Scripts" instead of "Breakpoints" when it is showing.

* UserInterface/Views/DebuggerSidebarPanel.css:
(.sidebar > .panel.navigation.debugger .details-section.scripts):
(.sidebar > .panel.navigation.debugger .details-section.scripts .header):
(.sidebar > .panel.navigation.debugger .details-section.scripts.collapsed > .content):
(.sidebar > .panel.navigation.debugger.paused .details-section.scripts):
(.sidebar > .panel.navigation.debugger.paused .details-section.scripts .header):
(.sidebar > .panel.navigation.debugger.paused .details-section.scripts.collapsed > .content):
Adjust styles to hide header and border.

* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel):
(WebInspector.DebuggerSidebarPanel.prototype._debuggerDidPause):
(WebInspector.DebuggerSidebarPanel.prototype._debuggerDidResume):
Add a `paused` class to the debugger sidebar when it is paused.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@181768 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.css
Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.js

index f185255..5b385cb 100644 (file)
@@ -1,5 +1,32 @@
 2015-03-19  Jono Wells  <jonowells@apple.com>
 
+        Web Inspector: Debugger sidebar header should say "Scripts" instead of "Breakpoints", appear only on pause
+        https://bugs.webkit.org/show_bug.cgi?id=142847
+
+        Reviewed by Timothy Hatcher.
+
+        Add a `paused` class on the debugger sidebar panel. Use that class to adjust the sidebar styles so that, when
+        the debugger is not paused: there is no header for the scripts section, there is no border beneath the scripts
+        section, and the scripts section cannot be collapsed (which could be done while the debugger is paused). The
+        header has changed to say "Scripts" instead of "Breakpoints" when it is showing.
+
+        * UserInterface/Views/DebuggerSidebarPanel.css:
+        (.sidebar > .panel.navigation.debugger .details-section.scripts):
+        (.sidebar > .panel.navigation.debugger .details-section.scripts .header):
+        (.sidebar > .panel.navigation.debugger .details-section.scripts.collapsed > .content):
+        (.sidebar > .panel.navigation.debugger.paused .details-section.scripts):
+        (.sidebar > .panel.navigation.debugger.paused .details-section.scripts .header):
+        (.sidebar > .panel.navigation.debugger.paused .details-section.scripts.collapsed > .content):
+        Adjust styles to hide header and border.
+
+        * UserInterface/Views/DebuggerSidebarPanel.js:
+        (WebInspector.DebuggerSidebarPanel):
+        (WebInspector.DebuggerSidebarPanel.prototype._debuggerDidPause):
+        (WebInspector.DebuggerSidebarPanel.prototype._debuggerDidResume):
+        Add a `paused` class to the debugger sidebar when it is paused.
+
+2015-03-19  Jono Wells  <jonowells@apple.com>
+
         Web Inspector: FilterBar for debugger sidebar hides breakpoints for displayed resources
         https://bugs.webkit.org/show_bug.cgi?id=142777
 
index ad2a90f..0cec6d7 100644 (file)
@@ -41,3 +41,27 @@ body.mac-platform.legacy .sidebar > .panel.navigation.debugger > .content {
 .sidebar > .panel.navigation.debugger .details-section {
     font-size: 11px;
 }
+
+.sidebar > .panel.navigation.debugger .details-section.scripts {
+    border-bottom: none;
+}
+
+.sidebar > .panel.navigation.debugger .details-section.scripts .header {
+    display: none;
+}
+
+.sidebar > .panel.navigation.debugger .details-section.scripts.collapsed > .content {
+    display: block;
+}
+
+.sidebar > .panel.navigation.debugger.paused .details-section.scripts {
+    border-bottom: 1px solid rgb(179, 179, 179);
+}
+
+.sidebar > .panel.navigation.debugger.paused .details-section.scripts .header {
+    display: block;
+}
+
+.sidebar > .panel.navigation.debugger.paused .details-section.scripts.collapsed > .content {
+    display: none;
+}
index 28703c2..d8a149c 100644 (file)
@@ -124,7 +124,7 @@ WebInspector.DebuggerSidebarPanel = function()
     breakpointsRow.element.appendChild(this._breakpointsContentTreeOutline.element);
 
     var breakpointsGroup = new WebInspector.DetailsSectionGroup([breakpointsRow]);
-    var breakpointsSection = new WebInspector.DetailsSection("breakpoints", WebInspector.UIString("Breakpoints"), [breakpointsGroup]);
+    var breakpointsSection = new WebInspector.DetailsSection("scripts", WebInspector.UIString("Scripts"), [breakpointsGroup]);
     this.contentElement.appendChild(breakpointsSection.element);
 
     this._callStackContentTreeOutline = this.createContentTreeOutline(true);
@@ -148,6 +148,7 @@ WebInspector.DebuggerSidebarPanel = function()
 };
 
 WebInspector.DebuggerSidebarPanel.OffsetSectionsStyleClassName = "offset-sections";
+WebInspector.DebuggerSidebarPanel.DebuggerPausedStyleClassName = "paused";
 WebInspector.DebuggerSidebarPanel.ExceptionIconStyleClassName = "breakpoint-exception-icon";
 WebInspector.DebuggerSidebarPanel.PausedBreakpointIconStyleClassName = "breakpoint-paused-icon";
 WebInspector.DebuggerSidebarPanel.GlobalIconStyleClassName = "global-breakpoints-icon";
@@ -253,6 +254,8 @@ WebInspector.DebuggerSidebarPanel.prototype = {
         this._debuggerPauseResumeButtonItem.toggled = true;
         this._debuggerStepOverButtonItem.enabled = true;
         this._debuggerStepIntoButtonItem.enabled = true;
+
+        this.element.classList.add(WebInspector.DebuggerSidebarPanel.DebuggerPausedStyleClassName);
     },
 
     _debuggerDidResume: function(event)
@@ -265,6 +268,8 @@ WebInspector.DebuggerSidebarPanel.prototype = {
         this._debuggerStepOverButtonItem.enabled = false;
         this._debuggerStepIntoButtonItem.enabled = false;
         this._debuggerStepOutButtonItem.enabled = false;
+
+        this.element.classList.remove(WebInspector.DebuggerSidebarPanel.DebuggerPausedStyleClassName);
     },
 
     _breakpointsEnabledDidChange: function(event)