diff options
Diffstat (limited to 'WebCore/inspector/front-end/ResourceView.js')
-rw-r--r-- | WebCore/inspector/front-end/ResourceView.js | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/WebCore/inspector/front-end/ResourceView.js b/WebCore/inspector/front-end/ResourceView.js index b7b01ac..618a935 100644 --- a/WebCore/inspector/front-end/ResourceView.js +++ b/WebCore/inspector/front-end/ResourceView.js @@ -47,7 +47,7 @@ WebInspector.ResourceView = function(resource) this.tabsElement.appendChild(this.contentTabElement); this.headersTabElement.addEventListener("click", this._selectHeadersTab.bind(this), false); - this.contentTabElement.addEventListener("click", this._selectContentTab.bind(this), false); + this.contentTabElement.addEventListener("click", this.selectContentTab.bind(this), false); this.headersElement = document.createElement("div"); this.headersElement.className = "resource-view-headers"; @@ -155,7 +155,7 @@ WebInspector.ResourceView.prototype = { if (WebInspector.settings.resourceViewTab === "headers") this._selectHeadersTab(); else - this._selectContentTab(); + this.selectContentTab(); } else this._innerSelectContentTab(); }, @@ -169,7 +169,7 @@ WebInspector.ResourceView.prototype = { this.contentElement.addStyleClass("hidden"); }, - _selectContentTab: function() + selectContentTab: function() { WebInspector.settings.resourceViewTab = "content"; this._innerSelectContentTab(); @@ -183,8 +183,17 @@ WebInspector.ResourceView.prototype = { this.headersElement.addStyleClass("hidden"); if ("resize" in this) this.resize(); - if ("contentTabSelected" in this) - this.contentTabSelected(); + this.contentTabSelected(); + }, + + contentTabSelected: function() + { + if (!this._contentPlaceholderElement) { + this._contentPlaceholderElement = document.createElement("div"); + this._contentPlaceholderElement.className = "resource-content-unavailable"; + this._contentPlaceholderElement.textContent = WebInspector.UIString("No Content Available"); + this.contentElement.appendChild(this._contentPlaceholderElement); + } }, _refreshURL: function() |