Changeset 184823 in webkit


Ignore:
Timestamp:
May 23, 2015, 8:03:43 AM (10 years ago)
Author:
commit-queue@webkit.org
Message:

Web Inspector: Improve native parameter lists a bit
https://bugs.webkit.org/show_bug.cgi?id=145338

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2015-05-23
Reviewed by Timothy Hatcher.

  • UserInterface/Models/NativeFunctionParameters.js:
  • UserInterface/Views/ObjectTreePropertyTreeElement.js:

(WebInspector.ObjectTreePropertyTreeElement.prototype._functionParameterString):

Location:
trunk/Source/WebInspectorUI
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r184822 r184823  
     12015-05-23  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        Web Inspector: Improve native parameter lists a bit
     4        https://bugs.webkit.org/show_bug.cgi?id=145338
     5
     6        Reviewed by Timothy Hatcher.
     7
     8        * UserInterface/Models/NativeFunctionParameters.js:
     9        * UserInterface/Views/ObjectTreePropertyTreeElement.js:
     10        (WebInspector.ObjectTreePropertyTreeElement.prototype._functionParameterString):
     11
    1122015-05-23  Joseph Pecoraro  <pecoraro@apple.com>
    213
  • trunk/Source/WebInspectorUI/UserInterface/Models/NativeFunctionParameters.js

    r183233 r184823  
    3131        assign: "target, ...sources",
    3232        create: "prototype, [propertiesObject]",
     33        defineProperties: "object, properties",
    3334        defineProperty: "object, propertyName, descriptor",
    34         defineProperties: "object, properties",
    3535        freeze: "object",
    3636        getOwnPropertyDescriptor: "object, propertyName",
     
    3838        getOwnPropertySymbols: "object",
    3939        getPrototypeOf: "object",
     40        is: "value1, value2",
    4041        isExtensible: "object",
    4142        isFrozen: "object",
     
    4445        preventExtensions: "object",
    4546        seal: "object",
     47        setPrototypeOf: "object, prototype",
    4648        __proto__: null,
    4749    },
     
    7678        asin: "x",
    7779        asinh: "x",
     80        atan2: "y, x",
    7881        atan: "x",
    79         atan2: "y, x",
    8082        atanh: "x",
    8183        cbrt: "x",
    8284        ceil: "x",
     85        clz32: "x",
    8386        cos: "x",
    8487        cosh: "x",
     
    97100        pow: "x, y",
    98101        round: "x",
     102        sign: "x",
    99103        sin: "x",
    100104        sinh: "x",
     
    127131
    128132    String: {
    129         fromCharCode: "code, [...codes]",
     133        fromCharCode: "...codeUnits",
     134        fromCodePoint: "...codePoints",
     135        raw: "template, ...substitutions",
    130136        __proto__: null,
    131137    },
     
    301307        charAt: "index",
    302308        charCodeAt: "index",
     309        codePoints: "index",
    303310        concat: "string, ...",
    304311        includes: "searchValue, [startIndex=0]",
     
    307314        localeCompare: "string",
    308315        match: "regex",
     316        repeat: "count",
    309317        replace: "regex|string, replaceString|replaceHandler, [flags]",
    310318        search: "regex",
     
    734742
    735743    DocumentFragment: {
     744        getElementById: "id",
    736745        querySelector: "selectors",
    737746        querySelectorAll: "selectors",
  • trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreePropertyTreeElement.js

    r183947 r184823  
    258258            }
    259259
     260            var parentDescription = this._propertyPath.object.description;
     261
    260262            // Native function property on a native function is likely a "Foo.method".
    261             if (isFunctionStringNativeCode(this._propertyPath.object.description)) {
    262                 var match = this._propertyPath.object.description.match(/^function\s+([^)]+?)\(/);
     263            if (isFunctionStringNativeCode(parentDescription)) {
     264                var match = parentDescription.match(/^function\s+([^)]+?)\(/);
    263265                if (match) {
    264266                    var name = match[1];
     
    270272            }
    271273
    272             // Native DOM constructor.
    273             if (this._propertyPath.object.description.endsWith("Constructor")) {
    274                 var name = this._propertyPath.object.description;
     274            // Native DOM constructor or on native objects that are not functions.
     275            if (parentDescription.endsWith("Constructor") || parentDescription === "Math" || parentDescription === "JSON") {
     276                var name = parentDescription;
    275277                if (WebInspector.NativeConstructorFunctionParameters[name]) {
    276278                    var params = WebInspector.NativeConstructorFunctionParameters[name][this._property.name];
Note: See TracChangeset for help on using the changeset viewer.