Changeset 55627 in webkit


Ignore:
Timestamp:
Mar 6, 2010 10:14:51 AM (14 years ago)
Author:
pfeldman@chromium.org
Message:

2010-03-06 Pavel Feldman <pfeldman@chromium.org>

Reviewed by Jeremy Orlow.

Web Inspector: switching to/from Timeline Panel moves scroller.
(Also added couple of record details items as I was fixing it).

https://bugs.webkit.org/show_bug.cgi?id=35829

  • English.lproj/localizedStrings.js:
  • inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel): (WebInspector.TimelinePanel.prototype.get defaultFocusedElement): (WebInspector.TimelinePanel.prototype.show): (WebInspector.TimelinePanel.prototype._refreshRecords):
Location:
trunk/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r55624 r55627  
     12010-03-06  Pavel Feldman  <pfeldman@chromium.org>
     2
     3        Reviewed by Jeremy Orlow.
     4
     5        Web Inspector: switching to/from Timeline Panel moves scroller.
     6        (Also added couple of record details items as I was fixing it).
     7
     8        https://bugs.webkit.org/show_bug.cgi?id=35829
     9
     10        * English.lproj/localizedStrings.js:
     11        * inspector/front-end/TimelinePanel.js:
     12        (WebInspector.TimelinePanel):
     13        (WebInspector.TimelinePanel.prototype.get defaultFocusedElement):
     14        (WebInspector.TimelinePanel.prototype.show):
     15        (WebInspector.TimelinePanel.prototype._refreshRecords):
     16        (WebInspector.TimelinePanel.FormattedRecord.prototype._generatePopupContent):
     17
    1182010-03-06  Patrick Gansterer  <paroga@paroga.com>
    219
  • trunk/WebCore/inspector/front-end/TimelinePanel.js

    r55614 r55627  
    3838    this._overviewPane.addEventListener("filter changed", this._refresh, this);
    3939    this.element.appendChild(this._overviewPane.element);
     40    this.element.tabIndex = 0;
    4041
    4142    this._sidebarBackgroundElement = document.createElement("div");
     
    112113        }
    113114        return this._categories;
     115    },
     116
     117    get defaultFocusedElement()
     118    {
     119        return this.element;
    114120    },
    115121
     
    235241    {
    236242        WebInspector.Panel.prototype.show.call(this);
    237 
    238         if (this._needsRefresh)
     243        if (typeof this._scrollTop === "number")
     244            this._containerElement.scrollTop = this._scrollTop;
     245        else if (this._needsRefresh)
    239246            this._refresh();
    240247    },
     
    314321
    315322        // Calculate the visible area.
    316         var visibleTop = this._containerElement.scrollTop;
     323        this._scrollTop = this._containerElement.scrollTop;
     324        var visibleTop = this._scrollTop;
    317325        var visibleBottom = visibleTop + this._containerElement.clientHeight;
    318326
     
    700708        const recordTypes = WebInspector.TimelineAgent.RecordType;
    701709        if (this.details) {
    702             if (this.type == recordTypes.TimerInstall ||
    703                 this.type == recordTypes.TimerFire ||
    704                 this.type == recordTypes.TimerRemove) {
     710            if (this.type === recordTypes.TimerInstall ||
     711                this.type === recordTypes.TimerFire ||
     712                this.type === recordTypes.TimerRemove) {
    705713                recordContentTable.appendChild(this._createRow(WebInspector.UIString("Timer Id"), this.data.timerId));
    706714                if (this.timeout) {
     
    712720                    recordContentTable.appendChild(this._createLinkRow(WebInspector.UIString("Call Site"), link));
    713721                }
    714             } else if (this.type == recordTypes.FunctionCall) {
     722            } else if (this.type === recordTypes.FunctionCall) {
    715723                var link = WebInspector.linkifyResourceAsNode(this.data.scriptName, "scripts", this.data.scriptLine, "timeline-details");
    716724                recordContentTable.appendChild(this._createLinkRow(WebInspector.UIString("Location"), link));
     
    718726                var link = WebInspector.linkifyResourceAsNode(this.data.url, "resources", null, "timeline-details");
    719727                recordContentTable.appendChild(this._createLinkRow(WebInspector.UIString("Resource"), link));
     728            } else if (this.type === recordTypes.EvaluateScript) {
     729                var link = WebInspector.linkifyResourceAsNode(this.data.url, "scripts", null, "timeline-details");
     730                recordContentTable.appendChild(this._createLinkRow(WebInspector.UIString("Script"), link));
     731            } else if (this.type === recordTypes.Paint) {
     732                recordContentTable.appendChild(this._createRow(WebInspector.UIString("Location"), this.data.x + "\u2009\u00d7\u2009" + this.data.y));
     733                recordContentTable.appendChild(this._createRow(WebInspector.UIString("Dimensions"), this.data.width + "\u2009\u00d7\u2009" + this.data.height));
    720734            } else
    721735                recordContentTable.appendChild(this._createRow(WebInspector.UIString("Details"), this.details));
Note: See TracChangeset for help on using the changeset viewer.