Title: [114729] trunk/Source/WebCore
Revision
114729
Author
pfeld...@chromium.org
Date
2012-04-20 02:15:13 -0700 (Fri, 20 Apr 2012)

Log Message

Web Inspector: replace @type annotation with @return annotation for getters
https://bugs.webkit.org/show_bug.cgi?id=84362

Reviewed by Yury Semikhatsky.

Otherwise, compiler does not check for errors.

* inspector/front-end/AdvancedSearchController.js:
(WebInspector.SearchView.prototype.get searchConfig):
* inspector/front-end/BreakpointManager.js:
* inspector/front-end/NetworkRequest.js:
(WebInspector.NetworkRequest.prototype.requestContent):
* inspector/front-end/ResourceTreeModel.js:
(WebInspector.ResourceTreeFrame):
(WebInspector.ResourceTreeFrame.prototype._navigate):
* inspector/front-end/ScriptsNavigator.js:
* inspector/front-end/Settings.js:
* inspector/front-end/SnippetsModel.js:
* inspector/front-end/SplitView.js:
* inspector/front-end/TabbedEditorContainer.js:
* inspector/front-end/TabbedPane.js:
(WebInspector.TabbedPaneTab):
* inspector/front-end/TextEditorModel.js:
* inspector/front-end/TimelinePresentationModel.js:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (114728 => 114729)


--- trunk/Source/WebCore/ChangeLog	2012-04-20 08:49:18 UTC (rev 114728)
+++ trunk/Source/WebCore/ChangeLog	2012-04-20 09:15:13 UTC (rev 114729)
@@ -1,3 +1,30 @@
+2012-04-19  Pavel Feldman  <pfeld...@chromium.org>
+
+        Web Inspector: replace @type annotation with @return annotation for getters
+        https://bugs.webkit.org/show_bug.cgi?id=84362
+
+        Reviewed by Yury Semikhatsky.
+
+        Otherwise, compiler does not check for errors.
+
+        * inspector/front-end/AdvancedSearchController.js:
+        (WebInspector.SearchView.prototype.get searchConfig):
+        * inspector/front-end/BreakpointManager.js:
+        * inspector/front-end/NetworkRequest.js:
+        (WebInspector.NetworkRequest.prototype.requestContent):
+        * inspector/front-end/ResourceTreeModel.js:
+        (WebInspector.ResourceTreeFrame):
+        (WebInspector.ResourceTreeFrame.prototype._navigate):
+        * inspector/front-end/ScriptsNavigator.js:
+        * inspector/front-end/Settings.js:
+        * inspector/front-end/SnippetsModel.js:
+        * inspector/front-end/SplitView.js:
+        * inspector/front-end/TabbedEditorContainer.js:
+        * inspector/front-end/TabbedPane.js:
+        (WebInspector.TabbedPaneTab):
+        * inspector/front-end/TextEditorModel.js:
+        * inspector/front-end/TimelinePresentationModel.js:
+
 2012-04-20  Mark Pilgrim  <pilg...@chromium.org>
 
         [Chromium] Call cacheMetadata directly

Modified: trunk/Source/WebCore/inspector/front-end/AdvancedSearchController.js (114728 => 114729)


--- trunk/Source/WebCore/inspector/front-end/AdvancedSearchController.js	2012-04-20 08:49:18 UTC (rev 114728)
+++ trunk/Source/WebCore/inspector/front-end/AdvancedSearchController.js	2012-04-20 09:15:13 UTC (rev 114729)
@@ -228,7 +228,7 @@
 
 WebInspector.SearchView.prototype = {
     /**
-     * @type {Array.<Element>}
+     * @return {Array.<Element>}
      */
     get statusBarItems()
     {
@@ -236,7 +236,7 @@
     },
 
     /**
-     * @type {Element}
+     * @return {Element}
      */
     get counterElement()
     {
@@ -244,15 +244,11 @@
     },
 
     /**
-     * @type {WebInspector.SearchConfig}
+     * @return {WebInspector.SearchConfig}
      */
     get searchConfig()
     {
-        var searchConfig = {};
-        searchConfig.query = this._search.value;
-        searchConfig.ignoreCase = this._ignoreCaseCheckbox.checked;
-        searchConfig.isRegex = this._regexCheckbox.checked;
-        return searchConfig;
+        return new WebInspector.SearchConfig(this._search.value, this._ignoreCaseCheckbox.checked, this._regexCheckbox.checked);
     },
     
     /**
@@ -467,7 +463,7 @@
 
 WebInspector.SearchResultsPane.prototype = {
     /**
-     * @type {WebInspector.SearchConfig}
+     * @return {WebInspector.SearchConfig}
      */
     get searchConfig()
     {

Modified: trunk/Source/WebCore/inspector/front-end/BreakpointManager.js (114728 => 114729)


--- trunk/Source/WebCore/inspector/front-end/BreakpointManager.js	2012-04-20 08:49:18 UTC (rev 114728)
+++ trunk/Source/WebCore/inspector/front-end/BreakpointManager.js	2012-04-20 09:15:13 UTC (rev 114729)
@@ -413,7 +413,7 @@
     },
 
     /**
-     * @type {WebInspector.UIBreakpoint}
+     * @return {WebInspector.UIBreakpoint}
      */
     get uiBreakpoint()
     {

Modified: trunk/Source/WebCore/inspector/front-end/NetworkRequest.js (114728 => 114729)


--- trunk/Source/WebCore/inspector/front-end/NetworkRequest.js	2012-04-20 08:49:18 UTC (rev 114728)
+++ trunk/Source/WebCore/inspector/front-end/NetworkRequest.js	2012-04-20 09:15:13 UTC (rev 114729)
@@ -69,7 +69,7 @@
 
 WebInspector.NetworkRequest.prototype = {
     /**
-     * @type {NetworkAgent.RequestId}
+     * @return {NetworkAgent.RequestId}
      */
     get requestId()
     {
@@ -82,7 +82,7 @@
     },
 
     /**
-     * @type {string}
+     * @return {string}
      */
     get url()
     {
@@ -100,7 +100,7 @@
     },
 
     /**
-     * @type {string}
+     * @return {string}
      */
     get documentURL()
     {
@@ -113,7 +113,7 @@
     },
 
     /**
-     * @type {NetworkAgent.FrameId}
+     * @return {NetworkAgent.FrameId}
      */
     get frameId()
     {
@@ -121,7 +121,7 @@
     },
 
     /**
-     * @type {NetworkAgent.LoaderId}
+     * @return {NetworkAgent.LoaderId}
      */
     get loaderId()
     {
@@ -129,7 +129,7 @@
     },
 
     /**
-     * @type {number}
+     * @return {number}
      */
     get startTime()
     {
@@ -142,7 +142,7 @@
     },
 
     /**
-     * @type {number}
+     * @return {number}
      */
     get responseReceivedTime()
     {
@@ -155,7 +155,7 @@
     },
 
     /**
-     * @type {number}
+     * @return {number}
      */
     get endTime()
     {
@@ -176,7 +176,7 @@
     },
 
     /**
-     * @type {number}
+     * @return {number}
      */
     get duration()
     {
@@ -186,7 +186,7 @@
     },
 
     /**
-     * @type {number}
+     * @return {number}
      */
     get latency()
     {
@@ -196,7 +196,7 @@
     },
 
     /**
-     * @type {number}
+     * @return {number}
      */
     get receiveDuration()
     {
@@ -206,7 +206,7 @@
     },
 
     /**
-     * @type {number}
+     * @return {number}
      */
     get resourceSize()
     {
@@ -219,7 +219,7 @@
     },
 
     /**
-     * @type {number}
+     * @return {number}
      */
     get transferSize()
     {
@@ -252,7 +252,7 @@
     },
 
     /**
-     * @type {boolean}
+     * @return {boolean}
      */
     get finished()
     {
@@ -274,7 +274,7 @@
     },
 
     /**
-     * @type {boolean}
+     * @return {boolean}
      */
     get failed()
     {
@@ -287,7 +287,7 @@
     },
 
     /**
-     * @type {boolean}
+     * @return {boolean}
      */
     get canceled()
     {
@@ -300,7 +300,7 @@
     },
 
     /**
-     * @type {boolean}
+     * @return {boolean}
      */
     get cached()
     {
@@ -315,7 +315,7 @@
     },
 
     /**
-     * @type {NetworkAgent.ResourceTiming|undefined}
+     * @return {NetworkAgent.ResourceTiming|undefined}
      */
     get timing()
     {
@@ -336,7 +336,7 @@
     },
 
     /**
-     * @type {string}
+     * @return {string}
      */
     get mimeType()
     {
@@ -349,7 +349,7 @@
     },
 
     /**
-     * @type {string}
+     * @return {string}
      */
     get displayName()
     {
@@ -357,7 +357,7 @@
     },
 
     /**
-     * @type {string}
+     * @return {string}
      */
     get folder()
     {
@@ -370,7 +370,7 @@
     },
 
     /**
-     * @type {WebInspector.ResourceType}
+     * @return {WebInspector.ResourceType}
      */
     get type()
     {
@@ -383,7 +383,7 @@
     },
 
     /**
-     * @type {WebInspector.Resource|undefined}
+     * @return {WebInspector.Resource|undefined}
      */
     get redirectSource()
     {
@@ -398,7 +398,7 @@
     },
 
     /**
-     * @type {Object}
+     * @return {Object}
      */
     get requestHeaders()
     {
@@ -415,7 +415,7 @@
     },
 
     /**
-     * @type {string}
+     * @return {string}
      */
     get requestHeadersText()
     {
@@ -435,7 +435,7 @@
     },
 
     /**
-     * @type {number}
+     * @return {number}
      */
     get requestHeadersSize()
     {
@@ -443,7 +443,7 @@
     },
 
     /**
-     * @type {Array.<Object>}
+     * @return {Array.<Object>}
      */
     get sortedRequestHeaders()
     {
@@ -468,7 +468,7 @@
     },
 
     /**
-     * @type {Array.<WebInspector.Cookie>}
+     * @return {Array.<WebInspector.Cookie>}
      */
     get requestCookies()
     {
@@ -478,7 +478,7 @@
     },
 
     /**
-     * @type {string|undefined}
+     * @return {string|undefined}
      */
     get requestFormData()
     {
@@ -492,7 +492,7 @@
     },
 
     /**
-     * @type {string|undefined}
+     * @return {string|undefined}
      */
     get requestHttpVersion()
     {
@@ -502,7 +502,7 @@
     },
 
     /**
-     * @type {Object}
+     * @return {Object}
      */
     get responseHeaders()
     {
@@ -519,7 +519,7 @@
     },
 
     /**
-     * @type {string}
+     * @return {string}
      */
     get responseHeadersText()
     {
@@ -539,7 +539,7 @@
     },
 
     /**
-     * @type {number}
+     * @return {number}
      */
     get responseHeadersSize()
     {
@@ -547,7 +547,7 @@
     },
 
     /**
-     * @type {Array.<Object>}
+     * @return {Array.<Object>}
      */
     get sortedResponseHeaders()
     {
@@ -572,7 +572,7 @@
     },
 
     /**
-     * @type {Array.<WebInspector.Cookie>}
+     * @return {Array.<WebInspector.Cookie>}
      */
     get responseCookies()
     {
@@ -582,7 +582,7 @@
     },
 
     /**
-     * @type {?Array.<Object>}
+     * @return {?Array.<Object>}
      */
     get queryParameters()
     {
@@ -597,7 +597,7 @@
     },
 
     /**
-     * @type {?Array.<Object>}
+     * @return {?Array.<Object>}
      */
     get formParameters()
     {
@@ -613,7 +613,7 @@
     },
 
     /**
-     * @type {string|undefined}
+     * @return {string|undefined}
      */
     get responseHttpVersion()
     {
@@ -657,7 +657,7 @@
     },
 
     /**
-     * @type {string}
+     * @return {?string|undefined}
      */
     get content()
     {
@@ -665,7 +665,7 @@
     },
 
     /**
-     * @type {string}
+     * @return {boolean}
      */
     get contentEncoded()
     {
@@ -693,7 +693,7 @@
             return;
         }
         if (typeof this._content !== "undefined") {
-            callback(this.content, this._contentEncoded, this._mimeType);
+            callback(this.content || null, this._contentEncoded, this._mimeType);
             return;
         }
         this._pendingContentCallbacks.push(callback);

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


--- trunk/Source/WebCore/inspector/front-end/ResourceTreeModel.js	2012-04-20 08:49:18 UTC (rev 114728)
+++ trunk/Source/WebCore/inspector/front-end/ResourceTreeModel.js	2012-04-20 09:15:13 UTC (rev 114729)
@@ -387,7 +387,7 @@
     this._loaderId = payload.loaderId;
     this._name = payload.name;
     this._url = payload.url;
-    this._securityOrigin = payload.securityOrigin;
+    this._securityOrigin = payload.securityOrigin || "";
     this._mimeType = payload.mimeType;
 
     /**
@@ -406,7 +406,7 @@
 
 WebInspector.ResourceTreeFrame.prototype = {
     /**
-     * @type {string}
+     * @return {string}
      */
     get id()
     {
@@ -414,7 +414,7 @@
     },
 
     /**
-     * @type {string}
+     * @return {string}
      */
     get name()
     {
@@ -422,7 +422,7 @@
     },
 
     /**
-     * @type {string}
+     * @return {string}
      */
     get url()
     {
@@ -430,7 +430,7 @@
     },
 
     /**
-     * @type {string}
+     * @return {string}
      */
     get securityOrigin()
     {
@@ -438,7 +438,7 @@
     },
 
     /**
-     * @type {string}
+     * @return {string}
      */
     get loaderId()
     {
@@ -446,7 +446,7 @@
     },
 
     /**
-     * @type {WebInspector.ResourceTreeFrame}
+     * @return {WebInspector.ResourceTreeFrame}
      */
     get parentFrame()
     {
@@ -454,7 +454,7 @@
     },
 
     /**
-     * @type {Array.<WebInspector.ResourceTreeFrame>}
+     * @return {Array.<WebInspector.ResourceTreeFrame>}
      */
     get childFrames()
     {
@@ -477,7 +477,7 @@
         this._loaderId = framePayload.loaderId;
         this._name = framePayload.name;
         this._url = framePayload.url;
-        this._securityOrigin = framePayload.securityOrigin;
+        this._securityOrigin = framePayload.securityOrigin || "";
         this._mimeType = framePayload.mimeType;
 
         var mainResource = this._resourcesMap[this._url];
@@ -488,7 +488,7 @@
     },
 
     /**
-     * @type {WebInspector.Resource}
+     * @return {WebInspector.Resource}
      */
     get mainResource()
     {

Modified: trunk/Source/WebCore/inspector/front-end/ScriptsNavigator.js (114728 => 114729)


--- trunk/Source/WebCore/inspector/front-end/ScriptsNavigator.js	2012-04-20 08:49:18 UTC (rev 114728)
+++ trunk/Source/WebCore/inspector/front-end/ScriptsNavigator.js	2012-04-20 09:15:13 UTC (rev 114729)
@@ -105,7 +105,7 @@
     },
 
     /**
-     * @type {WebInspector.View}
+     * @return {WebInspector.View}
      */
     get view()
     {
@@ -632,7 +632,7 @@
     },
 
     /**
-     * @type {string}
+     * @return {string}
      */
     get titleText()
     {
@@ -677,7 +677,7 @@
 
 WebInspector.NavigatorFolderTreeElement.prototype = {
     /**
-     * @type {string}
+     * @return {string}
      */
     get folderIdentifier()
     {
@@ -685,7 +685,7 @@
     },
 
     /**
-     * @type {boolean}
+     * @return {boolean}
      */
     get isDomain()
     {
@@ -721,7 +721,7 @@
 
 WebInspector.NavigatorScriptTreeElement.prototype = {
     /**
-     * @type {WebInspector.ScriptsNavigator}
+     * @return {WebInspector.ScriptsNavigator}
      */
     get navigator()
     {
@@ -729,7 +729,7 @@
     },
 
     /**
-     * @type {WebInspector.UISourceCode}
+     * @return {WebInspector.UISourceCode}
      */
     get uiSourceCode()
     {

Modified: trunk/Source/WebCore/inspector/front-end/Settings.js (114728 => 114729)


--- trunk/Source/WebCore/inspector/front-end/Settings.js	2012-04-20 08:49:18 UTC (rev 114728)
+++ trunk/Source/WebCore/inspector/front-end/Settings.js	2012-04-20 09:15:13 UTC (rev 114729)
@@ -188,7 +188,7 @@
 
 WebInspector.ExperimentsSettings.prototype = {
     /**
-     * @type {Array.<WebInspector.Experiment>}
+     * @return {Array.<WebInspector.Experiment>}
      */
     get experiments()
     {
@@ -196,7 +196,7 @@
     },
     
     /**
-     * @type {boolean}
+     * @return {boolean}
      */
     get experimentsEnabled()
     {

Modified: trunk/Source/WebCore/inspector/front-end/SnippetsModel.js (114728 => 114729)


--- trunk/Source/WebCore/inspector/front-end/SnippetsModel.js	2012-04-20 08:49:18 UTC (rev 114728)
+++ trunk/Source/WebCore/inspector/front-end/SnippetsModel.js	2012-04-20 09:15:13 UTC (rev 114729)
@@ -60,7 +60,7 @@
     },
 
     /**
-     * @type {Array.<WebInspector.Snippet>}
+     * @return {Array.<WebInspector.Snippet>}
      */
     get snippets()
     {
@@ -216,7 +216,7 @@
 
 WebInspector.Snippet.prototype = {
     /**
-     * @type {number}
+     * @return {string}
      */
     get id()
     {
@@ -224,7 +224,7 @@
     },
 
     /**
-     * @type {string}
+     * @return {string}
      */
     get name()
     {
@@ -241,7 +241,7 @@
     },
 
     /**
-     * @type {string}
+     * @return {string}
      */
     get content()
     {

Modified: trunk/Source/WebCore/inspector/front-end/SplitView.js (114728 => 114729)


--- trunk/Source/WebCore/inspector/front-end/SplitView.js	2012-04-20 08:49:18 UTC (rev 114728)
+++ trunk/Source/WebCore/inspector/front-end/SplitView.js	2012-04-20 09:15:13 UTC (rev 114729)
@@ -86,7 +86,7 @@
 
 WebInspector.SplitView.prototype = {
     /**
-     * @type {boolean}
+     * @return {boolean}
      */
     get hasLeftSidebar()
     {
@@ -94,7 +94,7 @@
     },
 
     /**
-     * @type {Element}
+     * @return {Element}
      */
     get mainElement()
     {
@@ -102,7 +102,7 @@
     },
 
     /**
-     * @type {Element}
+     * @return {Element}
      */
     get sidebarElement()
     {
@@ -110,7 +110,7 @@
     },
 
     /**
-     * @type {boolean}
+     * @return {boolean}
      */
     get resizable()
     {

Modified: trunk/Source/WebCore/inspector/front-end/TabbedEditorContainer.js (114728 => 114729)


--- trunk/Source/WebCore/inspector/front-end/TabbedEditorContainer.js	2012-04-20 08:49:18 UTC (rev 114728)
+++ trunk/Source/WebCore/inspector/front-end/TabbedEditorContainer.js	2012-04-20 09:15:13 UTC (rev 114729)
@@ -76,7 +76,7 @@
 
 WebInspector.TabbedEditorContainer.prototype = {
     /**
-     * @type {WebInspector.SourceFrame}
+     * @return {WebInspector.View}
      */
     get visibleView()
     {
@@ -84,7 +84,7 @@
     },
 
     /**
-     * @type {Element}
+     * @return {Element}
      */
     get element()
     {

Modified: trunk/Source/WebCore/inspector/front-end/TabbedPane.js (114728 => 114729)


--- trunk/Source/WebCore/inspector/front-end/TabbedPane.js	2012-04-20 08:49:18 UTC (rev 114728)
+++ trunk/Source/WebCore/inspector/front-end/TabbedPane.js	2012-04-20 09:15:13 UTC (rev 114729)
@@ -55,7 +55,7 @@
 
 WebInspector.TabbedPane.prototype = {
     /**
-     * @type {WebInspector.View}
+     * @return {WebInspector.View}
      */
     get visibleView()
     {
@@ -63,7 +63,7 @@
     },
 
     /**
-     * @type {string}
+     * @return {string}
      */
     get selectedTabId()
     {
@@ -498,11 +498,13 @@
     this._tooltip = tooltip;
     this._view = view;
     this.shown = false;
+    /** @type {number} */ this._measuredWidth;
+    /** @type {Element} */ this._tabElement;
 }
 
 WebInspector.TabbedPaneTab.prototype = {
     /**
-     * @type {string}
+     * @return {string}
      */
     get id()
     {
@@ -510,7 +512,7 @@
     },
 
     /**
-     * @type {string}
+     * @return {string}
      */
     get title()
     {
@@ -526,7 +528,7 @@
     },
 
     /**
-     * @type {WebInspector.View}
+     * @return {WebInspector.View}
      */
     get view()
     {
@@ -539,7 +541,7 @@
     },
 
     /**
-     * @type {string|undefined}
+     * @return {string|undefined}
      */
     get tooltip()
     {
@@ -554,7 +556,7 @@
     },
 
     /**
-     * @type {Element}
+     * @return {Element}
      */
     get tabElement()
     {
@@ -566,7 +568,7 @@
     },
 
     /**
-     * @type {number}
+     * @return {number}
      */
     get measuredWidth()
     {
@@ -578,7 +580,7 @@
     },
 
     /**
-     * @type {number}
+     * @return {number}
      */
     get width()
     {

Modified: trunk/Source/WebCore/inspector/front-end/TextEditorModel.js (114728 => 114729)


--- trunk/Source/WebCore/inspector/front-end/TextEditorModel.js	2012-04-20 08:49:18 UTC (rev 114728)
+++ trunk/Source/WebCore/inspector/front-end/TextEditorModel.js	2012-04-20 09:15:13 UTC (rev 114729)
@@ -53,7 +53,7 @@
     },
 
     /**
-     * @type {number}
+     * @return {number}
      */
     get linesCount()
     {
@@ -125,7 +125,7 @@
 
 WebInspector.TextEditorModel.prototype = {
     /**
-     * @type {number}
+     * @return {number}
      */
     get linesCount()
     {
@@ -133,7 +133,7 @@
     },
 
     /**
-     * @type {string}
+     * @return {string}
      */
     get text()
     {
@@ -141,7 +141,7 @@
     },
 
     /**
-     * @type {string}
+     * @return {string}
      */
     get lineBreak()
     {

Modified: trunk/Source/WebCore/inspector/front-end/TimelinePresentationModel.js (114728 => 114729)


--- trunk/Source/WebCore/inspector/front-end/TimelinePresentationModel.js	2012-04-20 08:49:18 UTC (rev 114728)
+++ trunk/Source/WebCore/inspector/front-end/TimelinePresentationModel.js	2012-04-20 09:15:13 UTC (rev 114729)
@@ -784,7 +784,7 @@
 
 WebInspector.TimelineCategory.prototype = {
     /**
-     * @type {boolean}
+     * @return {boolean}
      */
     get hidden()
     {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to