Title: [160320] trunk/Source/WebCore
- Revision
- 160320
- Author
- [email protected]
- Date
- 2013-12-09 11:21:47 -0800 (Mon, 09 Dec 2013)
Log Message
Web Inspector: Inspector.json and CodeGenerator tweaks
https://bugs.webkit.org/show_bug.cgi?id=125321
Patch by Joseph Pecoraro <[email protected]> on 2013-12-09
Reviewed by Timothy Hatcher.
* inspector/protocol/Runtime.json:
Runtime.js was depending on Network.FrameId. This is a layering
violation, so ideally we can fix this later. For now, just copy
the FrameId type into Runtime. They are strings so all is good.
* inspector/CodeGeneratorInspector.py:
(Generator.EventMethodStructTemplate.append_epilog):
* inspector/CodeGeneratorInspectorStrings.py:
Improve --help usage information.
Make the script work with a single domain json file.
Add ASCIILiteral's where appropriate.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (160319 => 160320)
--- trunk/Source/WebCore/ChangeLog 2013-12-09 19:01:09 UTC (rev 160319)
+++ trunk/Source/WebCore/ChangeLog 2013-12-09 19:21:47 UTC (rev 160320)
@@ -1,3 +1,22 @@
+2013-12-09 Joseph Pecoraro <[email protected]>
+
+ Web Inspector: Inspector.json and CodeGenerator tweaks
+ https://bugs.webkit.org/show_bug.cgi?id=125321
+
+ Reviewed by Timothy Hatcher.
+
+ * inspector/protocol/Runtime.json:
+ Runtime.js was depending on Network.FrameId. This is a layering
+ violation, so ideally we can fix this later. For now, just copy
+ the FrameId type into Runtime. They are strings so all is good.
+
+ * inspector/CodeGeneratorInspector.py:
+ (Generator.EventMethodStructTemplate.append_epilog):
+ * inspector/CodeGeneratorInspectorStrings.py:
+ Improve --help usage information.
+ Make the script work with a single domain json file.
+ Add ASCIILiteral's where appropriate.
+
2013-12-09 Nick Diego Yamane <[email protected]>
[Nix] Fix file name typo in PlatformNix.cmake
Modified: trunk/Source/WebCore/inspector/CodeGeneratorInspector.py (160319 => 160320)
--- trunk/Source/WebCore/inspector/CodeGeneratorInspector.py 2013-12-09 19:01:09 UTC (rev 160319)
+++ trunk/Source/WebCore/inspector/CodeGeneratorInspector.py 2013-12-09 19:21:47 UTC (rev 160320)
@@ -72,7 +72,7 @@
EXACTLY_INT_SUPPORTED = False
-cmdline_parser = optparse.OptionParser()
+cmdline_parser = optparse.OptionParser(usage="usage: %prog [options] <Inspector.json>")
cmdline_parser.add_option("--output_h_dir")
cmdline_parser.add_option("--output_cpp_dir")
cmdline_parser.add_option("--output_js_dir")
@@ -1703,7 +1703,11 @@
json_string = input_file.read()
json_api = json.loads(json_string)
+# Allow this script to work when the input is a single domain.
+if not "domains" in json_api:
+ json_api = {"domains": [json_api]}
+
class Templates:
def get_this_script_path_(absolute_path):
absolute_path = os.path.abspath(absolute_path)
@@ -1987,7 +1991,7 @@
@staticmethod
def append_epilog(line_list):
- line_list.append(" jsonMessage->setObject(\"params\", paramsObject);\n")
+ line_list.append(" jsonMessage->setObject(ASCIILiteral(\"params\"), paramsObject);\n")
container_name = "paramsObject"
Modified: trunk/Source/WebCore/inspector/CodeGeneratorInspectorStrings.py (160319 => 160320)
--- trunk/Source/WebCore/inspector/CodeGeneratorInspectorStrings.py 2013-12-09 19:01:09 UTC (rev 160319)
+++ trunk/Source/WebCore/inspector/CodeGeneratorInspectorStrings.py 2013-12-09 19:21:47 UTC (rev 160320)
@@ -102,10 +102,10 @@
}
""")
-frontend_method = ("""void Inspector${domainName}FrontendDispatcher::$eventName($parameters)
+frontend_method = ("""void Inspector${domainName}FrontendDispatcher::$eventName(${parameters})
{
RefPtr<InspectorObject> jsonMessage = InspectorObject::create();
- jsonMessage->setString("method", "$domainName.$eventName");
+ jsonMessage->setString(ASCIILiteral("method"), ASCIILiteral("${domainName}.${eventName}"));
$code
m_inspectorFrontendChannel->sendMessageToFrontend(jsonMessage->toJSONString());
}
Modified: trunk/Source/WebCore/inspector/protocol/Runtime.json (160319 => 160320)
--- trunk/Source/WebCore/inspector/protocol/Runtime.json 2013-12-09 19:01:09 UTC (rev 160319)
+++ trunk/Source/WebCore/inspector/protocol/Runtime.json 2013-12-09 19:21:47 UTC (rev 160320)
@@ -82,6 +82,11 @@
"description": "Id of an execution context."
},
{
+ "id": "RuntimeFrameId",
+ "type": "string",
+ "description": "Unique frame identifier. FIXME: This duplicates Network.FrameId."
+ },
+ {
"id": "ExecutionContextDescription",
"type": "object",
"description": "Description of an isolated world.",
@@ -89,7 +94,7 @@
{ "name": "id", "$ref": "ExecutionContextId", "description": "Unique id of the execution context. It can be used to specify in which execution context script evaluation should be performed." },
{ "name": "isPageContext", "type": "boolean", "description": "True if this is a context where inpspected web page scripts run. False if it is a content script isolated context." },
{ "name": "name", "type": "string", "description": "Human readable name describing given context."},
- { "name": "frameId", "$ref": "Network.FrameId", "description": "Id of the owning frame." }
+ { "name": "frameId", "$ref": "RuntimeFrameId", "description": "Id of the owning frame." }
]
},
{
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes