Changeset 90594 in webkit


Ignore:
Timestamp:
Jul 7, 2011 3:20:21 PM (13 years ago)
Author:
Adam Roben
Message:

Update TestFailures's title and header immediately upon navigation

Fixes <http://webkit.org/b/64125> TestFailures page seems slow to react on link clicks

Reviewed by Daniel Bates.

  • BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ViewController.js:

(ViewController.prototype.loaded): Create and store an h1 element for displaying the page's
title.
(ViewController.prototype._displayBuilder): Set the page's title and clear out any old
content immediately instead of waiting for the first set of results for the history
analyzer. As we receive new results from the analyzer we'll just clear out the main content
area and replace it with the new info.
(ViewController.prototype._displayTesters): Set the page's title and clear out any old
content immediately instead of waiting for the list of testers from the buildbot. Sprinkled
in a little use of our removeAllChildren helper, too.
(ViewController.prototype._setTitle): Added. Set's the page's title and the header text.

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ViewController.js

    r90153 r90594  
    3737ViewController.prototype = {
    3838    loaded: function() {
     39        this._header = document.createElement('h1');
     40        document.body.appendChild(this._header);
    3941        this._mainContentElement = document.createElement('div');
    4042        document.body.appendChild(this._mainContentElement);
     
    5557
    5658    _displayBuilder: function(builder) {
     59        this._setTitle(builder.name);
     60        this._mainContentElement.removeAllChildren();
     61
    5762        var navigationID = this._navigationID;
     63
    5864        var self = this;
    5965        (new LayoutTestHistoryAnalyzer(builder)).start(function(data, stillFetchingData) {
     
    100106            });
    101107
    102             var header = document.createElement('h1');
    103             header.appendChild(document.createTextNode(builder.name));
    104             self._mainContentElement.innerHTML = '';
    105             document.title = builder.name;
    106             self._mainContentElement.appendChild(header);
     108            self._mainContentElement.removeAllChildren();
    107109            self._mainContentElement.appendChild(list);
    108110            self._mainContentElement.appendChild(self._domForPossiblyFlakyTests(builder, data.possiblyFlaky));
     
    116118
    117119    _displayTesters: function() {
     120        this._setTitle('Testers');
     121        this._mainContentElement.removeAllChildren();
     122
     123        var list = document.createElement('ul');
     124        this._mainContentElement.appendChild(list);
     125
     126        var latestBuildInfos = [];
    118127        var navigationID = this._navigationID;
    119 
    120         var list = document.createElement('ul');
    121         var latestBuildInfos = [];
    122128
    123129        function updateList() {
    124130            latestBuildInfos.sort(function(a, b) { return a.tester.name.localeCompare(b.tester.name) });
    125             while (list.firstChild)
    126                 list.removeChild(list.firstChild);
     131            list.removeAllChildren();
    127132            latestBuildInfos.forEach(function(buildInfo) {
    128133                var link = document.createElement('a');
     
    162167                });
    163168            });
    164 
    165             self._mainContentElement.innerHTML = '';
    166             document.title = 'Testers';
    167             self._mainContentElement.appendChild(list);
    168169        });
    169170    },
     
    521522        return result;
    522523    },
     524
     525    _setTitle: function(title) {
     526        document.title = title;
     527        this._header.textContent = title;
     528    },
    523529};
  • trunk/Tools/ChangeLog

    r90584 r90594  
     12011-07-07  Adam Roben  <aroben@apple.com>
     2
     3        Update TestFailures's title and header immediately upon navigation
     4
     5        Fixes <http://webkit.org/b/64125> TestFailures page seems slow to react on link clicks
     6
     7        Reviewed by Daniel Bates.
     8
     9        * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ViewController.js:
     10        (ViewController.prototype.loaded): Create and store an h1 element for displaying the page's
     11        title.
     12        (ViewController.prototype._displayBuilder): Set the page's title and clear out any old
     13        content immediately instead of waiting for the first set of results for the history
     14        analyzer. As we receive new results from the analyzer we'll just clear out the main content
     15        area and replace it with the new info.
     16        (ViewController.prototype._displayTesters): Set the page's title and clear out any old
     17        content immediately instead of waiting for the list of testers from the buildbot. Sprinkled
     18        in a little use of our removeAllChildren helper, too.
     19        (ViewController.prototype._setTitle): Added. Set's the page's title and the header text.
     20
    1212011-07-07  Adam Roben  <aroben@apple.com>
    222
Note: See TracChangeset for help on using the changeset viewer.