Adds info text to panes and sections in the Inspector's sidebars
authortimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 May 2008 22:30:59 +0000 (22:30 +0000)
committertimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 May 2008 22:30:59 +0000 (22:30 +0000)
that would normally be empty. These help the user know why there
is nothing in these sections.

Reviewed by John Sullivan.

* English.lproj/localizedStrings.js: Add strings.
* page/inspector/BreakpointsSidebarPane.js: Adds "No Breakpoints".
* page/inspector/CallStackSidebarPane.js: Adds "Not Paused".
* page/inspector/ObjectPropertiesSection.js: Adds "No Properties".
* page/inspector/ScopeChainSidebarPane.js: Adds "Not Paused".
* page/inspector/inspector.css: Adds style rules for the info elements.

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

WebCore/ChangeLog
WebCore/English.lproj/localizedStrings.js
WebCore/page/inspector/BreakpointsSidebarPane.js
WebCore/page/inspector/CallStackSidebarPane.js
WebCore/page/inspector/ObjectPropertiesSection.js
WebCore/page/inspector/ScopeChainSidebarPane.js
WebCore/page/inspector/inspector.css

index 23f9afd..010950a 100644 (file)
@@ -1,5 +1,20 @@
 2008-05-13  Timothy Hatcher  <timothy@apple.com>
 
+        Adds info text to panes and sections in the Inspector's sidebars
+        that would normally be empty. These help the user know why there
+        is nothing in these sections.
+
+        Reviewed by John Sullivan.
+
+        * English.lproj/localizedStrings.js: Add strings.
+        * page/inspector/BreakpointsSidebarPane.js: Adds "No Breakpoints".
+        * page/inspector/CallStackSidebarPane.js: Adds "Not Paused".
+        * page/inspector/ObjectPropertiesSection.js: Adds "No Properties".
+        * page/inspector/ScopeChainSidebarPane.js: Adds "Not Paused".
+        * page/inspector/inspector.css: Adds style rules for the info elements.
+
+2008-05-13  Timothy Hatcher  <timothy@apple.com>
+
         Implements the rest of the Scripts panel to get the debugger
         mostly working. "Basic debugging seems to work."
 
index 8eaac1a..20ee659 100644 (file)
Binary files a/WebCore/English.lproj/localizedStrings.js and b/WebCore/English.lproj/localizedStrings.js differ
index 1989c8b..69eaf4b 100644 (file)
@@ -28,6 +28,12 @@ WebInspector.BreakpointsSidebarPane = function()
     WebInspector.SidebarPane.call(this, WebInspector.UIString("Breakpoints"));
 
     this.breakpoints = [];
+
+    this.emptyElement = document.createElement("div");
+    this.emptyElement.className = "info";
+    this.emptyElement.textContent = WebInspector.UIString("No Breakpoints");
+
+    this.bodyElement.appendChild(this.emptyElement);
 }
 
 WebInspector.BreakpointsSidebarPane.prototype = {
index abb1c1b..6187620 100644 (file)
@@ -36,8 +36,13 @@ WebInspector.CallStackSidebarPane.prototype = {
         this.placards = [];
         delete this._selectedCallFrame;
 
-        if (!callFrame)
+        if (!callFrame) {
+            var infoElement = document.createElement("div");
+            infoElement.className = "info";
+            infoElement.textContent = WebInspector.UIString("Not Paused");
+            this.bodyElement.appendChild(infoElement);
             return;
+        }
 
         do {
             var title = callFrame.functionName;
index c466779..0791050 100644 (file)
@@ -49,6 +49,12 @@ WebInspector.ObjectPropertiesSection.prototype = {
                 continue;
             this.propertiesTreeOutline.appendChild(new WebInspector.ObjectPropertyTreeElement(this.object, propertyName));
         }
+
+        if (!this.propertiesTreeOutline.children.length) {
+            var title = "<div class=\"info\">" + WebInspector.UIString("No Properties") + "</div>";
+            var infoElement = new TreeElement(title, null, false);
+            this.propertiesTreeOutline.appendChild(infoElement);
+        }
     }
 }
 
index 8542ab8..bd8c143 100644 (file)
@@ -35,8 +35,13 @@ WebInspector.ScopeChainSidebarPane.prototype = {
 
         this.sections = [];
 
-        if (!callFrame)
+        if (!callFrame) {
+            var infoElement = document.createElement("div");
+            infoElement.className = "info";
+            infoElement.textContent = WebInspector.UIString("Not Paused");
+            this.bodyElement.appendChild(infoElement);
             return;
+        }
 
         var foundLocalScope = false;
         var scopeChain = callFrame.scopeChain;
index de8f1ba..b8995bc 100644 (file)
@@ -1005,6 +1005,11 @@ body.inactive .placard.selected {
     margin-top: 1px;
 }
 
+.section .properties li .info {
+    padding-top: 4px;
+    padding-bottom: 3px;
+}
+
 .editing {
     -webkit-user-select: text;
     -webkit-box-shadow: rgba(0, 0, 0, .5) 3px 3px 4px;
@@ -1124,6 +1129,14 @@ body.inactive .placard.selected {
     overflow-x: hidden;
 }
 
+.pane > .body .info {
+    text-align: center;
+    font-style: italic;
+    font-size: 10px;
+    padding: 6px;
+    color: gray;
+}
+
 .pane.expanded > .body, .pane.expanded > .growbar {
     display: block;
 }