Changeset 52629 in webkit


Ignore:
Timestamp:
Dec 29, 2009 11:55:59 AM (14 years ago)
Author:
eric@webkit.org
Message:

2009-12-29 Alexander Pavlov <apavlov@chromium.org>

Reviewed by Pavel Feldman.

Fix UI nits in the Audits panel.
https://bugs.webkit.org/show_bug.cgi?id=32932

  • inspector/front-end/AuditLauncherView.js: (WebInspector.AuditLauncherView.prototype._selectAllClicked): (WebInspector.AuditLauncherView.prototype._createCategoryElement): (WebInspector.AuditLauncherView.prototype._createLauncherUI.handleSelectAllClick): (WebInspector.AuditLauncherView.prototype._createLauncherUI):
  • inspector/front-end/AuditResultView.js: (WebInspector.AuditResultView): (WebInspector.AuditRuleResultPane):
  • inspector/front-end/audits.css:
Location:
trunk/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r52627 r52629  
     12009-12-29  Alexander Pavlov  <apavlov@chromium.org>
     2
     3        Reviewed by Pavel Feldman.
     4
     5        Fix UI nits in the Audits panel.
     6        https://bugs.webkit.org/show_bug.cgi?id=32932
     7
     8        * inspector/front-end/AuditLauncherView.js:
     9        (WebInspector.AuditLauncherView.prototype._selectAllClicked):
     10        (WebInspector.AuditLauncherView.prototype._createCategoryElement):
     11        (WebInspector.AuditLauncherView.prototype._createLauncherUI.handleSelectAllClick):
     12        (WebInspector.AuditLauncherView.prototype._createLauncherUI):
     13        * inspector/front-end/AuditResultView.js:
     14        (WebInspector.AuditResultView):
     15        (WebInspector.AuditRuleResultPane):
     16        * inspector/front-end/audits.css:
     17
    1182009-12-29  Johnny Ding  <jnd@chromium.org>
    219
  • trunk/WebCore/inspector/front-end/AuditLauncherView.js

    r52558 r52629  
    104104    },
    105105
    106     _selectAllClicked: function(event)
    107     {
    108         var shouldCheckCategoriesOn = event.target.checked;
     106    _selectAllClicked: function(checkCategories)
     107    {
    109108        var childNodes = this._categoriesElement.childNodes;
    110109        for (var i = 0, length = childNodes.length; i < length; ++i)
    111             childNodes[i].firstChild.checked = shouldCheckCategoriesOn;
    112         this._currentCategoriesCount = shouldCheckCategoriesOn ? this._totalCategoriesCount : 0;
     110            childNodes[i].firstChild.checked = checkCategories;
     111        this._currentCategoriesCount = checkCategories ? this._totalCategoriesCount : 0;
    113112        this._updateButton();
    114113    },
     
    130129        element.type = "checkbox";
    131130        labelElement.appendChild(element);
    132 
    133131        labelElement.appendChild(document.createTextNode(title));
    134132
     
    142140        this._contentElement.appendChild(this._headerElement);
    143141
     142        function handleSelectAllClick(event)
     143        {
     144            this._selectAllClicked(event.target.checked);
     145        }
    144146        var categoryElement = this._createCategoryElement(WebInspector.UIString("Select All"), "");
    145147        categoryElement.id = "audit-launcher-selectall";
    146148        this._selectAllCheckboxElement = categoryElement.firstChild;
    147         this._selectAllCheckboxElement.addEventListener("click", this._selectAllClicked.bind(this), false);
     149        this._selectAllCheckboxElement.checked = true;
     150        this._selectAllCheckboxElement.addEventListener("click", handleSelectAllClick.bind(this), false);
    148151        this._contentElement.appendChild(categoryElement);
    149152
     
    192195        this._contentElement.appendChild(this._buttonContainerElement);
    193196
     197        this._selectAllClicked(this._selectAllCheckboxElement.checked);
    194198        this.updateResourceTrackingState();
    195199        this._updateButton();
  • trunk/WebCore/inspector/front-end/AuditResultView.js

    r52558 r52629  
    3333    WebInspector.View.call(this);
    3434
    35     this.element.addStyleClass("audit-result-view");
    36 
    37     this.resultBarElement = document.createElement("div");
    38     this.resultBarElement.id = "audit-resultbar";
    39     this.element.appendChild(this.resultBarElement);
     35    this.element.id = "audit-result-view";
    4036
    4137    function entrySortFunction(a, b)
     
    5147        if (entries) {
    5248            entries.sort(entrySortFunction);
    53             this.resultBarElement.appendChild(new WebInspector.AuditCategoryResultPane(categoryResults[i]).element);
     49            this.element.appendChild(new WebInspector.AuditCategoryResultPane(categoryResults[i]).element);
    5450        }
    5551    }
     
    8076    for (var i = 0; i < ruleResult.children.length; ++i) {
    8177        var section = new WebInspector.AuditRuleResultChildSection(ruleResult.children[i]);
    82         section.expand();
    8378        this.bodyElement.appendChild(section.element);
    8479    }
  • trunk/WebCore/inspector/front-end/audits.css

    r52558 r52629  
    5151}
    5252
    53 .audit-result-view {
     53#audit-result-view {
    5454    display: none;
    5555    overflow: auto;
     
    5959    right: 0;
    6060    bottom: 0;
    61 }
    62 
    63 .audit-result-view.visible {
    64     display: block;
    65 }
    66 
    67 #audit-resultbar {
    68     position: absolute;
    69     top: 0;
    70     right: 0;
    71     bottom: 0;
    72     width: 100%;
    7361    background-color: rgb(245, 245, 245);
    74     border-left: 1px solid rgb(64%, 64%, 64%);
    7562    cursor: default;
    7663    overflow: auto;
    7764}
    7865
    79 #audit-resultbar > .pane img.score {
     66#audit-result-view.visible {
     67    display: block;
     68}
     69
     70#audit-result-view > .pane img.score {
    8071    float: left;
    8172    margin-top: 2px;
     
    8677}
    8778
    88 #audit-resultbar > .pane img.score.red {
     79#audit-result-view > .pane img.score.red {
    8980    content: url(Images/errorRedDot.png);
    9081}
    9182
    92 #audit-resultbar > .pane img.score.green {
     83#audit-result-view > .pane img.score.green {
    9384    content: url(Images/successGreenDot.png);
    9485}
    9586
    96 #audit-resultbar > .pane > .body > .pane:nth-of-type(2n) {
    97     background-color: rgba(0, 0, 0, 0.05);
    98 }
    99 
    100 #audit-resultbar > .pane > .body > .pane > .title {
     87#audit-result-view > .pane.expanded:nth-last-of-type(1) {
     88    border-bottom: 1px solid rgb(189, 189, 189) !important;
     89}
     90
     91#audit-result-view .pane.expanded:nth-last-of-type(1) {
     92    border-bottom: 0px transparent none;
     93}
     94
     95#audit-result-view > .pane > .body > .pane > .title {
    10196    padding-left: 16px;
    10297    background-image: none;
     
    10499}
    105100
    106 #audit-resultbar > .pane > .body > .pane > .body {
     101#audit-result-view > .pane > .body > .pane > .body {
    107102    background-color: transparent;
    108103}
    109104
    110 #audit-resultbar > .pane > .body > .pane .section {
     105#audit-result-view > .pane > .body > .pane .section {
    111106    margin-left: 16px;
    112107}
    113108
    114 #audit-resultbar .section .header {
     109#audit-result-view .section .header {
    115110    border: 0;
    116111    background-image: none;
     
    118113}
    119114
    120 #audit-resultbar .section .header > .title {
     115#audit-result-view .section .header > .title {
    121116    color: rgb(0, 0, 0);
    122117}
    123118
    124 #audit-resultbar .section .section-content {
     119#audit-result-view .section .section-content {
    125120    width: 100%;
    126121    padding-left: 18px;
     
    128123}
    129124
    130 #audit-resultbar .section.expanded .section-content {
    131     display: block;
    132 }
    133 
    134 #audit-resultbar .section.expanded .section-content > p:nth-of-type(1) {
     125#audit-result-view .section.expanded .section-content {
     126    display: block;
     127}
     128
     129#audit-result-view .section.expanded .section-content > p:nth-of-type(1) {
    135130    margin-top: 0;
    136131}
    137132
    138 #audit-resultbar .section.expanded .section-content > p:nth-of-type(1) > *:nth-child(1) {
     133#audit-result-view .section.expanded .section-content > p:nth-of-type(1) > *:nth-child(1) {
    139134    margin-top: 0;
    140135}
    141136
    142 #audit-resultbar .section .header::before {
     137#audit-result-view .section .header::before {
    143138    content: url(Images/treeRightTriangleBlack.png);
    144139}
    145140
    146 #audit-resultbar .section.expanded .header::before {
     141#audit-result-view .section.expanded .header::before {
    147142    content: url(Images/treeDownTriangleBlack.png);
    148143}
Note: See TracChangeset for help on using the changeset viewer.