Changeset 181186 in webkit


Ignore:
Timestamp:
Mar 6, 2015, 2:41:15 PM (10 years ago)
Author:
Joseph Pecoraro
Message:

Web Inspector: Adopt Object Literal Method Property Syntax
https://bugs.webkit.org/show_bug.cgi?id=142409

Reviewed by Timothy Hatcher.

Mechanical change touching lots of files.

Location:
trunk/Source/WebInspectorUI
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r181185 r181186  
     12015-03-06  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        Web Inspector: Adopt Object Literal Method Property Syntax
     4        https://bugs.webkit.org/show_bug.cgi?id=142409
     5
     6        Reviewed by Timothy Hatcher.
     7
     8        Mechanical change touching lots of files.
     9
    1102015-03-06  Joseph Pecoraro  <pecoraro@apple.com>
    211
  • trunk/Source/WebInspectorUI/UserInterface/Models/ObjectPreview.js

    r181061 r181186  
    111111    },
    112112
    113     hasSize: function()
     113    hasSize()
    114114    {
    115115        return this._size !== undefined && (this._subtype === "array" || this._subtype === "set" || this._subtype === "map" || this._subtype === "weakmap");
  • trunk/Source/WebInspectorUI/UserInterface/Models/PropertyDescriptor.js

    r180713 r181186  
    130130    },
    131131
    132     hasValue: function()
     132    hasValue()
    133133    {
    134134        return this._hasValue;
    135135    },
    136136
    137     hasGetter: function()
     137    hasGetter()
    138138    {
    139139        return this._get && this._get.type === "function";
    140140    },
    141141
    142     hasSetter: function()
     142    hasSetter()
    143143    {
    144144        return this._set && this._set.type === "function";
    145145    },
    146146
    147     isIndexProperty: function()
     147    isIndexProperty()
    148148    {
    149149        return !isNaN(Number(this._name));
  • trunk/Source/WebInspectorUI/UserInterface/Models/PropertyPath.js

    r180713 r181186  
    139139    },
    140140
    141     displayPath: function(type)
     141    displayPath(type)
    142142    {
    143143        return type === WebInspector.PropertyPath.Type.Value ? this.reducedPath : this.fullPath;
    144144    },
    145145
    146     isRoot: function()
     146    isRoot()
    147147    {
    148148        return !this._parent;
    149149    },
    150150
    151     isPathComponentImpossible: function()
     151    isPathComponentImpossible()
    152152    {
    153153        return this._pathComponent && this._pathComponent.startsWith("@");
    154154    },
    155155
    156     isFullPathImpossible: function()
     156    isFullPathImpossible()
    157157    {
    158158        if (this.isPathComponentImpossible())
     
    165165    },
    166166
    167     appendPropertyName: function(object, propertyName)
     167    appendPropertyName(object, propertyName)
    168168    {
    169169        var isPrototype = propertyName === "__proto__";
     
    172172    },
    173173
    174     appendPropertySymbol: function(object, symbolName)
     174    appendPropertySymbol(object, symbolName)
    175175    {
    176176        var component = WebInspector.PropertyPath.SpecialPathComponent.SymbolPropertyName + (symbolName.length ? "(" + symbolName + ")" : "");
     
    178178    },
    179179
    180     appendInternalPropertyName: function(object, propertyName)
     180    appendInternalPropertyName(object, propertyName)
    181181    {
    182182        var component = WebInspector.PropertyPath.SpecialPathComponent.InternalPropertyName + "[" + propertyName + "]";
     
    184184    },
    185185
    186     appendGetterPropertyName: function(object, propertyName)
     186    appendGetterPropertyName(object, propertyName)
    187187    {
    188188        var component = ".__lookupGetter__(" + doubleQuotedString(propertyName) + ")";
     
    190190    },
    191191
    192     appendSetterPropertyName: function(object, propertyName)
     192    appendSetterPropertyName(object, propertyName)
    193193    {
    194194        var component = ".__lookupSetter__(" + doubleQuotedString(propertyName) + ")";
     
    196196    },
    197197
    198     appendArrayIndex: function(object, indexString)
     198    appendArrayIndex(object, indexString)
    199199    {
    200200        var component = "[" + indexString + "]";
     
    202202    },
    203203
    204     appendMapKey: function(object)
     204    appendMapKey(object)
    205205    {
    206206        var component = WebInspector.PropertyPath.SpecialPathComponent.MapKey;
     
    208208    },
    209209
    210     appendMapValue: function(object, keyObject)
     210    appendMapValue(object, keyObject)
    211211    {
    212212        console.assert(!keyObject || keyObject instanceof WebInspector.RemoteObject);
     
    226226    },
    227227
    228     appendSetIndex: function(object)
     228    appendSetIndex(object)
    229229    {
    230230        var component = WebInspector.PropertyPath.SpecialPathComponent.SetIndex;
     
    232232    },
    233233   
    234     appendPropertyDescriptor: function(object, descriptor, type)
     234    appendPropertyDescriptor(object, descriptor, type)
    235235    {
    236236        if (descriptor.isInternalProperty)
     
    254254    // Private
    255255
    256     _canPropertyNameBeDotAccess: function(propertyName)
     256    _canPropertyNameBeDotAccess(propertyName)
    257257    {
    258258        return /^(?![0-9])\w+$/.test(propertyName);
  • trunk/Source/WebInspectorUI/UserInterface/Views/ObjectPreviewView.js

    r181066 r181186  
    8686    },
    8787
    88     showTitle: function()
     88    showTitle()
    8989    {
    9090        this._titleElement.hidden = false;
     
    9292    },
    9393
    94     showPreview: function()
     94    showPreview()
    9595    {
    9696        this._titleElement.hidden = true;
     
    100100    // Private
    101101
    102     _initTitleElement: function()
     102    _initTitleElement()
    103103    {
    104104        // Display null / regexps as simple formatted values even in title.
     
    109109    },
    110110
    111     _numberOfPropertiesToShowInMode: function()
     111    _numberOfPropertiesToShowInMode()
    112112    {
    113113        return this._mode === WebInspector.ObjectPreviewView.Mode.Brief ? 3 : Infinity;
    114114    },
    115115
    116     _appendPreview: function(element, preview)
     116    _appendPreview(element, preview)
    117117    {
    118118        var displayObjectAsValue = false;
     
    141141    },
    142142
    143     _appendEntryPreviews: function(element, preview)
     143    _appendEntryPreviews(element, preview)
    144144    {
    145145        var lossless = preview.lossless && !preview.propertyPreviews.length;
     
    172172    },
    173173
    174     _appendPropertyPreviews: function(element, preview)
     174    _appendPropertyPreviews(element, preview)
    175175    {
    176176        // Do not show Error properties in previews. They are more useful in full views.
     
    221221    },
    222222
    223     _appendValuePreview: function(element, preview)
     223    _appendValuePreview(element, preview)
    224224    {
    225225        element.appendChild(WebInspector.FormattedValue.createElementForObjectPreview(preview));
  • trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeArrayIndexTreeElement.js

    r181089 r181186  
    4444    // Protected
    4545
    46     invokedGetter: function()
     46    invokedGetter()
    4747    {
    4848        this.mainTitle = this._titleFragment();
     
    5353    // Private
    5454
    55     _titleFragment: function()
     55    _titleFragment()
    5656    {
    5757        var container = document.createDocumentFragment();
  • trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeBaseTreeElement.js

    r181089 r181186  
    5959    // Protected
    6060
    61     oncontextmenu: function(event)
     61    oncontextmenu(event)
    6262    {
    6363        this._contextMenuHandler(event);
    6464    },
    6565
    66     resolvedValue: function()
     66    resolvedValue()
    6767    {
    6868        console.assert(this._property);
     
    7474    },
    7575
    76     resolvedValuePropertyPath: function()
     76    resolvedValuePropertyPath()
    7777    {
    7878        console.assert(this._property);
     
    8484    },
    8585
    86     thisPropertyPath: function()
     86    thisPropertyPath()
    8787    {
    8888        console.assert(this._property);
     
    9090    },
    9191
    92     hadError: function()
     92    hadError()
    9393    {
    9494        console.assert(this._property);
     
    9696    },
    9797
    98     propertyPathType: function()
     98    propertyPathType()
    9999    {
    100100        console.assert(this._property);
     
    108108    },
    109109
    110     propertyPathString: function(propertyPath)
     110    propertyPathString(propertyPath)
    111111    {
    112112        if (propertyPath.isFullPathImpossible())
     
    116116    },
    117117
    118     createInteractiveGetterElement: function()
     118    createInteractiveGetterElement()
    119119    {
    120120        var getterElement = document.createElement("img");
     
    137137    },
    138138
    139     createReadOnlyIconElement: function()
     139    createReadOnlyIconElement()
    140140    {
    141141        var readOnlyElement = document.createElement("img");
     
    147147    // Private
    148148
    149     _logValue: function(value)
     149    _logValue(value)
    150150    {
    151151        var resolvedValue = value || this.resolvedValue();
     
    163163    },
    164164
    165     _contextMenuHandler: function(event)
     165    _contextMenuHandler(event)
    166166    {
    167167        var resolvedValue = this.resolvedValue();
     
    187187    },
    188188
    189     _appendMenusItemsForObject: function(contextMenu, resolvedValue)
     189    _appendMenusItemsForObject(contextMenu, resolvedValue)
    190190    {
    191191        if (resolvedValue.type === "function") {
  • trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeMapEntryTreeElement.js

    r181119 r181186  
    5151    // Protected
    5252
    53     resolvedValue: function()
     53    resolvedValue()
    5454    {
    5555        return this._object;
    5656    },
    5757
    58     propertyPathType: function()
     58    propertyPathType()
    5959    {
    6060        return WebInspector.PropertyPath.Type.Value;
     
    6363    // Private
    6464
    65     _titleFragment: function()
     65    _titleFragment()
    6666    {
    6767        var container = document.createDocumentFragment();
     
    9797    // Protected
    9898
    99     displayPropertyName: function()
     99    displayPropertyName()
    100100    {
    101101        return WebInspector.UIString("key");
    102102    },
    103103
    104     resolvedValuePropertyPath: function()
     104    resolvedValuePropertyPath()
    105105    {
    106106        return this._propertyPath.appendMapKey(this._object);
     
    122122    // Protected
    123123
    124     displayPropertyName: function()
     124    displayPropertyName()
    125125    {
    126126        return WebInspector.UIString("value");
    127127    },
    128128
    129     resolvedValuePropertyPath: function()
     129    resolvedValuePropertyPath()
    130130    {
    131131        return this._propertyPath.appendMapValue(this._object, this._key);
  • trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreePropertyTreeElement.js

    r181089 r181186  
    5656    // Protected
    5757
    58     onpopulate: function()
     58    onpopulate()
    5959    {
    6060        this._updateChildren();
    6161    },
    6262
    63     onexpand: function()
     63    onexpand()
    6464    {
    6565        if (this._previewView)
     
    6767    },
    6868
    69     oncollapse: function()
     69    oncollapse()
    7070    {
    7171        if (this._previewView)
     
    7373    },
    7474
    75     invokedGetter: function()
     75    invokedGetter()
    7676    {
    7777        this.mainTitle = this._titleFragment();
     
    9090    // Private
    9191
    92     _updateHasChildren: function()
     92    _updateHasChildren()
    9393    {
    9494        var resolvedValue = this.resolvedValue();
     
    102102    },
    103103
    104     _updateTooltips: function()
     104    _updateTooltips()
    105105    {
    106106        var attributes = [];
     
    116116    },
    117117
    118     _titleFragment: function()
     118    _titleFragment()
    119119    {
    120120        if (this.property.name === "__proto__")
     
    127127    },
    128128
    129     _createTitlePrototype: function()
     129    _createTitlePrototype()
    130130    {
    131131        console.assert(this.property.hasValue());
     
    139139    },
    140140
    141     _createTitlePropertyStyle: function()
     141    _createTitlePropertyStyle()
    142142    {
    143143        var container = document.createDocumentFragment();
     
    187187    },
    188188
    189     _createTitleAPIStyle: function()
     189    _createTitleAPIStyle()
    190190    {
    191191        // Fixed values and special properties display like a property.
     
    223223    },
    224224
    225     _alwaysDisplayAsProperty: function()
     225    _alwaysDisplayAsProperty()
    226226    {
    227227        // Constructor, though a function, is often better treated as an expandable object.
     
    240240    },
    241241
    242     _functionPropertyString: function()
     242    _functionPropertyString()
    243243    {
    244244        return "function" + this._functionParameterString();
    245245    },
    246246
    247     _functionParameterString: function()
     247    _functionParameterString()
    248248    {
    249249        var resolvedValue = this.resolvedValue();
     
    277277    },
    278278
    279     _sanitizedPrototypeString: function(value)
     279    _sanitizedPrototypeString(value)
    280280    {
    281281        // FIXME: <https://webkit.org/b/141610> For many X, X.prototype is an X when it must be a plain object
     
    290290    },
    291291
    292     _updateChildren: function()
     292    _updateChildren()
    293293    {
    294294        if (this.children.length && !this.shouldRefreshChildren)
     
    304304    },
    305305
    306     _updateChildrenInternal: function(handler, mode, list)
     306    _updateChildrenInternal(handler, mode, list)
    307307    {
    308308        this.removeChildren();
     
    317317    },
    318318
    319     _updateEntries: function(entries, propertyPath, mode)
     319    _updateEntries(entries, propertyPath, mode)
    320320    {
    321321        for (var entry of entries) {
     
    340340    },
    341341
    342     _updateProperties: function(properties, propertyPath, mode)
     342    _updateProperties(properties, propertyPath, mode)
    343343    {
    344344        properties.sort(WebInspector.ObjectTreeView.ComparePropertyDescriptors);
  • trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeSetIndexTreeElement.js

    r181119 r181186  
    5050    // Protected
    5151
    52     resolvedValue: function()
     52    resolvedValue()
    5353    {
    5454        return this._object;
    5555    },
    5656
    57     resolvedValuePropertyPath: function()
     57    resolvedValuePropertyPath()
    5858    {
    5959        return this.propertyPath.appendSetIndex(this._object);
     
    6262    // Private
    6363
    64     _titleFragment: function()
     64    _titleFragment()
    6565    {
    6666        var container = document.createDocumentFragment();
  • trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeView.js

    r180715 r181186  
    157157    },
    158158
    159     expand: function()
     159    expand()
    160160    {
    161161        if (this._expanded)
     
    173173    },
    174174
    175     collapse: function()
     175    collapse()
    176176    {
    177177        if (!this._expanded)
     
    187187    },
    188188
    189     appendTitleSuffix: function(suffixElement)
     189    appendTitleSuffix(suffixElement)
    190190    {
    191191        if (this._previewView)
     
    197197    // Protected
    198198
    199     update: function()
     199    update()
    200200    {
    201201        if (this._object.isCollectionType() && this._mode === WebInspector.ObjectTreeView.Mode.Properties)
     
    207207    // Private
    208208
    209     _updateChildren: function(handler, list)
     209    _updateChildren(handler, list)
    210210    {
    211211        this._outline.removeChildren();
     
    220220    },
    221221
    222     _updateEntries: function(entries, propertyPath)
     222    _updateEntries(entries, propertyPath)
    223223    {
    224224        for (var entry of entries) {
     
    242242    },
    243243
    244     _updateProperties: function(properties, propertyPath)
     244    _updateProperties(properties, propertyPath)
    245245    {
    246246        properties.sort(WebInspector.ObjectTreeView.ComparePropertyDescriptors);
     
    265265    },
    266266
    267     _handlePreviewOrTitleElementClick: function(event)
     267    _handlePreviewOrTitleElementClick(event)
    268268    {
    269269        if (this._hasLosslessPreview)
     
    278278    },
    279279
    280     _trackWeakEntries: function()
     280    _trackWeakEntries()
    281281    {
    282282        if (this._trackingEntries)
     
    295295    },
    296296
    297     _untrackWeakEntries: function()
     297    _untrackWeakEntries()
    298298    {
    299299        if (!this._trackingEntries)
Note: See TracChangeset for help on using the changeset viewer.