Changeset 84614 in webkit


Ignore:
Timestamp:
Apr 22, 2011 3:04:50 AM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2011-04-22 Annie Sullivan <sullivan@chromium.org>

Reviewed by Pavel Feldman.

Web Inspector: Timeline is too narrow
https://bugs.webkit.org/show_bug.cgi?id=58399

Changed Network Panel widths so that Timeline is 50%.
Added titles to the values in the other columns, so that a tooltip will show the value if the column is too narrow.

  • inspector/front-end/NetworkPanel.js: (WebInspector.NetworkPanel.prototype._createTable): Changed column widths. (WebInspector.NetworkPanel.prototype._toggleGridMode): Changed column widths. (WebInspector.NetworkDataGridNode.prototype.refreshResource): Added titles to column values. (WebInspector.NetworkDataGridNode.prototype._refreshStatusCell): Ditto (WebInspector.NetworkDataGridNode.prototype._refreshSizeCell): Ditto (WebInspector.NetworkDataGridNode.prototype._refreshTimeCell): Ditto
  • inspector/front-end/utilities.js: (Element.prototype.setTextAndTitle): Added new method to set the textContent and title of an Element at the same time, so that it can have a tooltip.
Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r84611 r84614  
     12011-04-22  Annie Sullivan  <sullivan@chromium.org>
     2
     3        Reviewed by Pavel Feldman.
     4
     5        Web Inspector: Timeline is too narrow
     6        https://bugs.webkit.org/show_bug.cgi?id=58399
     7
     8        Changed Network Panel widths so that Timeline is 50%.
     9        Added titles to the values in the other columns, so that a tooltip will show the value if the column is too narrow.
     10
     11        * inspector/front-end/NetworkPanel.js:
     12        (WebInspector.NetworkPanel.prototype._createTable):  Changed column widths.
     13        (WebInspector.NetworkPanel.prototype._toggleGridMode): Changed column widths.
     14        (WebInspector.NetworkDataGridNode.prototype.refreshResource): Added titles to column values.
     15        (WebInspector.NetworkDataGridNode.prototype._refreshStatusCell): Ditto
     16        (WebInspector.NetworkDataGridNode.prototype._refreshSizeCell): Ditto
     17        (WebInspector.NetworkDataGridNode.prototype._refreshTimeCell): Ditto
     18        * inspector/front-end/utilities.js:
     19        (Element.prototype.setTextAndTitle): Added new method to set the textContent and title of an Element at the same time, so that it can have a tooltip.
     20
    1212011-04-22  Dan Bernstein  <mitz@apple.com>
    222
  • trunk/Source/WebCore/inspector/front-end/NetworkPanel.js

    r84492 r84614  
    157157        columns.method.title = WebInspector.UIString("Method");
    158158        columns.method.sortable = true;
    159         columns.method.width = "7%";
     159        columns.method.width = "6%";
    160160
    161161        columns.status.titleDOMFragment = this._makeHeaderFragment(WebInspector.UIString("Status"), WebInspector.UIString("Text"));
    162162        columns.status.sortable = true;
    163         columns.status.width = "8%";
     163        columns.status.width = "6%";
    164164
    165165        columns.type.title = WebInspector.UIString("Type");
    166166        columns.type.sortable = true;
    167         columns.type.width = "10%";
     167        columns.type.width = "6%";
    168168
    169169        columns.size.titleDOMFragment = this._makeHeaderFragment(WebInspector.UIString("Size"), WebInspector.UIString("Transfer"));
    170170        columns.size.sortable = true;
    171         columns.size.width = "10%";
     171        columns.size.width = "6%";
    172172        columns.size.aligned = "right";
    173173
    174174        columns.time.titleDOMFragment = this._makeHeaderFragment(WebInspector.UIString("Time"), WebInspector.UIString("Latency"));
    175175        columns.time.sortable = true;
    176         columns.time.width = "10%";
     176        columns.time.width = "6%";
    177177        columns.time.aligned = "right";
    178178
    179179        columns.timeline.title = "";
    180180        columns.timeline.sortable = false;
    181         columns.timeline.width = "37%";
     181        columns.timeline.width = "50%";
    182182        columns.timeline.sort = "ascending";
    183183
     
    958958            var widths = {};
    959959            widths.name = 20;
    960             widths.method = 7;
    961             widths.status = 8;
    962             widths.type = 10;
    963             widths.size = 10;
    964             widths.time = 10;
    965             widths.timeline = 37;
     960            widths.method = 6;
     961            widths.status = 6;
     962            widths.type = 6;
     963            widths.size = 6;
     964            widths.time = 6;
     965            widths.timeline = 50;
    966966        }
    967967
     
    14661466        this._refreshNameCell();
    14671467
    1468         this._methodCell.textContent = this._resource.requestMethod;
     1468        this._methodCell.setTextAndTitle(this._resource.requestMethod);
    14691469
    14701470        this._refreshStatusCell();
     
    14721472        if (this._resource.mimeType) {
    14731473            this._typeCell.removeStyleClass("network-dim-cell");
    1474             this._typeCell.textContent = this._resource.mimeType;
     1474            this._typeCell.setTextAndTitle(this._resource.mimeType);
    14751475        } else {
    14761476            this._typeCell.addStyleClass("network-dim-cell");
    1477             this._typeCell.textContent = WebInspector.UIString("Pending");
     1477            this._typeCell.setTextAndTitle(WebInspector.UIString("Pending"));
    14781478        }
    14791479
     
    15361536
    15371537        if (this._resource.failed) {
    1538             if (this._resource.canceled) 
    1539                 this._statusCell.textContent = WebInspector.UIString("(canceled)");
     1538            if (this._resource.canceled)
     1539                this._statusCell.setTextAndTitle(WebInspector.UIString("(canceled)"));
    15401540            else
    1541                 this._statusCell.textContent = WebInspector.UIString("(failed)");
     1541                this._statusCell.setTextAndTitle(WebInspector.UIString("(failed)"));
    15421542            this._statusCell.addStyleClass("network-dim-cell");
    15431543            return;
     
    15461546        var fromCache = this._resource.cached;
    15471547        if (fromCache) {
    1548             this._statusCell.textContent = WebInspector.UIString("(from cache)");
     1548            this._statusCell.setTextAndTitle(WebInspector.UIString("(from cache)"));
    15491549            this._statusCell.addStyleClass("network-dim-cell");
    15501550            return;
     
    15591559        } else {
    15601560            if (this._resource.isDataURL() && this._resource.finished)
    1561                 this._statusCell.textContent = WebInspector.UIString("(data url)");
     1561                this._statusCell.setTextAndTitle(WebInspector.UIString("(data url)"));
    15621562            else
    1563                 this._statusCell.textContent = WebInspector.UIString("Pending");
     1563                this._statusCell.setTextAndTitle(WebInspector.UIString("(Pending)"));
    15641564            this._statusCell.addStyleClass("network-dim-cell");
    15651565        }
     
    15711571        var transferSize = typeof this._resource.transferSize === "number" ? Number.bytesToString(this._resource.transferSize) : "?";
    15721572        var fromCache = this._resource.cached;
    1573         this._sizeCell.textContent = !fromCache ? resourceSize : WebInspector.UIString("(from cache)");
     1573        this._sizeCell.setTextAndTitle(!fromCache ? resourceSize : WebInspector.UIString("(from cache)"));
    15741574        if (fromCache)
    15751575            this._sizeCell.addStyleClass("network-dim-cell");
     
    15841584        if (this._resource.duration > 0) {
    15851585            this._timeCell.removeStyleClass("network-dim-cell");
    1586             this._timeCell.textContent = Number.secondsToString(this._resource.duration);
     1586            this._timeCell.setTextAndTitle(Number.secondsToString(this._resource.duration));
    15871587            this._appendSubtitle(this._timeCell, Number.secondsToString(this._resource.latency));
    15881588        } else {
    15891589            this._timeCell.addStyleClass("network-dim-cell");
    1590             this._timeCell.textContent = WebInspector.UIString("Pending");
     1590            this._timeCell.setTextAndTitle(WebInspector.UIString("Pending"));
    15911591        }
    15921592    },
  • trunk/Source/WebCore/inspector/front-end/utilities.js

    r84358 r84614  
    290290
    291291    return elementOffset;
     292}
     293
     294Element.prototype.setTextAndTitle = function(text)
     295{
     296    this.textContent = text;
     297    this.title = text;
    292298}
    293299
Note: See TracChangeset for help on using the changeset viewer.