this.sidebarTree.appendChild(this.fileSystemListTreeElement);
}
- var mainView = new WebInspector.View();
+ var mainView = new WebInspector.VBox();
this.storageViews = mainView.element.createChild("div", "resources-main diff-container");
var statusBarContainer = mainView.element.createChild("div", "resources-status-bar");
this.storageViewStatusBarItemsContainer = statusBarContainer.createChild("div", "status-bar");
this.sidebarElement().addEventListener("mouseout", this._onmouseout.bind(this), false);
/**
- * @return {!WebInspector.View}
* @this {WebInspector.ResourcesPanel}
+ * @return {?WebInspector.SourceFrame}
*/
- function viewGetter()
+ function sourceFrameGetter()
{
- return this.visibleView;
+ var view = this.visibleView;
+ if (view && view instanceof WebInspector.SourceFrame)
+ return /** @type {!WebInspector.SourceFrame} */ (view);
+ return null;
}
- WebInspector.GoToLineDialog.install(this, viewGetter.bind(this));
+ WebInspector.GoToLineDialog.install(this, sourceFrameGetter.bind(this));
if (WebInspector.resourceTreeModel.cachedResourcesLoaded())
this._cachedResourcesLoaded();
}
}
- var mainResource = WebInspector.inspectedPageURL && this.resourcesListTreeElement && this.resourcesListTreeElement.expanded && WebInspector.resourceTreeModel.resourceForURL(WebInspector.inspectedPageURL);
+ var mainResource = WebInspector.resourceTreeModel.inspectedPageURL() && this.resourcesListTreeElement && this.resourcesListTreeElement.expanded
+ ? WebInspector.resourceTreeModel.resourceForURL(WebInspector.resourceTreeModel.inspectedPageURL())
+ : null;
if (mainResource)
this.showResource(mainResource);
},
resourceTreeElement.revealAndSelect(true);
if (typeof line === "number") {
- var view = this._resourceViewForResource(resource);
- if (view.canHighlightPosition())
- view.highlightPosition(line, column);
+ var resourceSourceFrame = this._resourceSourceFrameViewForResource(resource);
+ if (resourceSourceFrame)
+ resourceSourceFrame.revealPosition(line, column, true);
}
return true;
},
this._innerShowView(view);
},
+ /**
+ * @param {!WebInspector.Resource} resource
+ * @return {?WebInspector.View}
+ */
_resourceViewForResource: function(resource)
{
if (WebInspector.ResourceView.hasTextContent(resource)) {
},
/**
+ * @param {!WebInspector.Resource} resource
+ * @return {?WebInspector.ResourceSourceFrame}
+ */
+ _resourceSourceFrameViewForResource: function(resource)
+ {
+ var resourceView = this._resourceViewForResource(resource);
+ if (resourceView && resourceView instanceof WebInspector.ResourceSourceFrame)
+ return /** @type {!WebInspector.ResourceSourceFrame} */ (resourceView);
+ return null;
+ },
+
+ /**
* @param {!WebInspector.Database} database
* @param {string=} tableName
*/
this._applicationCacheViews[manifestURL].updateNetworkState(isNowOnline);
},
- _forAllResourceTreeElements: function(callback)
- {
- var stop = false;
- for (var treeElement = this.resourcesListTreeElement; !stop && treeElement; treeElement = treeElement.traverseNextTreeElement(false, this.resourcesListTreeElement, true)) {
- if (treeElement instanceof WebInspector.FrameResourceTreeElement)
- stop = callback(treeElement);
- }
- },
-
_findTreeElementForResource: function(resource)
{
function isAncestor(ancestor, object)
reveal: function(resource, lineNumber)
{
if (resource instanceof WebInspector.Resource)
- /** @type {!WebInspector.ResourcesPanel} */ (WebInspector.showPanel("resources")).showResource(resource, lineNumber);
+ /** @type {!WebInspector.ResourcesPanel} */ (WebInspector.inspectorView.showPanel("resources")).showResource(resource, lineNumber);
}
}
/**
* @constructor
- * @extends {WebInspector.View}
+ * @extends {WebInspector.VBox}
*/
WebInspector.StorageCategoryView = function()
{
- WebInspector.View.call(this);
+ WebInspector.VBox.call(this);
this.element.classList.add("storage-view");
this._emptyView = new WebInspector.EmptyView("");
this._emptyView.text = text;
},
- __proto__: WebInspector.View.prototype
+ __proto__: WebInspector.VBox.prototype
}