Changeset 112263 in webkit
- Timestamp:
- Mar 27, 2012 7:30:29 AM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r112262 r112263 1 2012-03-27 Alexander Pavlov <apavlov@chromium.org> 2 3 Web Inspector: Enable "number" parameters in the web inspector protocol methods 4 https://bugs.webkit.org/show_bug.cgi?id=82334 5 6 The generated protocol dispatcher does not understand protocol method parameters of type "number" 7 (mapped to "double" in the native code.) 8 9 Reviewed by Vsevolod Vlasov. 10 11 * inspector/CodeGeneratorInspector.py: 12 (RawTypes.Number.get_getter_name): 13 (RawTypes.Number.get_c_initializer): 14 (RawTypes.Number.get_js_bind_type): 15 (RawTypes.Number.get_validate_method_params.ValidateMethodParams): 16 (RawTypes.Number.get_validate_method_params): 17 1 18 2012-03-27 Alexei Filippov <alexeif@chromium.org> 2 19 -
trunk/Source/WebCore/inspector/CodeGeneratorInspector.py
r112087 r112263 339 339 @staticmethod 340 340 def get_getter_name(): 341 return " Object"341 return "Double" 342 342 343 343 @staticmethod … … 347 347 @staticmethod 348 348 def get_c_initializer(): 349 r aise Exception("Unsupported")349 return "0" 350 350 351 351 @staticmethod 352 352 def get_js_bind_type(): 353 r aise Exception("Unsupported")353 return "number" 354 354 355 355 @staticmethod 356 356 def get_validate_method_params(): 357 raise Exception("TODO") 357 class ValidateMethodParams: 358 name = "Double" 359 var_type = "double" 360 as_method_name = "Number" 361 return ValidateMethodParams 358 362 359 363 @staticmethod … … 1882 1886 1883 1887 static int getInt(InspectorObject* object, const String& name, bool* valueFound, InspectorArray* protocolErrors); 1888 static double getDouble(InspectorObject* object, const String& name, bool* valueFound, InspectorArray* protocolErrors); 1884 1889 static String getString(InspectorObject* object, const String& name, bool* valueFound, InspectorArray* protocolErrors); 1885 1890 static bool getBoolean(InspectorObject* object, const String& name, bool* valueFound, InspectorArray* protocolErrors); … … 2050 2055 struct AsMethodBridges { 2051 2056 static bool asInt(InspectorValue* value, int* output) { return value->asNumber(output); } 2057 static bool asDouble(InspectorValue* value, double* output) { return value->asNumber(output); } 2052 2058 static bool asString(InspectorValue* value, String* output) { return value->asString(output); } 2053 2059 static bool asBoolean(InspectorValue* value, bool* output) { return value->asBoolean(output); } … … 2059 2065 { 2060 2066 return getPropertyValueImpl<int, int, int>(object, name, valueFound, protocolErrors, 0, AsMethodBridges::asInt, "Number"); 2067 } 2068 2069 double InspectorBackendDispatcherImpl::getDouble(InspectorObject* object, const String& name, bool* valueFound, InspectorArray* protocolErrors) 2070 { 2071 return getPropertyValueImpl<double, double, double>(object, name, valueFound, protocolErrors, 0, AsMethodBridges::asDouble, "Number"); 2061 2072 } 2062 2073
Note: See TracChangeset
for help on using the changeset viewer.