Diff
Modified: trunk/LayoutTests/ChangeLog (93585 => 93586)
--- trunk/LayoutTests/ChangeLog 2011-08-23 09:32:42 UTC (rev 93585)
+++ trunk/LayoutTests/ChangeLog 2011-08-23 09:33:54 UTC (rev 93586)
@@ -1,3 +1,12 @@
+2011-08-22 Pavel Feldman <[email protected]>
+
+ Web Inspector: generate protocol externs API for the front-end compilation.
+ https://bugs.webkit.org/show_bug.cgi?id=66677
+
+ Reviewed by Tony Gentilcore.
+
+ * inspector/debugger/debugger-set-breakpoint-regex.html:
+
2011-08-23 Csaba Osztrogonác <[email protected]>
Unreviewed gardening. Remove Windows style new lines from the test introduced in r93521.
Modified: trunk/LayoutTests/inspector/debugger/debugger-set-breakpoint-regex.html (93585 => 93586)
--- trunk/LayoutTests/inspector/debugger/debugger-set-breakpoint-regex.html 2011-08-23 09:32:42 UTC (rev 93585)
+++ trunk/LayoutTests/inspector/debugger/debugger-set-breakpoint-regex.html 2011-08-23 09:33:54 UTC (rev 93586)
@@ -31,7 +31,7 @@
{
var url = ""
var urlRegex = "debugger-set-breakpoint.*";
- DebuggerAgent.setBreakpointByUrl(url, urlRegex, 1, step2);
+ DebuggerAgent.setBreakpointByUrl(1, url, urlRegex, step2);
function step2(result)
{
Modified: trunk/Source/WebCore/ChangeLog (93585 => 93586)
--- trunk/Source/WebCore/ChangeLog 2011-08-23 09:32:42 UTC (rev 93585)
+++ trunk/Source/WebCore/ChangeLog 2011-08-23 09:33:54 UTC (rev 93586)
@@ -1,5 +1,27 @@
2011-08-22 Pavel Feldman <[email protected]>
+ Web Inspector: generate protocol externs API for the front-end compilation.
+ https://bugs.webkit.org/show_bug.cgi?id=66677
+
+ Reviewed by Tony Gentilcore.
+
+ * inspector/Inspector.json:
+ * inspector/InspectorDOMAgent.cpp:
+ (WebCore::InspectorDOMAgent::setAttributesText):
+ * inspector/InspectorDOMAgent.h:
+ * inspector/InspectorDebuggerAgent.cpp:
+ (WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
+ * inspector/InspectorDebuggerAgent.h:
+ * inspector/compile-front-end.sh: Added.
+ * inspector/front-end/DOMAgent.js:
+ (WebInspector.DOMNode.prototype.setAttribute):
+ * inspector/front-end/DebuggerModel.js:
+ (WebInspector.DebuggerModel.prototype.setBreakpoint):
+ * inspector/front-end/externs.js: Added.
+ (console.warn):
+
+2011-08-22 Pavel Feldman <[email protected]>
+
Web Inspector: Prepare utilities.js for compilation.
https://bugs.webkit.org/show_bug.cgi?id=66656
Modified: trunk/Source/WebCore/inspector/Inspector.json (93585 => 93586)
--- trunk/Source/WebCore/inspector/Inspector.json 2011-08-23 09:32:42 UTC (rev 93585)
+++ trunk/Source/WebCore/inspector/Inspector.json 2011-08-23 09:33:54 UTC (rev 93586)
@@ -949,8 +949,8 @@
"name": "setAttributesText",
"parameters": [
{ "name": "nodeId", "$ref": "NodeId", "description": "Id of the element to set attributes for." },
- { "name": "name", "type": "string", "optional": true, "description": "Attribute name to replace with new attributes derived from text in case text parsed successfully." },
- { "name": "text", "type": "string", "description": "Text with a number of attributes. Will parse this text using HTML parser." }
+ { "name": "text", "type": "string", "description": "Text with a number of attributes. Will parse this text using HTML parser." },
+ { "name": "name", "type": "string", "optional": true, "description": "Attribute name to replace with new attributes derived from text in case text parsed successfully." }
],
"description": "Sets attributes on element with given id. This method is useful when user edits some existing attribute value and types in several attribute name/value pairs."
},
@@ -1544,9 +1544,9 @@
{
"name": "setBreakpointByUrl",
"parameters": [
+ { "name": "lineNumber", "type": "integer", "description": "Line number to set breakpoint at." },
{ "name": "url", "type": "string", "optional": true, "description": "URL of the resources to set breakpoint on." },
{ "name": "urlRegex", "type": "string", "optional": true, "description": "Regex pattern for the URLs of the resources to set breakpoints on. Either <code>url</code> or <code>urlRegex</code> must be specified." },
- { "name": "lineNumber", "type": "integer", "description": "Line number to set breakpoint at." },
{ "name": "columnNumber", "type": "integer", "optional": true, "description": "Offset in the line to set breakpoint at." },
{ "name": "condition", "type": "string", "optional": true, "description": "_expression_ to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this _expression_ evaluates to true." }
],
Modified: trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp (93585 => 93586)
--- trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp 2011-08-23 09:32:42 UTC (rev 93585)
+++ trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp 2011-08-23 09:33:54 UTC (rev 93586)
@@ -585,7 +585,7 @@
*errorString = "Internal error: could not set attribute value.";
}
-void InspectorDOMAgent::setAttributesText(ErrorString* errorString, int elementId, const String* const name, const String& text)
+void InspectorDOMAgent::setAttributesText(ErrorString* errorString, int elementId, const String& text, const String* const name)
{
Element* element = assertElement(errorString, elementId);
if (!element)
Modified: trunk/Source/WebCore/inspector/InspectorDOMAgent.h (93585 => 93586)
--- trunk/Source/WebCore/inspector/InspectorDOMAgent.h 2011-08-23 09:32:42 UTC (rev 93585)
+++ trunk/Source/WebCore/inspector/InspectorDOMAgent.h 2011-08-23 09:33:54 UTC (rev 93586)
@@ -117,7 +117,7 @@
void getDocument(ErrorString*, RefPtr<InspectorObject>* root);
void requestChildNodes(ErrorString*, int nodeId);
void setAttributeValue(ErrorString*, int elementId, const String& name, const String& value);
- void setAttributesText(ErrorString*, int elementId, const String* const name, const String& text);
+ void setAttributesText(ErrorString*, int elementId, const String& text, const String* const name);
void removeAttribute(ErrorString*, int elementId, const String& name);
void removeNode(ErrorString*, int nodeId);
void setNodeName(ErrorString*, int nodeId, const String& name, int* newId);
Modified: trunk/Source/WebCore/inspector/InspectorDebuggerAgent.cpp (93585 => 93586)
--- trunk/Source/WebCore/inspector/InspectorDebuggerAgent.cpp 2011-08-23 09:32:42 UTC (rev 93585)
+++ trunk/Source/WebCore/inspector/InspectorDebuggerAgent.cpp 2011-08-23 09:33:54 UTC (rev 93586)
@@ -181,7 +181,7 @@
return url == pattern;
}
-void InspectorDebuggerAgent::setBreakpointByUrl(ErrorString* errorString, const String* const optionalURL, const String* const optionalURLRegex, int lineNumber, const int* const optionalColumnNumber, const String* const optionalCondition, String* outBreakpointId, RefPtr<InspectorArray>* locations)
+void InspectorDebuggerAgent::setBreakpointByUrl(ErrorString* errorString, int lineNumber, const String* const optionalURL, const String* const optionalURLRegex, const int* const optionalColumnNumber, const String* const optionalCondition, String* outBreakpointId, RefPtr<InspectorArray>* locations)
{
if (!optionalURL == !optionalURLRegex) {
*errorString = "Either url or urlRegex must be specified.";
Modified: trunk/Source/WebCore/inspector/InspectorDebuggerAgent.h (93585 => 93586)
--- trunk/Source/WebCore/inspector/InspectorDebuggerAgent.h 2011-08-23 09:32:42 UTC (rev 93585)
+++ trunk/Source/WebCore/inspector/InspectorDebuggerAgent.h 2011-08-23 09:33:54 UTC (rev 93586)
@@ -82,7 +82,7 @@
// Part of the protocol.
void setBreakpointsActive(ErrorString*, bool active);
- void setBreakpointByUrl(ErrorString*, const String* const optionalURL, const String* const optionalURLRegex, int lineNumber, const int* const optionalColumnNumber, const String* const optionalCondition, String* breakpointId, RefPtr<InspectorArray>* locations);
+ void setBreakpointByUrl(ErrorString*, int lineNumber, const String* const optionalURL, const String* const optionalURLRegex, const int* const optionalColumnNumber, const String* const optionalCondition, String* breakpointId, RefPtr<InspectorArray>* locations);
void setBreakpoint(ErrorString*, PassRefPtr<InspectorObject> location, const String* const optionalCondition, String* breakpointId, RefPtr<InspectorObject>* actualLocation);
void removeBreakpoint(ErrorString*, const String& breakpointId);
void continueToLocation(ErrorString*, PassRefPtr<InspectorObject> location);
Added: trunk/Source/WebCore/inspector/compile-front-end.sh (0 => 93586)
--- trunk/Source/WebCore/inspector/compile-front-end.sh (rev 0)
+++ trunk/Source/WebCore/inspector/compile-front-end.sh 2011-08-23 09:33:54 UTC (rev 93586)
@@ -0,0 +1,37 @@
+#!/bin/sh
+# Copyright (C) 2011 Google Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# Compiles WebKit Web Inspector front-end.
+
+python Source/WebCore/inspector/generate-protocol-externs -o Source/WebCore/inspector/front-end/protocol-externs.js Source/WebCore/inspector/Inspector.json
+java -jar ~/closure/compiler.jar --compilation_level SIMPLE_OPTIMIZATIONS --warning_level VERBOSE --language_in ECMASCRIPT5 --accept_const_keyword \
+ --externs Source/WebCore/inspector/front-end/externs.js \
+ --externs Source/WebCore/inspector/front-end/protocol-externs.js \
+ --js Source/WebCore/inspector/front-end/utilities.js \
+ --js Source/WebCore/inspector/front-end/treeoutline.js
Property changes on: trunk/Source/WebCore/inspector/compile-front-end.sh
___________________________________________________________________
Added: svn:executable
Added: svn:eol-style
Modified: trunk/Source/WebCore/inspector/front-end/DOMAgent.js (93585 => 93586)
--- trunk/Source/WebCore/inspector/front-end/DOMAgent.js 2011-08-23 09:32:42 UTC (rev 93585)
+++ trunk/Source/WebCore/inspector/front-end/DOMAgent.js 2011-08-23 09:33:54 UTC (rev 93586)
@@ -129,7 +129,7 @@
setAttribute: function(name, text, callback)
{
- DOMAgent.setAttributesText(this.id, name, text, callback);
+ DOMAgent.setAttributesText(this.id, text, name, callback);
},
setAttributeValue: function(name, value, callback)
Modified: trunk/Source/WebCore/inspector/front-end/DebuggerModel.js (93585 => 93586)
--- trunk/Source/WebCore/inspector/front-end/DebuggerModel.js 2011-08-23 09:32:42 UTC (rev 93585)
+++ trunk/Source/WebCore/inspector/front-end/DebuggerModel.js 2011-08-23 09:33:54 UTC (rev 93586)
@@ -98,7 +98,7 @@
if (callback)
callback(error ? null : breakpointId, locations);
}
- DebuggerAgent.setBreakpointByUrl(url, undefined, lineNumber, columnNumber, condition, didSetBreakpoint.bind(this));
+ DebuggerAgent.setBreakpointByUrl(lineNumber, url, undefined, columnNumber, condition, didSetBreakpoint.bind(this));
WebInspector.userMetrics.ScriptsBreakpointSet.record();
},
Added: trunk/Source/WebCore/inspector/front-end/externs.js (0 => 93586)
--- trunk/Source/WebCore/inspector/front-end/externs.js (rev 0)
+++ trunk/Source/WebCore/inspector/front-end/externs.js 2011-08-23 09:33:54 UTC (rev 93586)
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2011 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+var console = {}
+console.warn = function(message) {}
+
+var WebInspector = {}
+var InspectorBackend = {}
Property changes on: trunk/Source/WebCore/inspector/front-end/externs.js
___________________________________________________________________
Added: svn:eol-style