Changeset 51297 in webkit


Ignore:
Timestamp:
Nov 22, 2009 12:05:47 PM (14 years ago)
Author:
pfeldman@chromium.org
Message:

2009-11-22 Pavel Feldman <pfeldman@chromium.org>

Reviewed by Timothy Hatcher.

Web Inspector: Introduce sidebar background on timeline panel in order
to prevent it from flickering on scroll.

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

  • inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel): (WebInspector.TimelinePanel.prototype.setSidebarWidth): (WebInspector.TimelinePanel.prototype._onScroll): (WebInspector.TimelinePanel.prototype._scheduleRefresh):
  • inspector/front-end/inspector.css:
Location:
trunk/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r51296 r51297  
     12009-11-22  Pavel Feldman  <pfeldman@chromium.org>
     2
     3        Reviewed by Timothy Hatcher.
     4
     5        Web Inspector: Introduce sidebar background on timeline panel in order
     6        to prevent it from flickering on scroll.
     7
     8        https://bugs.webkit.org/show_bug.cgi?id=31789
     9
     10        * inspector/front-end/TimelinePanel.js:
     11        (WebInspector.TimelinePanel):
     12        (WebInspector.TimelinePanel.prototype.setSidebarWidth):
     13        (WebInspector.TimelinePanel.prototype._onScroll):
     14        (WebInspector.TimelinePanel.prototype._scheduleRefresh):
     15        * inspector/front-end/inspector.css:
     16
    1172009-11-22  Pavel Feldman  <pfeldman@chromium.org>
    218
  • trunk/WebCore/inspector/front-end/TimelinePanel.js

    r51296 r51297  
    3939    this.element.appendChild(this._overviewPane.element);
    4040
     41    this._sidebarBackgroundElement = document.createElement("div");
     42    this._sidebarBackgroundElement.className = "sidebar timeline-sidebar-background";
     43    this.element.appendChild(this._sidebarBackgroundElement);
     44
    4145    this._containerElement = document.createElement("div");
    4246    this._containerElement.id = "timeline-container";
     
    4549
    4650    this.createSidebar(this._containerElement, this._containerElement);
    47     this.sidebarElement.id = "timeline-sidebar";
    48     this.itemsTreeElement = new WebInspector.SidebarSectionTreeElement(WebInspector.UIString("RECORDS"), {}, true);
    49     this.itemsTreeElement.expanded = true;
    50     this.sidebarTree.appendChild(this.itemsTreeElement);
     51    var itemsTreeElement = new WebInspector.SidebarSectionTreeElement(WebInspector.UIString("RECORDS"), {}, true);
     52    itemsTreeElement.expanded = true;
     53    this.sidebarTree.appendChild(itemsTreeElement);
    5154
    5255    this._sidebarListElement = document.createElement("div");
     
    5861
    5962    this._timelineGrid = new WebInspector.TimelineGrid();
    60     this._itemsGraphsElement = this._timelineGrid.itemsGraphsElement;
    61     this._itemsGraphsElement.id = "timeline-graphs";
     63    var itemsGraphsElement = this._timelineGrid.itemsGraphsElement;
     64    itemsGraphsElement.id = "timeline-graphs";
    6265    this._containerContentElement.appendChild(this._timelineGrid.element);
    6366
    6467    this._topGapElement = document.createElement("div");
    6568    this._topGapElement.className = "timeline-gap";
    66     this._itemsGraphsElement.appendChild(this._topGapElement);
     69    itemsGraphsElement.appendChild(this._topGapElement);
    6770
    6871    this._graphRowsElement = document.createElement("div");
    69     this._itemsGraphsElement.appendChild(this._graphRowsElement);
     72    itemsGraphsElement.appendChild(this._graphRowsElement);
    7073
    7174    this._bottomGapElement = document.createElement("div");
    7275    this._bottomGapElement.className = "timeline-gap";
    73     this._itemsGraphsElement.appendChild(this._bottomGapElement);
     76    itemsGraphsElement.appendChild(this._bottomGapElement);
    7477
    7578    this._createStatusbarButtons();
     
    237240    {
    238241        WebInspector.Panel.prototype.setSidebarWidth.call(this, width);
     242        this._sidebarBackgroundElement.style.width = width + "px";
    239243        this._overviewPane.setSidebarWidth(width);
    240244    },
     
    273277        var dividersTop = Math.max(0, scrollTop);
    274278        this._timelineGrid.setScrollAndDividerTop(scrollTop, dividersTop);
    275         this._scheduleRefresh();
    276     },
    277 
    278     _scheduleRefresh: function()
     279        this._scheduleRefresh(true);
     280    },
     281
     282    _scheduleRefresh: function(immediate)
    279283    {
    280284        if (this._needsRefresh)
     
    283287
    284288        if (this.visible && !("_refreshTimeout" in this))
    285             this._refreshTimeout = setTimeout(this._refresh.bind(this), 100);
     289            this._refreshTimeout = setTimeout(this._refresh.bind(this), immediate ? 0 : 100);
    286290    },
    287291
  • trunk/WebCore/inspector/front-end/inspector.css

    r51296 r51297  
    32763276/* Timeline Style */
    32773277
    3278 #timeline-summary {
     3278#timeline-overview-panel {
    32793279    position: absolute;
    32803280    top: 0;
    32813281    left: 0;
    3282     width: 0;
    3283     height: 0;
    3284 }
    3285 
    3286 #timeline-overview-panel {
    3287     position: absolute;
    3288     top: 0;
    3289     left: 0;
    32903282    right: 0;
    32913283    height: 80px;
     3284}
     3285
     3286.timeline-sidebar-background {
     3287    top: 90px;
     3288    bottom: 0;
    32923289}
    32933290
Note: See TracChangeset for help on using the changeset viewer.