Changeset 51952 in webkit


Ignore:
Timestamp:
Dec 10, 2009 10:58:39 AM (14 years ago)
Author:
bweinstein@apple.com
Message:

Fixes <http://webkit.org/b/31738>.
Web Inspector: Console Scope Bar should be on top of console when Console is a Panel.

Reviewed by Pavel Feldman.

When the console is set to be shown as a full panel, move the scope bar to the top
where it looks best. When it is only shown as a drawer, move it to the bottom, where
it originally was. This takes up less space as a drawer, and makes it more discoverable
and usable when it is the full panel.

  • inspector/front-end/ConsolePanel.js:

(WebInspector.ConsolePanel.prototype.show): Move filter bar to top.
(WebInspector.ConsolePanel.prototype.hide): Move filter bar back to bottom.

  • inspector/front-end/inspector.css:
Location:
trunk/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r51950 r51952  
     12009-12-09  Brian Weinstein  <bweinstein@apple.com>
     2
     3        Reviewed by Pavel Feldman.
     4
     5        Fixes <http://webkit.org/b/31738>.
     6        Web Inspector: Console Scope Bar should be on top of console when Console is a Panel.
     7       
     8        When the console is set to be shown as a full panel, move the scope bar to the top
     9        where it looks best. When it is only shown as a drawer, move it to the bottom, where
     10        it originally was. This takes up less space as a drawer, and makes it more discoverable
     11        and usable when it is the full panel.
     12
     13        * inspector/front-end/ConsolePanel.js:
     14        (WebInspector.ConsolePanel.prototype.show): Move filter bar to top.
     15        (WebInspector.ConsolePanel.prototype.hide): Move filter bar back to bottom.
     16        * inspector/front-end/inspector.css:
     17
    1182009-12-10  Stephen White  <senorblanco@chromium.org>
    219
  • trunk/WebCore/inspector/front-end/ConsolePanel.js

    r51245 r51952  
    4747        WebInspector.drawer.enterPanelMode();
    4848        WebInspector.showConsole();
     49       
     50        // Move the scope bar to the top of the messages, like the resources filter.
     51        var scopeBar = document.getElementById("console-filter");
     52        var consoleMessages = document.getElementById("console-messages");
     53
     54        scopeBar.parentNode.removeChild(scopeBar);
     55        document.getElementById("console-view").insertBefore(scopeBar, consoleMessages);
     56       
     57        // Update styles, and give console-messages a top margin so it doesn't overwrite the scope bar.
     58        scopeBar.addStyleClass("console-filter-top");
     59        scopeBar.removeStyleClass("status-bar-item");
     60
     61        consoleMessages.addStyleClass("console-filter-top");
    4962    },
    5063
     
    5871            WebInspector.drawer.exitPanelMode();
    5972        delete this._previousConsoleState;
     73       
     74        // Move the scope bar back to the bottom bar, next to Clear Console.
     75        var scopeBar = document.getElementById("console-filter");
     76
     77        scopeBar.parentNode.removeChild(scopeBar);
     78        document.getElementById("other-drawer-status-bar-items").appendChild(scopeBar);
     79       
     80        // Update styles, and remove the top margin on console-messages.
     81        scopeBar.removeStyleClass("console-filter-top");
     82        scopeBar.addStyleClass("status-bar-item");
     83
     84        document.getElementById("console-messages").removeStyleClass("console-filter-top");
    6085    }
    6186}
  • trunk/WebCore/inspector/front-end/inspector.css

    r51339 r51952  
    24192419}
    24202420
    2421 #resources-filter {
     2421#resources-filter, #console-filter.console-filter-top {
    24222422    background: -webkit-gradient(linear, left top, left bottom, from(rgb(236, 236, 236)), to(rgb(217, 217, 217)));
    24232423    border-bottom: 1px solid rgb(64%, 64%, 64%);
     2424    width: 100%;
     2425}
     2426
     2427#console-messages.console-filter-top {
     2428    margin-top: 23px;
    24242429}
    24252430
Note: See TracChangeset for help on using the changeset viewer.