Title: [123770] trunk/Source/WebCore
Revision
123770
Author
[email protected]
Date
2012-07-26 10:55:35 -0700 (Thu, 26 Jul 2012)

Log Message

Web Inspector: simplify handling of status bar items
https://bugs.webkit.org/show_bug.cgi?id=92143

Reviewed by Pavel Feldman.

- split status bars into "global" (always in the bottom) and "panel"
    (on top of the drawer when drawer is shown)
- use "inner" status bar section in global status bar to display either
    panel status bar items or drawer view items (depending on drawer visibility)
- let panels/views manage their counters as part of their status bar
    items, not through special interface members;
- get rid of absolute positioning in the status bars where possible;

* inspector/front-end/AdvancedSearchController.js:
(WebInspector.SearchView.prototype.get statusBarItems):
* inspector/front-end/Drawer.js:
(WebInspector.Drawer):
(WebInspector.Drawer.prototype.show.animationFinished):
(WebInspector.Drawer.prototype.show):
(WebInspector.Drawer.prototype.hide.animationFinished):
(WebInspector.Drawer.prototype.hide):
(WebInspector.Drawer.prototype._startStatusBarDragging):
* inspector/front-end/Panel.js:
(WebInspector.Panel.prototype.wasShown):
* inspector/front-end/TimelinePanel.js:
(WebInspector.TimelinePanel.prototype.get statusBarItems):
(WebInspector.TimelinePanel.prototype.willHide):
* inspector/front-end/elementsPanel.css:
(.crumbs):
* inspector/front-end/inspector.css:
(#main):
(body.drawer-visible #main-panels):
(.status-bar):
(.status-bar-item):
(#panel-status-bar-placeholder):
(body.drawer-visible #panel-status-bar-placeholder):
(#panel-status-bar-resizer):
(#panel-status-bar):
(#panel-status-bar > div):
(#error-warning-count):
(#drawer):
(#drawer-contents):
(.status-bar-items):
(.drawer-header):
(#inner-status-bar):
(.search-status-bar-item):
(.search-status-bar-message):
(.search-status-bar-progress):
(body:not(.platform-mac) .search-status-bar-progress):
(body.platform-mac .search-status-bar-progress):
(.search-status-bar-stop-button-item):
(.search-status-bar-stop-button .glyph):
(.search-results-status-bar-message):
* inspector/front-end/inspector.html:
* inspector/front-end/inspector.js:
(WebInspector._createGlobalStatusBarItems):
(WebInspector.showViewInDrawer):
(WebInspector._closePreviousDrawerView):
* inspector/front-end/timelinePanel.css:
(.timeline-records-counter):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (123769 => 123770)


--- trunk/Source/WebCore/ChangeLog	2012-07-26 17:47:18 UTC (rev 123769)
+++ trunk/Source/WebCore/ChangeLog	2012-07-26 17:55:35 UTC (rev 123770)
@@ -1,3 +1,66 @@
+2012-07-25  Andrey Kosyakov  <[email protected]>
+
+        Web Inspector: simplify handling of status bar items
+        https://bugs.webkit.org/show_bug.cgi?id=92143
+
+        Reviewed by Pavel Feldman.
+
+        - split status bars into "global" (always in the bottom) and "panel"
+            (on top of the drawer when drawer is shown)
+        - use "inner" status bar section in global status bar to display either
+            panel status bar items or drawer view items (depending on drawer visibility)
+        - let panels/views manage their counters as part of their status bar
+            items, not through special interface members;
+        - get rid of absolute positioning in the status bars where possible;
+
+        * inspector/front-end/AdvancedSearchController.js:
+        (WebInspector.SearchView.prototype.get statusBarItems):
+        * inspector/front-end/Drawer.js:
+        (WebInspector.Drawer):
+        (WebInspector.Drawer.prototype.show.animationFinished):
+        (WebInspector.Drawer.prototype.show):
+        (WebInspector.Drawer.prototype.hide.animationFinished):
+        (WebInspector.Drawer.prototype.hide):
+        (WebInspector.Drawer.prototype._startStatusBarDragging):
+        * inspector/front-end/Panel.js:
+        (WebInspector.Panel.prototype.wasShown):
+        * inspector/front-end/TimelinePanel.js:
+        (WebInspector.TimelinePanel.prototype.get statusBarItems):
+        (WebInspector.TimelinePanel.prototype.willHide):
+        * inspector/front-end/elementsPanel.css:
+        (.crumbs):
+        * inspector/front-end/inspector.css:
+        (#main):
+        (body.drawer-visible #main-panels):
+        (.status-bar):
+        (.status-bar-item):
+        (#panel-status-bar-placeholder):
+        (body.drawer-visible #panel-status-bar-placeholder):
+        (#panel-status-bar-resizer):
+        (#panel-status-bar):
+        (#panel-status-bar > div):
+        (#error-warning-count):
+        (#drawer):
+        (#drawer-contents):
+        (.status-bar-items):
+        (.drawer-header):
+        (#inner-status-bar):
+        (.search-status-bar-item):
+        (.search-status-bar-message):
+        (.search-status-bar-progress):
+        (body:not(.platform-mac) .search-status-bar-progress):
+        (body.platform-mac .search-status-bar-progress):
+        (.search-status-bar-stop-button-item):
+        (.search-status-bar-stop-button .glyph):
+        (.search-results-status-bar-message):
+        * inspector/front-end/inspector.html:
+        * inspector/front-end/inspector.js:
+        (WebInspector._createGlobalStatusBarItems):
+        (WebInspector.showViewInDrawer):
+        (WebInspector._closePreviousDrawerView):
+        * inspector/front-end/timelinePanel.css:
+        (.timeline-records-counter):
+
 2012-07-26  Christophe Dumez  <[email protected]>
 
         [EFL][WK2] Implement Network Information provider

Modified: trunk/Source/WebCore/inspector/front-end/AdvancedSearchController.js (123769 => 123770)


--- trunk/Source/WebCore/inspector/front-end/AdvancedSearchController.js	2012-07-26 17:47:18 UTC (rev 123769)
+++ trunk/Source/WebCore/inspector/front-end/AdvancedSearchController.js	2012-07-26 17:55:35 UTC (rev 123770)
@@ -235,18 +235,10 @@
      */
     get statusBarItems()
     {
-        return [this._searchStatusBarElement];
+        return [this._searchStatusBarElement, this._searchResultsMessageElement];
     },
 
     /**
-     * @return {Element}
-     */
-    get counterElement()
-    {
-        return this._searchResultsMessageElement;
-    },
-
-    /**
      * @return {WebInspector.SearchConfig}
      */
     get searchConfig()

Modified: trunk/Source/WebCore/inspector/front-end/Drawer.js (123769 => 123770)


--- trunk/Source/WebCore/inspector/front-end/Drawer.js	2012-07-26 17:47:18 UTC (rev 123769)
+++ trunk/Source/WebCore/inspector/front-end/Drawer.js	2012-07-26 17:55:35 UTC (rev 123770)
@@ -36,23 +36,16 @@
     this._savedHeight = 200; // Default.
     this._mainElement = document.getElementById("main");
     this._toolbarElement = document.getElementById("toolbar");
-    this._mainStatusBar = document.getElementById("main-status-bar");
-    WebInspector.installDragHandle(this._mainStatusBar, this._startStatusBarDragging.bind(this), this._statusBarDragging.bind(this), this._endStatusBarDragging.bind(this), "row-resize");
 
-    this._counters = document.getElementById("counters");
+    this._floatingStatusBarContainer = document.getElementById("floating-status-bar-container");
+    WebInspector.installDragHandle(this._floatingStatusBarContainer, this._startStatusBarDragging.bind(this), this._statusBarDragging.bind(this), this._endStatusBarDragging.bind(this), "row-resize");
 
     this._drawerContentsElement = document.createElement("div");
     this._drawerContentsElement.id = "drawer-contents";
     this._drawerContentsElement.className = "drawer-contents";
     this.element.appendChild(this._drawerContentsElement);
-
-    this._drawerStatusBar = document.createElement("div");
-    this._drawerStatusBar.id = "drawer-status-bar";
-    this._drawerStatusBar.className = "status-bar";
-    this.element.appendChild(this._drawerStatusBar);
-
     this._viewStatusBar = document.createElement("div");
-    this._drawerStatusBar.appendChild(this._viewStatusBar);
+    this._bottomStatusBar = document.getElementById("bottom-status-bar-container");
 }
 
 WebInspector.Drawer.AnimationType = {
@@ -75,8 +68,6 @@
     show: function(view, animationType)
     {
         this.immediatelyFinishAnimation();
-        if (this._view && this._view.counterElement)
-            this._view.counterElement.parentNode.removeChild(this._view.counterElement);
 
         var drawerWasVisible = this.visible;
 
@@ -92,44 +83,29 @@
         for (var i = 0; i < statusBarItems.length; ++i)
             this._viewStatusBar.appendChild(statusBarItems[i]);
 
-        if (this._view.counterElement)
-            this._counters.insertBefore(this._view.counterElement, this._counters.firstChild);
-
         document.body.addStyleClass("drawer-visible");
+        this._floatingStatusBarContainer.insertBefore(document.getElementById("panel-status-bar"), this._floatingStatusBarContainer.firstElementChild);
+        this._bottomStatusBar.appendChild(this._viewStatusBar);
         this._view.markAsRoot();
         this._view.show(this._drawerContentsElement);
 
         if (drawerWasVisible)
             return;
         
-        var anchoredItems = document.getElementById("anchored-status-bar-items");
         var height = this._constrainHeight(this._savedHeight || this.element.offsetHeight);
         var animations = [
             {element: this.element, end: {height: height}},
             {element: this._mainElement, end: {bottom: height}},
-            {element: this._mainStatusBar, start: {"padding-left": anchoredItems.offsetWidth - 1}, end: {"padding-left": 0}},
+            {element: this._floatingStatusBarContainer, start: {"padding-left": this._bottomStatusBar.offsetLeft}, end: {"padding-left": 0}},
             {element: this._viewStatusBar, start: {opacity: 0}, end: {opacity: 1}}
         ];
 
-        this._drawerStatusBar.insertBefore(anchoredItems, this._drawerStatusBar.firstChild);
-
-        if (this._currentPanelCounters) {
-            var oldRight = this._drawerStatusBar.clientWidth - (this._counters.offsetLeft + this._currentPanelCounters.offsetWidth);
-            var newRight = WebInspector.Panel.counterRightMargin;
-            var rightPadding = (oldRight - newRight);
-            animations.push({element: this._currentPanelCounters, start: {"padding-right": rightPadding}, end: {"padding-right": 0}});
-            this._currentPanelCounters.parentNode.removeChild(this._currentPanelCounters);
-            this._mainStatusBar.appendChild(this._currentPanelCounters);
-        }
-        
         function animationFinished()
         {
             WebInspector.inspectorView.currentPanel().doResize();
             if (this._view && this._view.afterShow)
                 this._view.afterShow();
             delete this._currentAnimation;
-            if (this._currentPanelCounters)
-                this._currentPanelCounters.removeAttribute("style");
         }
 
         this._currentAnimation = WebInspector.animateStyle(animations, this._animationDuration(animationType), animationFinished.bind(this));
@@ -147,45 +123,26 @@
 
         WebInspector.restoreFocusFromElement(this.element);
 
-        var anchoredItems = document.getElementById("anchored-status-bar-items");
-
         // Temporarily set properties and classes to mimic the post-animation values so panels
         // like Elements in their updateStatusBarItems call will size things to fit the final location.
-        this._mainStatusBar.style.setProperty("padding-left", (anchoredItems.offsetWidth - 1) + "px");
         document.body.removeStyleClass("drawer-visible");
         WebInspector.inspectorView.currentPanel().statusBarResized();
         document.body.addStyleClass("drawer-visible");
 
         var animations = [
             {element: this._mainElement, end: {bottom: 0}},
-            {element: this._mainStatusBar, start: {"padding-left": 0}, end: {"padding-left": anchoredItems.offsetWidth - 1}},
+            {element: this.element, end: {height: 0}},
+            {element: this._floatingStatusBarContainer, start: {"padding-left": 0}, end: {"padding-left": this._bottomStatusBar.offsetLeft} },
             {element: this._viewStatusBar, start: {opacity: 1}, end: {opacity: 0}}
         ];
 
-        if (this._currentPanelCounters) {
-            var newRight = this._drawerStatusBar.clientWidth - this._counters.offsetLeft;
-            var oldRight = this._mainStatusBar.clientWidth - (this._currentPanelCounters.offsetLeft + this._currentPanelCounters.offsetWidth);
-            var rightPadding = (newRight - oldRight);
-            animations.push({element: this._currentPanelCounters, start: {"padding-right": 0}, end: {"padding-right": rightPadding}});
-        }
-
         function animationFinished()
         {
             WebInspector.inspectorView.currentPanel().doResize();
-            this._mainStatusBar.insertBefore(anchoredItems, this._mainStatusBar.firstChild);
-            this._mainStatusBar.style.removeProperty("padding-left");
-
-            if (this._view.counterElement)
-                this._view.counterElement.parentNode.removeChild(this._view.counterElement);
-
-            if (this._currentPanelCounters) {
-                this._currentPanelCounters.setAttribute("style", null);
-                this._currentPanelCounters.parentNode.removeChild(this._currentPanelCounters);
-                this._counters.insertBefore(this._currentPanelCounters, this._counters.firstChild);
-            }
-
             this._view.detach();
             delete this._view;
+            this._bottomStatusBar.removeChildren();
+            this._bottomStatusBar.appendChild(document.getElementById("panel-status-bar"));
             this._drawerContentsElement.removeChildren();
             document.body.removeStyleClass("drawer-visible");
             delete this._currentAnimation;
@@ -214,22 +171,6 @@
             this._currentAnimation.forceComplete();
     },
 
-    set currentPanelCounters(x)
-    {
-        if (!x) {
-            if (this._currentPanelCounters)
-                this._currentPanelCounters.parentElement.removeChild(this._currentPanelCounters);
-            delete this._currentPanelCounters;
-            return;
-        }
-
-        this._currentPanelCounters = x;
-        if (this.visible)
-            this._mainStatusBar.appendChild(x);
-        else
-            this._counters.insertBefore(x, this._counters.firstChild);
-    },
-
     _animationDuration: function(animationType)
     {
         switch (animationType) {
@@ -247,7 +188,7 @@
      */
     _startStatusBarDragging: function(event)
     {
-        if (!this.visible || event.target !== this._mainStatusBar)
+        if (!this.visible || event.target !== this._floatingStatusBarContainer)
             return false;
 
         this._view.storeScrollPositions();

Modified: trunk/Source/WebCore/inspector/front-end/Panel.js (123769 => 123770)


--- trunk/Source/WebCore/inspector/front-end/Panel.js	2012-07-26 17:47:18 UTC (rev 123769)
+++ trunk/Source/WebCore/inspector/front-end/Panel.js	2012-07-26 17:55:35 UTC (rev 123770)
@@ -73,7 +73,7 @@
             this._statusBarItemContainer = document.createElement("div");
             for (var i = 0; i < statusBarItems.length; ++i)
                 this._statusBarItemContainer.appendChild(statusBarItems[i]);
-            document.getElementById("main-status-bar").appendChild(this._statusBarItemContainer);
+            document.getElementById("panel-status-bar").appendChild(this._statusBarItemContainer);
         }
 
         if ("_toolbarItem" in this)

Modified: trunk/Source/WebCore/inspector/front-end/TimelinePanel.js (123769 => 123770)


--- trunk/Source/WebCore/inspector/front-end/TimelinePanel.js	2012-07-26 17:47:18 UTC (rev 123769)
+++ trunk/Source/WebCore/inspector/front-end/TimelinePanel.js	2012-07-26 17:55:35 UTC (rev 123770)
@@ -202,7 +202,14 @@
 
     get statusBarItems()
     {
-        var statusBarItems = [ this.toggleFilterButton.element, this.toggleTimelineButton.element, this.clearButton.element, this.garbageCollectButton.element, this._glueParentButton.element, this.statusBarFilters ];
+        var statusBarItems = [
+            this.toggleFilterButton.element,
+            this.toggleTimelineButton.element,
+            this.clearButton.element, this.garbageCollectButton.element,
+            this._glueParentButton.element,
+            this.statusBarFilters,
+            this.recordsCounter
+        ];
 
         return statusBarItems;
     },
@@ -592,13 +599,11 @@
         }
         this._overviewPane.setMode(this._overviewModeSetting.get());
         this._refresh();
-        WebInspector.drawer.currentPanelCounters = this.recordsCounter;
     },
 
     willHide: function()
     {
         this._closeRecordDetails();
-        WebInspector.drawer.currentPanelCounters = null;
         WebInspector.Panel.prototype.willHide.call(this);
     },
 

Modified: trunk/Source/WebCore/inspector/front-end/elementsPanel.css (123769 => 123770)


--- trunk/Source/WebCore/inspector/front-end/elementsPanel.css	2012-07-26 17:47:18 UTC (rev 123769)
+++ trunk/Source/WebCore/inspector/front-end/elementsPanel.css	2012-07-26 17:55:35 UTC (rev 123770)
@@ -61,6 +61,8 @@
 
 .crumbs {
     display: inline-block;
+    pointer-events: auto;
+    cursor: default;
     font-size: 11px;
     line-height: 19px;
     text-shadow: rgba(255, 255, 255, 0.75) 0 1px 0;

Modified: trunk/Source/WebCore/inspector/front-end/inspector.css (123769 => 123770)


--- trunk/Source/WebCore/inspector/front-end/inspector.css	2012-07-26 17:47:18 UTC (rev 123769)
+++ trunk/Source/WebCore/inspector/front-end/inspector.css	2012-07-26 17:55:35 UTC (rev 123770)
@@ -500,6 +500,10 @@
     overflow: hidden;
 }
 
+body.drawer-visible #main-panels {
+    bottom: 24px;
+}
+
 #main-status-bar {
     position: absolute;
     bottom: 0;
@@ -507,27 +511,6 @@
     right: 0;
 }
 
-body.drawer-visible #main-status-bar {
-    height: 24px;
-    border-bottom: 1px solid rgb(202, 202, 202);
-    cursor: ns-resize;
-}
-
-body.drawer-visible #main-status-bar::after {
-    position: absolute;
-    right: 0;
-    top: 5px;
-    content: url(Images/statusbarResizerVertical.png);
-}
-
-body.drawer-visible #main-status-bar * {
-    cursor: default;
-}
-
-body.drawer-visible #main-panels {
-    bottom: 24px;
-}
-
 .status-bar {
     white-space: nowrap;
     height: 23px;
@@ -535,6 +518,7 @@
     z-index: 12;
     background-image: -webkit-linear-gradient(rgb(253,253,253), rgb(230,230,230) 75%, rgb(230,230,230));
     border-top: 1px solid rgb(202, 202, 202);
+    display: -webkit-flex;
 }
 
 .status-bar > div {
@@ -545,6 +529,9 @@
 
 .status-bar-item {
     display: inline-block;
+    pointer-events: auto;
+    cursor: default;
+    -webkit-flex: 0;
     height: 24px;
     padding: 0;
     margin-left: -1px;
@@ -554,6 +541,37 @@
     background-color: transparent;
 }
 
+#floating-status-bar-container {
+    position: absolute;
+    left: 0;
+    right: 0;
+    bottom: 0;
+    display: none;
+    border-bottom: 1px solid rgb(202, 202, 202);
+    cursor: ns-resize;
+    height: 24px;
+}
+
+body.drawer-visible #floating-status-bar-container {
+    display: -webkit-flex;
+}
+
+#floating-status-bar-resizer {
+    content: url(Images/statusbarResizerVertical.png);
+    margin-top: 7px;
+    pointer-events: none;
+}
+
+#panel-status-bar {
+    -webkit-flex: 1 0;
+    display: -webkit-flex;
+    pointer-events: none;
+}
+
+#panel-status-bar > div {
+    width: 100%;
+}
+
 .status-bar-item:active {
     position: relative;
     z-index: 200;
@@ -673,11 +691,6 @@
     background-color: rgba(0, 0, 0, 0.75);
 }
 
-button.settings-status-bar-item {
-    position: absolute;
-    right: 0;
-}
-
 body.detached .alternate-status-bar-buttons-bar {
     margin-left: 1px;
 }
@@ -702,6 +715,11 @@
     border-bottom: 1px solid transparent;
 }
 
+button.status-bar-item.settings-status-bar-item,
+button.status-bar-item.settings-status-bar-item:active {
+    border-right: 0 transparent none;
+}
+
 .settings-status-bar-item .glyph {
     -webkit-mask-position: -160px -24px;
 }
@@ -718,20 +736,13 @@
     -webkit-mask-position: -64px 0;
 }
 
-#counters {
-    position: absolute;
-    right: 32px;
-    top: 0;
-    cursor: pointer;
+#error-warning-count {
     padding: 6px 2px 6px 0px;
     font-size: 10px;
     height: 19px;
+    cursor: pointer;
 }
 
-#error-warning-count {
-    display: inline;
-}
-
 #error-warning-count:hover {
     border-bottom: 1px solid rgb(96, 96, 96);
 }
@@ -764,11 +775,9 @@
     right: 0;
     height: 200px;
     background-color: white;
-    background-repeat: repeat-x;
-    background-position: bottom;
 }
 
-body.drawer-visible #drawer-contents {
+#drawer-contents {
     position: absolute;
     top: 0;
     bottom: 24px;
@@ -780,13 +789,6 @@
     display: block;
 }
 
-#drawer-status-bar {
-    position: absolute;
-    bottom: 0;
-    left: 0;
-    right: 0;
-}
-
 body.platform-mac .monospace, body.platform-mac .source-code {
     font-family: Monaco, monospace;
 }
@@ -2538,6 +2540,7 @@
     border-right: 1px solid rgb(197, 197, 197);
     line-height: 23px;
     padding-left: 6px;
+    display: inline-block;
 }
 
 .drawer-header-close-button {
@@ -2558,48 +2561,55 @@
     opacity: 0.7;
 }
 
-#drawer-status-bar .search-status-bar-item {
+#bottom-status-bar-container {
+    -webkit-flex: 1 0;
+}
+
+.search-status-bar-item {
+    display: inline-block;
     cursor: pointer;
     font-size: 11px;
     height: 23px;
 }
 
-#drawer-status-bar .search-status-bar-message {
+.search-status-bar-message {
     margin-left:5px;
     margin-right:5px;
-    margin-top:6px;
+    margin-top:5px;
     float:left;
 }
 
-#drawer-status-bar .search-status-bar-progress {
+.search-status-bar-progress {
     height: 11px;
     width: 100px;
     float: left;
 }
 
-body:not(.platform-mac) #drawer-status-bar .search-status-bar-progress {
-    margin-top: 8px;
+body:not(.platform-mac) .search-status-bar-progress {
+    margin-top: 7px;
 }
 
-body.platform-mac #drawer-status-bar .search-status-bar-progress {
-    margin-top: 7px;
+body.platform-mac .search-status-bar-progress {
+    margin-top: 6px;
 }
 
-#drawer-status-bar .search-status-bar-stop-button-item {
+.search-status-bar-stop-button-item {
     width: 19px;
     height: 24px;
     overflow: hidden;
 }
 
-#drawer-status-bar .search-status-bar-stop-button .glyph {
+.search-status-bar-stop-button .glyph {
     -webkit-mask-position: -96px -48px;
     background-color: rgb(216, 0, 0) !important;
 }
 
-#drawer-status-bar .search-results-status-bar-message {
+.search-results-status-bar-message {
     margin-right: 10px;
     cursor: default;
     font-size: 11px;
+    float: right;
+    margin-top: 5px;
 }
 
 .search-view .search-results {

Modified: trunk/Source/WebCore/inspector/front-end/inspector.html (123769 => 123770)


--- trunk/Source/WebCore/inspector/front-end/inspector.html	2012-07-26 17:47:18 UTC (rev 123769)
+++ trunk/Source/WebCore/inspector/front-end/inspector.html	2012-07-26 17:55:35 UTC (rev 123770)
@@ -233,8 +233,14 @@
         </div>
     </div>
     <div id="main">
-        <div id="main-status-bar" class="status-bar"><div id="anchored-status-bar-items"><div id="counters"><div id="error-warning-count" class="hidden"></div></div></div></div>
+        <div id="floating-status-bar-container" class="status-bar"><div id="floating-status-bar-resizer"></div></div>
     </div>
     <div id="drawer"></div>
+    <div id="main-status-bar" class="status-bar">
+        <div id="bottom-status-bar-container">
+            <div id="panel-status-bar"></div>
+        </div>
+        <div id="error-warning-count" class="hidden"></div>
+    </div>
 </body>
 </html>

Modified: trunk/Source/WebCore/inspector/front-end/inspector.js (123769 => 123770)


--- trunk/Source/WebCore/inspector/front-end/inspector.js	2012-07-26 17:47:18 UTC (rev 123769)
+++ trunk/Source/WebCore/inspector/front-end/inspector.js	2012-07-26 17:55:35 UTC (rev 123770)
@@ -70,21 +70,22 @@
 
     _createGlobalStatusBarItems: function()
     {
+        var bottomStatusBarContainer = document.getElementById("bottom-status-bar-container");
         this._dockToggleButton = new WebInspector.StatusBarButton("", "dock-status-bar-item", 3);
         this._dockToggleButton.makeLongClickEnabled(this._createDockOptions.bind(this));
         this._dockToggleButton.addEventListener("click", this._toggleAttach.bind(this), false);
         this._updateDockButtonState();
 
-        var anchoredStatusBar = document.getElementById("anchored-status-bar-items");
-        anchoredStatusBar.appendChild(this._dockToggleButton.element);
+        var mainStatusBar = document.getElementById("main-status-bar");
+        mainStatusBar.insertBefore(this._dockToggleButton.element, bottomStatusBarContainer);
 
         this._toggleConsoleButton = new WebInspector.StatusBarButton(WebInspector.UIString("Show console."), "console-status-bar-item");
         this._toggleConsoleButton.addEventListener("click", this._toggleConsoleButtonClicked.bind(this), false);
-        anchoredStatusBar.appendChild(this._toggleConsoleButton.element);
+        mainStatusBar.insertBefore(this._toggleConsoleButton.element, bottomStatusBarContainer);
 
         if (this.panels.elements)
-            anchoredStatusBar.appendChild(this.panels.elements.nodeSearchButton.element);
-        anchoredStatusBar.appendChild(this.settingsController.statusBarItem);
+            mainStatusBar.insertBefore(this.panels.elements.nodeSearchButton.element, bottomStatusBarContainer);
+        mainStatusBar.appendChild(this.settingsController.statusBarItem);
     },
 
     _createDockOptions: function()
@@ -180,21 +181,16 @@
         this._closePreviousDrawerView();
 
         var drawerStatusBarHeader = document.createElement("div");
-        drawerStatusBarHeader.className = "drawer-header";
+        drawerStatusBarHeader.className = "drawer-header status-bar-item";
         drawerStatusBarHeader.appendChild(statusBarElement);
         drawerStatusBarHeader._onclose_ = onclose;
 
         var closeButton = drawerStatusBarHeader.createChild("span");
         closeButton.textContent = WebInspector.UIString("\u00D7");
         closeButton.addStyleClass("drawer-header-close-button");
-        closeButton.addEventListener("click", closeButtonPressed.bind(this), false);
+        closeButton.addEventListener("click", this.closeViewInDrawer.bind(this), false);
 
-        function closeButtonPressed(event)
-        {
-            this.closeViewInDrawer();
-        }
-
-        document.getElementById("main-status-bar").appendChild(drawerStatusBarHeader);
+        document.getElementById("panel-status-bar").firstElementChild.appendChild(drawerStatusBarHeader);
         this._drawerStatusBarHeader = drawerStatusBarHeader;
         this.drawer.show(view, WebInspector.Drawer.AnimationType.Immediately);
     },
@@ -215,7 +211,7 @@
     _closePreviousDrawerView: function()
     {
         if (this._drawerStatusBarHeader) {
-            document.getElementById("main-status-bar").removeChild(this._drawerStatusBarHeader);
+            this._drawerStatusBarHeader.parentElement.removeChild(this._drawerStatusBarHeader);
             if (this._drawerStatusBarHeader.onclose)
                 this._drawerStatusBarHeader.onclose();
             delete this._drawerStatusBarHeader;

Modified: trunk/Source/WebCore/inspector/front-end/timelinePanel.css (123769 => 123770)


--- trunk/Source/WebCore/inspector/front-end/timelinePanel.css	2012-07-26 17:47:18 UTC (rev 123769)
+++ trunk/Source/WebCore/inspector/front-end/timelinePanel.css	2012-07-26 17:55:35 UTC (rev 123770)
@@ -423,17 +423,12 @@
     text-shadow: white 0 1px 0;
 }
 
-#main-status-bar > .timeline-records-counter {
+.timeline-records-counter {
     float: right;
-    margin-top: 4px;
-    margin-right: 25px;
+    margin-top: 5px;
+    margin-right: 6px;
 }
 
-#counters > .timeline-records-counter {
-    float: left;
-    margin-top: -1px;
-}
-
 #resources-container-content {
     overflow: visible;
     min-height: 100%;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to