Changeset 195881 in webkit


Ignore:
Timestamp:
Jan 29, 2016 7:31:32 PM (8 years ago)
Author:
commit-queue@webkit.org
Message:

Web Inspector: Add support for variable size timeline graphs
https://bugs.webkit.org/show_bug.cgi?id=153690
<rdar://problem/24421696>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-01-29
Reviewed by Timothy Hatcher.

  • UserInterface/Views/LayoutTimelineDataGrid.js:

(WebInspector.LayoutTimelineDataGrid): Deleted.
Remove unnecessary constructor.

  • UserInterface/Views/TimelineOverviewGraph.js:

(WebInspector.TimelineOverviewGraph.prototype.set selectedRecord):
Default graph height.

  • UserInterface/Views/RenderingFrameTimelineOverview.js:

(WebInspector.RenderingFrameTimelineOverview.prototype.get height):
Custom graph height.

  • UserInterface/Views/TimelineOverview.js:

(WebInspector.TimelineOverview.prototype.get height):
Provide a way to get the height of the overview which accumulates graph heights.

  • UserInterface/Views/TimelineRecordingContentView.js:

(WebInspector.TimelineRecordingContentView.prototype.get timelineOverviewHeight):
(WebInspector.TimelineRecordingContentView.prototype._updateTimelineOverviewHeight):

  • UserInterface/Views/TimelineSidebarPanel.js:

(WebInspector.TimelineSidebarPanel.prototype._updateTimelineOverviewHeight):
Switch from assuming certain graph heights to asking the overview for its height.

Location:
trunk/Source/WebInspectorUI
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r195880 r195881  
     12016-01-29  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        Web Inspector: Add support for variable size timeline graphs
     4        https://bugs.webkit.org/show_bug.cgi?id=153690
     5        <rdar://problem/24421696>
     6
     7        Reviewed by Timothy Hatcher.
     8
     9        * UserInterface/Views/LayoutTimelineDataGrid.js:
     10        (WebInspector.LayoutTimelineDataGrid): Deleted.
     11        Remove unnecessary constructor.
     12
     13        * UserInterface/Views/TimelineOverviewGraph.js:
     14        (WebInspector.TimelineOverviewGraph.prototype.set selectedRecord):
     15        Default graph height.
     16
     17        * UserInterface/Views/RenderingFrameTimelineOverview.js:
     18        (WebInspector.RenderingFrameTimelineOverview.prototype.get height):
     19        Custom graph height.
     20
     21        * UserInterface/Views/TimelineOverview.js:
     22        (WebInspector.TimelineOverview.prototype.get height):
     23        Provide a way to get the height of the overview which accumulates graph heights.
     24
     25        * UserInterface/Views/TimelineRecordingContentView.js:
     26        (WebInspector.TimelineRecordingContentView.prototype.get timelineOverviewHeight):
     27        (WebInspector.TimelineRecordingContentView.prototype._updateTimelineOverviewHeight):
     28        * UserInterface/Views/TimelineSidebarPanel.js:
     29        (WebInspector.TimelineSidebarPanel.prototype._updateTimelineOverviewHeight):
     30        Switch from assuming certain graph heights to asking the overview for its height.
     31
    1322016-01-29  Devin Rousso  <dcrousso+webkit@gmail.com>
    233
  • trunk/Source/WebInspectorUI/UserInterface/Views/LayoutTimelineDataGrid.js

    r187873 r195881  
    2626WebInspector.LayoutTimelineDataGrid = class LayoutTimelineDataGrid extends WebInspector.TimelineDataGrid
    2727{
    28     constructor(treeOutline, columns, delegate, editCallback, deleteCallback)
    29     {
    30         super(treeOutline, columns, delegate, editCallback, deleteCallback);
    31     }
    32 
    3328    // Protected
    3429
  • trunk/Source/WebInspectorUI/UserInterface/Views/RenderingFrameTimelineOverview.js

    r187689 r195881  
    4848    // Protected
    4949
     50    get height()
     51    {
     52        return 108;
     53    }
     54
    5055    canShowTimeline(timeline)
    5156    {
  • trunk/Source/WebInspectorUI/UserInterface/Views/TimelineOverview.js

    r195544 r195881  
    249249    }
    250250
     251    get height()
     252    {
     253        let height = 0;
     254        for (let graph of this._timelineOverviewGraphsMap.values())
     255            height += graph.height;
     256        return height;
     257    }
     258
    251259    get visible()
    252260    {
  • trunk/Source/WebInspectorUI/UserInterface/Views/TimelineOverviewGraph.js

    r193806 r195881  
    162162    }
    163163
     164    get height()
     165    {
     166        // Overridden by sub-classes if needed.
     167        return 36;
     168    }
     169
    164170    shown()
    165171    {
  • trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.js

    r195536 r195881  
    160160    }
    161161
     162    get timelineOverviewHeight()
     163    {
     164        return this._currentTimelineOverview.height;
     165    }
     166
    162167    shown()
    163168    {
     
    561566    {
    562567        const rulerHeight = 29;
    563         const timelineHeight = 36;
    564         const renderingFramesTimelineHeight = 108;
    565 
    566         let overviewHeight;
    567         if (this.currentTimelineView && this.currentTimelineView.representedObject.type === WebInspector.TimelineRecord.Type.RenderingFrame)
    568             overviewHeight = renderingFramesTimelineHeight;
    569         else {
    570             let timelineCount = this._timelineViewMap.size;
    571             if (this._renderingFrameTimeline)
    572                 timelineCount--;
    573 
    574             overviewHeight = timelineCount * timelineHeight;
    575         }
    576 
    577         let styleValue = (overviewHeight + rulerHeight) + "px";
     568       
     569        let styleValue = (rulerHeight + this.timelineOverviewHeight) + "px";
    578570        this._currentTimelineOverview.element.style.height = styleValue;
    579571        this._contentViewContainer.element.style.top = styleValue;
  • trunk/Source/WebInspectorUI/UserInterface/Views/TimelineSidebarPanel.js

    r195303 r195881  
    812812    _updateTimelineOverviewHeight()
    813813    {
    814         const timelineHeight = 36;
    815814        const eventTitleBarOffset = 58;
    816815        const contentElementOffset = 81;
    817         const renderingFramesTimelineHeight = 108;
    818816
    819817        if (!this._displayedContentView)
    820818            return;
    821819
    822         let overviewHeight;
    823         let currentTimelineView = this._displayedContentView.currentTimelineView;
    824         if (currentTimelineView && currentTimelineView.representedObject.type === WebInspector.TimelineRecord.Type.RenderingFrame)
    825             overviewHeight = renderingFramesTimelineHeight;
    826         else {
    827             let timelineCount = this._timelineTreeElementMap.size;
    828             if (this._timelineTreeElementMap.has(WebInspector.TimelineRecord.Type.RenderingFrame))
    829                 timelineCount--;
    830             overviewHeight = timelineCount * timelineHeight;
    831         }
    832 
     820        let overviewHeight = this._displayedContentView.timelineOverviewHeight;
    833821        this._timelineEventsTitleBarContainer.style.top = (overviewHeight + eventTitleBarOffset) + "px";
    834822        this.contentView.element.style.top = (overviewHeight + contentElementOffset) + "px";
Note: See TracChangeset for help on using the changeset viewer.