Commit 3d837ef6 authored by timothy@apple.com's avatar timothy@apple.com

Remove a lot of the current Timelines code to make room for a new implementation.

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

Reviewed by Joseph Pecoraro.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/ContentView.js:
(WebInspector.ContentView):
(WebInspector.ContentView.isViewable):
* UserInterface/DashboardView.js:
(WebInspector.DashboardView.prototype._networkItemWasClicked):
* UserInterface/InspectorFrontendAPI.js:
(InspectorFrontendAPI.setTimelineProfilingEnabled):
(InspectorFrontendAPI.stopProfilingJavaScript):
* UserInterface/InstrumentSidebarPanel.js: Removed.
* UserInterface/Main.html:
* UserInterface/Main.js:
(WebInspector.contentLoaded):
(WebInspector.sidebarPanelForRepresentedObject):
(WebInspector.openURL):
* UserInterface/Object.js:
(WebInspector.Object.addEventListener):
* UserInterface/TimelineManager.js:
(WebInspector.TimelineManager):
(WebInspector.TimelineManager.prototype.startRecording):
(WebInspector.TimelineManager.prototype.eventRecorded.processRecord):
(WebInspector.TimelineManager.prototype.eventRecorded):
(WebInspector.TimelineManager.prototype.objectForCookie):
(WebInspector.TimelineManager.prototype._addRecord):
* UserInterface/TimelinesObject.js: Removed.
* UserInterface/TimelineOverview.css: Removed.
* UserInterface/TimelineOverview.js: Removed.
* UserInterface/TimelineSidebarPanel.css: Added.
* UserInterface/TimelineSidebarPanel.js: Added.
(WebInspector.TimelineSidebarPanel):
* UserInterface/TimelinesContentView.css: Removed.
* UserInterface/TimelinesContentView.js: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162397 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 22ec5d1b
2013-10-25 Timothy Hatcher <timothy@apple.com>
Remove a lot of the current Timelines code to make room for a new implementation.
https://bugs.webkit.org/show_bug.cgi?id=123368
Reviewed by Joseph Pecoraro.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/ContentView.js:
(WebInspector.ContentView):
(WebInspector.ContentView.isViewable):
* UserInterface/DashboardView.js:
(WebInspector.DashboardView.prototype._networkItemWasClicked):
* UserInterface/InspectorFrontendAPI.js:
(InspectorFrontendAPI.setTimelineProfilingEnabled):
(InspectorFrontendAPI.stopProfilingJavaScript):
* UserInterface/InstrumentSidebarPanel.js: Removed.
* UserInterface/Main.html:
* UserInterface/Main.js:
(WebInspector.contentLoaded):
(WebInspector.sidebarPanelForRepresentedObject):
(WebInspector.openURL):
* UserInterface/Object.js:
(WebInspector.Object.addEventListener):
* UserInterface/TimelineManager.js:
(WebInspector.TimelineManager):
(WebInspector.TimelineManager.prototype.startRecording):
(WebInspector.TimelineManager.prototype.eventRecorded.processRecord):
(WebInspector.TimelineManager.prototype.eventRecorded):
(WebInspector.TimelineManager.prototype.objectForCookie):
(WebInspector.TimelineManager.prototype._addRecord):
* UserInterface/TimelinesObject.js: Removed.
* UserInterface/TimelineOverview.css: Removed.
* UserInterface/TimelineOverview.js: Removed.
* UserInterface/TimelineSidebarPanel.css: Added.
* UserInterface/TimelineSidebarPanel.js: Added.
(WebInspector.TimelineSidebarPanel):
* UserInterface/TimelinesContentView.css: Removed.
* UserInterface/TimelinesContentView.js: Removed.
2014-01-20 Timothy Hatcher <timothy@apple.com> 2014-01-20 Timothy Hatcher <timothy@apple.com>
Fix jumping to a text position when showing a resource. Fix jumping to a text position when showing a resource.
......
...@@ -60,9 +60,6 @@ WebInspector.ContentView = function(representedObject) ...@@ -60,9 +60,6 @@ WebInspector.ContentView = function(representedObject)
if (representedObject instanceof WebInspector.LogObject) if (representedObject instanceof WebInspector.LogObject)
return new WebInspector.LogContentView(representedObject); return new WebInspector.LogContentView(representedObject);
if (representedObject instanceof WebInspector.TimelinesObject)
return new WebInspector.TimelinesContentView(representedObject);
if (representedObject instanceof WebInspector.JavaScriptProfileObject) if (representedObject instanceof WebInspector.JavaScriptProfileObject)
return new WebInspector.JavaScriptProfileView(representedObject); return new WebInspector.JavaScriptProfileView(representedObject);
...@@ -118,8 +115,6 @@ WebInspector.ContentView.isViewable = function(representedObject) ...@@ -118,8 +115,6 @@ WebInspector.ContentView.isViewable = function(representedObject)
return true; return true;
if (representedObject instanceof WebInspector.LogObject) if (representedObject instanceof WebInspector.LogObject)
return true; return true;
if (representedObject instanceof WebInspector.TimelinesObject)
return true;
if (representedObject instanceof WebInspector.JavaScriptProfileObject) if (representedObject instanceof WebInspector.JavaScriptProfileObject)
return true; return true;
if (representedObject instanceof WebInspector.CanvasProfileObject) if (representedObject instanceof WebInspector.CanvasProfileObject)
......
...@@ -191,8 +191,7 @@ WebInspector.DashboardView.prototype = { ...@@ -191,8 +191,7 @@ WebInspector.DashboardView.prototype = {
_networkItemWasClicked: function() _networkItemWasClicked: function()
{ {
WebInspector.navigationSidebar.selectedSidebarPanel = WebInspector.instrumentSidebarPanel; WebInspector.navigationSidebar.selectedSidebarPanel = WebInspector.timelineSidebarPanel;
WebInspector.instrumentSidebarPanel.showTimelineForRecordType(WebInspector.TimelineRecord.Type.Network);
}, },
_consoleItemWasClicked: function(scope) _consoleItemWasClicked: function(scope)
......
...@@ -57,8 +57,7 @@ InspectorFrontendAPI = { ...@@ -57,8 +57,7 @@ InspectorFrontendAPI = {
setTimelineProfilingEnabled: function(enabled) setTimelineProfilingEnabled: function(enabled)
{ {
if (enabled) { if (enabled) {
WebInspector.navigationSidebar.selectedSidebarPanel = WebInspector.instrumentSidebarPanel; WebInspector.navigationSidebar.selectedSidebarPanel = WebInspector.timelineSidebarPanel;
WebInspector.instrumentSidebarPanel.showTimeline();
WebInspector.timelineManager.startRecording(); WebInspector.timelineManager.startRecording();
} else { } else {
WebInspector.timelineManager.stopRecording(); WebInspector.timelineManager.stopRecording();
...@@ -77,7 +76,7 @@ InspectorFrontendAPI = { ...@@ -77,7 +76,7 @@ InspectorFrontendAPI = {
stopProfilingJavaScript: function() stopProfilingJavaScript: function()
{ {
WebInspector.instrumentSidebarPanel.show(); WebInspector.timelineSidebarPanel.show();
WebInspector.profileManager.stopProfilingJavaScript(); WebInspector.profileManager.stopProfilingJavaScript();
}, },
......
/*
* Copyright (C) 2013 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/
.sidebar > .panel.instrument > .title-bar {
position: absolute;
left: 0;
right: 0;
box-shadow: inset rgba(255, 255, 255, 0.2) 0 1px 0;
border-bottom: 1px solid rgb(179, 179, 179);
height: 22px;
padding: 4px 6px;
font-size: 11px;
font-family: "Lucida Grande", sans-serif;
white-space: nowrap;
overflow: hidden;
}
.sidebar > .panel.instrument > .title-bar.timelines {
top: 0;
}
.sidebar > .panel.instrument > .title-bar > .record-glyph {
position: absolute;
top: 0;
right: 0;
width: 21px;
height: 21px;
padding: 0;
border: none;
outline: none;
color: transparent;
overflow: hidden;
-webkit-appearance: none;
background-color: transparent;
background-image: -webkit-image-set(url(Images/RecordingStopped.png) 1x, url(Images/RecordingStopped@2x.png) 2x);
background-repeat: no-repeat;
background-size: 21px 21px;
}
.sidebar > .panel.instrument > .title-bar > .record-glyph.recording {
background-image: -webkit-image-set(url(Images/Recording.png) 1x, url(Images/Recording@2x.png) 2x);
}
.sidebar > .panel.instrument > .title-bar > .record-glyph:hover {
background-image: -webkit-image-set(url(Images/RecordingHovered.png) 1x, url(Images/RecordingHovered@2x.png) 2x);
}
.sidebar > .panel.instrument > .title-bar > .record-glyph.recording:hover {
background-image: -webkit-image-set(url(Images/RecordingStopped.png) 1x, url(Images/RecordingStopped@2x.png) 2x);
}
.sidebar > .panel.instrument > .title-bar > .record-glyph.forced {
background-image: -webkit-image-set(url(Images/RecordingStopped.png) 1x, url(Images/RecordingStopped@2x.png) 2x) !important;
}
.sidebar > .panel.instrument > .title-bar > .record-glyph.recording.forced {
background-image: -webkit-image-set(url(Images/Recording.png) 1x, url(Images/Recording@2x.png) 2x) !important;
}
.sidebar > .panel.instrument > .title-bar > .record-status {
position: absolute;
top: 0;
right: 21px;
line-height: 20px;
color: rgb(76, 76, 76);
}
.sidebar > .panel.instrument > .navigation-sidebar-panel-content-tree-outline.timelines {
position: absolute;
top: 22px;
left: 0;
right: 0;
height: 78px;
}
.sidebar > .panel.instrument > .navigation-sidebar-panel-content-tree-outline.timelines .item:not(:first-child):not(.selected) {
border-top-color: rgba(0, 0, 0, 0.1);
}
.sidebar > .panel.instrument > .navigation-sidebar-panel-content-tree-outline.timelines .item.selected + .item {
border-top-color: rgba(0, 0, 0, 0.4);
}
.sidebar > .panel.instrument > .title-bar.profiles {
top: 100px;
border-top: 1px solid rgb(179, 179, 179);
height: 23px;
}
.sidebar > .panel.instrument > .content,
.sidebar > .panel.instrument > .empty-content-placeholder {
top: 123px;
}
...@@ -81,16 +81,13 @@ ...@@ -81,16 +81,13 @@
<link rel="stylesheet" href="ApplicationCacheIcons.css"> <link rel="stylesheet" href="ApplicationCacheIcons.css">
<link rel="stylesheet" href="ResourceTreeElement.css"> <link rel="stylesheet" href="ResourceTreeElement.css">
<link rel="stylesheet" href="TreeElementStatusButton.css"> <link rel="stylesheet" href="TreeElementStatusButton.css">
<link rel="stylesheet" href="InstrumentSidebarPanel.css"> <link rel="stylesheet" href="TimelineSidebarPanel.css">
<link rel="stylesheet" href="InstrumentIcons.css"> <link rel="stylesheet" href="InstrumentIcons.css">
<link rel="stylesheet" href="TimelinesContentView.css">
<link rel="stylesheet" href="TimelineDecorations.css"> <link rel="stylesheet" href="TimelineDecorations.css">
<link rel="stylesheet" href="NetworkDataGrid.css">
<link rel="stylesheet" href="TimelineDataGrid.css"> <link rel="stylesheet" href="TimelineDataGrid.css">
<link rel="stylesheet" href="TimelineOverview.css"> <link rel="stylesheet" href="TimelineOverview.css">
<link rel="stylesheet" href="ProfileView.css"> <link rel="stylesheet" href="ProfileView.css">
<link rel="stylesheet" href="JavaScriptProfileView.css"> <link rel="stylesheet" href="JavaScriptProfileView.css">
<link rel="stylesheet" href="NetworkTimeline.css">
<link rel="stylesheet" href="CSSStyleDetailsSidebarPanel.css"> <link rel="stylesheet" href="CSSStyleDetailsSidebarPanel.css">
<link rel="stylesheet" href="DOMTreeDataGrid.css"> <link rel="stylesheet" href="DOMTreeDataGrid.css">
<link rel="stylesheet" href="LayerTreeSidebarPanel.css"> <link rel="stylesheet" href="LayerTreeSidebarPanel.css">
...@@ -335,15 +332,11 @@ ...@@ -335,15 +332,11 @@
<script src="CSSStyleDeclarationTextEditor.js"></script> <script src="CSSStyleDeclarationTextEditor.js"></script>
<script src="CSSStyleDeclarationSection.js"></script> <script src="CSSStyleDeclarationSection.js"></script>
<script src="IndeterminateProgressSpinner.js"></script> <script src="IndeterminateProgressSpinner.js"></script>
<script src="InstrumentSidebarPanel.js"></script> <script src="TimelineSidebarPanel.js"></script>
<script src="NetworkGraphCalculator.js"></script>
<script src="TimelineDecorations.js"></script> <script src="TimelineDecorations.js"></script>
<script src="TimelinesObject.js"></script>
<script src="TimelineDataGrid.js"></script> <script src="TimelineDataGrid.js"></script>
<script src="NetworkDataGrid.js"></script>
<script src="LayoutTimelineDataGrid.js"></script> <script src="LayoutTimelineDataGrid.js"></script>
<script src="ScriptTimelineDataGrid.js"></script> <script src="ScriptTimelineDataGrid.js"></script>
<script src="TimelinesContentView.js"></script>
<script src="ResourceTimelineDataGridNode.js"></script> <script src="ResourceTimelineDataGridNode.js"></script>
<script src="ResourceTimelineDataGridNodePathComponent.js"></script> <script src="ResourceTimelineDataGridNodePathComponent.js"></script>
<script src="LayoutTimelineRecord.js"></script> <script src="LayoutTimelineRecord.js"></script>
......
...@@ -217,15 +217,15 @@ WebInspector.contentLoaded = function() ...@@ -217,15 +217,15 @@ WebInspector.contentLoaded = function()
this.toolbar.addToolbarItem(this.undockButtonNavigationItem, WebInspector.Toolbar.Section.Control); this.toolbar.addToolbarItem(this.undockButtonNavigationItem, WebInspector.Toolbar.Section.Control);
this.resourceSidebarPanel = new WebInspector.ResourceSidebarPanel; this.resourceSidebarPanel = new WebInspector.ResourceSidebarPanel;
this.instrumentSidebarPanel = new WebInspector.InstrumentSidebarPanel; this.timelineSidebarPanel = new WebInspector.TimelineSidebarPanel;
this.debuggerSidebarPanel = new WebInspector.DebuggerSidebarPanel; this.debuggerSidebarPanel = new WebInspector.DebuggerSidebarPanel;
this.navigationSidebar.addSidebarPanel(this.resourceSidebarPanel); this.navigationSidebar.addSidebarPanel(this.resourceSidebarPanel);
this.navigationSidebar.addSidebarPanel(this.instrumentSidebarPanel); this.navigationSidebar.addSidebarPanel(this.timelineSidebarPanel);
this.navigationSidebar.addSidebarPanel(this.debuggerSidebarPanel); this.navigationSidebar.addSidebarPanel(this.debuggerSidebarPanel);
this.toolbar.addToolbarItem(this.resourceSidebarPanel.toolbarItem, WebInspector.Toolbar.Section.Left); this.toolbar.addToolbarItem(this.resourceSidebarPanel.toolbarItem, WebInspector.Toolbar.Section.Left);
this.toolbar.addToolbarItem(this.instrumentSidebarPanel.toolbarItem, WebInspector.Toolbar.Section.Left); this.toolbar.addToolbarItem(this.timelineSidebarPanel.toolbarItem, WebInspector.Toolbar.Section.Left);
this.toolbar.addToolbarItem(this.debuggerSidebarPanel.toolbarItem, WebInspector.Toolbar.Section.Left); this.toolbar.addToolbarItem(this.debuggerSidebarPanel.toolbarItem, WebInspector.Toolbar.Section.Left);
// The toolbar button for the console. // The toolbar button for the console.
...@@ -323,9 +323,6 @@ WebInspector.sidebarPanelForRepresentedObject = function(representedObject) ...@@ -323,9 +323,6 @@ WebInspector.sidebarPanelForRepresentedObject = function(representedObject)
if (representedObject instanceof WebInspector.LogObject) if (representedObject instanceof WebInspector.LogObject)
return null; return null;
if (representedObject instanceof WebInspector.TimelinesObject || representedObject instanceof WebInspector.ProfileObject)
return this.instrumentSidebarPanel;
console.error("Unknown representedObject: ", representedObject); console.error("Unknown representedObject: ", representedObject);
return null; return null;
} }
...@@ -460,7 +457,7 @@ WebInspector.openURL = function(url, frame, alwaysOpenExternally, lineNumber) ...@@ -460,7 +457,7 @@ WebInspector.openURL = function(url, frame, alwaysOpenExternally, lineNumber)
console.assert(profileTitle[0] === '/'); console.assert(profileTitle[0] === '/');
profileTitle = profileTitle.substring(1); profileTitle = profileTitle.substring(1);
this.instrumentSidebarPanel.showProfile(profileType, profileTitle); this.timelineSidebarPanel.showProfile(profileType, profileTitle);
return; return;
} }
......
/*
* Copyright (C) 2013 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/
WebInspector.NetworkDataGrid = function(columns)
{
WebInspector.TimelineDataGrid.call(this, columns);
this.element.classList.add(WebInspector.NetworkDataGrid.NetworkDataGridStyleClassName);
this.addEventListener(WebInspector.DataGrid.Event.SortChanged, this._dataGridSortChanged, this);
this.addEventListener(WebInspector.DataGrid.Event.DidLayout, this._dataGridDidLayout, this);
this._timelineDecorations = new WebInspector.TimelineDecorations;
this._timelineDecorations.element.classList.add(WebInspector.NetworkDataGrid.NetworkTimelineDecorationsStyleClassName);
this._timelineDecorations.hideHeaderDividers();
this.element.appendChild(this._timelineDecorations.element);
// Network calculators all deal with WebInspector.Resources.
this._timeCalculator = new WebInspector.NetworkTransferTimeCalculator;
this._detailsColumnGroupCollapsedSetting = new WebInspector.Setting("network-data-grid-" + WebInspector.NetworkDataGrid.DetailsColumnGroup + "-collapsed", false);
if (this._detailsColumnGroupCollapsedSetting.value)
this.collapseColumnGroup(WebInspector.NetworkDataGrid.DetailsColumnGroup);
}
WebInspector.NetworkDataGrid.NetworkDataGridStyleClassName = "network-datagrid";
WebInspector.NetworkDataGrid.NetworkTimelineDecorationsStyleClassName = "network-timeline-decorations";
WebInspector.NetworkDataGrid.NetworkTimelineCollapsedColumnsStyleClassName = "collapsed-details";
WebInspector.NetworkDataGrid.DetailsColumnGroup = "details";
WebInspector.NetworkDataGrid.prototype = {
constructor: WebInspector.NetworkDataGrid,
// Public
get currentCalculator()
{
return this._timeCalculator;
},
updateCalculatorBoundariesWithRecord: function(record)
{
return this.currentCalculator.updateBoundaries(record.resource);
},
updateCalculatorBoundariesWithDataGridNode: function(node)
{
return this.currentCalculator.updateBoundaries(node.record.resource);
},
updateCalculatorBoundariesWithEventMarker: function(eventMarker)
{
return this.currentCalculator.updateBoundariesForEventMarker(eventMarker);
},
reset: function()
{
WebInspector.TimelineDataGrid.prototype.reset.call(this);
this.currentCalculator.reset();
this._timelineDecorations.clear();
this._updateDecorations();
},
update: function()
{
this._updateDecorations();
},
// Protected
willToggleColumnGroup: function(columnGroup, willCollapse)
{
console.assert(columnGroup === "details");
if (willCollapse) {
console.assert(!this._savedExpandedNetworkColumnWidths);
this._savedExpandedNetworkColumnWidths = this.columnWidthsMap();
}
},
didToggleColumnGroup: function(columnGroup, didCollapse)
{
console.assert(columnGroup === "details");
console.assert(this._savedExpandedNetworkColumnWidths);
if (didCollapse) {
var newWidths = {};
newWidths.name = this._savedExpandedNetworkColumnWidths.name;
newWidths.timeline = (100 - newWidths.name);
this.element.classList.add(WebInspector.NetworkDataGrid.NetworkTimelineCollapsedColumnsStyleClassName);
this._timelineDecorations.showHeaderDividers();
} else {
var newWidths = this._savedExpandedNetworkColumnWidths;
delete this._savedExpandedNetworkColumnWidths;
this.element.classList.remove(WebInspector.NetworkDataGrid.NetworkTimelineCollapsedColumnsStyleClassName);
this._timelineDecorations.hideHeaderDividers();
}
this.applyColumnWidthsMap(newWidths);
this._detailsColumnGroupCollapsedSetting.value = didCollapse;
},
addTimelineEventMarker: function(eventMarker)
{
this._timelineDecorations.addTimelineEventMarker(eventMarker);
},
// Private
_dataGridSortChanged: function()
{
this._updateDecorations(true);
},
_dataGridDidLayout: function()
{
if (this.selectedNode)
this.selectedNode.updateLayout();
this._updateDecorations();
},
_localizedTimelineHeaderWidth: function()
{
if (WebInspector.NetworkDataGrid._localizedTimelineWidth !== undefined)
return WebInspector.NetworkDataGrid._localizedTimelineWidth;
var div = document.createElement("div");
div.style.position = "absolute";
div.style.top = 0;
div.style.left = 0;
div.style.fontSize = "11px";
div.style.fontFamily = "\"Lucida Grande\", sans-serif";
div.style.visibility = "hidden";
div.textContent = WebInspector.UIString("Timeline");
document.body.appendChild(div);
WebInspector.NetworkDataGrid._localizedTimelineWidth = div.offsetWidth + 20 /* padding */;
document.body.removeChild(div);
return WebInspector.NetworkDataGrid._localizedTimelineWidth;
},
_updateDecorations: function(force)
{
this._updateDecorationsPosition();
this._updateHeaderTimes(force);
this._updateEventMarkers();
},
_updateDecorationsPosition: function()
{
var lastVisibleResizer = null;
for (var i = this.resizers.length - 1; i >= 0; --i) {
if (this.resizers[i].style.display !== "none") {
lastVisibleResizer = this.resizers[i];
break;
}
}
if (!lastVisibleResizer)
return;
this._timelineDecorations.element.style.left = lastVisibleResizer.style.left;
},
_updateHeaderTimes: function(force)
{
var calculator = this.currentCalculator;
var boundarySpan = calculator.boundarySpan;
var isTimelineColumnSorted = this.isColumnSortColumn("timeline");
if (isTimelineColumnSorted)
this._timelineDecorations.element.classList.add("sort-active");
else
this._timelineDecorations.element.classList.remove("sort-active");
var leftPadding = this._localizedTimelineHeaderWidth();
var rightPadding = isTimelineColumnSorted ? 50 /* Collapse Button and Sort Indicator */ : 27 /* Collapse Button */;
this._timelineDecorations.updateHeaderTimes(boundarySpan, leftPadding, rightPadding, force);
},
_updateEventMarkers: function()
{
var calculator = this.currentCalculator;
this._timelineDecorations.updateEventMarkers(calculator.minimumBoundary, calculator.maximumBoundary);
},
}
WebInspector.NetworkDataGrid.prototype.__proto__ = WebInspector.TimelineDataGrid.prototype;
/*
* Copyright (C) 2007, 2008, 2013 Apple Inc. All rights reserved.
* Copyright (C) 2008, 2009 Anthony Ricaud <rik@webkit.org>
* Copyright (C) 2011 Google Inc. All rights reserved.