Changeset 140329 in webkit
- Timestamp:
- Jan 21, 2013 6:16:07 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r140324 r140329 1 2013-01-21 Andrey Adaikin <aandrey@chromium.org> 2 3 Web Inspector: modify generate_protocol_externs.py to generate JSON typedef's for @constructors 4 https://bugs.webkit.org/show_bug.cgi?id=107287 5 6 Reviewed by Pavel Feldman. 7 8 * inspector/console/command-line-api-expected.txt: 9 1 10 2013-01-21 Kent Tamura <tkent@chromium.org> 2 11 -
trunk/LayoutTests/inspector/console/command-line-api-expected.txt
r135720 r140329 1 CONSOLE MESSAGE: line 105 8: The console function $() has changed from $=getElementById(id) to $=querySelector(selector). You might try $("#%s")1 CONSOLE MESSAGE: line 1059: The console function $() has changed from $=getElementById(id) to $=querySelector(selector). You might try $("#%s") 2 2 Tests that command line api works. 3 3 -
trunk/Source/WebCore/ChangeLog
r140325 r140329 1 2013-01-18 Andrey Adaikin <aandrey@chromium.org> 2 3 Web Inspector: modify generate_protocol_externs.py to generate JSON typedef's for @constructors 4 https://bugs.webkit.org/show_bug.cgi?id=107287 5 6 Reviewed by Pavel Feldman. 7 8 Modify generate_protocol_externs.py to generate @typedefs instead of @constructors, 9 10 * inspector/InjectedScriptCanvasModuleSource.js: 11 (.): 12 * inspector/InjectedScriptSource.js: 13 * inspector/compile-front-end.py: 14 * inspector/generate_protocol_externs.py: 15 (param_type): 16 1 17 2013-01-21 Oleg Smirnov <oleg.smirnov@lge.com> 2 18 -
trunk/Source/WebCore/inspector/InjectedScriptCanvasModuleSource.js
r140157 r140329 2857 2857 2858 2858 /** 2859 * @return { string}2859 * @return {CanvasAgent.TraceLogId} 2860 2860 */ 2861 2861 captureFrame: function() … … 2865 2865 2866 2866 /** 2867 * @return { string}2867 * @return {CanvasAgent.TraceLogId} 2868 2868 */ 2869 2869 startCapturing: function() … … 2874 2874 /** 2875 2875 * @param {function(this:ResourceTrackingManager)} func 2876 * @return { string}2876 * @return {CanvasAgent.TraceLogId} 2877 2877 */ 2878 2878 _callStartCapturingFunction: function(func) … … 2893 2893 2894 2894 /** 2895 * @param { string} id2895 * @param {CanvasAgent.TraceLogId} id 2896 2896 */ 2897 2897 stopCapturing: function(id) … … 2903 2903 2904 2904 /** 2905 * @param { string} id2905 * @param {CanvasAgent.TraceLogId} id 2906 2906 */ 2907 2907 dropTraceLog: function(id) … … 2913 2913 2914 2914 /** 2915 * @param { string} id2915 * @param {CanvasAgent.TraceLogId} id 2916 2916 * @param {number=} startOffset 2917 * @return {! Object|string}2917 * @return {!CanvasAgent.TraceLog|string} 2918 2918 */ 2919 2919 traceLog: function(id, startOffset) … … 2926 2926 var result = { 2927 2927 id: id, 2928 /** @type {Array.<CanvasAgent.Call>} */ 2928 2929 calls: [], 2929 2930 alive: alive, … … 2944 2945 if (call.functionName()) { 2945 2946 traceLogItem.functionName = call.functionName(); 2946 traceLogItem.arguments = call.args().map(this._ createRemoteObject.bind(this));2947 traceLogItem.arguments = call.args().map(this._makeCallArgument.bind(this)); 2947 2948 if (call.result() !== undefined) 2948 traceLogItem.result = this._ createRemoteObject(call.result());2949 traceLogItem.result = this._makeCallArgument(call.result()); 2949 2950 } else { 2950 2951 traceLogItem.property = call.args()[0]; 2951 traceLogItem.value = this._ createRemoteObject(call.args()[1]);2952 traceLogItem.value = this._makeCallArgument(call.args()[1]); 2952 2953 } 2953 2954 result.calls.push(traceLogItem); … … 2958 2959 /** 2959 2960 * @param {*} obj 2960 * @return { Object}2961 */ 2962 _ createRemoteObject: function(obj)2961 * @return {!CanvasAgent.CallArgument} 2962 */ 2963 _makeCallArgument: function(obj) 2963 2964 { 2964 2965 if (obj instanceof ReplayableResource) … … 2970 2971 2971 2972 /** 2972 * @param { string} traceLogId2973 * @param {CanvasAgent.TraceLogId} traceLogId 2973 2974 * @param {number} stepNo 2974 * @return {! Object|string}2975 * @return {!CanvasAgent.ResourceState|string} 2975 2976 */ 2976 2977 replayTraceLog: function(traceLogId, stepNo) … … 2991 2992 2992 2993 /** 2993 * @param { string} stringResourceId2994 * @return {! Object|string}2994 * @param {CanvasAgent.ResourceId} stringResourceId 2995 * @return {!CanvasAgent.ResourceInfo|string} 2995 2996 */ 2996 2997 resourceInfo: function(stringResourceId) … … 3013 3014 3014 3015 /** 3015 * @param { string} traceLogId3016 * @param { string} stringResourceId3017 * @return {! Object|string}3016 * @param {CanvasAgent.TraceLogId} traceLogId 3017 * @param {CanvasAgent.ResourceId} stringResourceId 3018 * @return {!CanvasAgent.ResourceState|string} 3018 3019 */ 3019 3020 resourceState: function(traceLogId, stringResourceId) … … 3044 3045 3045 3046 /** 3046 * @return { string}3047 * @return {CanvasAgent.TraceLogId} 3047 3048 */ 3048 3049 _makeTraceLogId: function() … … 3053 3054 /** 3054 3055 * @param {number} resourceId 3055 * @return { string}3056 * @return {CanvasAgent.ResourceId} 3056 3057 */ 3057 3058 _makeStringResourceId: function(resourceId) … … 3061 3062 3062 3063 /** 3063 * @param { string} stringResourceId3064 * @param {CanvasAgent.ResourceId} stringResourceId 3064 3065 * @param {string} description 3065 * @return {! Object}3066 * @return {!CanvasAgent.ResourceInfo} 3066 3067 */ 3067 3068 _makeResourceInfo: function(stringResourceId, description) … … 3074 3075 3075 3076 /** 3076 * @param { string} stringResourceId3077 * @param { string} traceLogId3077 * @param {CanvasAgent.ResourceId} stringResourceId 3078 * @param {CanvasAgent.TraceLogId} traceLogId 3078 3079 * @param {string} imageURL 3079 * @return {! Object}3080 * @return {!CanvasAgent.ResourceState} 3080 3081 */ 3081 3082 _makeResourceState: function(stringResourceId, traceLogId, imageURL) -
trunk/Source/WebCore/inspector/InjectedScriptSource.js
r135720 r140329 112 112 * @param {boolean} canAccessInspectedWindow 113 113 * @param {boolean} generatePreview 114 * @return { Object}114 * @return {!RuntimeAgent.RemoteObject} 115 115 */ 116 116 wrapObject: function(object, groupName, canAccessInspectedWindow, generatePreview) … … 170 170 * @param {boolean=} forceValueType 171 171 * @param {boolean=} generatePreview 172 * @return {InjectedScript.RemoteObject} 172 * @return {!RuntimeAgent.RemoteObject} 173 * @suppress {checkTypes} 173 174 */ 174 175 _wrapObject: function(object, objectGroupName, forceValueType, generatePreview) … … 249 250 * @param {string} objectId 250 251 * @param {boolean} ownProperties 251 * @return {Array.< Object>|boolean}252 * @return {Array.<RuntimeAgent.PropertyDescriptor>|boolean} 252 253 */ 253 254 getProperties: function(objectId, ownProperties) … … 306 307 /** 307 308 * @param {string} functionId 308 * @return { Object|string}309 * @return {!DebuggerAgent.FunctionDetails|string} 309 310 */ 310 311 getFunctionDetails: function(functionId) … … 676 677 return "null"; 677 678 678 var type = typeof obj;679 679 if (this.isPrimitiveValue(obj)) 680 680 return null; … … 941 941 /** 942 942 * @param {Object} callFrame 943 * @return { Array.<Object>}943 * @return {!Array.<DebuggerAgent.Scope>} 944 944 */ 945 945 _wrapScopeChain: function(callFrame) … … 959 959 * @param {*} scopeObject 960 960 * @param {string} groupId 961 * @return { Object}961 * @return {!DebuggerAgent.Scope} 962 962 */ 963 963 InjectedScript.CallFrameProxy._createScopeJson = function(scopeTypeCode, scopeObject, groupId) { … … 968 968 const CATCH_SCOPE = 4; 969 969 970 /** @type {!Object.<number, string>} */ 970 971 var scopeTypeNames = {}; 971 972 scopeTypeNames[GLOBAL_SCOPE] = "global"; -
trunk/Source/WebCore/inspector/compile-front-end.py
r139978 r140329 422 422 command = compiler_command 423 423 command += " --externs " + inspector_path + "/" + "InjectedScriptExterns.js" + " \\\n" 424 command += " --externs " + protocol_externs_path + " \\\n" 424 425 command += " --module " + jsmodule_name_prefix + "injected_script" + ":" + "1" + " \\\n" 425 426 command += " --js " + inspector_path + "/" + "InjectedScriptSourceTmp.js" + " \\\n" … … 433 434 command = compiler_command 434 435 command += " --externs " + inspector_path + "/" + "InjectedScriptExterns.js" + " \\\n" 436 command += " --externs " + protocol_externs_path + " \\\n" 435 437 command += " --module " + jsmodule_name_prefix + "injected_script" + ":" + "1" + " \\\n" 436 438 command += " --js " + inspector_path + "/" + "InjectedScriptCanvasModuleSourceTmp.js" + " \\\n" -
trunk/Source/WebCore/inspector/front-end/DebuggerModel.js
r138496 r140329 64 64 * @constructor 65 65 * @implements {WebInspector.RawLocation} 66 * @extends {DebuggerAgent.Location}67 66 * @param {string} scriptId 68 67 * @param {number} lineNumber -
trunk/Source/WebCore/inspector/generate_protocol_externs.py
r119585 r140329 92 92 for type in domain["types"]: 93 93 if type["type"] == "object": 94 output_file.write("\n/** @constructor */\n") 95 output_file.write("%sAgent.%s = function()\n{\n" % (domain_name, type["id"])) 94 typedef_args = [] 96 95 if "properties" in type: 97 96 for property in type["properties"]: … … 99 98 if ("optional" in property): 100 99 suffix = "|undefined" 101 output_file.write("/** @type {%s%s} */ this.%s;\n" % (param_type(domain_name, property), suffix, property["name"])) 102 output_file.write("}\n") 100 typedef_args.append("%s:(%s%s)" % (property["name"], param_type(domain_name, property), suffix)) 101 if (typedef_args): 102 output_file.write("\n/** @typedef {{%s}|null} */\n%sAgent.%s;\n" % (", ".join(typedef_args), domain_name, type["id"])) 103 else: 104 output_file.write("\n/** @typedef {Object} */\n%sAgent.%s;\n" % (domain_name, type["id"])) 103 105 elif type["type"] == "array": 104 106 suffix = ""
Note: See TracChangeset
for help on using the changeset viewer.