Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (181185 => 181186)
--- trunk/Source/WebInspectorUI/ChangeLog 2015-03-06 22:41:11 UTC (rev 181185)
+++ trunk/Source/WebInspectorUI/ChangeLog 2015-03-06 22:41:15 UTC (rev 181186)
@@ -1,5 +1,14 @@
2015-03-06 Joseph Pecoraro <pecor...@apple.com>
+ 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.
+
+2015-03-06 Joseph Pecoraro <pecor...@apple.com>
+
Web Inspector: Adopt Object Literal Shorthand Property Construction Syntax
https://bugs.webkit.org/show_bug.cgi?id=142374
Modified: trunk/Source/WebInspectorUI/UserInterface/Models/ObjectPreview.js (181185 => 181186)
--- trunk/Source/WebInspectorUI/UserInterface/Models/ObjectPreview.js 2015-03-06 22:41:11 UTC (rev 181185)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/ObjectPreview.js 2015-03-06 22:41:15 UTC (rev 181186)
@@ -110,7 +110,7 @@
return this._size;
},
- hasSize: function()
+ hasSize()
{
return this._size !== undefined && (this._subtype === "array" || this._subtype === "set" || this._subtype === "map" || this._subtype === "weakmap");
}
Modified: trunk/Source/WebInspectorUI/UserInterface/Models/PropertyDescriptor.js (181185 => 181186)
--- trunk/Source/WebInspectorUI/UserInterface/Models/PropertyDescriptor.js 2015-03-06 22:41:11 UTC (rev 181185)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/PropertyDescriptor.js 2015-03-06 22:41:15 UTC (rev 181186)
@@ -129,22 +129,22 @@
return this._internal;
},
- hasValue: function()
+ hasValue()
{
return this._hasValue;
},
- hasGetter: function()
+ hasGetter()
{
return this._get && this._get.type === "function";
},
- hasSetter: function()
+ hasSetter()
{
return this._set && this._set.type === "function";
},
- isIndexProperty: function()
+ isIndexProperty()
{
return !isNaN(Number(this._name));
},
Modified: trunk/Source/WebInspectorUI/UserInterface/Models/PropertyPath.js (181185 => 181186)
--- trunk/Source/WebInspectorUI/UserInterface/Models/PropertyPath.js 2015-03-06 22:41:11 UTC (rev 181185)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/PropertyPath.js 2015-03-06 22:41:15 UTC (rev 181186)
@@ -138,22 +138,22 @@
return components.join("");
},
- displayPath: function(type)
+ displayPath(type)
{
return type === WebInspector.PropertyPath.Type.Value ? this.reducedPath : this.fullPath;
},
- isRoot: function()
+ isRoot()
{
return !this._parent;
},
- isPathComponentImpossible: function()
+ isPathComponentImpossible()
{
return this._pathComponent && this._pathComponent.startsWith("@");
},
- isFullPathImpossible: function()
+ isFullPathImpossible()
{
if (this.isPathComponentImpossible())
return true;
@@ -164,50 +164,50 @@
return false;
},
- appendPropertyName: function(object, propertyName)
+ appendPropertyName(object, propertyName)
{
var isPrototype = propertyName === "__proto__";
var component = this._canPropertyNameBeDotAccess(propertyName) ? "." + propertyName : "[" + doubleQuotedString(propertyName) + "]";
return new WebInspector.PropertyPath(object, component, this, isPrototype);
},
- appendPropertySymbol: function(object, symbolName)
+ appendPropertySymbol(object, symbolName)
{
var component = WebInspector.PropertyPath.SpecialPathComponent.SymbolPropertyName + (symbolName.length ? "(" + symbolName + ")" : "");
return new WebInspector.PropertyPath(object, component, this);
},
- appendInternalPropertyName: function(object, propertyName)
+ appendInternalPropertyName(object, propertyName)
{
var component = WebInspector.PropertyPath.SpecialPathComponent.InternalPropertyName + "[" + propertyName + "]";
return new WebInspector.PropertyPath(object, component, this);
},
- appendGetterPropertyName: function(object, propertyName)
+ appendGetterPropertyName(object, propertyName)
{
var component = ".__lookupGetter__(" + doubleQuotedString(propertyName) + ")";
return new WebInspector.PropertyPath(object, component, this);
},
- appendSetterPropertyName: function(object, propertyName)
+ appendSetterPropertyName(object, propertyName)
{
var component = ".__lookupSetter__(" + doubleQuotedString(propertyName) + ")";
return new WebInspector.PropertyPath(object, component, this);
},
- appendArrayIndex: function(object, indexString)
+ appendArrayIndex(object, indexString)
{
var component = "[" + indexString + "]";
return new WebInspector.PropertyPath(object, component, this);
},
- appendMapKey: function(object)
+ appendMapKey(object)
{
var component = WebInspector.PropertyPath.SpecialPathComponent.MapKey;
return new WebInspector.PropertyPath(object, component, this);
},
- appendMapValue: function(object, keyObject)
+ appendMapValue(object, keyObject)
{
console.assert(!keyObject || keyObject instanceof WebInspector.RemoteObject);
@@ -225,13 +225,13 @@
return new WebInspector.PropertyPath(object, component, this);
},
- appendSetIndex: function(object)
+ appendSetIndex(object)
{
var component = WebInspector.PropertyPath.SpecialPathComponent.SetIndex;
return new WebInspector.PropertyPath(object, component, this);
},
- appendPropertyDescriptor: function(object, descriptor, type)
+ appendPropertyDescriptor(object, descriptor, type)
{
if (descriptor.isInternalProperty)
return this.appendInternalPropertyName(object, descriptor.name);
@@ -253,7 +253,7 @@
// Private
- _canPropertyNameBeDotAccess: function(propertyName)
+ _canPropertyNameBeDotAccess(propertyName)
{
return /^(?![0-9])\w+$/.test(propertyName);
}
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ObjectPreviewView.js (181185 => 181186)
--- trunk/Source/WebInspectorUI/UserInterface/Views/ObjectPreviewView.js 2015-03-06 22:41:11 UTC (rev 181185)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ObjectPreviewView.js 2015-03-06 22:41:15 UTC (rev 181186)
@@ -85,13 +85,13 @@
return this._lossless;
},
- showTitle: function()
+ showTitle()
{
this._titleElement.hidden = false;
this._previewElement.hidden = true;
},
- showPreview: function()
+ showPreview()
{
this._titleElement.hidden = true;
this._previewElement.hidden = false;
@@ -99,7 +99,7 @@
// Private
- _initTitleElement: function()
+ _initTitleElement()
{
// Display null / regexps as simple formatted values even in title.
if (this._preview.subtype === "regexp" || this._preview.subtype === "null")
@@ -108,12 +108,12 @@
this._titleElement.textContent = this._preview.description || "";
},
- _numberOfPropertiesToShowInMode: function()
+ _numberOfPropertiesToShowInMode()
{
return this._mode === WebInspector.ObjectPreviewView.Mode.Brief ? 3 : Infinity;
},
- _appendPreview: function(element, preview)
+ _appendPreview(element, preview)
{
var displayObjectAsValue = false;
if (preview.type === "object") {
@@ -140,7 +140,7 @@
return this._appendValuePreview(bodyElement, preview);
},
- _appendEntryPreviews: function(element, preview)
+ _appendEntryPreviews(element, preview)
{
var lossless = preview.lossless && !preview.propertyPreviews.length;
@@ -171,7 +171,7 @@
return lossless;
},
- _appendPropertyPreviews: function(element, preview)
+ _appendPropertyPreviews(element, preview)
{
// Do not show Error properties in previews. They are more useful in full views.
if (preview.subtype === "error")
@@ -220,7 +220,7 @@
return preview.lossless;
},
- _appendValuePreview: function(element, preview)
+ _appendValuePreview(element, preview)
{
element.appendChild(WebInspector.FormattedValue.createElementForObjectPreview(preview));
return true;
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeArrayIndexTreeElement.js (181185 => 181186)
--- trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeArrayIndexTreeElement.js 2015-03-06 22:41:11 UTC (rev 181185)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeArrayIndexTreeElement.js 2015-03-06 22:41:15 UTC (rev 181186)
@@ -43,7 +43,7 @@
// Protected
- invokedGetter: function()
+ invokedGetter()
{
this.mainTitle = this._titleFragment();
@@ -52,7 +52,7 @@
// Private
- _titleFragment: function()
+ _titleFragment()
{
var container = document.createDocumentFragment();
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeBaseTreeElement.js (181185 => 181186)
--- trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeBaseTreeElement.js 2015-03-06 22:41:11 UTC (rev 181185)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeBaseTreeElement.js 2015-03-06 22:41:15 UTC (rev 181186)
@@ -58,12 +58,12 @@
// Protected
- oncontextmenu: function(event)
+ oncontextmenu(event)
{
this._contextMenuHandler(event);
},
- resolvedValue: function()
+ resolvedValue()
{
console.assert(this._property);
if (this._getterValue)
@@ -73,7 +73,7 @@
return null;
},
- resolvedValuePropertyPath: function()
+ resolvedValuePropertyPath()
{
console.assert(this._property);
if (this._getterValue)
@@ -83,19 +83,19 @@
return null;
},
- thisPropertyPath: function()
+ thisPropertyPath()
{
console.assert(this._property);
return this._propertyPath.appendPropertyDescriptor(null, this._property, this.propertyPathType());
},
- hadError: function()
+ hadError()
{
console.assert(this._property);
return this._property.wasThrown || this._getterHadError;
},
- propertyPathType: function()
+ propertyPathType()
{
console.assert(this._property);
if (this._getterValue || this._property.hasValue())
@@ -107,7 +107,7 @@
return WebInspector.PropertyPath.Type.Value;
},
- propertyPathString: function(propertyPath)
+ propertyPathString(propertyPath)
{
if (propertyPath.isFullPathImpossible())
return WebInspector.UIString("Unable to determine path to property from root");
@@ -115,7 +115,7 @@
return propertyPath.displayPath(this.propertyPathType());
},
- createInteractiveGetterElement: function()
+ createInteractiveGetterElement()
{
var getterElement = document.createElement("img");
getterElement.className = "getter";
@@ -136,7 +136,7 @@
return getterElement;
},
- createReadOnlyIconElement: function()
+ createReadOnlyIconElement()
{
var readOnlyElement = document.createElement("img");
readOnlyElement.className = "read-only";
@@ -146,7 +146,7 @@
// Private
- _logValue: function(value)
+ _logValue(value)
{
var resolvedValue = value || this.resolvedValue();
if (!resolvedValue)
@@ -162,7 +162,7 @@
WebInspector.consoleLogViewController.appendImmediateExecutionWithResult(text, resolvedValue);
},
- _contextMenuHandler: function(event)
+ _contextMenuHandler(event)
{
var resolvedValue = this.resolvedValue();
if (!resolvedValue)
@@ -186,7 +186,7 @@
contextMenu.show();
},
- _appendMenusItemsForObject: function(contextMenu, resolvedValue)
+ _appendMenusItemsForObject(contextMenu, resolvedValue)
{
if (resolvedValue.type === "function") {
// FIXME: We should better handle bound functions.
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeMapEntryTreeElement.js (181185 => 181186)
--- trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeMapEntryTreeElement.js 2015-03-06 22:41:11 UTC (rev 181185)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeMapEntryTreeElement.js 2015-03-06 22:41:15 UTC (rev 181186)
@@ -50,19 +50,19 @@
// Protected
- resolvedValue: function()
+ resolvedValue()
{
return this._object;
},
- propertyPathType: function()
+ propertyPathType()
{
return WebInspector.PropertyPath.Type.Value;
},
// Private
- _titleFragment: function()
+ _titleFragment()
{
var container = document.createDocumentFragment();
@@ -96,12 +96,12 @@
// Protected
- displayPropertyName: function()
+ displayPropertyName()
{
return WebInspector.UIString("key");
},
- resolvedValuePropertyPath: function()
+ resolvedValuePropertyPath()
{
return this._propertyPath.appendMapKey(this._object);
}
@@ -121,12 +121,12 @@
// Protected
- displayPropertyName: function()
+ displayPropertyName()
{
return WebInspector.UIString("value");
},
- resolvedValuePropertyPath: function()
+ resolvedValuePropertyPath()
{
return this._propertyPath.appendMapValue(this._object, this._key);
}
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreePropertyTreeElement.js (181185 => 181186)
--- trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreePropertyTreeElement.js 2015-03-06 22:41:11 UTC (rev 181185)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreePropertyTreeElement.js 2015-03-06 22:41:15 UTC (rev 181186)
@@ -55,24 +55,24 @@
// Protected
- onpopulate: function()
+ onpopulate()
{
this._updateChildren();
},
- onexpand: function()
+ onexpand()
{
if (this._previewView)
this._previewView.showTitle();
},
- oncollapse: function()
+ oncollapse()
{
if (this._previewView)
this._previewView.showPreview();
},
- invokedGetter: function()
+ invokedGetter()
{
this.mainTitle = this._titleFragment();
@@ -89,7 +89,7 @@
// Private
- _updateHasChildren: function()
+ _updateHasChildren()
{
var resolvedValue = this.resolvedValue();
var valueHasChildren = (resolvedValue && resolvedValue.hasChildren);
@@ -101,7 +101,7 @@
this.hasChildren = !wasThrown && valueHasChildren && (this.property.name === "__proto__" || this._alwaysDisplayAsProperty());
},
- _updateTooltips: function()
+ _updateTooltips()
{
var attributes = [];
@@ -115,7 +115,7 @@
this.iconElement.title = attributes.join(" ");
},
- _titleFragment: function()
+ _titleFragment()
{
if (this.property.name === "__proto__")
return this._createTitlePrototype();
@@ -126,7 +126,7 @@
return this._createTitleAPIStyle();
},
- _createTitlePrototype: function()
+ _createTitlePrototype()
{
console.assert(this.property.hasValue());
console.assert(this.property.name === "__proto__");
@@ -138,7 +138,7 @@
return nameElement;
},
- _createTitlePropertyStyle: function()
+ _createTitlePropertyStyle()
{
var container = document.createDocumentFragment();
@@ -186,7 +186,7 @@
return container;
},
- _createTitleAPIStyle: function()
+ _createTitleAPIStyle()
{
// Fixed values and special properties display like a property.
if (this._alwaysDisplayAsProperty())
@@ -222,7 +222,7 @@
return container;
},
- _alwaysDisplayAsProperty: function()
+ _alwaysDisplayAsProperty()
{
// Constructor, though a function, is often better treated as an expandable object.
if (this.property.name === "constructor")
@@ -239,12 +239,12 @@
return false;
},
- _functionPropertyString: function()
+ _functionPropertyString()
{
return "function" + this._functionParameterString();
},
- _functionParameterString: function()
+ _functionParameterString()
{
var resolvedValue = this.resolvedValue();
console.assert(resolvedValue.type === "function");
@@ -276,7 +276,7 @@
return match ? match[1] : "()";
},
- _sanitizedPrototypeString: function(value)
+ _sanitizedPrototypeString(value)
{
// FIXME: <https://webkit.org/b/141610> For many X, X.prototype is an X when it must be a plain object
if (value.type === "function")
@@ -289,7 +289,7 @@
return value.description.replace(/Prototype$/, "");
},
- _updateChildren: function()
+ _updateChildren()
{
if (this.children.length && !this.shouldRefreshChildren)
return;
@@ -303,7 +303,7 @@
resolvedValue.getDisplayablePropertyDescriptors(this._updateChildrenInternal.bind(this, this._updateProperties, this._mode));
},
- _updateChildrenInternal: function(handler, mode, list)
+ _updateChildrenInternal(handler, mode, list)
{
this.removeChildren();
@@ -316,7 +316,7 @@
handler.call(this, list, this.resolvedValuePropertyPath(), mode);
},
- _updateEntries: function(entries, propertyPath, mode)
+ _updateEntries(entries, propertyPath, mode)
{
for (var entry of entries) {
if (entry.key) {
@@ -339,7 +339,7 @@
}.bind(this));
},
- _updateProperties: function(properties, propertyPath, mode)
+ _updateProperties(properties, propertyPath, mode)
{
properties.sort(WebInspector.ObjectTreeView.ComparePropertyDescriptors);
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeSetIndexTreeElement.js (181185 => 181186)
--- trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeSetIndexTreeElement.js 2015-03-06 22:41:11 UTC (rev 181185)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeSetIndexTreeElement.js 2015-03-06 22:41:15 UTC (rev 181186)
@@ -49,19 +49,19 @@
// Protected
- resolvedValue: function()
+ resolvedValue()
{
return this._object;
},
- resolvedValuePropertyPath: function()
+ resolvedValuePropertyPath()
{
return this.propertyPath.appendSetIndex(this._object);
},
// Private
- _titleFragment: function()
+ _titleFragment()
{
var container = document.createDocumentFragment();
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeView.js (181185 => 181186)
--- trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeView.js 2015-03-06 22:41:11 UTC (rev 181185)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeView.js 2015-03-06 22:41:15 UTC (rev 181186)
@@ -156,7 +156,7 @@
return this._expanded;
},
- expand: function()
+ expand()
{
if (this._expanded)
return;
@@ -172,7 +172,7 @@
this.update();
},
- collapse: function()
+ collapse()
{
if (!this._expanded)
return;
@@ -186,7 +186,7 @@
this._untrackWeakEntries();
},
- appendTitleSuffix: function(suffixElement)
+ appendTitleSuffix(suffixElement)
{
if (this._previewView)
this._previewView.element.appendChild(suffixElement);
@@ -196,7 +196,7 @@
// Protected
- update: function()
+ update()
{
if (this._object.isCollectionType() && this._mode === WebInspector.ObjectTreeView.Mode.Properties)
this._object.getCollectionEntries(0, 100, this._updateChildren.bind(this, this._updateEntries));
@@ -206,7 +206,7 @@
// Private
- _updateChildren: function(handler, list)
+ _updateChildren(handler, list)
{
this._outline.removeChildren();
@@ -219,7 +219,7 @@
handler.call(this, list, this._propertyPath);
},
- _updateEntries: function(entries, propertyPath)
+ _updateEntries(entries, propertyPath)
{
for (var entry of entries) {
if (entry.key) {
@@ -241,7 +241,7 @@
}.bind(this));
},
- _updateProperties: function(properties, propertyPath)
+ _updateProperties(properties, propertyPath)
{
properties.sort(WebInspector.ObjectTreeView.ComparePropertyDescriptors);
@@ -264,7 +264,7 @@
}
},
- _handlePreviewOrTitleElementClick: function(event)
+ _handlePreviewOrTitleElementClick(event)
{
if (this._hasLosslessPreview)
return;
@@ -277,7 +277,7 @@
event.stopPropagation();
},
- _trackWeakEntries: function()
+ _trackWeakEntries()
{
if (this._trackingEntries)
return;
@@ -294,7 +294,7 @@
}
},
- _untrackWeakEntries: function()
+ _untrackWeakEntries()
{
if (!this._trackingEntries)
return;