Web Inspector: make ResourceView(s) compile
authorpfeldman@chromium.org <pfeldman@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 5 Oct 2011 11:55:41 +0000 (11:55 +0000)
committerpfeldman@chromium.org <pfeldman@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 5 Oct 2011 11:55:41 +0000 (11:55 +0000)
https://bugs.webkit.org/show_bug.cgi?id=69351

Reviewed by Yury Semikhatsky.

* inspector/compile-front-end.sh:
* inspector/front-end/CookiesTable.js:
(WebInspector.CookiesTable.prototype._sortCookies):
* inspector/front-end/DataGrid.js:
* inspector/front-end/EmptyView.js:
* inspector/front-end/FontView.js:
(WebInspector.FontView.prototype._createContentIfNeeded):
* inspector/front-end/ImageView.js:
(WebInspector.ImageView.prototype._createContentIfNeeded.onImageLoad):
(WebInspector.ImageView.prototype._createContentIfNeeded):
(WebInspector.ImageView.prototype._openInNewTab):
* inspector/front-end/NetworkItemView.js:
* inspector/front-end/ResourceCookiesView.js:
* inspector/front-end/ResourceHTMLView.js:
(WebInspector.ResourceHTMLView.prototype.hide):
* inspector/front-end/ResourceHeadersView.js:
(WebInspector.ResourceHeadersView.prototype._refreshParms):
(WebInspector.ResourceHeadersView.prototype._refreshHeadersTitle):
(WebInspector.ResourceHeadersView.prototype._refreshHeaders):
(WebInspector.ResourceHeadersView.prototype._refreshHeadersText):
* inspector/front-end/ResourceJSONView.js:
(WebInspector.ResourceJSONView.parseJSON.WebInspector.ResourceJSONView.parseJSONP):
* inspector/front-end/ResourcePreviewView.js:
* inspector/front-end/ResourceResponseView.js:
* inspector/front-end/ResourceTimingView.js:
(WebInspector.ResourceTimingView.createTimingTable):
* inspector/front-end/ResourceView.js:
(WebInspector.ResourceSourceFrame):
* inspector/front-end/SourceFrame.js:
* inspector/front-end/TabbedPane.js:
* inspector/front-end/UIUtils.js:
(Number.secondsToString):
(Number.bytesToString):
* inspector/front-end/inspector.js:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@96695 268f45cc-cd09-0410-ab3c-d52691b4dbfc

20 files changed:
Source/WebCore/ChangeLog
Source/WebCore/inspector/compile-front-end.sh
Source/WebCore/inspector/front-end/CookiesTable.js
Source/WebCore/inspector/front-end/DataGrid.js
Source/WebCore/inspector/front-end/EmptyView.js
Source/WebCore/inspector/front-end/FontView.js
Source/WebCore/inspector/front-end/ImageView.js
Source/WebCore/inspector/front-end/NetworkItemView.js
Source/WebCore/inspector/front-end/ResourceCookiesView.js
Source/WebCore/inspector/front-end/ResourceHTMLView.js
Source/WebCore/inspector/front-end/ResourceHeadersView.js
Source/WebCore/inspector/front-end/ResourceJSONView.js
Source/WebCore/inspector/front-end/ResourcePreviewView.js
Source/WebCore/inspector/front-end/ResourceResponseView.js
Source/WebCore/inspector/front-end/ResourceTimingView.js
Source/WebCore/inspector/front-end/ResourceView.js
Source/WebCore/inspector/front-end/SourceFrame.js
Source/WebCore/inspector/front-end/TabbedPane.js
Source/WebCore/inspector/front-end/UIUtils.js
Source/WebCore/inspector/front-end/inspector.js

index c1ce3bf..20ad5eb 100644 (file)
@@ -1,3 +1,45 @@
+2011-10-04  Pavel Feldman  <pfeldman@google.com>
+
+        Web Inspector: make ResourceView(s) compile
+        https://bugs.webkit.org/show_bug.cgi?id=69351
+
+        Reviewed by Yury Semikhatsky.
+
+        * inspector/compile-front-end.sh:
+        * inspector/front-end/CookiesTable.js:
+        (WebInspector.CookiesTable.prototype._sortCookies):
+        * inspector/front-end/DataGrid.js:
+        * inspector/front-end/EmptyView.js:
+        * inspector/front-end/FontView.js:
+        (WebInspector.FontView.prototype._createContentIfNeeded):
+        * inspector/front-end/ImageView.js:
+        (WebInspector.ImageView.prototype._createContentIfNeeded.onImageLoad):
+        (WebInspector.ImageView.prototype._createContentIfNeeded):
+        (WebInspector.ImageView.prototype._openInNewTab):
+        * inspector/front-end/NetworkItemView.js:
+        * inspector/front-end/ResourceCookiesView.js:
+        * inspector/front-end/ResourceHTMLView.js:
+        (WebInspector.ResourceHTMLView.prototype.hide):
+        * inspector/front-end/ResourceHeadersView.js:
+        (WebInspector.ResourceHeadersView.prototype._refreshParms):
+        (WebInspector.ResourceHeadersView.prototype._refreshHeadersTitle):
+        (WebInspector.ResourceHeadersView.prototype._refreshHeaders):
+        (WebInspector.ResourceHeadersView.prototype._refreshHeadersText):
+        * inspector/front-end/ResourceJSONView.js:
+        (WebInspector.ResourceJSONView.parseJSON.WebInspector.ResourceJSONView.parseJSONP):
+        * inspector/front-end/ResourcePreviewView.js:
+        * inspector/front-end/ResourceResponseView.js:
+        * inspector/front-end/ResourceTimingView.js:
+        (WebInspector.ResourceTimingView.createTimingTable):
+        * inspector/front-end/ResourceView.js:
+        (WebInspector.ResourceSourceFrame):
+        * inspector/front-end/SourceFrame.js:
+        * inspector/front-end/TabbedPane.js:
+        * inspector/front-end/UIUtils.js:
+        (Number.secondsToString):
+        (Number.bytesToString):
+        * inspector/front-end/inspector.js:
+
 2011-10-04  Ilya Tikhonovsky  <loislo@chromium.org>
 
         Web Inspector: debuggerPresentatioModel.linkifyLocation leaks updateAnchor closure instances.
index 044d90e..b9dfff0 100755 (executable)
@@ -68,10 +68,11 @@ java -jar ~/closure/compiler.jar --compilation_level SIMPLE_OPTIMIZATIONS --warn
         --js Source/WebCore/inspector/front-end/Resource.js \
         --js Source/WebCore/inspector/front-end/NetworkManager.js \
         --js Source/WebCore/inspector/front-end/UISourceCode.js \
-    --module jsmodule_ui:27:jsmodule_common \
+    --module jsmodule_ui:28:jsmodule_common \
         --js Source/WebCore/inspector/front-end/Checkbox.js \
         --js Source/WebCore/inspector/front-end/Color.js \
         --js Source/WebCore/inspector/front-end/ContextMenu.js \
+        --js Source/WebCore/inspector/front-end/CookiesTable.js \
         --js Source/WebCore/inspector/front-end/DataGrid.js \
         --js Source/WebCore/inspector/front-end/Drawer.js \
         --js Source/WebCore/inspector/front-end/EmptyView.js \
@@ -96,11 +97,22 @@ java -jar ~/closure/compiler.jar --compilation_level SIMPLE_OPTIMIZATIONS --warn
         --js Source/WebCore/inspector/front-end/Toolbar.js \
         --js Source/WebCore/inspector/front-end/UIUtils.js \
         --js Source/WebCore/inspector/front-end/View.js \
-    --module jsmodule_inspector:7:jsmodule_sdk,jsmodule_ui \
+    --module jsmodule_inspector:18:jsmodule_sdk,jsmodule_ui \
         --js Source/WebCore/inspector/front-end/ConsoleMessage.js \
         --js Source/WebCore/inspector/front-end/ConsoleView.js \
+        --js Source/WebCore/inspector/front-end/FontView.js \
+        --js Source/WebCore/inspector/front-end/ImageView.js \
         --js Source/WebCore/inspector/front-end/JavaScriptContextManager.js \
+        --js Source/WebCore/inspector/front-end/NetworkItemView.js \
         --js Source/WebCore/inspector/front-end/ObjectPopoverHelper.js \
         --js Source/WebCore/inspector/front-end/ObjectPropertiesSection.js \
+        --js Source/WebCore/inspector/front-end/ResourceCookiesView.js \
+        --js Source/WebCore/inspector/front-end/ResourceHeadersView.js \
+        --js Source/WebCore/inspector/front-end/ResourceHTMLView.js \
+        --js Source/WebCore/inspector/front-end/ResourceJSONView.js \
+        --js Source/WebCore/inspector/front-end/ResourcePreviewView.js \
+        --js Source/WebCore/inspector/front-end/ResourceResponseView.js \
+        --js Source/WebCore/inspector/front-end/ResourceTimingView.js \
+        --js Source/WebCore/inspector/front-end/ResourceView.js \
         --js Source/WebCore/inspector/front-end/SourceFrame.js \
         --js Source/WebCore/inspector/front-end/TimelineManager.js
index 2d1cb6a..3ef2c8b 100644 (file)
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+/**
+ * @constructor
+ * @param {function(PageAgent.Cookie)=} deleteCallback
+ * @param {function()=} refreshCallback
+ */
 WebInspector.CookiesTable = function(cookieDomain, expandable, deleteCallback, refreshCallback)
 {
     this._cookieDomain = cookieDomain;
@@ -164,7 +169,7 @@ WebInspector.CookiesTable.prototype = {
         }
 
         var comparator;
-        switch (parseInt(this._dataGrid.sortColumnIdentifier)) {
+        switch (parseInt(this._dataGrid.sortColumnIdentifier, 10)) {
             case 0: comparator = localeCompare.bind(this, "name"); break;
             case 1: comparator = localeCompare.bind(this, "value"); break;
             case 2: comparator = localeCompare.bind(this, "domain"); break;
@@ -179,6 +184,9 @@ WebInspector.CookiesTable.prototype = {
         cookies.sort(comparator);
     },
 
+    /**
+     * @param {PageAgent.Cookie} cookie
+     */
     _createGridNode: function(cookie)
     {
         var data = {};
index ae03512..4e4a129 100644 (file)
@@ -1036,6 +1036,7 @@ WebInspector.DataGrid.prototype.__proto__ = WebInspector.Object.prototype;
 /**
  * @constructor
  * @extends {WebInspector.Object}
+ * @param {boolean=} hasChildren
  */
 WebInspector.DataGridNode = function(data, hasChildren)
 {
index 41904ac..fb0321e 100644 (file)
@@ -39,6 +39,9 @@ WebInspector.EmptyView = function(text)
 }
 
 WebInspector.EmptyView.prototype = {
+    /**
+     * @param {Element=} parentElement
+     */
     show: function(parentElement)
     {
         WebInspector.View.prototype.show.call(this, parentElement);
index a9b7aab..760c75a 100644 (file)
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+/**
+ * @extends {WebInspector.ResourceView}
+ * @constructor
+ */
 WebInspector.FontView = function(resource)
 {
     WebInspector.ResourceView.call(this, resource);
@@ -58,16 +62,16 @@ WebInspector.FontView.prototype = {
 
         this.fontPreviewElement = document.createElement("div");
         this.fontPreviewElement.innerHTML = WebInspector.FontView._fontInnerHTML;
-        this.fontPreviewElement.style.setProperty("font-family", uniqueFontName, null);
-        this.fontPreviewElement.style.setProperty("visibility", "hidden", null);
+        this.fontPreviewElement.style.setProperty("font-family", uniqueFontName);
+        this.fontPreviewElement.style.setProperty("visibility", "hidden");
 
         this._dummyElement = document.createElement("div");
         this._dummyElement.style.visibility = "hidden";
         this._dummyElement.style.zIndex = "-1";
         this._dummyElement.style.display = "inline";
         this._dummyElement.style.position = "absolute";
-        this._dummyElement.style.setProperty("font-family", uniqueFontName, null);
-        this._dummyElement.style.setProperty("font-size", WebInspector.FontView._measureFontSize + "px", null);
+        this._dummyElement.style.setProperty("font-family", uniqueFontName);
+        this._dummyElement.style.setProperty("font-size", WebInspector.FontView._measureFontSize + "px");
         this._dummyElement.innerHTML = WebInspector.FontView._fontInnerHTML;
 
         this.element.appendChild(this.fontPreviewElement);
index 691548a..70fe042 100644 (file)
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+/**
+ * @extends {WebInspector.ResourceView}
+ * @constructor
+ */
 WebInspector.ImageView = function(resource)
 {
     WebInspector.ResourceView.call(this, resource);
@@ -101,7 +105,7 @@ WebInspector.ImageView.prototype = {
             infoListElement.appendChild(dt);
             var dd = document.createElement("dd");
             var externalResource = true;
-            dd.appendChild(WebInspector.linkifyURLAsNode(this.resource.url, null, null, externalResource));
+            dd.appendChild(WebInspector.linkifyURLAsNode(this.resource.url, undefined, undefined, externalResource));
             infoListElement.appendChild(dd);
 
             this._container.appendChild(infoListElement);
@@ -136,7 +140,7 @@ WebInspector.ImageView.prototype = {
 
     _openInNewTab: function(event)
     {
-        WebInspector.openResource(this.resource.url, false);
+        PageAgent.open(this.resource.url, true);
     }
 }
 
index 6efb1ae..3157da6 100644 (file)
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+/**
+ * @extends {WebInspector.TabbedPane}
+ * @constructor
+ */
 WebInspector.NetworkItemView = function(resource)
 {
     WebInspector.TabbedPane.call(this);
@@ -63,6 +67,9 @@ WebInspector.NetworkItemView.prototype = {
         this._selectTab();
     },
 
+    /**
+     * @param {string=} tabId
+     */
     _selectTab: function(tabId)
     {
         if (!tabId)
@@ -84,6 +91,10 @@ WebInspector.NetworkItemView.prototype = {
 
 WebInspector.NetworkItemView.prototype.__proto__ = WebInspector.TabbedPane.prototype;
 
+/**
+ * @extends {WebInspector.ResourceView}
+ * @constructor
+ */
 WebInspector.ResourceContentView = function(resource)
 {
     WebInspector.ResourceView.call(this, resource);
index f07e7e4..5ef5598 100644 (file)
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+/**
+ * @extends {WebInspector.View}
+ * @constructor
+ */
 WebInspector.ResourceCookiesView = function(resource)
 {
     WebInspector.View.call(this);
index 0663bcb..933ff84 100644 (file)
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+/**
+ * @constructor
+ * @extends {WebInspector.ResourceView}
+ */
 WebInspector.ResourceHTMLView = function(resource)
 {
     WebInspector.ResourceView.call(this, resource);
@@ -48,7 +52,7 @@ WebInspector.ResourceHTMLView.prototype = {
 
     hide: function(parentElement)
     {
-        WebInspector.ResourceView.prototype.hide.call(this, parentElement);
+        WebInspector.ResourceView.prototype.hide.call(this);
         this.element.removeChildren();
     },
 
index 39ff081..4b553cf 100644 (file)
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+/**
+ * @extends {WebInspector.View}
+ * @constructor
+ */
 WebInspector.ResourceHeadersView = function(resource)
 {
     WebInspector.View.call(this);
@@ -219,7 +223,7 @@ WebInspector.ResourceHeadersView.prototype = {
             var valueEscaped = this._decodeRequestParameters ? this._decodeURIComponent(value) : value.escapeHTML();
             var nameEscaped = this._decodeRequestParameters ? this._decodeURIComponent(name) : name.escapeHTML();
 
-            var title = "<div class=\"header-name\">" + nameEscaped + ":</div>";
+            title = "<div class=\"header-name\">" + nameEscaped + ":</div>";
             title += "<div class=\"header-value source-code\">" + valueEscaped + "</div>";
 
             var parmTreeElement = new TreeElement(null, null, false);
@@ -251,7 +255,7 @@ WebInspector.ResourceHeadersView.prototype = {
         if (typeof this._resource.webSocketRequestKey3 !== "undefined")
             additionalRow = {header: "(Key3)", value: this._resource.webSocketRequestKey3};
         if (this._showRequestHeadersText)
-            this._refreshHeadersText(WebInspector.UIString("Request Headers"), this._resource.requestHeadersText, this._requestHeadersTreeElement);
+            this._refreshHeadersText(WebInspector.UIString("Request Headers"), this._resource.sortedRequestHeaders, this._resource.requestHeadersText, this._requestHeadersTreeElement);
         else
             this._refreshHeaders(WebInspector.UIString("Request Headers"), this._resource.sortedRequestHeaders, additionalRow, this._requestHeadersTreeElement);
 
@@ -270,7 +274,7 @@ WebInspector.ResourceHeadersView.prototype = {
         if (typeof this._resource.webSocketChallengeResponse !== "undefined")
             additionalRow = {header: "(Challenge Response)", value: this._resource.webSocketChallengeResponse};
         if (this._showResponseHeadersText)
-            this._refreshHeadersText(WebInspector.UIString("Response Headers"), this._resource.responseHeadersText, this._responseHeadersTreeElement);
+            this._refreshHeadersText(WebInspector.UIString("Response Headers"), this._resource.sortedResponseHeaders, this._resource.responseHeadersText, this._responseHeadersTreeElement);
         else
             this._refreshHeaders(WebInspector.UIString("Response Headers"), this._resource.sortedResponseHeaders, additionalRow, this._responseHeadersTreeElement);
 
@@ -313,17 +317,15 @@ WebInspector.ResourceHeadersView.prototype = {
         }
     },
 
-    _refreshHeadersTitle: function(title, headersTreeElement, isHeadersTextShown, headersLength)
+    _refreshHeadersTitle: function(title, headersTreeElement, headersLength)
     {
         headersTreeElement.listItemElement.removeChildren();
         headersTreeElement.listItemElement.appendChild(document.createTextNode(title));
 
-        if (!isHeadersTextShown) {
-            var headerCount = document.createElement("span");
-            headerCount.addStyleClass("header-count");
-            headerCount.textContent = WebInspector.UIString(" (%d)", headersLength);
-            headersTreeElement.listItemElement.appendChild(headerCount);
-        }
+        var headerCount = document.createElement("span");
+        headerCount.addStyleClass("header-count");
+        headerCount.textContent = WebInspector.UIString(" (%d)", headersLength);
+        headersTreeElement.listItemElement.appendChild(headerCount);
     },
 
     _refreshHeaders: function(title, headers, additionalRow, headersTreeElement)
@@ -331,10 +333,10 @@ WebInspector.ResourceHeadersView.prototype = {
         headersTreeElement.removeChildren();
 
         var length = headers.length;
-        this._refreshHeadersTitle(title, headersTreeElement, false, length);
+        this._refreshHeadersTitle(title, headersTreeElement, length);
         headersTreeElement.hidden = !length;
         for (var i = 0; i < length; ++i) {
-            var title = "<div class=\"header-name\">" + headers[i].header.escapeHTML() + ":</div>";
+            title = "<div class=\"header-name\">" + headers[i].header.escapeHTML() + ":</div>";
             title += "<div class=\"header-value source-code\">" + headers[i].value.escapeHTML() + "</div>"
 
             var headerTreeElement = new TreeElement(null, null, false);
@@ -344,7 +346,7 @@ WebInspector.ResourceHeadersView.prototype = {
         }
 
         if (additionalRow) {
-            var title = "<div class=\"header-name\">" + additionalRow.header.escapeHTML() + ":</div>";
+            title = "<div class=\"header-name\">" + additionalRow.header.escapeHTML() + ":</div>";
             title += "<div class=\"header-value source-code\">" + additionalRow.value.escapeHTML() + "</div>"
 
             var headerTreeElement = new TreeElement(null, null, false);
@@ -354,11 +356,11 @@ WebInspector.ResourceHeadersView.prototype = {
         }
     },
 
-    _refreshHeadersText: function(title, headersText, headersTreeElement)
+    _refreshHeadersText: function(title, headers, headersText, headersTreeElement)
     {
         headersTreeElement.removeChildren();
 
-        this._refreshHeadersTitle(title, headersTreeElement, true);
+        this._refreshHeadersTitle(title, headersTreeElement, headers.length);
         var headerTreeElement = new TreeElement(null, null, false);
         headerTreeElement.selectable = false;
         headersTreeElement.appendChild(headerTreeElement);
index f91a182..dd36db9 100644 (file)
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+/**
+ * @extends {WebInspector.ResourceView}
+ * @constructor
+ */
 WebInspector.ResourceJSONView = function(resource, parsedJSON)
 {
     WebInspector.ResourceView.call(this, resource);
@@ -63,7 +67,7 @@ WebInspector.ResourceJSONView.parseJSONP = function(text)
 
     var prefix = text.substring(0, start + 1);
     var suffix = text.substring(end);
-    var text = text.substring(start + 1, end);
+    text = text.substring(start + 1, end);
 
     try {
         return new WebInspector.ParsedJSON(JSON.parse(text), prefix, suffix);
@@ -101,6 +105,9 @@ WebInspector.ResourceJSONView.prototype = {
 
 WebInspector.ResourceJSONView.prototype.__proto__ = WebInspector.ResourceView.prototype;
 
+/**
+ * @constructor
+ */
 WebInspector.ParsedJSON = function(data, prefix, suffix)
 {
     this.data = data;
index 2feb1a5..6b62b3a 100644 (file)
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+/**
+ * @extends {WebInspector.ResourceContentView}
+ * @constructor
+ */
 WebInspector.ResourcePreviewView = function(resource, responseView)
 {
     WebInspector.ResourceContentView.call(this, resource);
index f734272..491457e 100644 (file)
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+/**
+ * @extends {WebInspector.ResourceContentView}
+ * @constructor
+ */
 WebInspector.ResourceResponseView = function(resource)
 {
     WebInspector.ResourceContentView.call(this, resource);
index cb36d4d..ec3fd1a 100644 (file)
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+/**
+ * @extends {WebInspector.View}
+ * @constructor
+ */
 WebInspector.ResourceTimingView = function(resource)
 {
     WebInspector.View.call(this);
@@ -76,7 +80,7 @@ WebInspector.ResourceTimingView.createTimingTable = function(resource)
     var tableElement = document.createElement("table");
     var rows = [];
 
-    function addRow(title, className, start, end, color)
+    function addRow(title, className, start, end)
     {
         var row = {};
         row.title = title;
index fda8511..436183f 100644 (file)
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+/**
+ * @extends {WebInspector.View}
+ * @constructor
+ */
 WebInspector.ResourceView = function(resource)
 {
     WebInspector.View.call(this);
@@ -70,9 +74,13 @@ WebInspector.ResourceView.nonSourceViewForResource = function(resource)
     }
 }
 
+/**
+ * @extends {WebInspector.SourceFrame}
+ * @constructor
+ */
 WebInspector.ResourceSourceFrame = function(resource)
 {
-    WebInspector.SourceFrame.call(this, new WebInspector.SourceFrameDelegate(resource), resource.url);
+    WebInspector.SourceFrame.call(this, WebInspector.SourceFrameDelegate.stub, resource.url);
     this._resource = resource;
 }
 
@@ -118,6 +126,10 @@ WebInspector.EditableResourceSourceFrame = function(resource)
     WebInspector.ResourceSourceFrame.call(this, resource);
 }
 
+/**
+ * @extends {WebInspector.ResourceSourceFrame}
+ * @constructor
+ */
 WebInspector.EditableResourceSourceFrame.prototype = {
     canEditSource: function()
     {
@@ -161,6 +173,10 @@ WebInspector.EditableResourceSourceFrame.prototype = {
 
 WebInspector.EditableResourceSourceFrame.prototype.__proto__ = WebInspector.ResourceSourceFrame.prototype;
 
+/**
+ * @extends {WebInspector.ResourceSourceFrame}
+ * @constructor
+ */
 WebInspector.ResourceRevisionSourceFrame = function(revision)
 {
     WebInspector.ResourceSourceFrame.call(this, revision.resource);
index 499abf6..09f8267 100644 (file)
@@ -992,3 +992,8 @@ WebInspector.SourceFrameDelegate.prototype = {
 
     suggestedFileName: function() { }
 }
+
+/**
+ * Default implementation.
+ */
+WebInspector.SourceFrameDelegate.stub = Object.create(WebInspector.SourceFrameDelegate.prototype);
index c3f4fd0..af1355c 100644 (file)
@@ -31,6 +31,7 @@
 /**
  * @extends {WebInspector.View}
  * @constructor
+ * @param {Element=} element
  */
 WebInspector.TabbedPane = function(element)
 {
@@ -55,6 +56,9 @@ WebInspector.TabbedPane.prototype = {
         this._tabs[id] = { tabElement: tabElement, view: view };
     },
 
+    /**
+     * @param {boolean=} userGesture
+     */
     selectTab: function(id, userGesture)
     {
         if (!(id in this._tabs))
index d656d36..8ec938d 100644 (file)
@@ -396,3 +396,55 @@ WebInspector.startEditing = function(element, config)
     };
 }
 
+/**
+ * @param {boolean=} higherResolution
+ */
+Number.secondsToString = function(seconds, higherResolution)
+{
+    if (seconds === 0)
+        return "0";
+
+    var ms = seconds * 1000;
+    if (higherResolution && ms < 1000)
+        return WebInspector.UIString("%.3fms", ms);
+    else if (ms < 1000)
+        return WebInspector.UIString("%.0fms", ms);
+
+    if (seconds < 60)
+        return WebInspector.UIString("%.2fs", seconds);
+
+    var minutes = seconds / 60;
+    if (minutes < 60)
+        return WebInspector.UIString("%.1fmin", minutes);
+
+    var hours = minutes / 60;
+    if (hours < 24)
+        return WebInspector.UIString("%.1fhrs", hours);
+
+    var days = hours / 24;
+    return WebInspector.UIString("%.1f days", days);
+}
+
+/**
+ * @param {boolean=} higherResolution
+ */
+Number.bytesToString = function(bytes, higherResolution)
+{
+    if (typeof higherResolution === "undefined")
+        higherResolution = true;
+
+    if (bytes < 1024)
+        return WebInspector.UIString("%.0fB", bytes);
+
+    var kilobytes = bytes / 1024;
+    if (higherResolution && kilobytes < 1024)
+        return WebInspector.UIString("%.2fKB", kilobytes);
+    else if (kilobytes < 1024)
+        return WebInspector.UIString("%.0fKB", kilobytes);
+
+    var megabytes = kilobytes / 1024;
+    if (higherResolution)
+        return WebInspector.UIString("%.2fMB", megabytes);
+    else
+        return WebInspector.UIString("%.0fMB", megabytes);
+}
index 6820940..19b3377 100644 (file)
@@ -1411,50 +1411,3 @@ WebInspector.PanelHistory.prototype = {
         this._historyIterator = this._history.length - 1;
     }
 }
-
-Number.secondsToString = function(seconds, higherResolution)
-{
-    if (seconds === 0)
-        return "0";
-
-    var ms = seconds * 1000;
-    if (higherResolution && ms < 1000)
-        return WebInspector.UIString("%.3fms", ms);
-    else if (ms < 1000)
-        return WebInspector.UIString("%.0fms", ms);
-
-    if (seconds < 60)
-        return WebInspector.UIString("%.2fs", seconds);
-
-    var minutes = seconds / 60;
-    if (minutes < 60)
-        return WebInspector.UIString("%.1fmin", minutes);
-
-    var hours = minutes / 60;
-    if (hours < 24)
-        return WebInspector.UIString("%.1fhrs", hours);
-
-    var days = hours / 24;
-    return WebInspector.UIString("%.1f days", days);
-}
-
-Number.bytesToString = function(bytes, higherResolution)
-{
-    if (typeof higherResolution === "undefined")
-        higherResolution = true;
-
-    if (bytes < 1024)
-        return WebInspector.UIString("%.0fB", bytes);
-
-    var kilobytes = bytes / 1024;
-    if (higherResolution && kilobytes < 1024)
-        return WebInspector.UIString("%.2fKB", kilobytes);
-    else if (kilobytes < 1024)
-        return WebInspector.UIString("%.0fKB", kilobytes);
-
-    var megabytes = kilobytes / 1024;
-    if (higherResolution)
-        return WebInspector.UIString("%.2fMB", megabytes);
-    else
-        return WebInspector.UIString("%.0fMB", megabytes);
-}