Title: [114754] trunk/Source/WebCore
Revision
114754
Author
[email protected]
Date
2012-04-20 09:28:07 -0700 (Fri, 20 Apr 2012)

Log Message

Web Inspector: follow up to r114729: more @return annotations added.
https://bugs.webkit.org/show_bug.cgi?id=84447

Reviewed by Yury Semikhatsky.

* inspector/front-end/Resource.js:
(WebInspector.Resource):
(WebInspector.ResourceRevision.prototype.get content):
* inspector/front-end/ResourceTreeModel.js:
(WebInspector.ResourceTreeFrame.prototype._addRequest):
* inspector/front-end/ResourceUtils.js:
(String.prototype.asParsedURL):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (114753 => 114754)


--- trunk/Source/WebCore/ChangeLog	2012-04-20 16:24:41 UTC (rev 114753)
+++ trunk/Source/WebCore/ChangeLog	2012-04-20 16:28:07 UTC (rev 114754)
@@ -1,5 +1,20 @@
 2012-04-20  Pavel Feldman  <[email protected]>
 
+        Web Inspector: follow up to r114729: more @return annotations added.
+        https://bugs.webkit.org/show_bug.cgi?id=84447
+
+        Reviewed by Yury Semikhatsky.
+
+        * inspector/front-end/Resource.js:
+        (WebInspector.Resource):
+        (WebInspector.ResourceRevision.prototype.get content):
+        * inspector/front-end/ResourceTreeModel.js:
+        (WebInspector.ResourceTreeFrame.prototype._addRequest):
+        * inspector/front-end/ResourceUtils.js:
+        (String.prototype.asParsedURL):
+
+2012-04-20  Pavel Feldman  <[email protected]>
+
         Web Inspector: migrate from ScriptsNavigator to NavigatorView in the Styles panel
         https://bugs.webkit.org/show_bug.cgi?id=84459
 

Modified: trunk/Source/WebCore/inspector/front-end/Resource.js (114753 => 114754)


--- trunk/Source/WebCore/inspector/front-end/Resource.js	2012-04-20 16:24:41 UTC (rev 114753)
+++ trunk/Source/WebCore/inspector/front-end/Resource.js	2012-04-20 16:28:07 UTC (rev 114754)
@@ -35,8 +35,8 @@
  * @param {string} documentURL
  * @param {NetworkAgent.FrameId} frameId
  * @param {NetworkAgent.LoaderId} loaderId
- * @param {WebInspector.ResourceType=} type
- * @param {string=} mimeType
+ * @param {WebInspector.ResourceType} type
+ * @param {string} mimeType
  */
 WebInspector.Resource = function(request, url, documentURL, frameId, loaderId, type, mimeType)
 {
@@ -51,8 +51,8 @@
     this._mimeType = mimeType;
     this.history = [];
 
-    this._content = undefined;
-    this._contentEncoded = undefined;
+    /** @type {?string} */ this._content;
+    /** @type {boolean} */ this._contentEncoded;
     this._pendingContentCallbacks = [];
 }
 
@@ -154,7 +154,7 @@
 
 WebInspector.Resource.prototype = {
     /**
-     * @type {?WebInspector.NetworkRequest}
+     * @return {?WebInspector.NetworkRequest}
      */
     get request()
     {
@@ -162,7 +162,7 @@
     },
 
     /**
-     * @type {string}
+     * @return {string}
      */
     get url()
     {
@@ -181,7 +181,7 @@
     },
 
     /**
-     * @type {string}
+     * @return {string}
      */
     get documentURL()
     {
@@ -189,7 +189,7 @@
     },
 
     /**
-     * @type {NetworkAgent.FrameId}
+     * @return {NetworkAgent.FrameId}
      */
     get frameId()
     {
@@ -197,7 +197,7 @@
     },
 
     /**
-     * @type {NetworkAgent.LoaderId}
+     * @return {NetworkAgent.LoaderId}
      */
     get loaderId()
     {
@@ -205,7 +205,7 @@
     },
 
     /**
-     * @type {string}
+     * @return {string}
      */
     get displayName()
     {
@@ -213,7 +213,7 @@
     },
 
     /**
-     * @type {WebInspector.ResourceType}
+     * @return {WebInspector.ResourceType}
      */
     get type()
     {
@@ -221,7 +221,7 @@
     },
 
     /**
-     * @type {string}
+     * @return {string}
      */
     get mimeType()
     {
@@ -229,7 +229,7 @@
     },
 
     /**
-     * @type {Array.<WebInspector.ConsoleMessage>}
+     * @return {Array.<WebInspector.ConsoleMessage>}
      */
     get messages()
     {
@@ -251,7 +251,7 @@
     },
 
     /**
-     * @type {number}
+     * @return {number}
      */
     get errors()
     {
@@ -264,7 +264,7 @@
     },
 
     /**
-     * @type {number}
+     * @return {number}
      */
     get warnings()
     {
@@ -285,7 +285,7 @@
     },
 
     /**
-     * @type {string}
+     * @return {?string}
      */
     get content()
     {
@@ -293,7 +293,7 @@
     },
 
     /**
-     * @type {string}
+     * @return {boolean}
      */
     get contentEncoded()
     {
@@ -301,7 +301,7 @@
     },
 
     /**
-     * @type {number}
+     * @return {number}
      */
     get contentTimestamp()
     {
@@ -462,7 +462,7 @@
  * @constructor
  * @implements {WebInspector.ContentProvider}
  * @param {WebInspector.Resource} resource
- * @param {string|undefined} content
+ * @param {?string|undefined} content
  * @param {number} timestamp
  */
 WebInspector.ResourceRevision = function(resource, content, timestamp)
@@ -474,7 +474,7 @@
 
 WebInspector.ResourceRevision.prototype = {
     /**
-     * @type {WebInspector.Resource}
+     * @return {WebInspector.Resource}
      */
     get resource()
     {
@@ -482,7 +482,7 @@
     },
 
     /**
-     * @type {number}
+     * @return {number}
      */
     get timestamp()
     {
@@ -490,11 +490,11 @@
     },
 
     /**
-     * @type {string}
+     * @return {?string}
      */
     get content()
     {
-        return this._content;
+        return this._content || null;
     },
 
     revertToThis: function()

Modified: trunk/Source/WebCore/inspector/front-end/ResourceTreeModel.js (114753 => 114754)


--- trunk/Source/WebCore/inspector/front-end/ResourceTreeModel.js	2012-04-20 16:24:41 UTC (rev 114753)
+++ trunk/Source/WebCore/inspector/front-end/ResourceTreeModel.js	2012-04-20 16:28:07 UTC (rev 114754)
@@ -542,7 +542,7 @@
             // Already in the tree, we just got an extra update.
             return resource;
         }
-        resource = new WebInspector.Resource(request, request.url, request.documentURL, request.frameId, request.loaderId);
+        resource = new WebInspector.Resource(request, request.url, request.documentURL, request.frameId, request.loaderId, request.type, request.mimeType);
         this._resourcesMap[resource.url] = resource;
         this._model.dispatchEventToListeners(WebInspector.ResourceTreeModel.EventTypes.ResourceAdded, resource);
         return resource;

Modified: trunk/Source/WebCore/inspector/front-end/ResourceUtils.js (114753 => 114754)


--- trunk/Source/WebCore/inspector/front-end/ResourceUtils.js	2012-04-20 16:24:41 UTC (rev 114753)
+++ trunk/Source/WebCore/inspector/front-end/ResourceUtils.js	2012-04-20 16:28:07 UTC (rev 114754)
@@ -30,7 +30,7 @@
 
 /**
  * @constructor
- * @param {String|string} url
+ * @param {string} url
  */
 WebInspector.ParsedURL = function(url)
 {
@@ -110,7 +110,7 @@
  */
 String.prototype.asParsedURL = function()
 {
-    var parsedURL = new WebInspector.ParsedURL(this);
+    var parsedURL = new WebInspector.ParsedURL(this.toString());
     if (parsedURL.isValid)
         return parsedURL;
     return null;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to