Changeset 160588 in webkit
- Timestamp:
- Dec 13, 2013 10:50:33 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 26 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r160567 r160588 1 2013-12-13 Joseph Pecoraro <pecoraro@apple.com> 2 3 Web Inspector: Move Inspector and Debugger protocol domains into JavaScriptCore 4 https://bugs.webkit.org/show_bug.cgi?id=125707 5 6 Reviewed by Timothy Hatcher. 7 8 * http/tests/inspector-protocol/resources/InspectorTest.js: 9 (InspectorTest.checkForError): 10 Since having a protocol error is likely wrong, make the output 11 for it as detailed as possible. 12 1 13 2013-12-13 Roger Fong <roger_fong@apple.com> 2 14 -
trunk/LayoutTests/http/tests/inspector-protocol/resources/InspectorTest.js
r160557 r160588 132 132 { 133 133 if (responseObject.error) { 134 InspectorTest.log("PROTOCOL ERROR: " + responseObject.error.message);134 InspectorTest.log("PROTOCOL ERROR: " + JSON.stringify(responseObject.error)); 135 135 InspectorTest.completeTest(); 136 136 throw "PROTOCOL ERROR"; -
trunk/Source/JavaScriptCore/CMakeLists.txt
r160557 r160588 659 659 660 660 set(JavaScriptCore_INSPECTOR_DOMAINS 661 inspector/protocol/Debugger.json 662 inspector/protocol/GenericTypes.json 663 inspector/protocol/InspectorDomain.json 661 664 inspector/protocol/Runtime.json 662 665 ) -
trunk/Source/JavaScriptCore/ChangeLog
r160587 r160588 1 2013-12-13 Joseph Pecoraro <pecoraro@apple.com> 2 3 Web Inspector: Move Inspector and Debugger protocol domains into JavaScriptCore 4 https://bugs.webkit.org/show_bug.cgi?id=125707 5 6 Reviewed by Timothy Hatcher. 7 8 * CMakeLists.txt: 9 * DerivedSources.make: 10 * GNUmakefile.am: 11 * inspector/protocol/Debugger.json: Renamed from Source/WebCore/inspector/protocol/Debugger.json. 12 * inspector/protocol/GenericTypes.json: Added. 13 * inspector/protocol/InspectorDomain.json: Renamed from Source/WebCore/inspector/protocol/InspectorDomain.json. 14 Add new files to inspector generation. 15 16 * inspector/scripts/CodeGeneratorInspector.py: 17 (Generator.go): 18 Only build TypeBuilder output if the domain only has types. Avoid 19 backend/frontend dispatchers and backend commands. 20 21 (TypeBindings.create_type_declaration_.EnumBinding.get_setter_value_expression_pattern): 22 (format_setter_value_expression): 23 (Generator.process_command): 24 (Generator.generate_send_method): 25 * inspector/scripts/CodeGeneratorInspectorStrings.py: 26 Export and name the get{JS,Web}EnumConstant function. 27 1 28 2013-12-11 Filip Pizlo <fpizlo@apple.com> 2 29 -
trunk/Source/JavaScriptCore/DerivedSources.make
r160557 r160588 85 85 86 86 INSPECTOR_DOMAINS = \ 87 $(JavaScriptCore)/inspector/protocol/Debugger.json \ 88 $(JavaScriptCore)/inspector/protocol/GenericTypes.json \ 89 $(JavaScriptCore)/inspector/protocol/InspectorDomain.json \ 87 90 $(JavaScriptCore)/inspector/protocol/Runtime.json \ 88 91 # -
trunk/Source/JavaScriptCore/GNUmakefile.am
r160568 r160588 221 221 222 222 JavaScriptCore_INSPECTOR_DOMAINS := \ 223 $(JavaScriptCore)/inspector/protocol/Debugger.json \ 224 $(JavaScriptCore)/inspector/protocol/GenericTypes.json \ 225 $(JavaScriptCore)/inspector/protocol/InspectorDomain.json \ 223 226 $(JavaScriptCore)/inspector/protocol/Runtime.json 224 227 -
trunk/Source/JavaScriptCore/inspector/protocol/Debugger.json
r160587 r160588 181 181 ], 182 182 "returns": [ 183 { "name": "result", "type": "array", "items": { "$ref": " Page.SearchMatch" }, "description": "List of search matches." }183 { "name": "result", "type": "array", "items": { "$ref": "GenericTypes.SearchMatch" }, "description": "List of search matches." } 184 184 ], 185 185 "description": "Searches for given string in script content." -
trunk/Source/JavaScriptCore/inspector/protocol/Runtime.json
r160557 r160588 85 85 "id": "RuntimeFrameId", 86 86 "type": "string", 87 "description": "Unique frame identifier. FIXME: This duplicates Network.FrameId."87 "description": "Unique frame identifier. FIXME: Duplicate of Network.FrameId <https://webkit.org/b/125664> Web Inspector: FIX Type Dependency Issues" 88 88 }, 89 89 { -
trunk/Source/JavaScriptCore/inspector/scripts/CodeGeneratorInspector.py
r160557 r160588 1002 1002 @staticmethod 1003 1003 def get_setter_value_expression_pattern(): 1004 return "Inspector::TypeBuilder::get EnumConstantValue(%s)"1004 return "Inspector::TypeBuilder::get%sEnumConstantValue(%s)" 1005 1005 1006 1006 @staticmethod … … 1864 1864 pattern = param_type_binding.get_setter_value_expression_pattern() 1865 1865 if pattern: 1866 return pattern % value_ref1866 return pattern % (INSPECTOR_TYPES_GENERATOR_CONFIG_MAP[output_type]["prefix"], value_ref) 1867 1867 else: 1868 1868 return value_ref … … 1907 1907 frontend_method_declaration_lines = [] 1908 1908 1909 Generator.backend_js_domain_initializer_list.append("// %s.\n" % domain_name)1910 1911 if not domain_fixes.skip_js_bind:1912 Generator.backend_js_domain_initializer_list.append("InspectorBackend.register%sDispatcher = InspectorBackend.registerDomainDispatcher.bind(InspectorBackend, \"%s\");\n" % (domain_name, domain_name))1909 if ("commands" in json_domain or "events" in json_domain): 1910 Generator.backend_js_domain_initializer_list.append("// %s.\n" % domain_name) 1911 if not domain_fixes.skip_js_bind: 1912 Generator.backend_js_domain_initializer_list.append("InspectorBackend.register%sDispatcher = InspectorBackend.registerDomainDispatcher.bind(InspectorBackend, \"%s\");\n" % (domain_name, domain_name)) 1913 1913 1914 1914 if "types" in json_domain: … … 1944 1944 agent_interface_name = dispatcher_name + "Handler" 1945 1945 1946 Generator.backend_dispatcher_interface_list.append("class %s %s FINAL : public Inspector::InspectorSupplementalBackendDispatcher {\n" % (INSPECTOR_TYPES_GENERATOR_CONFIG_MAP[output_type]["export_macro"], dispatcher_name))1947 Generator.backend_dispatcher_interface_list.append("public:\n")1948 Generator.backend_dispatcher_interface_list.append(" static PassRefPtr<%s> create(Inspector::InspectorBackendDispatcher*, %s*);\n" % (dispatcher_name, agent_interface_name))1949 Generator.backend_dispatcher_interface_list.append(" virtual void dispatch(long callId, const String& method, PassRefPtr<Inspector::InspectorObject> message) OVERRIDE;\n")1950 Generator.backend_dispatcher_interface_list.append("private:\n")1951 1952 Generator.backend_handler_interface_list.append("class %s %s {\n" % (INSPECTOR_TYPES_GENERATOR_CONFIG_MAP[output_type]["export_macro"], agent_interface_name))1953 Generator.backend_handler_interface_list.append("public:\n")1954 1955 backend_method_count = len(Generator.backend_method_implementation_list)1956 1957 dispatcher_if_chain = []1958 dispatcher_commands_list = []1959 1946 if "commands" in json_domain: 1947 Generator.backend_dispatcher_interface_list.append("class %s %s FINAL : public Inspector::InspectorSupplementalBackendDispatcher {\n" % (INSPECTOR_TYPES_GENERATOR_CONFIG_MAP[output_type]["export_macro"], dispatcher_name)) 1948 Generator.backend_dispatcher_interface_list.append("public:\n") 1949 Generator.backend_dispatcher_interface_list.append(" static PassRefPtr<%s> create(Inspector::InspectorBackendDispatcher*, %s*);\n" % (dispatcher_name, agent_interface_name)) 1950 Generator.backend_dispatcher_interface_list.append(" virtual void dispatch(long callId, const String& method, PassRefPtr<Inspector::InspectorObject> message) OVERRIDE;\n") 1951 Generator.backend_dispatcher_interface_list.append("private:\n") 1952 1953 Generator.backend_handler_interface_list.append("class %s %s {\n" % (INSPECTOR_TYPES_GENERATOR_CONFIG_MAP[output_type]["export_macro"], agent_interface_name)) 1954 Generator.backend_handler_interface_list.append("public:\n") 1955 1956 backend_method_count = len(Generator.backend_method_implementation_list) 1957 1958 dispatcher_if_chain = [] 1959 dispatcher_commands_list = [] 1960 1960 for json_command in json_domain["commands"]: 1961 1961 Generator.process_command(json_command, domain_name, agent_interface_name, dispatcher_name, dispatcher_if_chain, dispatcher_commands_list) 1962 1962 1963 Generator.backend_handler_interface_list.append("protected:\n") 1964 Generator.backend_handler_interface_list.append(" virtual ~%s() { }\n" % agent_interface_name) 1965 Generator.backend_handler_interface_list.append("};\n\n") 1966 1967 Generator.backend_dispatcher_interface_list.append("private:\n") 1968 Generator.backend_dispatcher_interface_list.append(" %s(Inspector::InspectorBackendDispatcher*, %s*);\n" % (dispatcher_name, agent_interface_name)) 1969 Generator.backend_dispatcher_interface_list.append(" %s* m_agent;\n" % agent_interface_name) 1970 Generator.backend_dispatcher_interface_list.append("};\n\n") 1971 1972 Generator.backend_method_implementation_list.insert(backend_method_count, Templates.backend_dispatcher_constructor.substitute(None, 1973 domainName=domain_name, 1974 dispatcherName=dispatcher_name, 1975 agentName=agent_interface_name)) 1976 1977 if "commands" in json_domain and len(json_domain["commands"]) <= 5: 1978 Generator.backend_method_implementation_list.insert(backend_method_count + 1, Templates.backend_dispatcher_dispatch_method_simple.substitute(None, 1963 Generator.backend_handler_interface_list.append("protected:\n") 1964 Generator.backend_handler_interface_list.append(" virtual ~%s() { }\n" % agent_interface_name) 1965 Generator.backend_handler_interface_list.append("};\n\n") 1966 1967 Generator.backend_dispatcher_interface_list.append("private:\n") 1968 Generator.backend_dispatcher_interface_list.append(" %s(Inspector::InspectorBackendDispatcher*, %s*);\n" % (dispatcher_name, agent_interface_name)) 1969 Generator.backend_dispatcher_interface_list.append(" %s* m_agent;\n" % agent_interface_name) 1970 Generator.backend_dispatcher_interface_list.append("};\n\n") 1971 1972 Generator.backend_method_implementation_list.insert(backend_method_count, Templates.backend_dispatcher_constructor.substitute(None, 1979 1973 domainName=domain_name, 1980 1974 dispatcherName=dispatcher_name, 1981 ifChain="\n".join(dispatcher_if_chain))) 1982 else: 1983 Generator.backend_method_implementation_list.insert(backend_method_count + 1, Templates.backend_dispatcher_dispatch_method.substitute(None, 1984 domainName=domain_name, 1985 dispatcherName=dispatcher_name, 1986 dispatcherCommands="\n".join(dispatcher_commands_list))) 1987 1988 if domain_guard: 1989 for l in reversed(first_cycle_guardable_list_list): 1990 domain_guard.generate_close(l) 1991 Generator.backend_js_domain_initializer_list.append("\n") 1975 agentName=agent_interface_name)) 1976 1977 if len(json_domain["commands"]) <= 5: 1978 Generator.backend_method_implementation_list.insert(backend_method_count + 1, Templates.backend_dispatcher_dispatch_method_simple.substitute(None, 1979 domainName=domain_name, 1980 dispatcherName=dispatcher_name, 1981 ifChain="\n".join(dispatcher_if_chain))) 1982 else: 1983 Generator.backend_method_implementation_list.insert(backend_method_count + 1, Templates.backend_dispatcher_dispatch_method.substitute(None, 1984 domainName=domain_name, 1985 dispatcherName=dispatcher_name, 1986 dispatcherCommands="\n".join(dispatcher_commands_list))) 1987 1988 if domain_guard: 1989 for l in reversed(first_cycle_guardable_list_list): 1990 domain_guard.generate_close(l) 1991 Generator.backend_js_domain_initializer_list.append("\n") 1992 1992 1993 1993 @staticmethod … … 2187 2187 setter_argument = type_model.get_command_return_pass_model().get_output_to_raw_expression() % var_name 2188 2188 if return_type_binding.get_setter_value_expression_pattern(): 2189 setter_argument = return_type_binding.get_setter_value_expression_pattern() % setter_argument2189 setter_argument = return_type_binding.get_setter_value_expression_pattern() % (INSPECTOR_TYPES_GENERATOR_CONFIG_MAP[output_type]["prefix"], setter_argument) 2190 2190 2191 2191 cook = " result->set%s(ASCIILiteral(\"%s\"), %s);\n" % (setter_type, json_return_name, setter_argument) … … 2280 2280 setter_argument = raw_type_model.get_event_setter_expression_pattern() % parameter_name 2281 2281 if mode_type_binding.get_setter_value_expression_pattern(): 2282 setter_argument = mode_type_binding.get_setter_value_expression_pattern() % setter_argument2282 setter_argument = mode_type_binding.get_setter_value_expression_pattern() % (INSPECTOR_TYPES_GENERATOR_CONFIG_MAP[output_type]["prefix"], setter_argument) 2283 2283 2284 2284 setter_code = " %s->set%s(ASCIILiteral(\"%s\"), %s);\n" % (method_struct_template.container_name, setter_type, parameter_name, setter_argument) … … 2485 2485 outputFileNamePrefix=output_file_name_prefix, 2486 2486 typeBuilderDependencies=INSPECTOR_TYPES_GENERATOR_CONFIG_MAP[output_type]["typebuilder_dependency"], 2487 exportMacro=INSPECTOR_TYPES_GENERATOR_CONFIG_MAP[output_type]["export_macro"], 2487 2488 typeBuilders="".join(flatten_list(Generator.type_builder_fragments)), 2488 2489 forwards="".join(Generator.type_builder_forwards), -
trunk/Source/JavaScriptCore/inspector/scripts/CodeGeneratorInspectorStrings.py
r160565 r160588 224 224 ${forwards} 225 225 226 String getEnumConstantValue(int code);226 ${exportMacro} String get${outputFileNamePrefix}EnumConstantValue(int code); 227 227 228 228 ${typeBuilders} … … 251 251 namespace TypeBuilder { 252 252 253 const char* const enum_constant_values[] = {253 static const char* const enum_constant_values[] = { 254 254 ${enumConstantValues}}; 255 255 256 String get EnumConstantValue(int code) {256 String get${outputFileNamePrefix}EnumConstantValue(int code) { 257 257 return enum_constant_values[code]; 258 258 } -
trunk/Source/WebCore/CMakeLists.txt
r160557 r160588 763 763 inspector/protocol/DOMStorage.json 764 764 inspector/protocol/Database.json 765 inspector/protocol/Debugger.json766 765 inspector/protocol/FileSystem.json 767 766 inspector/protocol/HeapProfiler.json 768 767 inspector/protocol/IndexedDB.json 769 768 inspector/protocol/Input.json 770 inspector/protocol/InspectorDomain.json771 769 inspector/protocol/LayerTree.json 772 770 inspector/protocol/Memory.json -
trunk/Source/WebCore/ChangeLog
r160581 r160588 1 2013-12-13 Joseph Pecoraro <pecoraro@apple.com> 2 3 Web Inspector: Move Inspector and Debugger protocol domains into JavaScriptCore 4 https://bugs.webkit.org/show_bug.cgi?id=125707 5 6 Reviewed by Timothy Hatcher. 7 8 - Switch TypeBuilder::Page::SearchMatch to TypeBuilder::GenericTypes::SearchMatch 9 which comes from InspectorJSTypeBuilders. 10 - Remove domains that moved to JavaScriptCore. 11 12 No new tests, this only moves code around. There are no functional changes. 13 14 * CMakeLists.txt: 15 * DerivedSources.make: 16 * GNUmakefile.am: 17 Add new files. 18 19 * inspector/ContentSearchUtils.cpp: 20 (WebCore::ContentSearchUtils::buildObjectForSearchMatch): 21 (WebCore::ContentSearchUtils::searchInTextByLines): 22 * inspector/ContentSearchUtils.h: 23 * inspector/InspectorAgent.cpp: 24 * inspector/InspectorAgent.h: 25 * inspector/InspectorDebuggerAgent.h: 26 * inspector/InspectorPageAgent.cpp: 27 (WebCore::InspectorPageAgent::searchInResource): 28 * inspector/InspectorPageAgent.h: 29 * inspector/protocol/Page.json: 30 Update includes and type builder type names. 31 32 * inspector/InspectorDebuggerAgent.cpp: 33 (WebCore::breakpointActionTypeForString): 34 (WebCore::InspectorDebuggerAgent::searchInContent): 35 * inspector/InspectorTimelineAgent.cpp: 36 (WebCore::InspectorTimelineAgent::innerAddRecordToTimeline): 37 Use the new getEnum function names. 38 1 39 2013-12-13 Brent Fulgham <bfulgham@apple.com> 2 40 -
trunk/Source/WebCore/DerivedSources.make
r160557 r160588 1078 1078 $(WebCore)/inspector/protocol/DOMStorage.json \ 1079 1079 $(WebCore)/inspector/protocol/Database.json \ 1080 $(WebCore)/inspector/protocol/Debugger.json \1081 1080 $(WebCore)/inspector/protocol/FileSystem.json \ 1082 1081 $(WebCore)/inspector/protocol/HeapProfiler.json \ 1083 1082 $(WebCore)/inspector/protocol/IndexedDB.json \ 1084 1083 $(WebCore)/inspector/protocol/Input.json \ 1085 $(WebCore)/inspector/protocol/InspectorDomain.json \1086 1084 $(WebCore)/inspector/protocol/LayerTree.json \ 1087 1085 $(WebCore)/inspector/protocol/Memory.json \ -
trunk/Source/WebCore/GNUmakefile.am
r160568 r160588 343 343 $(WebCore)/inspector/protocol/DOMStorage.json \ 344 344 $(WebCore)/inspector/protocol/Database.json \ 345 $(WebCore)/inspector/protocol/Debugger.json \346 345 $(WebCore)/inspector/protocol/FileSystem.json \ 347 346 $(WebCore)/inspector/protocol/HeapProfiler.json \ 348 347 $(WebCore)/inspector/protocol/IndexedDB.json \ 349 348 $(WebCore)/inspector/protocol/Input.json \ 350 $(WebCore)/inspector/protocol/InspectorDomain.json \351 349 $(WebCore)/inspector/protocol/LayerTree.json \ 352 350 $(WebCore)/inspector/protocol/Memory.json \ -
trunk/Source/WebCore/inspector/ContentSearchUtils.cpp
r160457 r160588 33 33 #include "ContentSearchUtils.h" 34 34 #include "RegularExpression.h" 35 #include <inspector/InspectorJSTypeBuilders.h> 35 36 #include <inspector/InspectorValues.h> 36 37 #include <wtf/BumpPointerAllocator.h> … … 121 122 } 122 123 123 static PassRefPtr<Inspector::TypeBuilder:: Page::SearchMatch> buildObjectForSearchMatch(int lineNumber, const String& lineContent)124 { 125 return Inspector::TypeBuilder:: Page::SearchMatch::create()124 static PassRefPtr<Inspector::TypeBuilder::GenericTypes::SearchMatch> buildObjectForSearchMatch(int lineNumber, const String& lineContent) 125 { 126 return Inspector::TypeBuilder::GenericTypes::SearchMatch::create() 126 127 .setLineNumber(lineNumber) 127 128 .setLineContent(lineContent) … … 154 155 } 155 156 156 PassRefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder:: Page::SearchMatch>> searchInTextByLines(const String& text, const String& query, const bool caseSensitive, const bool isRegex)157 { 158 RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder:: Page::SearchMatch>> result = Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Page::SearchMatch>::create();157 PassRefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::GenericTypes::SearchMatch>> searchInTextByLines(const String& text, const String& query, const bool caseSensitive, const bool isRegex) 158 { 159 RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::GenericTypes::SearchMatch>> result = Inspector::TypeBuilder::Array<Inspector::TypeBuilder::GenericTypes::SearchMatch>::create(); 159 160 160 161 RegularExpression regex = ContentSearchUtils::createSearchRegex(query, caseSensitive, isRegex); -
trunk/Source/WebCore/inspector/ContentSearchUtils.h
r160457 r160588 45 45 RegularExpression createSearchRegex(const String& query, bool caseSensitive, bool isRegex); 46 46 int countRegularExpressionMatches(const RegularExpression&, const String&); 47 PassRefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder:: Page::SearchMatch>> searchInTextByLines(const String& text, const String& query, const bool caseSensitive, const bool isRegex);47 PassRefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::GenericTypes::SearchMatch>> searchInTextByLines(const String& text, const String& query, const bool caseSensitive, const bool isRegex); 48 48 TextPosition textPositionFromOffset(size_t offset, const Vector<size_t>& lineEndings); 49 49 PassOwnPtr<Vector<size_t>> lineEndings(const String&); -
trunk/Source/WebCore/inspector/InspectorAgent.cpp
r160557 r160588 42 42 #include "InspectorController.h" 43 43 #include "InspectorInstrumentation.h" 44 #include "InspectorWebFrontendDispatchers.h"45 44 #include "InstrumentingAgents.h" 46 45 #include "MainFrame.h" … … 51 50 #include "Settings.h" 52 51 #include <bindings/ScriptValue.h> 52 #include <inspector/InspectorJSFrontendDispatchers.h> 53 53 #include <inspector/InspectorValues.h> 54 54 #include <wtf/PassRefPtr.h> -
trunk/Source/WebCore/inspector/InspectorAgent.h
r160557 r160588 32 32 33 33 #include "InspectorWebAgentBase.h" 34 #include "InspectorWebBackendDispatchers.h"34 #include <inspector/InspectorJSBackendDispatchers.h> 35 35 #include <wtf/Forward.h> 36 36 #include <wtf/HashMap.h> -
trunk/Source/WebCore/inspector/InspectorDebuggerAgent.cpp
r160557 r160588 29 29 30 30 #include "config.h" 31 #include "InspectorDebuggerAgent.h" 31 32 32 33 #if ENABLE(JAVASCRIPT_DEBUGGER) && ENABLE(INSPECTOR) 33 #include "InspectorDebuggerAgent.h"34 34 35 35 #include "CachedResource.h" … … 38 38 #include "InjectedScriptManager.h" 39 39 #include "InspectorPageAgent.h" 40 #include "InspectorWebFrontendDispatchers.h"41 40 #include "InstrumentingAgents.h" 42 41 #include "RegularExpression.h" … … 204 203 static bool breakpointActionTypeForString(const String& typeString, ScriptBreakpointActionType* output) 205 204 { 206 if (typeString == Inspector::TypeBuilder::get EnumConstantValue(Inspector::TypeBuilder::Debugger::BreakpointAction::Type::Log)) {205 if (typeString == Inspector::TypeBuilder::getJSEnumConstantValue(Inspector::TypeBuilder::Debugger::BreakpointAction::Type::Log)) { 207 206 *output = ScriptBreakpointActionTypeLog; 208 207 return true; 209 208 } 210 if (typeString == Inspector::TypeBuilder::get EnumConstantValue(Inspector::TypeBuilder::Debugger::BreakpointAction::Type::Evaluate)) {209 if (typeString == Inspector::TypeBuilder::getJSEnumConstantValue(Inspector::TypeBuilder::Debugger::BreakpointAction::Type::Evaluate)) { 211 210 *output = ScriptBreakpointActionTypeEvaluate; 212 211 return true; 213 212 } 214 if (typeString == Inspector::TypeBuilder::get EnumConstantValue(Inspector::TypeBuilder::Debugger::BreakpointAction::Type::Sound)) {213 if (typeString == Inspector::TypeBuilder::getJSEnumConstantValue(Inspector::TypeBuilder::Debugger::BreakpointAction::Type::Sound)) { 215 214 *output = ScriptBreakpointActionTypeSound; 216 215 return true; … … 424 423 } 425 424 426 void InspectorDebuggerAgent::searchInContent(ErrorString* error, const String& scriptIDStr, const String& query, const bool* const optionalCaseSensitive, const bool* const optionalIsRegex, RefPtr<Array<Inspector::TypeBuilder:: Page::SearchMatch>>& results)425 void InspectorDebuggerAgent::searchInContent(ErrorString* error, const String& scriptIDStr, const String& query, const bool* const optionalCaseSensitive, const bool* const optionalIsRegex, RefPtr<Array<Inspector::TypeBuilder::GenericTypes::SearchMatch>>& results) 427 426 { 428 427 bool isRegex = optionalIsRegex ? *optionalIsRegex : false; -
trunk/Source/WebCore/inspector/InspectorDebuggerAgent.h
r160557 r160588 38 38 #include "InjectedScript.h" 39 39 #include "InspectorWebAgentBase.h" 40 #include "InspectorWebBackendDispatchers.h"41 #include "InspectorWebFrontendDispatchers.h"42 40 #include "ScriptBreakpoint.h" 43 41 #include "ScriptDebugListener.h" 44 42 #include "ScriptState.h" 45 43 #include "SourceID.h" 44 #include <inspector/InspectorJSBackendDispatchers.h> 45 #include <inspector/InspectorJSFrontendDispatchers.h> 46 46 #include <wtf/Forward.h> 47 47 #include <wtf/HashMap.h> … … 97 97 virtual void continueToLocation(ErrorString*, const RefPtr<Inspector::InspectorObject>& location); 98 98 99 virtual void searchInContent(ErrorString*, const String& scriptID, const String& query, const bool* optionalCaseSensitive, const bool* optionalIsRegex, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder:: Page::SearchMatch>>&);99 virtual void searchInContent(ErrorString*, const String& scriptID, const String& query, const bool* optionalCaseSensitive, const bool* optionalIsRegex, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::GenericTypes::SearchMatch>>&); 100 100 virtual void setScriptSource(ErrorString*, const String& scriptID, const String& newContent, const bool* preview, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Debugger::CallFrame>>& newCallFrames, RefPtr<Inspector::InspectorObject>& result); 101 101 virtual void getScriptSource(ErrorString*, const String& scriptID, String* scriptSource); -
trunk/Source/WebCore/inspector/InspectorPageAgent.cpp
r160557 r160588 607 607 } 608 608 609 void InspectorPageAgent::searchInResource(ErrorString*, const String& frameId, const String& url, const String& query, const bool* const optionalCaseSensitive, const bool* const optionalIsRegex, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder:: Page::SearchMatch>>& results)610 { 611 results = Inspector::TypeBuilder::Array<Inspector::TypeBuilder:: Page::SearchMatch>::create();609 void InspectorPageAgent::searchInResource(ErrorString*, const String& frameId, const String& url, const String& query, const bool* const optionalCaseSensitive, const bool* const optionalIsRegex, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::GenericTypes::SearchMatch>>& results) 610 { 611 results = Inspector::TypeBuilder::Array<Inspector::TypeBuilder::GenericTypes::SearchMatch>::create(); 612 612 613 613 bool isRegex = optionalIsRegex ? *optionalIsRegex : false; -
trunk/Source/WebCore/inspector/InspectorPageAgent.h
r160557 r160588 110 110 virtual void getResourceTree(ErrorString*, RefPtr<Inspector::TypeBuilder::Page::FrameResourceTree>&); 111 111 virtual void getResourceContent(ErrorString*, const String& frameId, const String& url, String* content, bool* base64Encoded); 112 virtual void searchInResource(ErrorString*, const String& frameId, const String& url, const String& query, const bool* optionalCaseSensitive, const bool* optionalIsRegex, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder:: Page::SearchMatch>>&);112 virtual void searchInResource(ErrorString*, const String& frameId, const String& url, const String& query, const bool* optionalCaseSensitive, const bool* optionalIsRegex, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::GenericTypes::SearchMatch>>&); 113 113 virtual void searchInResources(ErrorString*, const String&, const bool* caseSensitive, const bool* isRegex, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Page::SearchResult>>&); 114 114 virtual void setDocumentContent(ErrorString*, const String& frameId, const String& html); -
trunk/Source/WebCore/inspector/InspectorTimelineAgent.cpp
r160557 r160588 515 515 void InspectorTimelineAgent::innerAddRecordToTimeline(PassRefPtr<InspectorObject> prpRecord, TimelineRecordType type) 516 516 { 517 prpRecord->setString("type", Inspector::TypeBuilder::get EnumConstantValue(toProtocol(type)));517 prpRecord->setString("type", Inspector::TypeBuilder::getWebEnumConstantValue(toProtocol(type))); 518 518 519 519 RefPtr<Inspector::TypeBuilder::Timeline::TimelineEvent> record = Inspector::TypeBuilder::Timeline::TimelineEvent::runtimeCast(prpRecord); -
trunk/Source/WebCore/inspector/protocol/Page.json
r160203 r160588 53 53 }, 54 54 { 55 "id": "SearchMatch",56 "type": "object",57 "description": "Search match for resource.",58 "properties": [59 { "name": "lineNumber", "type": "number", "description": "Line number in resource content." },60 { "name": "lineContent", "type": "string", "description": "Line with match content." }61 ]62 },63 {64 55 "id": "SearchResult", 65 56 "type": "object", … … 178 169 ], 179 170 "returns": [ 180 { "name": "result", "type": "array", "items": { "$ref": " SearchMatch" }, "description": "List of search matches." }171 { "name": "result", "type": "array", "items": { "$ref": "GenericTypes.SearchMatch" }, "description": "List of search matches." } 181 172 ] 182 173 }, -
trunk/Source/WebInspectorUI/ChangeLog
r160585 r160588 1 2013-12-13 Joseph Pecoraro <pecoraro@apple.com> 2 3 Web Inspector: Move Inspector and Debugger protocol domains into JavaScriptCore 4 https://bugs.webkit.org/show_bug.cgi?id=125707 5 6 Reviewed by Timothy Hatcher. 7 8 * UserInterface/InspectorJSBackendCommands.js: 9 * UserInterface/InspectorWebBackendCommands.js: 10 Regenerate now that domains have moved around. 11 1 12 2013-12-13 Joseph Pecoraro <pecoraro@apple.com> 2 13 -
trunk/Source/WebInspectorUI/UserInterface/InspectorJSBackendCommands.js
r160557 r160588 6 6 // found in the LICENSE file. 7 7 8 9 // Debugger. 10 InspectorBackend.registerDebuggerDispatcher = InspectorBackend.registerDomainDispatcher.bind(InspectorBackend, "Debugger"); 11 InspectorBackend.registerEnum("Debugger.BreakpointActionType", {Log: "log", Evaluate: "evaluate", Sound: "sound"}); 12 InspectorBackend.registerEnum("Debugger.ScopeType", {Global: "global", Local: "local", With: "with", Closure: "closure", Catch: "catch"}); 13 InspectorBackend.registerEvent("Debugger.globalObjectCleared", []); 14 InspectorBackend.registerEvent("Debugger.scriptParsed", ["scriptId", "url", "startLine", "startColumn", "endLine", "endColumn", "isContentScript", "sourceMapURL", "hasSourceURL"]); 15 InspectorBackend.registerEvent("Debugger.scriptFailedToParse", ["url", "scriptSource", "startLine", "errorLine", "errorMessage"]); 16 InspectorBackend.registerEvent("Debugger.breakpointResolved", ["breakpointId", "location"]); 17 InspectorBackend.registerEvent("Debugger.paused", ["callFrames", "reason", "data"]); 18 InspectorBackend.registerEvent("Debugger.resumed", []); 19 InspectorBackend.registerCommand("Debugger.causesRecompilation", [], ["result"]); 20 InspectorBackend.registerCommand("Debugger.supportsSeparateScriptCompilationAndExecution", [], ["result"]); 21 InspectorBackend.registerCommand("Debugger.enable", [], []); 22 InspectorBackend.registerCommand("Debugger.disable", [], []); 23 InspectorBackend.registerCommand("Debugger.setBreakpointsActive", [{"name": "active", "type": "boolean", "optional": false}], []); 24 InspectorBackend.registerCommand("Debugger.setBreakpointByUrl", [{"name": "lineNumber", "type": "number", "optional": false}, {"name": "url", "type": "string", "optional": true}, {"name": "urlRegex", "type": "string", "optional": true}, {"name": "columnNumber", "type": "number", "optional": true}, {"name": "options", "type": "object", "optional": true}], ["breakpointId", "locations"]); 25 InspectorBackend.registerCommand("Debugger.setBreakpoint", [{"name": "location", "type": "object", "optional": false}, {"name": "options", "type": "object", "optional": true}], ["breakpointId", "actualLocation"]); 26 InspectorBackend.registerCommand("Debugger.removeBreakpoint", [{"name": "breakpointId", "type": "string", "optional": false}], []); 27 InspectorBackend.registerCommand("Debugger.continueToLocation", [{"name": "location", "type": "object", "optional": false}], []); 28 InspectorBackend.registerCommand("Debugger.stepOver", [], []); 29 InspectorBackend.registerCommand("Debugger.stepInto", [], []); 30 InspectorBackend.registerCommand("Debugger.stepOut", [], []); 31 InspectorBackend.registerCommand("Debugger.pause", [], []); 32 InspectorBackend.registerCommand("Debugger.resume", [], []); 33 InspectorBackend.registerCommand("Debugger.searchInContent", [{"name": "scriptId", "type": "string", "optional": false}, {"name": "query", "type": "string", "optional": false}, {"name": "caseSensitive", "type": "boolean", "optional": true}, {"name": "isRegex", "type": "boolean", "optional": true}], ["result"]); 34 InspectorBackend.registerCommand("Debugger.canSetScriptSource", [], ["result"]); 35 InspectorBackend.registerCommand("Debugger.setScriptSource", [{"name": "scriptId", "type": "string", "optional": false}, {"name": "scriptSource", "type": "string", "optional": false}, {"name": "preview", "type": "boolean", "optional": true}], ["callFrames", "result"]); 36 InspectorBackend.registerCommand("Debugger.getScriptSource", [{"name": "scriptId", "type": "string", "optional": false}], ["scriptSource"]); 37 InspectorBackend.registerCommand("Debugger.getFunctionDetails", [{"name": "functionId", "type": "string", "optional": false}], ["details"]); 38 InspectorBackend.registerCommand("Debugger.setPauseOnExceptions", [{"name": "state", "type": "string", "optional": false}], []); 39 InspectorBackend.registerCommand("Debugger.evaluateOnCallFrame", [{"name": "callFrameId", "type": "string", "optional": false}, {"name": "expression", "type": "string", "optional": false}, {"name": "objectGroup", "type": "string", "optional": true}, {"name": "includeCommandLineAPI", "type": "boolean", "optional": true}, {"name": "doNotPauseOnExceptionsAndMuteConsole", "type": "boolean", "optional": true}, {"name": "returnByValue", "type": "boolean", "optional": true}, {"name": "generatePreview", "type": "boolean", "optional": true}], ["result", "wasThrown"]); 40 InspectorBackend.registerCommand("Debugger.compileScript", [{"name": "expression", "type": "string", "optional": false}, {"name": "sourceURL", "type": "string", "optional": false}], ["scriptId", "syntaxErrorMessage"]); 41 InspectorBackend.registerCommand("Debugger.runScript", [{"name": "scriptId", "type": "string", "optional": false}, {"name": "contextId", "type": "number", "optional": true}, {"name": "objectGroup", "type": "string", "optional": true}, {"name": "doNotPauseOnExceptionsAndMuteConsole", "type": "boolean", "optional": true}], ["result", "wasThrown"]); 42 InspectorBackend.registerCommand("Debugger.setOverlayMessage", [{"name": "message", "type": "string", "optional": true}], []); 43 44 // Inspector. 45 InspectorBackend.registerInspectorDispatcher = InspectorBackend.registerDomainDispatcher.bind(InspectorBackend, "Inspector"); 46 InspectorBackend.registerEvent("Inspector.evaluateForTestInFrontend", ["testCallId", "script"]); 47 InspectorBackend.registerEvent("Inspector.inspect", ["object", "hints"]); 48 InspectorBackend.registerEvent("Inspector.detached", ["reason"]); 49 InspectorBackend.registerEvent("Inspector.targetCrashed", []); 50 InspectorBackend.registerCommand("Inspector.enable", [], []); 51 InspectorBackend.registerCommand("Inspector.disable", [], []); 8 52 9 53 // Runtime. -
trunk/Source/WebInspectorUI/UserInterface/InspectorWebBackendCommands.js
r160557 r160588 160 160 InspectorBackend.registerCommand("Database.executeSQL", [{"name": "databaseId", "type": "string", "optional": false}, {"name": "query", "type": "string", "optional": false}], ["columnNames", "values", "sqlError"]); 161 161 162 // Debugger.163 InspectorBackend.registerDebuggerDispatcher = InspectorBackend.registerDomainDispatcher.bind(InspectorBackend, "Debugger");164 InspectorBackend.registerEnum("Debugger.BreakpointActionType", {Log: "log", Evaluate: "evaluate", Sound: "sound"});165 InspectorBackend.registerEnum("Debugger.ScopeType", {Global: "global", Local: "local", With: "with", Closure: "closure", Catch: "catch"});166 InspectorBackend.registerEvent("Debugger.globalObjectCleared", []);167 InspectorBackend.registerEvent("Debugger.scriptParsed", ["scriptId", "url", "startLine", "startColumn", "endLine", "endColumn", "isContentScript", "sourceMapURL", "hasSourceURL"]);168 InspectorBackend.registerEvent("Debugger.scriptFailedToParse", ["url", "scriptSource", "startLine", "errorLine", "errorMessage"]);169 InspectorBackend.registerEvent("Debugger.breakpointResolved", ["breakpointId", "location"]);170 InspectorBackend.registerEvent("Debugger.paused", ["callFrames", "reason", "data"]);171 InspectorBackend.registerEvent("Debugger.resumed", []);172 InspectorBackend.registerCommand("Debugger.causesRecompilation", [], ["result"]);173 InspectorBackend.registerCommand("Debugger.supportsSeparateScriptCompilationAndExecution", [], ["result"]);174 InspectorBackend.registerCommand("Debugger.enable", [], []);175 InspectorBackend.registerCommand("Debugger.disable", [], []);176 InspectorBackend.registerCommand("Debugger.setBreakpointsActive", [{"name": "active", "type": "boolean", "optional": false}], []);177 InspectorBackend.registerCommand("Debugger.setBreakpointByUrl", [{"name": "lineNumber", "type": "number", "optional": false}, {"name": "url", "type": "string", "optional": true}, {"name": "urlRegex", "type": "string", "optional": true}, {"name": "columnNumber", "type": "number", "optional": true}, {"name": "options", "type": "object", "optional": true}], ["breakpointId", "locations"]);178 InspectorBackend.registerCommand("Debugger.setBreakpoint", [{"name": "location", "type": "object", "optional": false}, {"name": "options", "type": "object", "optional": true}], ["breakpointId", "actualLocation"]);179 InspectorBackend.registerCommand("Debugger.removeBreakpoint", [{"name": "breakpointId", "type": "string", "optional": false}], []);180 InspectorBackend.registerCommand("Debugger.continueToLocation", [{"name": "location", "type": "object", "optional": false}], []);181 InspectorBackend.registerCommand("Debugger.stepOver", [], []);182 InspectorBackend.registerCommand("Debugger.stepInto", [], []);183 InspectorBackend.registerCommand("Debugger.stepOut", [], []);184 InspectorBackend.registerCommand("Debugger.pause", [], []);185 InspectorBackend.registerCommand("Debugger.resume", [], []);186 InspectorBackend.registerCommand("Debugger.searchInContent", [{"name": "scriptId", "type": "string", "optional": false}, {"name": "query", "type": "string", "optional": false}, {"name": "caseSensitive", "type": "boolean", "optional": true}, {"name": "isRegex", "type": "boolean", "optional": true}], ["result"]);187 InspectorBackend.registerCommand("Debugger.canSetScriptSource", [], ["result"]);188 InspectorBackend.registerCommand("Debugger.setScriptSource", [{"name": "scriptId", "type": "string", "optional": false}, {"name": "scriptSource", "type": "string", "optional": false}, {"name": "preview", "type": "boolean", "optional": true}], ["callFrames", "result"]);189 InspectorBackend.registerCommand("Debugger.getScriptSource", [{"name": "scriptId", "type": "string", "optional": false}], ["scriptSource"]);190 InspectorBackend.registerCommand("Debugger.getFunctionDetails", [{"name": "functionId", "type": "string", "optional": false}], ["details"]);191 InspectorBackend.registerCommand("Debugger.setPauseOnExceptions", [{"name": "state", "type": "string", "optional": false}], []);192 InspectorBackend.registerCommand("Debugger.evaluateOnCallFrame", [{"name": "callFrameId", "type": "string", "optional": false}, {"name": "expression", "type": "string", "optional": false}, {"name": "objectGroup", "type": "string", "optional": true}, {"name": "includeCommandLineAPI", "type": "boolean", "optional": true}, {"name": "doNotPauseOnExceptionsAndMuteConsole", "type": "boolean", "optional": true}, {"name": "returnByValue", "type": "boolean", "optional": true}, {"name": "generatePreview", "type": "boolean", "optional": true}], ["result", "wasThrown"]);193 InspectorBackend.registerCommand("Debugger.compileScript", [{"name": "expression", "type": "string", "optional": false}, {"name": "sourceURL", "type": "string", "optional": false}], ["scriptId", "syntaxErrorMessage"]);194 InspectorBackend.registerCommand("Debugger.runScript", [{"name": "scriptId", "type": "string", "optional": false}, {"name": "contextId", "type": "number", "optional": true}, {"name": "objectGroup", "type": "string", "optional": true}, {"name": "doNotPauseOnExceptionsAndMuteConsole", "type": "boolean", "optional": true}], ["result", "wasThrown"]);195 InspectorBackend.registerCommand("Debugger.setOverlayMessage", [{"name": "message", "type": "string", "optional": true}], []);196 197 162 // FileSystem. 198 163 InspectorBackend.registerFileSystemDispatcher = InspectorBackend.registerDomainDispatcher.bind(InspectorBackend, "FileSystem"); … … 237 202 InspectorBackend.registerCommand("Input.dispatchKeyEvent", [{"name": "type", "type": "string", "optional": false}, {"name": "modifiers", "type": "number", "optional": true}, {"name": "timestamp", "type": "number", "optional": true}, {"name": "text", "type": "string", "optional": true}, {"name": "unmodifiedText", "type": "string", "optional": true}, {"name": "keyIdentifier", "type": "string", "optional": true}, {"name": "windowsVirtualKeyCode", "type": "number", "optional": true}, {"name": "nativeVirtualKeyCode", "type": "number", "optional": true}, {"name": "macCharCode", "type": "number", "optional": true}, {"name": "autoRepeat", "type": "boolean", "optional": true}, {"name": "isKeypad", "type": "boolean", "optional": true}, {"name": "isSystemKey", "type": "boolean", "optional": true}], []); 238 203 InspectorBackend.registerCommand("Input.dispatchMouseEvent", [{"name": "type", "type": "string", "optional": false}, {"name": "x", "type": "number", "optional": false}, {"name": "y", "type": "number", "optional": false}, {"name": "modifiers", "type": "number", "optional": true}, {"name": "timestamp", "type": "number", "optional": true}, {"name": "button", "type": "string", "optional": true}, {"name": "clickCount", "type": "number", "optional": true}], []); 239 240 // Inspector.241 InspectorBackend.registerInspectorDispatcher = InspectorBackend.registerDomainDispatcher.bind(InspectorBackend, "Inspector");242 InspectorBackend.registerEvent("Inspector.evaluateForTestInFrontend", ["testCallId", "script"]);243 InspectorBackend.registerEvent("Inspector.inspect", ["object", "hints"]);244 InspectorBackend.registerEvent("Inspector.detached", ["reason"]);245 InspectorBackend.registerEvent("Inspector.targetCrashed", []);246 InspectorBackend.registerCommand("Inspector.enable", [], []);247 InspectorBackend.registerCommand("Inspector.disable", [], []);248 204 249 205 // LayerTree.
Note: See TracChangeset
for help on using the changeset viewer.