Changeset 93586 in webkit


Ignore:
Timestamp:
Aug 23, 2011 2:33:54 AM (13 years ago)
Author:
pfeldman@chromium.org
Message:

Web Inspector: generate protocol externs API for the front-end compilation.
https://bugs.webkit.org/show_bug.cgi?id=66677

Reviewed by Tony Gentilcore.

Source/WebCore:

  • 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):

LayoutTests:

  • inspector/debugger/debugger-set-breakpoint-regex.html:
Location:
trunk
Files:
2 added
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r93583 r93586  
     12011-08-22  Pavel Feldman  <pfeldman@google.com>
     2
     3        Web Inspector: generate protocol externs API for the front-end compilation.
     4        https://bugs.webkit.org/show_bug.cgi?id=66677
     5
     6        Reviewed by Tony Gentilcore.
     7
     8        * inspector/debugger/debugger-set-breakpoint-regex.html:
     9
    1102011-08-23  Csaba Osztrogonác  <ossy@webkit.org>
    211
  • trunk/LayoutTests/inspector/debugger/debugger-set-breakpoint-regex.html

    r93389 r93586  
    3232            var url = "debugger-set-breakpoint.js";
    3333            var urlRegex = "debugger-set-breakpoint.*";
    34             DebuggerAgent.setBreakpointByUrl(url, urlRegex, 1, step2);
     34            DebuggerAgent.setBreakpointByUrl(1, url, urlRegex, step2);
    3535
    3636            function step2(result)
  • trunk/Source/WebCore/ChangeLog

    r93584 r93586  
     12011-08-22  Pavel Feldman  <pfeldman@google.com>
     2
     3        Web Inspector: generate protocol externs API for the front-end compilation.
     4        https://bugs.webkit.org/show_bug.cgi?id=66677
     5
     6        Reviewed by Tony Gentilcore.
     7
     8        * inspector/Inspector.json:
     9        * inspector/InspectorDOMAgent.cpp:
     10        (WebCore::InspectorDOMAgent::setAttributesText):
     11        * inspector/InspectorDOMAgent.h:
     12        * inspector/InspectorDebuggerAgent.cpp:
     13        (WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
     14        * inspector/InspectorDebuggerAgent.h:
     15        * inspector/compile-front-end.sh: Added.
     16        * inspector/front-end/DOMAgent.js:
     17        (WebInspector.DOMNode.prototype.setAttribute):
     18        * inspector/front-end/DebuggerModel.js:
     19        (WebInspector.DebuggerModel.prototype.setBreakpoint):
     20        * inspector/front-end/externs.js: Added.
     21        (console.warn):
     22
    1232011-08-22  Pavel Feldman  <pfeldman@google.com>
    224
  • trunk/Source/WebCore/inspector/Inspector.json

    r93398 r93586  
    950950                "parameters": [
    951951                    { "name": "nodeId", "$ref": "NodeId", "description": "Id of the element to set attributes for." },
    952                     { "name": "name", "type": "string", "optional": true, "description": "Attribute name to replace with new attributes derived from text in case text parsed successfully." },
    953                     { "name": "text", "type": "string", "description": "Text with a number of attributes. Will parse this text using HTML parser." }
     952                    { "name": "text", "type": "string", "description": "Text with a number of attributes. Will parse this text using HTML parser." },
     953                    { "name": "name", "type": "string", "optional": true, "description": "Attribute name to replace with new attributes derived from text in case text parsed successfully." }
    954954                ],
    955955                "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."
     
    15451545                "name": "setBreakpointByUrl",
    15461546                "parameters": [
     1547                    { "name": "lineNumber", "type": "integer", "description": "Line number to set breakpoint at." },
    15471548                    { "name": "url", "type": "string", "optional": true, "description": "URL of the resources to set breakpoint on." },
    15481549                    { "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." },
    1549                     { "name": "lineNumber", "type": "integer", "description": "Line number to set breakpoint at." },
    15501550                    { "name": "columnNumber", "type": "integer", "optional": true, "description": "Offset in the line to set breakpoint at." },
    15511551                    { "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." }
  • trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp

    r93398 r93586  
    586586}
    587587
    588 void InspectorDOMAgent::setAttributesText(ErrorString* errorString, int elementId, const String* const name, const String& text)
     588void InspectorDOMAgent::setAttributesText(ErrorString* errorString, int elementId, const String& text, const String* const name)
    589589{
    590590    Element* element = assertElement(errorString, elementId);
  • trunk/Source/WebCore/inspector/InspectorDOMAgent.h

    r93398 r93586  
    118118    void requestChildNodes(ErrorString*, int nodeId);
    119119    void setAttributeValue(ErrorString*, int elementId, const String& name, const String& value);
    120     void setAttributesText(ErrorString*, int elementId, const String* const name, const String& text);
     120    void setAttributesText(ErrorString*, int elementId, const String& text, const String* const name);
    121121    void removeAttribute(ErrorString*, int elementId, const String& name);
    122122    void removeNode(ErrorString*, int nodeId);
  • trunk/Source/WebCore/inspector/InspectorDebuggerAgent.cpp

    r93042 r93586  
    182182}
    183183
    184 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)
     184void 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)
    185185{
    186186    if (!optionalURL == !optionalURLRegex) {
  • trunk/Source/WebCore/inspector/InspectorDebuggerAgent.h

    r93042 r93586  
    8383    void setBreakpointsActive(ErrorString*, bool active);
    8484
    85     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);
     85    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);
    8686    void setBreakpoint(ErrorString*, PassRefPtr<InspectorObject> location, const String* const optionalCondition, String* breakpointId, RefPtr<InspectorObject>* actualLocation);
    8787    void removeBreakpoint(ErrorString*, const String& breakpointId);
  • trunk/Source/WebCore/inspector/front-end/DOMAgent.js

    r93584 r93586  
    130130    setAttribute: function(name, text, callback)
    131131    {
    132         DOMAgent.setAttributesText(this.id, name, text, callback);
     132        DOMAgent.setAttributesText(this.id, text, name, callback);
    133133    },
    134134
  • trunk/Source/WebCore/inspector/front-end/DebuggerModel.js

    r93510 r93586  
    9999                callback(error ? null : breakpointId, locations);
    100100        }
    101         DebuggerAgent.setBreakpointByUrl(url, undefined, lineNumber, columnNumber, condition, didSetBreakpoint.bind(this));
     101        DebuggerAgent.setBreakpointByUrl(lineNumber, url, undefined, columnNumber, condition, didSetBreakpoint.bind(this));
    102102        WebInspector.userMetrics.ScriptsBreakpointSet.record();
    103103    },
Note: See TracChangeset for help on using the changeset viewer.