Changeset 82769 in webkit


Ignore:
Timestamp:
Apr 2, 2011 12:48:27 AM (13 years ago)
Author:
loislo@chromium.org
Message:

2011-04-02 Ilya Tikhonovsky <loislo@chromium.org>

Reviewed by Pavel Feldman.

Web Inspector: we should be able to have in and out arguments of a command with same name.
https://bugs.webkit.org/show_bug.cgi?id=57701

  • inspector/CodeGeneratorInspector.pm:
  • inspector/Inspector.json:
Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r82767 r82769  
     12011-04-02  Ilya Tikhonovsky  <loislo@chromium.org>
     2
     3        Reviewed by Pavel Feldman.
     4
     5        Web Inspector: we should be able to have in and out arguments of a command with same name.
     6        https://bugs.webkit.org/show_bug.cgi?id=57701
     7
     8        * inspector/CodeGeneratorInspector.pm:
     9        * inspector/Inspector.json:
     10
    1112011-04-01  Ilya Tikhonovsky  <loislo@chromium.org>
    212
  • trunk/Source/WebCore/inspector/CodeGeneratorInspector.pm

    r82680 r82769  
    482482
    483483    # declare local variables for out arguments.
    484     push(@function, map("    " . typeTraits($_->type, "variable") . " " . $_->name . " = " . typeTraits($_->type, "defaultValue") . ";", @outArgs));
     484    push(@function, map("    " . typeTraits($_->type, "variable") . " out_" . $_->name . " = " . typeTraits($_->type, "defaultValue") . ";", @outArgs));
    485485    push(@function, "");
    486486    push(@function, "    ErrorString error;");
     
    495495            my $type = $parameter->type;
    496496            my $typeString = camelCase($parameter->type);
    497             push(@function, "        " . typeTraits($type, "variable") . " $name = get$typeString(argumentsContainer.get(), \"$name\", protocolErrors.get());");
     497            push(@function, "        " . typeTraits($type, "variable") . " in_$name = get$typeString(argumentsContainer.get(), \"$name\", protocolErrors.get());");
    498498        }
    499499        push(@function, "");
     
    501501    }
    502502
    503     my $args = join(", ", ("&error", map($_->name, @inArgs), map("&" . $_->name, @outArgs)));
     503    my $args = join(", ", ("&error", map("in_" . $_->name, @inArgs), map("&out_" . $_->name, @outArgs)));
    504504    push(@function, "$indent    if (!protocolErrors->length())");
    505505    push(@function, "$indent        $domainAccessor->$functionName($args);");
     
    522522        push(@function, "                responseMessage->setString(\"error\", error);");
    523523        push(@function, "            RefPtr<InspectorObject> responseBody = InspectorObject::create();");
    524         push(@function, map("            responseBody->set" . typeTraits($_->type, "JSONType") . "(\"" . $_->name . "\", " . $_->name . ");", @outArgs));
     524        push(@function, map("            responseBody->set" . typeTraits($_->type, "JSONType") . "(\"" . $_->name . "\", out_" . $_->name . ");", @outArgs));
    525525        push(@function, "            responseMessage->setObject(\"body\", responseBody);");
    526526        push(@function, "        }");
  • trunk/Source/WebCore/inspector/Inspector.json

    r82663 r82769  
    681681                ],
    682682                "returns": [
    683                     { "name": "elementId", "type": "integer", "description": "Query selector result." }
     683                    { "name": "nodeId", "type": "integer", "description": "Query selector result." }
    684684                ],
    685685                "description": "Executes <code>querySelector</code> on a given node. Setting <code>documentWide</code> to true starts selecting from the document node."
Note: See TracChangeset for help on using the changeset viewer.