https://bugs.webkit.org/show_bug.cgi?id=144110
Reviewed by Joseph Pecoraro.
* UserInterface/Base/Main.js:
(WebInspector.loaded):
(WebInspector.hideSplitConsole):
(WebInspector.showSourceCodeLocation):
(WebInspector.showOriginalUnformattedSourceCodeLocation):
(WebInspector.showOriginalOrFormattedSourceCodeLocation):
(WebInspector.showOriginalOrFormattedSourceCodeTextRange):
(WebInspector.showResourceRequest):
(WebInspector.debuggerToggleBreakpoints):
(WebInspector.debuggerPauseResumeToggle):
(WebInspector.debuggerStepOver):
(WebInspector.debuggerStepInto):
(WebInspector.debuggerStepOut):
(WebInspector._focusChanged):
(WebInspector._mouseWasClicked):
(WebInspector._dragOver):
(WebInspector._captureDidStart):
(WebInspector._debuggerDidPause):
(WebInspector._debuggerDidResume):
(WebInspector._frameWasAdded):
(WebInspector._undock):
(WebInspector._updateDockNavigationItems):
* UserInterface/Models/Breakpoint.js:
(WebInspector.Breakpoint.prototype.appendContextMenuItems.revealOriginalSourceCodeLocation):
(WebInspector.Breakpoint.prototype.appendContextMenuItems):
* UserInterface/Protocol/InspectorFrontendAPI.js:
(InspectorFrontendAPI.showMainResourceForFrame):
* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype.tokenTrackingControllerHighlightedRangeWasClicked):
* UserInterface/Views/ComputedStyleDetailsPanel.js:
(WebInspector.ComputedStyleDetailsPanel.prototype._goToRegionFlowArrowWasClicked):
(WebInspector.ComputedStyleDetailsPanel.prototype._goToContentFlowArrowWasClicked):
(WebInspector.ComputedStyleDetailsPanel):
* UserInterface/Views/ContentBrowser.js:
(WebInspector.ContentBrowser.prototype.updateHierarchicalPathForCurrentContentView):
* UserInterface/Views/ContentView.js:
(WebInspector.ContentView):
* UserInterface/Views/DOMTreeContentView.js:
(WebInspector.DOMTreeContentView.prototype.restoreFromCookie):
* UserInterface/Views/DOMTreeDataGridNode.js:
(WebInspector.DOMTreeDataGridNode.prototype._goToArrowWasClicked):
* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel.prototype.showDefaultContentView):
(WebInspector.DebuggerSidebarPanel.prototype._addTreeElementForSourceCodeToContentTreeOutline):
(WebInspector.DebuggerSidebarPanel.prototype._treeElementSelected):
(WebInspector.DebuggerSidebarPanel.prototype._addIssue):
(WebInspector.DebuggerSidebarPanel.prototype._handleIssueAdded):
* UserInterface/Views/LayerTreeDataGridNode.js:
(WebInspector.LayerTreeDataGridNode.prototype._goToArrowWasClicked):
* UserInterface/Views/LayoutTimelineView.js:
(WebInspector.LayoutTimelineView.prototype._treeElementSelected):
* UserInterface/Views/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel.prototype.get contentBrowser):
(WebInspector.NavigationSidebarPanel.prototype.set contentBrowser):
(WebInspector.NavigationSidebarPanel.prototype._updateFilter):
* UserInterface/Views/NetworkTimelineView.js:
(WebInspector.NetworkTimelineView.prototype._treeElementSelected):
* UserInterface/Views/ObjectTreeBaseTreeElement.js:
(WebInspector.ObjectTreeBaseTreeElement.prototype._appendMenusItemsForObject):
(WebInspector.ObjectTreeBaseTreeElement):
* UserInterface/Views/OverviewTimelineView.js:
(WebInspector.OverviewTimelineView.prototype._treeElementSelected):
* UserInterface/Views/ResourceDetailsSidebarPanel.js:
(WebInspector.ResourceDetailsSidebarPanel.prototype._goToRequestDataClicked):
* UserInterface/Views/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel):
(WebInspector.ResourceSidebarPanel.prototype.showDefaultContentView):
(WebInspector.ResourceSidebarPanel.prototype._mainFrameDidChange):
(WebInspector.ResourceSidebarPanel.prototype._mainFrameMainResourceDidChange.delayedWork):
(WebInspector.ResourceSidebarPanel.prototype._mainFrameMainResourceDidChange):
(WebInspector.ResourceSidebarPanel.prototype._treeElementSelected):
(WebInspector.ResourceSidebarPanel.prototype._storageCleared):
* UserInterface/Views/ResourceTimelineDataGridNode.js:
(WebInspector.ResourceTimelineDataGridNode.prototype._goToResource):
* UserInterface/Views/ScriptTimelineView.js:
(WebInspector.ScriptTimelineView.prototype._treeElementSelected):
* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype.tokenTrackingControllerHighlightedRangeWasClicked):
* UserInterface/Views/TimelineDataGrid.js:
(WebInspector.TimelineDataGrid.prototype._popoverCallStackTreeElementSelected):
* UserInterface/Views/TimelineSidebarPanel.js:
(WebInspector.TimelineSidebarPanel):
(WebInspector.TimelineSidebarPanel.prototype.shown):
(WebInspector.TimelineSidebarPanel.showTimelineViewForTimeline):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183331
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2015-04-23 Timothy Hatcher <timothy@apple.com>
+
+ Web Inspector: Make showing a content view work in the tab world
+ https://bugs.webkit.org/show_bug.cgi?id=144110
+
+ Reviewed by Joseph Pecoraro.
+
+ * UserInterface/Base/Main.js:
+ (WebInspector.loaded):
+ (WebInspector.hideSplitConsole):
+ (WebInspector.showSourceCodeLocation):
+ (WebInspector.showOriginalUnformattedSourceCodeLocation):
+ (WebInspector.showOriginalOrFormattedSourceCodeLocation):
+ (WebInspector.showOriginalOrFormattedSourceCodeTextRange):
+ (WebInspector.showResourceRequest):
+ (WebInspector.debuggerToggleBreakpoints):
+ (WebInspector.debuggerPauseResumeToggle):
+ (WebInspector.debuggerStepOver):
+ (WebInspector.debuggerStepInto):
+ (WebInspector.debuggerStepOut):
+ (WebInspector._focusChanged):
+ (WebInspector._mouseWasClicked):
+ (WebInspector._dragOver):
+ (WebInspector._captureDidStart):
+ (WebInspector._debuggerDidPause):
+ (WebInspector._debuggerDidResume):
+ (WebInspector._frameWasAdded):
+ (WebInspector._undock):
+ (WebInspector._updateDockNavigationItems):
+ * UserInterface/Models/Breakpoint.js:
+ (WebInspector.Breakpoint.prototype.appendContextMenuItems.revealOriginalSourceCodeLocation):
+ (WebInspector.Breakpoint.prototype.appendContextMenuItems):
+ * UserInterface/Protocol/InspectorFrontendAPI.js:
+ (InspectorFrontendAPI.showMainResourceForFrame):
+ * UserInterface/Views/CSSStyleDeclarationTextEditor.js:
+ (WebInspector.CSSStyleDeclarationTextEditor.prototype.tokenTrackingControllerHighlightedRangeWasClicked):
+ * UserInterface/Views/ComputedStyleDetailsPanel.js:
+ (WebInspector.ComputedStyleDetailsPanel.prototype._goToRegionFlowArrowWasClicked):
+ (WebInspector.ComputedStyleDetailsPanel.prototype._goToContentFlowArrowWasClicked):
+ (WebInspector.ComputedStyleDetailsPanel):
+ * UserInterface/Views/ContentBrowser.js:
+ (WebInspector.ContentBrowser.prototype.updateHierarchicalPathForCurrentContentView):
+ * UserInterface/Views/ContentView.js:
+ (WebInspector.ContentView):
+ * UserInterface/Views/DOMTreeContentView.js:
+ (WebInspector.DOMTreeContentView.prototype.restoreFromCookie):
+ * UserInterface/Views/DOMTreeDataGridNode.js:
+ (WebInspector.DOMTreeDataGridNode.prototype._goToArrowWasClicked):
+ * UserInterface/Views/DebuggerSidebarPanel.js:
+ (WebInspector.DebuggerSidebarPanel.prototype.showDefaultContentView):
+ (WebInspector.DebuggerSidebarPanel.prototype._addTreeElementForSourceCodeToContentTreeOutline):
+ (WebInspector.DebuggerSidebarPanel.prototype._treeElementSelected):
+ (WebInspector.DebuggerSidebarPanel.prototype._addIssue):
+ (WebInspector.DebuggerSidebarPanel.prototype._handleIssueAdded):
+ * UserInterface/Views/LayerTreeDataGridNode.js:
+ (WebInspector.LayerTreeDataGridNode.prototype._goToArrowWasClicked):
+ * UserInterface/Views/LayoutTimelineView.js:
+ (WebInspector.LayoutTimelineView.prototype._treeElementSelected):
+ * UserInterface/Views/NavigationSidebarPanel.js:
+ (WebInspector.NavigationSidebarPanel.prototype.get contentBrowser):
+ (WebInspector.NavigationSidebarPanel.prototype.set contentBrowser):
+ (WebInspector.NavigationSidebarPanel.prototype._updateFilter):
+ * UserInterface/Views/NetworkTimelineView.js:
+ (WebInspector.NetworkTimelineView.prototype._treeElementSelected):
+ * UserInterface/Views/ObjectTreeBaseTreeElement.js:
+ (WebInspector.ObjectTreeBaseTreeElement.prototype._appendMenusItemsForObject):
+ (WebInspector.ObjectTreeBaseTreeElement):
+ * UserInterface/Views/OverviewTimelineView.js:
+ (WebInspector.OverviewTimelineView.prototype._treeElementSelected):
+ * UserInterface/Views/ResourceDetailsSidebarPanel.js:
+ (WebInspector.ResourceDetailsSidebarPanel.prototype._goToRequestDataClicked):
+ * UserInterface/Views/ResourceSidebarPanel.js:
+ (WebInspector.ResourceSidebarPanel):
+ (WebInspector.ResourceSidebarPanel.prototype.showDefaultContentView):
+ (WebInspector.ResourceSidebarPanel.prototype._mainFrameDidChange):
+ (WebInspector.ResourceSidebarPanel.prototype._mainFrameMainResourceDidChange.delayedWork):
+ (WebInspector.ResourceSidebarPanel.prototype._mainFrameMainResourceDidChange):
+ (WebInspector.ResourceSidebarPanel.prototype._treeElementSelected):
+ (WebInspector.ResourceSidebarPanel.prototype._storageCleared):
+ * UserInterface/Views/ResourceTimelineDataGridNode.js:
+ (WebInspector.ResourceTimelineDataGridNode.prototype._goToResource):
+ * UserInterface/Views/ScriptTimelineView.js:
+ (WebInspector.ScriptTimelineView.prototype._treeElementSelected):
+ * UserInterface/Views/SourceCodeTextEditor.js:
+ (WebInspector.SourceCodeTextEditor.prototype.tokenTrackingControllerHighlightedRangeWasClicked):
+ * UserInterface/Views/TimelineDataGrid.js:
+ (WebInspector.TimelineDataGrid.prototype._popoverCallStackTreeElementSelected):
+ * UserInterface/Views/TimelineSidebarPanel.js:
+ (WebInspector.TimelineSidebarPanel):
+ (WebInspector.TimelineSidebarPanel.prototype.shown):
+ (WebInspector.TimelineSidebarPanel.showTimelineViewForTimeline):
+
2015-04-22 Timothy Hatcher <timothy@apple.com>
Web Inspector: Make debugger keyboard shortcuts global
this.domTreeManager.addEventListener(WebInspector.DOMTreeManager.Event.InspectModeStateChanged, this._inspectModeStateChanged, this);
this.domTreeManager.addEventListener(WebInspector.DOMTreeManager.Event.DOMNodeWasInspected, this._domNodeWasInspected, this);
this.frameResourceManager.addEventListener(WebInspector.FrameResourceManager.Event.MainFrameDidChange, this._mainFrameDidChange, this);
+ this.frameResourceManager.addEventListener(WebInspector.FrameResourceManager.Event.FrameWasAdded, this._frameWasAdded, this);
WebInspector.Frame.addEventListener(WebInspector.Frame.Event.MainResourceDidChange, this._mainResourceDidChange, this);
var resource = frame.url === url ? frame.mainResource : frame.resourceForURL(url, searchChildFrames);
if (resource) {
var position = new WebInspector.SourceCodePosition(lineNumber, 0);
- this.resourceSidebarPanel.showSourceCode(resource, position);
+ this.showSourceCode(resource, position);
return;
}
this.detailsSidebar.collapsed = false;
};
+WebInspector.tabContentViewClassForRepresentedObject = function(representedObject)
+{
+ if (representedObject instanceof WebInspector.DOMTree)
+ return WebInspector.ElementsTabContentView;
+
+ if (representedObject instanceof WebInspector.TimelineRecording)
+ return WebInspector.TimelineTabContentView;
+
+ // We only support one console tab right now. So this isn't an instanceof check.
+ if (representedObject === this._consoleRepresentedObject)
+ return WebInspector.ConsoleTabContentView;
+
+ if (WebInspector.debuggerManager.paused) {
+ if (representedObject instanceof WebInspector.Script)
+ return WebInspector.DebuggerTabContentView;
+
+ if (representedObject instanceof WebInspector.Resource && (representedObject.type === WebInspector.Resource.Type.Document || representedObject.type === WebInspector.Resource.Type.Script))
+ return WebInspector.DebuggerTabContentView;
+ }
+
+ if (representedObject instanceof WebInspector.Frame || representedObject instanceof WebInspector.Resource || representedObject instanceof WebInspector.Script)
+ return WebInspector.ResourcesTabContentView;
+
+ // FIXME: Move Content Flows to the Elements tab?
+ if (representedObject instanceof WebInspector.ContentFlow)
+ return WebInspector.ResourcesTabContentView;
+
+ // FIXME: Move these to a Storage tab.
+ if (representedObject instanceof WebInspector.DOMStorageObject || representedObject instanceof WebInspector.CookieStorageObject ||
+ representedObject instanceof WebInspector.DatabaseTableObject || representedObject instanceof WebInspector.DatabaseObject ||
+ representedObject instanceof WebInspector.ApplicationCacheFrame || representedObject instanceof WebInspector.IndexedDatabaseObjectStore ||
+ representedObject instanceof WebInspector.IndexedDatabaseObjectStoreIndex)
+ return WebInspector.ResourcesTabContentView;
+
+ return null;
+};
+
+WebInspector.tabContentViewForRepresentedObject = function(representedObject)
+{
+ var tabContentView = this.tabBrowser.bestTabContentViewForRepresentedObject(representedObject);
+ if (tabContentView)
+ return tabContentView;
+
+ var tabContentViewClass = this.tabContentViewClassForRepresentedObject(representedObject);
+ if (!tabContentViewClass) {
+ console.error("Unknown representedObject, couldn't create TabContentView.", representedObject);
+ return null;
+ }
+
+ tabContentView = new tabContentViewClass;
+
+ this.tabBrowser.addTabForContentView(tabContentView);
+
+ return tabContentView;
+};
+
+WebInspector.showRepresentedObject = function(representedObject, cookie, forceShowTab)
+{
+ var tabContentView = this.tabContentViewForRepresentedObject(representedObject);
+ console.assert(tabContentView);
+ if (!tabContentView)
+ return;
+
+ if (window.event || forceShowTab)
+ this.tabBrowser.showTabForContentView(tabContentView);
+
+ tabContentView.showRepresentedObject(representedObject, cookie);
+};
+
+WebInspector.showMainFrameDOMTree = function(nodeToSelect, forceShowTab)
+{
+ console.assert(WebInspector.frameResourceManager.mainFrame);
+ if (!WebInspector.frameResourceManager.mainFrame)
+ return;
+ this.showRepresentedObject(WebInspector.frameResourceManager.mainFrame.domTree, {nodeToSelect}, forceShowTab);
+};
+
+WebInspector.showContentFlowDOMTree = function(contentFlow, nodeToSelect, forceShowTab)
+{
+ this.showRepresentedObject(contentFlow, {nodeToSelect}, forceShowTab);
+};
+
+WebInspector.showSourceCodeForFrame = function(frameIdentifier, forceShowTab)
+{
+ var frame = WebInspector.frameResourceManager.frameForIdentifier(frameIdentifier);
+ if (!frame) {
+ this._frameIdentifierToShowSourceCodeWhenAvailable = frameIdentifier;
+ return;
+ }
+
+ this._frameIdentifierToShowSourceCodeWhenAvailable = undefined;
+
+ this.showRepresentedObject(frame, null, forceShowTab);
+};
+
+WebInspector.showSourceCode = function(sourceCode, positionToReveal, textRangeToSelect, forceUnformatted, forceShowTab)
+{
+ console.assert(!positionToReveal || positionToReveal instanceof WebInspector.SourceCodePosition, positionToReveal);
+ var representedObject = sourceCode;
+
+ if (representedObject instanceof WebInspector.Script) {
+ // A script represented by a resource should always show the resource.
+ representedObject = representedObject.resource || representedObject;
+ }
+
+ var cookie = positionToReveal ? {lineNumber: positionToReveal.lineNumber, columnNumber: positionToReveal.columnNumber} : {};
+ this.showRepresentedObject(representedObject, cookie, forceShowTab);
+};
+
+WebInspector.showSourceCodeLocation = function(sourceCodeLocation, forceShowTab)
+{
+ this.showSourceCode(sourceCodeLocation.displaySourceCode, sourceCodeLocation.displayPosition(), null, false, forceShowTab);
+};
+
+WebInspector.showOriginalUnformattedSourceCodeLocation = function(sourceCodeLocation, forceShowTab)
+{
+ this.showSourceCode(sourceCodeLocation.sourceCode, sourceCodeLocation.position(), null, true);
+};
+
+WebInspector.showOriginalOrFormattedSourceCodeLocation = function(sourceCodeLocation, forceShowTab)
+{
+ this.showSourceCode(sourceCodeLocation.sourceCode, sourceCodeLocation.formattedPosition(), null, false, forceShowTab);
+};
+
+WebInspector.showOriginalOrFormattedSourceCodeTextRange = function(sourceCodeTextRange, forceShowTab)
+{
+ var textRangeToSelect = sourceCodeTextRange.formattedTextRange;
+ this.showSourceCode(sourceCodeTextRange.sourceCode, textRangeToSelect.startPosition(), textRangeToSelect, false, forceShowTab);
+};
+
+WebInspector.showResourceRequest = function(resource, forceShowTab)
+{
+ this.showRepresentedObject(resource, {[WebInspector.ResourceClusterContentView.ContentViewIdentifierCookieKey]: WebInspector.ResourceClusterContentView.RequestIdentifier}, forceShowTab);
+};
+
WebInspector.debuggerToggleBreakpoints = function(event)
{
WebInspector.debuggerManager.breakpointsEnabled = !WebInspector.debuggerManager.breakpointsEnabled;
this.dashboardContainer.closeDashboardViewForRepresentedObject(this.dashboardManager.dashboards.debugger);
};
+WebInspector._frameWasAdded = function(event)
+{
+ if (!this._frameIdentifierToShowSourceCodeWhenAvailable)
+ return;
+
+ var frame = event.data.frame;
+ if (frame.id !== this._frameIdentifierToShowSourceCodeWhenAvailable)
+ return;
+
+ this.showSourceCodeForFrame(frame.id);
+};
+
WebInspector._mainFrameDidChange = function(event)
{
this.updateWindowTitle();
event.preventDefault();
if (event.metaKey)
- this.resourceSidebarPanel.showOriginalUnformattedSourceCodeLocation(sourceCodeLocation);
+ this.showOriginalUnformattedSourceCodeLocation(sourceCodeLocation);
else
- this.resourceSidebarPanel.showSourceCodeLocation(sourceCodeLocation);
+ this.showSourceCodeLocation(sourceCodeLocation);
}
var linkElement = document.createElement("a");
function revealOriginalSourceCodeLocation()
{
- WebInspector.resourceSidebarPanel.showOriginalOrFormattedSourceCodeLocation(this._sourceCodeLocation);
+ WebInspector.showOriginalOrFormattedSourceCodeLocation(this._sourceCodeLocation);
}
if (WebInspector.debuggerManager.isBreakpointEditable(this))
showMainResourceForFrame: function(frameIdentifier)
{
WebInspector.ignoreLastContentCookie = true;
- WebInspector.navigationSidebar.selectedSidebarPanel = WebInspector.resourceSidebarPanel;
- WebInspector.resourceSidebarPanel.showSourceCodeForFrame(frameIdentifier, true);
+ WebInspector.showSourceCodeForFrame(frameIdentifier, true);
},
contextMenuItemSelected: function(id)
}
}
- WebInspector.resourceSidebarPanel.showSourceCodeLocation(sourceCodeLocation);
+ WebInspector.showSourceCodeLocation(sourceCodeLocation);
}
tokenTrackingControllerNewHighlightCandidate(tokenTrackingController, candidate)
_goToRegionFlowArrowWasClicked()
{
- WebInspector.resourceSidebarPanel.showContentFlowDOMTree(this._regionFlow);
+ WebInspector.showContentFlowDOMTree(this._regionFlow);
}
_goToContentFlowArrowWasClicked()
{
- WebInspector.resourceSidebarPanel.showContentFlowDOMTree(this._contentFlow, this.nodeStyles.node, true);
+ WebInspector.showContentFlowDOMTree(this._contentFlow, this.nodeStyles.node, true);
}
};
return this._contentViewContainer.contentViewForRepresentedObject(representedObject, onlyExisting, extraArguments);
},
+ updateHierarchicalPathForCurrentContentView: function()
+ {
+ var currentContentView = this.currentContentView;
+ this._updateHierarchicalPathNavigationItem(currentContentView ? currentContentView.representedObject : null);
+ },
+
canGoBack: function()
{
var currentContentView = this.currentContentView;
console.assert(representedObject);
if (representedObject instanceof WebInspector.Frame)
- return new WebInspector.FrameContentView(representedObject, extraArguments);
+ return new WebInspector.ResourceClusterContentView(representedObject.mainResource, extraArguments);
if (representedObject instanceof WebInspector.Resource)
return new WebInspector.ResourceClusterContentView(representedObject, extraArguments);
return pathComponents;
},
+ restoreFromCookie: function(cookie)
+ {
+ if (!cookie || !cookie.nodeToSelect)
+ return;
+
+ this.selectAndRevealDOMNode(cookie.nodeToSelect);
+
+ // Because nodeToSelect is ephemeral, we don't want to keep
+ // it around in the back-forward history entries.
+ cookie.nodeToSelect = undefined;
+ },
+
selectAndRevealDOMNode: function(domNode, preventFocusChange)
{
this._domTreeOutline.selectDOMNode(domNode, !preventFocusChange);
_goToArrowWasClicked: function()
{
- WebInspector.resourceSidebarPanel.showMainFrameDOMTree(this._domNode, true);
+ WebInspector.showMainFrameDOMTree(this._domNode);
}
};
WebInspector.DebuggerSidebarPanel = class DebuggerSidebarPanel extends WebInspector.NavigationSidebarPanel
{
- constructor()
+ constructor(contentBrowser)
{
super("debugger", WebInspector.UIString("Debugger"), true);
+ this.contentBrowser = contentBrowser;
+
WebInspector.Frame.addEventListener(WebInspector.Frame.Event.MainResourceDidChange, this._mainResourceChanged, this);
WebInspector.Frame.addEventListener(WebInspector.Frame.Event.ResourceWasAdded, this._resourceAdded, this);
showDefaultContentView()
{
- WebInspector.resourceSidebarPanel.showDefaultContentView();
+ var currentTreeElement = this._contentTreeOutline.children[0];
+ while (currentTreeElement && !currentTreeElement.root) {
+ if (currentTreeElement instanceof WebInspector.ResourceTreeElement || currentTreeElement instanceof WebInspector.ScriptTreeElement) {
+ currentTreeElement.revealAndSelect();
+ return;
+ }
+
+ currentTreeElement = currentTreeElement.traverseNextTreeElement(false, null, true);
+ }
}
treeElementForRepresentedObject(representedObject)
treeElement = new WebInspector.ScriptTreeElement(sourceCode);
}
+ if (!treeElement) {
+ console.error("Unknown sourceCode instance", sourceCode);
+ return;
+ }
+
if (!treeElement.parent) {
treeElement.hasChildren = false;
treeElement.expand();
if (treeElement instanceof WebInspector.ResourceTreeElement || treeElement instanceof WebInspector.ScriptTreeElement) {
deselectCallStackContentTreeElements.call(this);
deselectPauseReasonContentTreeElements.call(this);
- WebInspector.resourceSidebarPanel.showSourceCode(treeElement.representedObject);
+ WebInspector.showSourceCode(treeElement.representedObject);
return;
}
var callFrame = treeElement.callFrame;
WebInspector.debuggerManager.activeCallFrame = callFrame;
- WebInspector.resourceSidebarPanel.showSourceCodeLocation(callFrame.sourceCodeLocation);
+ WebInspector.showSourceCodeLocation(callFrame.sourceCodeLocation);
return;
}
if (treeElement instanceof WebInspector.IssueTreeElement) {
deselectCallStackContentTreeElements.call(this);
deselectPauseReasonContentTreeElements.call(this);
- WebInspector.resourceSidebarPanel.showSourceCodeLocation(treeElement.issueMessage.sourceCodeLocation);
+ WebInspector.showSourceCodeLocation(treeElement.issueMessage.sourceCodeLocation);
return;
}
var breakpoint = treeElement.breakpoint;
if (treeElement.treeOutline === this._pauseReasonTreeOutline) {
- WebInspector.resourceSidebarPanel.showSourceCodeLocation(breakpoint.sourceCodeLocation);
+ WebInspector.showSourceCodeLocation(breakpoint.sourceCodeLocation);
return;
}
if (!(treeElement.parent.representedObject instanceof WebInspector.SourceCode))
return;
- WebInspector.resourceSidebarPanel.showSourceCodeLocation(breakpoint.sourceCodeLocation);
+ WebInspector.showSourceCodeLocation(breakpoint.sourceCodeLocation);
}
_compareTopLevelTreeElements(a, b)
_addIssue(issueMessage)
{
var parentTreeElement = this._addTreeElementForSourceCodeToContentTreeOutline(issueMessage.sourceCodeLocation.sourceCode);
+ if (!parentTreeElement)
+ return null;
+
var issueTreeElement = new WebInspector.IssueTreeElement(issueMessage);
parentTreeElement.insertChild(issueTreeElement, insertionIndexForObjectInListSortedByFunction(issueTreeElement, parentTreeElement.children, this._compareDebuggerTreeElements));
var issue = event.data.issue;
// We only want to show issues originating from JavaScript source code.
- if (!issue.lineNumber || (issue.source !== "javascript" && issue.source !== "console-api"))
+ if (!issue.sourceCodeLocation || !issue.sourceCodeLocation.sourceCode || (issue.source !== "javascript" && issue.source !== "console-api"))
return;
this._addIssue(issue);
_goToArrowWasClicked: function()
{
var domNode = WebInspector.domTreeManager.nodeForId(this._layer.nodeId);
- WebInspector.resourceSidebarPanel.showMainFrameDOMTree(domNode, true);
+ WebInspector.showMainFrameDOMTree(domNode);
}
};
// Public
+ get contentBrowser()
+ {
+ return this._contentBrowser;
+ }
+
+ set contentBrowser(contentBrowser)
+ {
+ this._contentBrowser = contentBrowser || null;
+ }
+
get contentTreeOutlineElement()
{
return this._contentTreeOutline.element;
this._updateContentOverflowShadowVisibility();
// Filter may have hidden the selected resource in the timeline view, which should now notify its listeners.
+ // FIXME: This is a layering violation. This should at least be in TimelineSidebarPanel.
if (selectedTreeElement && selectedTreeElement.hidden !== selectionWasHidden) {
- var currentContentView = WebInspector.contentBrowser.currentContentView;
+ var currentContentView = this.contentBrowser.currentContentView;
if (currentContentView instanceof WebInspector.TimelineRecordingContentView && typeof currentContentView.currentTimelineView.filterUpdated === "function")
currentContentView.currentTimelineView.filterUpdated();
}
showContentViewForTreeElement: function(treeElement)
{
if (treeElement instanceof WebInspector.ResourceTreeElement || treeElement instanceof WebInspector.ScriptTreeElement) {
- WebInspector.resourceSidebarPanel.showSourceCode(treeElement.representedObject);
+ WebInspector.showSourceCode(treeElement.representedObject);
return true;
}
return;
var sourceCodeLocation = sourceCode.createSourceCodeLocation(location.lineNumber, location.columnNumber || 0);
- WebInspector.resourceSidebarPanel.showSourceCodeLocation(sourceCodeLocation);
+ WebInspector.showSourceCodeLocation(sourceCodeLocation);
});
});
}
return;
if (treeElement instanceof WebInspector.ResourceTreeElement || treeElement instanceof WebInspector.ScriptTreeElement) {
- WebInspector.resourceSidebarPanel.showSourceCode(treeElement.representedObject);
+ WebInspector.showSourceCode(treeElement.representedObject);
this._updateTreeElementWithCloseButton(treeElement);
return;
}
return;
}
- WebInspector.resourceSidebarPanel.showOriginalOrFormattedSourceCodeLocation(treeElement.sourceCodeTimeline.sourceCodeLocation);
+ WebInspector.showOriginalOrFormattedSourceCodeLocation(treeElement.sourceCodeTimeline.sourceCodeLocation);
this._updateTreeElementWithCloseButton(treeElement);
},
showContentViewForTreeElement: function(treeElement)
{
if (treeElement instanceof WebInspector.ProfileNodeTreeElement && treeElement.profileNode.sourceCodeLocation) {
- WebInspector.resourceSidebarPanel.showOriginalOrFormattedSourceCodeLocation(treeElement.profileNode.sourceCodeLocation);
+ WebInspector.showOriginalOrFormattedSourceCodeLocation(treeElement.profileNode.sourceCodeLocation);
return true;
}
_goToRequestDataClicked()
{
- WebInspector.resourceSidebarPanel.showResourceRequest(this._resource);
+ WebInspector.showResourceRequest(this._resource);
}
_refreshRequestDataSection()
WebInspector.ResourceSidebarPanel = class ResourceSidebarPanel extends WebInspector.NavigationSidebarPanel
{
- constructor()
+ constructor(contentBrowser)
{
super("resource", WebInspector.UIString("Resources"), true, true);
+ this.contentBrowser = contentBrowser;
+
var searchElement = document.createElement("div");
searchElement.classList.add("search-bar");
this.element.appendChild(searchElement);
WebInspector.applicationCacheManager.addEventListener(WebInspector.ApplicationCacheManager.Event.FrameManifestRemoved, this._frameManifestRemoved, this);
WebInspector.frameResourceManager.addEventListener(WebInspector.FrameResourceManager.Event.MainFrameDidChange, this._mainFrameDidChange, this);
- WebInspector.frameResourceManager.addEventListener(WebInspector.FrameResourceManager.Event.FrameWasAdded, this._frameWasAdded, this);
-
- WebInspector.domTreeManager.addEventListener(WebInspector.DOMTreeManager.Event.DOMNodeWasInspected, this._domNodeWasInspected, this);
WebInspector.debuggerManager.addEventListener(WebInspector.DebuggerManager.Event.ScriptAdded, this._scriptWasAdded, this);
WebInspector.debuggerManager.addEventListener(WebInspector.DebuggerManager.Event.ScriptsCleared, this._scriptsCleared, this);
showDefaultContentView()
{
if (WebInspector.frameResourceManager.mainFrame) {
- this.showMainFrame();
+ this.contentBrowser.showContentViewForRepresentedObject(WebInspector.frameResourceManager.mainFrame);
return;
}
return this._searchContentTreeOutline;
}
- showMainFrame(nodeToSelect, preventFocusChange)
- {
- WebInspector.contentBrowser.showContentViewForRepresentedObject(WebInspector.frameResourceManager.mainFrame);
- }
-
- showMainFrameDOMTree(nodeToSelect, preventFocusChange)
- {
- var contentView = WebInspector.contentBrowser.contentViewForRepresentedObject(WebInspector.frameResourceManager.mainFrame);
- contentView.showDOMTree(nodeToSelect, preventFocusChange);
- WebInspector.contentBrowser.showContentView(contentView);
- }
-
- showMainFrameSourceCode()
- {
- var contentView = WebInspector.contentBrowser.contentViewForRepresentedObject(WebInspector.frameResourceManager.mainFrame);
- contentView.showSourceCode();
- WebInspector.contentBrowser.showContentView(contentView);
- }
-
- showContentFlowDOMTree(contentFlow, nodeToSelect, preventFocusChange)
- {
- var contentView = WebInspector.contentBrowser.contentViewForRepresentedObject(contentFlow);
- if (nodeToSelect)
- contentView.selectAndRevealDOMNode(nodeToSelect, preventFocusChange);
- WebInspector.contentBrowser.showContentView(contentView);
- }
-
- showSourceCodeForFrame(frameIdentifier, revealAndSelectTreeElement)
- {
- delete this._frameIdentifierToShowSourceCodeWhenAvailable;
-
- // We can't show anything until we have the main frame in the sidebar.
- // Otherwise the path components in the navigation bar would be missing.
- var frame = WebInspector.frameResourceManager.frameForIdentifier(frameIdentifier);
- if (!frame || !this._mainFrameTreeElement) {
- this._frameIdentifierToShowSourceCodeWhenAvailable = frameIdentifier;
- return;
- }
-
- var contentView = WebInspector.contentBrowser.contentViewForRepresentedObject(frame);
- console.assert(contentView);
- if (!contentView)
- return;
-
- contentView.showSourceCode();
- WebInspector.contentBrowser.showContentView(contentView);
-
- if (revealAndSelectTreeElement)
- this.treeElementForRepresentedObject(frame).revealAndSelect(true, true, true, true);
- }
-
- showSourceCode(sourceCode, positionToReveal, textRangeToSelect, forceUnformatted)
- {
- console.assert(!positionToReveal || positionToReveal instanceof WebInspector.SourceCodePosition, positionToReveal);
- var representedObject = sourceCode;
-
- if (representedObject instanceof WebInspector.Script) {
- // A script represented by a resource should always show the resource.
- representedObject = representedObject.resource || representedObject;
- }
-
- // A main resource is always represented by its parent frame.
- if (representedObject instanceof WebInspector.Resource && representedObject.isMainResource())
- representedObject = representedObject.parentFrame;
-
- var cookie = positionToReveal ? {lineNumber: positionToReveal.lineNumber, columnNumber: positionToReveal.columnNumber} : {};
- WebInspector.contentBrowser.showContentViewForRepresentedObject(representedObject, cookie);
- }
-
- showSourceCodeLocation(sourceCodeLocation)
- {
- this.showSourceCode(sourceCodeLocation.displaySourceCode, sourceCodeLocation.displayPosition());
- }
-
- showOriginalUnformattedSourceCodeLocation(sourceCodeLocation)
- {
- this.showSourceCode(sourceCodeLocation.sourceCode, sourceCodeLocation.position(), undefined, true);
- }
-
- showOriginalOrFormattedSourceCodeLocation(sourceCodeLocation)
- {
- this.showSourceCode(sourceCodeLocation.sourceCode, sourceCodeLocation.formattedPosition());
- }
-
- showSourceCodeTextRange(sourceCodeTextRange)
- {
- var textRangeToSelect = sourceCodeTextRange.displayTextRange;
- this.showSourceCode(sourceCodeTextRange.displaySourceCode, textRangeToSelect.startPosition(), textRangeToSelect);
- }
-
- showOriginalOrFormattedSourceCodeTextRange(sourceCodeTextRange)
- {
- var textRangeToSelect = sourceCodeTextRange.formattedTextRange;
- this.showSourceCode(sourceCodeTextRange.sourceCode, textRangeToSelect.startPosition(), textRangeToSelect);
- }
-
- showResource(resource)
- {
- WebInspector.contentBrowser.showContentViewForRepresentedObject(resource.isMainResource() ? resource.parentFrame : resource);
- }
-
- showResourceRequest(resource)
- {
- var contentView = WebInspector.contentBrowser.contentViewForRepresentedObject(resource.isMainResource() ? resource.parentFrame : resource);
-
- if (contentView instanceof WebInspector.FrameContentView)
- var resourceContentView = contentView.showResource();
- else if (contentView instanceof WebInspector.ResourceClusterContentView)
- var resourceContentView = contentView;
-
- console.assert(resourceContentView instanceof WebInspector.ResourceClusterContentView);
- if (!(resourceContentView instanceof WebInspector.ResourceClusterContentView))
- return;
-
- resourceContentView.showRequest();
-
- WebInspector.contentBrowser.showContentView(contentView);
- }
-
treeElementForRepresentedObject(representedObject)
{
// A custom implementation is needed for this since the frames are populated lazily.
+ if (!this._mainFrameTreeElement && (representedObject instanceof WebInspector.Resource || representedObject instanceof WebInspector.Frame)) {
+ // All resources are under the main frame, so we need to return early if we don't have the main frame yet.
+ return null;
+ }
+
// The Frame is used as the representedObject instead of the main resource in our tree.
if (representedObject instanceof WebInspector.Resource && representedObject.parentFrame && representedObject.parentFrame.mainResource === representedObject)
representedObject = representedObject.parentFrame;
this._mainFrameTreeElement = new WebInspector.FrameTreeElement(newFrame);
this._resourcesContentTreeOutline.insertChild(this._mainFrameTreeElement, 0);
- // Select by default. Allow onselect if we aren't showing a content view.
- if (!this._resourcesContentTreeOutline.selectedTreeElement)
- this._mainFrameTreeElement.revealAndSelect(true, false, !!WebInspector.contentBrowser.currentContentView);
-
- if (this._frameIdentifierToShowSourceCodeWhenAvailable)
- this.showSourceCodeForFrame(this._frameIdentifierToShowSourceCodeWhenAvailable, true);
+ // Select a tree element by default. Allow onselect if we aren't showing a content view.
+ if (!this._resourcesContentTreeOutline.selectedTreeElement) {
+ var currentContentView = this.contentBrowser.currentContentView;
+ var treeElement = currentContentView ? this.treeElementForRepresentedObject(currentContentView.representedObject) : null;
+ if (!treeElement)
+ treeElement = this._mainFrameTreeElement;
+ treeElement.revealAndSelect(true, false, !!currentContentView, true);
+ }
}
+ // The navigation path needs update when the main frame changes, since all resources are under the main frame.
+ this.contentBrowser.updateHierarchicalPathForCurrentContentView();
+
// We only care about the first time the main frame changes.
if (!this._waitingForInitialMainFrame)
return;
if (!newFrame)
return;
- delete this._waitingForInitialMainFrame;
+ this._waitingForInitialMainFrame = false;
// Only if the last page searched is the same as the current page.
if (this._lastSearchedPageSetting.value !== newFrame.url.hash)
_mainFrameMainResourceDidChange(event)
{
var wasShowingResourceSidebar = this.selected;
- var currentContentView = WebInspector.contentBrowser.currentContentView;
+ var currentContentView = this.contentBrowser.currentContentView;
var wasShowingResourceContentView = currentContentView instanceof WebInspector.ResourceContentView
|| currentContentView instanceof WebInspector.ResourceClusterContentView
|| currentContentView instanceof WebInspector.FrameContentView
|| currentContentView instanceof WebInspector.ScriptContentView;
- // Close all resource and frame content views since the main frame has navigated and all resources are cleared.
- WebInspector.contentBrowser.contentViewContainer.closeAllContentViewsOfPrototype(WebInspector.ResourceClusterContentView);
- WebInspector.contentBrowser.contentViewContainer.closeAllContentViewsOfPrototype(WebInspector.FrameContentView);
- WebInspector.contentBrowser.contentViewContainer.closeAllContentViewsOfPrototype(WebInspector.ScriptContentView);
+ this.contentBrowser.contentViewContainer.closeAllContentViews();
// Break out of search tree outline if there was an active search.
this._showResourcesContentTreeOutline();
{
// Show the main frame since there is no content view showing or we were showing a resource before.
// Cookie restoration will attempt to re-select the resource we were showing.
- if (!WebInspector.contentBrowser.currentContentView || wasShowingResourceContentView) {
- // If we were showing a resource inside of the ResourceSidebar, we should
- // re-show the resource inside of the resource sidebar. It is possible that
- // the sidebar panel could have switched to another view in the back-forward list.
- if (wasShowingResourceSidebar)
- WebInspector.navigationSidebar.selectedSidebarPanel = this;
-
+ if (!this.contentBrowser.currentContentView || wasShowingResourceContentView) {
// NOTE: This selection, during provisional loading, won't be saved, so it is
// safe to do and not-clobber cookie restoration.
this._mainFrameTreeElement.revealAndSelect(true, false);
setTimeout(delayedWork.bind(this), 0);
}
- _frameWasAdded(event)
- {
- if (!this._frameIdentifierToShowSourceCodeWhenAvailable)
- return;
-
- var frame = event.data.frame;
- if (frame.id !== this._frameIdentifierToShowSourceCodeWhenAvailable)
- return;
-
- this.showSourceCodeForFrame(frame.id, true);
- }
-
_scriptWasAdded(event)
{
var script = event.data.script;
treeElement instanceof WebInspector.DatabaseTreeElement || treeElement instanceof WebInspector.ApplicationCacheFrameTreeElement ||
treeElement instanceof WebInspector.ContentFlowTreeElement || treeElement instanceof WebInspector.IndexedDatabaseObjectStoreTreeElement ||
treeElement instanceof WebInspector.IndexedDatabaseObjectStoreIndexTreeElement) {
- WebInspector.contentBrowser.showContentViewForRepresentedObject(treeElement.representedObject);
+ WebInspector.showRepresentedObject(treeElement.representedObject);
return;
}
return;
if (treeElement.representedObject instanceof WebInspector.DOMSearchMatchObject)
- this.showMainFrameDOMTree(treeElement.representedObject.domNode, true);
+ WebInspector.showMainFrameDOMTree(treeElement.representedObject.domNode);
else if (treeElement.representedObject instanceof WebInspector.SourceCodeSearchMatchObject)
- this.showOriginalOrFormattedSourceCodeTextRange(treeElement.representedObject.sourceCodeTextRange);
- }
-
- _domNodeWasInspected(event)
- {
- this.showMainFrameDOMTree(event.data.node);
+ WebInspector.showOriginalOrFormattedSourceCodeTextRange(treeElement.representedObject.sourceCodeTextRange);
}
_domStorageObjectWasAdded(event)
_storageCleared(event)
{
// Close all DOM and cookie storage content views since the main frame has navigated and all storages are cleared.
- WebInspector.contentBrowser.contentViewContainer.closeAllContentViewsOfPrototype(WebInspector.CookieStorageContentView);
- WebInspector.contentBrowser.contentViewContainer.closeAllContentViewsOfPrototype(WebInspector.DOMStorageContentView);
- WebInspector.contentBrowser.contentViewContainer.closeAllContentViewsOfPrototype(WebInspector.DatabaseTableContentView);
- WebInspector.contentBrowser.contentViewContainer.closeAllContentViewsOfPrototype(WebInspector.DatabaseContentView);
- WebInspector.contentBrowser.contentViewContainer.closeAllContentViewsOfPrototype(WebInspector.ApplicationCacheFrameContentView);
+ this.contentBrowser.contentViewContainer.closeAllContentViewsOfPrototype(WebInspector.CookieStorageContentView);
+ this.contentBrowser.contentViewContainer.closeAllContentViewsOfPrototype(WebInspector.DOMStorageContentView);
+ this.contentBrowser.contentViewContainer.closeAllContentViewsOfPrototype(WebInspector.DatabaseTableContentView);
+ this.contentBrowser.contentViewContainer.closeAllContentViewsOfPrototype(WebInspector.DatabaseContentView);
+ this.contentBrowser.contentViewContainer.closeAllContentViewsOfPrototype(WebInspector.ApplicationCacheFrameContentView);
if (this._localStorageRootTreeElement && this._localStorageRootTreeElement.parent)
this._localStorageRootTreeElement.parent.removeChild(this._localStorageRootTreeElement);
_goToResource: function(event)
{
- WebInspector.resourceSidebarPanel.showSourceCode(this._resource);
+ WebInspector.showSourceCode(this._resource);
},
_timelineRecordUpdated: function(event)
showContentViewForTreeElement: function(treeElement)
{
if (treeElement instanceof WebInspector.ProfileNodeTreeElement && treeElement.profileNode.sourceCodeLocation) {
- WebInspector.resourceSidebarPanel.showOriginalOrFormattedSourceCodeLocation(treeElement.profileNode.sourceCodeLocation);
+ WebInspector.showOriginalOrFormattedSourceCodeLocation(treeElement.profileNode.sourceCodeLocation);
return true;
}
var sourceCodeLocation = this._sourceCodeLocationForEditorPosition(this.tokenTrackingController.candidate.hoveredTokenRange.start);
if (this.sourceCode instanceof WebInspector.SourceMapResource)
- WebInspector.resourceSidebarPanel.showOriginalOrFormattedSourceCodeLocation(sourceCodeLocation);
+ WebInspector.showOriginalOrFormattedSourceCodeLocation(sourceCodeLocation);
else
- WebInspector.resourceSidebarPanel.showSourceCodeLocation(sourceCodeLocation);
+ WebInspector.showSourceCodeLocation(sourceCodeLocation);
}
tokenTrackingControllerNewHighlightCandidate(tokenTrackingController, candidate)
if (!callFrame.sourceCodeLocation)
return;
- WebInspector.resourceSidebarPanel.showSourceCodeLocation(callFrame.sourceCodeLocation);
+ WebInspector.showSourceCodeLocation(callFrame.sourceCodeLocation);
}
};
WebInspector.TimelineSidebarPanel = class TimelineSidebarPanel extends WebInspector.NavigationSidebarPanel
{
- constructor()
+ constructor(contentBrowser)
{
super("timeline", WebInspector.UIString("Timelines"));
+ this.contentBrowser = contentBrowser;
+
this._timelineEventsTitleBarElement = document.createElement("div");
this._timelineEventsTitleBarElement.classList.add(WebInspector.TimelineSidebarPanel.TitleBarStyleClass);
this._timelineEventsTitleBarElement.classList.add(WebInspector.TimelineSidebarPanel.TimelineEventsTitleBarStyleClass);
WebInspector.timelineManager.addEventListener(WebInspector.TimelineManager.Event.RecordingCreated, this._recordingCreated, this);
WebInspector.timelineManager.addEventListener(WebInspector.TimelineManager.Event.RecordingLoaded, this._recordingLoaded, this);
- WebInspector.contentBrowser.addEventListener(WebInspector.ContentBrowser.Event.CurrentContentViewDidChange, this._contentBrowserCurrentContentViewDidChange, this);
+ this.contentBrowser.addEventListener(WebInspector.ContentBrowser.Event.CurrentContentViewDidChange, this._contentBrowserCurrentContentViewDidChange, this);
WebInspector.timelineManager.addEventListener(WebInspector.TimelineManager.Event.CapturingStarted, this._capturingStarted, this);
WebInspector.timelineManager.addEventListener(WebInspector.TimelineManager.Event.CapturingStopped, this._capturingStopped, this);
}
super.shown();
if (this._displayedContentView)
- WebInspector.contentBrowser.showContentView(this._displayedContentView);
+ this.contentBrowser.showContentView(this._displayedContentView);
}
showDefaultContentView()
this._timelinesTreeOutline.selectedTreeElement.deselect();
this._displayedContentView.showOverviewTimelineView();
- WebInspector.contentBrowser.showContentView(this._displayedContentView);
+ this.contentBrowser.showContentView(this._displayedContentView);
}
showTimelineViewForTimeline(timeline)
{
console.assert(cookie);
- cookie[WebInspector.TimelineSidebarPanel.ShowingTimelineRecordingContentViewCookieKey] = WebInspector.contentBrowser.currentContentView instanceof WebInspector.TimelineRecordingContentView;
+ cookie[WebInspector.TimelineSidebarPanel.ShowingTimelineRecordingContentViewCookieKey] = this.contentBrowser.currentContentView instanceof WebInspector.TimelineRecordingContentView;
var selectedTreeElement = this._timelinesTreeOutline.selectedTreeElement;
if (selectedTreeElement)
console.assert(this._displayedRecording.timelines.get(timeline.type) === timeline, timeline);
this._displayedContentView.showTimelineViewForTimeline(timeline);
- WebInspector.contentBrowser.showContentView(this._displayedContentView);
+ this.contentBrowser.showContentView(this._displayedContentView);
}
_contentBrowserCurrentContentViewDidChange(event)
{
- var didShowTimelineRecordingContentView = WebInspector.contentBrowser.currentContentView instanceof WebInspector.TimelineRecordingContentView;
+ var didShowTimelineRecordingContentView = this.contentBrowser.currentContentView instanceof WebInspector.TimelineRecordingContentView;
this.element.classList.toggle(WebInspector.TimelineSidebarPanel.TimelineRecordingContentViewShowingStyleClass, didShowTimelineRecordingContentView);
}
for (var timeline of recording.timelines.values())
this._timelineAdded(timeline);
- this._displayedContentView = WebInspector.contentBrowser.contentViewForRepresentedObject(this._displayedRecording, false, {timelineSidebarPanel: this});
+ this._displayedContentView = this.contentBrowser.contentViewForRepresentedObject(this._displayedRecording, false, {timelineSidebarPanel: this});
if (this.selected)
- WebInspector.contentBrowser.showContentView(this._displayedContentView);
+ this.contentBrowser.showContentView(this._displayedContentView);
}
_recordingLoaded(event)
return true;
}
- WebInspector.resourceSidebarPanel.showOriginalOrFormattedSourceCodeLocation(sourceCodeLocation);
+ WebInspector.showOriginalOrFormattedSourceCodeLocation(sourceCodeLocation);
return true;
},