Web Inspector: Adopt Object Literal Shorthand Property Construction Syntax
authorjoepeck@webkit.org <joepeck@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 Mar 2015 22:41:11 +0000 (22:41 +0000)
committerjoepeck@webkit.org <joepeck@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 Mar 2015 22:41:11 +0000 (22:41 +0000)
https://bugs.webkit.org/show_bug.cgi?id=142374

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

* inspector/InjectedScriptSource.js:

Source/WebInspectorUI:

Mechanical change touching lots of files.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@181185 268f45cc-cd09-0410-ab3c-d52691b4dbfc

55 files changed:
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/inspector/InjectedScriptSource.js
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Base/EventListenerSet.js
Source/WebInspectorUI/UserInterface/Base/Object.js
Source/WebInspectorUI/UserInterface/Base/URLUtilities.js
Source/WebInspectorUI/UserInterface/Base/Utilities.js
Source/WebInspectorUI/UserInterface/Controllers/ApplicationCacheManager.js
Source/WebInspectorUI/UserInterface/Controllers/CodeMirrorCompletionController.js
Source/WebInspectorUI/UserInterface/Controllers/CodeMirrorDragToAdjustNumberController.js
Source/WebInspectorUI/UserInterface/Controllers/CodeMirrorTokenTrackingController.js
Source/WebInspectorUI/UserInterface/Controllers/DOMTreeManager.js
Source/WebInspectorUI/UserInterface/Controllers/DebuggerManager.js
Source/WebInspectorUI/UserInterface/Controllers/FormatterSourceMap.js
Source/WebInspectorUI/UserInterface/Controllers/FrameResourceManager.js
Source/WebInspectorUI/UserInterface/Controllers/IssueManager.js
Source/WebInspectorUI/UserInterface/Controllers/LayerTreeManager.js
Source/WebInspectorUI/UserInterface/Controllers/LogManager.js
Source/WebInspectorUI/UserInterface/Controllers/ProbeManager.js
Source/WebInspectorUI/UserInterface/Controllers/ReplayManager.js
Source/WebInspectorUI/UserInterface/Controllers/RuntimeManager.js
Source/WebInspectorUI/UserInterface/Controllers/StorageManager.js
Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js
Source/WebInspectorUI/UserInterface/Models/CSSStyleDeclaration.js
Source/WebInspectorUI/UserInterface/Models/DOMNode.js
Source/WebInspectorUI/UserInterface/Models/DOMNodeStyles.js
Source/WebInspectorUI/UserInterface/Models/DOMStorageObject.js
Source/WebInspectorUI/UserInterface/Models/DOMTree.js
Source/WebInspectorUI/UserInterface/Models/Frame.js
Source/WebInspectorUI/UserInterface/Models/Gradient.js
Source/WebInspectorUI/UserInterface/Models/ProbeSet.js
Source/WebInspectorUI/UserInterface/Models/ProfileNode.js
Source/WebInspectorUI/UserInterface/Models/ReplaySession.js
Source/WebInspectorUI/UserInterface/Models/Resource.js
Source/WebInspectorUI/UserInterface/Models/ScriptSyntaxTree.js
Source/WebInspectorUI/UserInterface/Models/SourceCode.js
Source/WebInspectorUI/UserInterface/Models/SourceCodeLocation.js
Source/WebInspectorUI/UserInterface/Models/SourceMapResource.js
Source/WebInspectorUI/UserInterface/Models/Timeline.js
Source/WebInspectorUI/UserInterface/Models/TimelineRecording.js
Source/WebInspectorUI/UserInterface/Views/BoxModelDetailsSectionRow.js
Source/WebInspectorUI/UserInterface/Views/CodeMirrorAdditions.js
Source/WebInspectorUI/UserInterface/Views/ConsolePrompt.js
Source/WebInspectorUI/UserInterface/Views/DOMStorageContentView.js
Source/WebInspectorUI/UserInterface/Views/FolderizedTreeElement.js
Source/WebInspectorUI/UserInterface/Views/LogContentView.js
Source/WebInspectorUI/UserInterface/Views/Popover.js
Source/WebInspectorUI/UserInterface/Views/ResourceDetailsSidebarPanel.js
Source/WebInspectorUI/UserInterface/Views/ScopeBarItem.js
Source/WebInspectorUI/UserInterface/Views/ScriptContentView.js
Source/WebInspectorUI/UserInterface/Views/ScriptTimelineDataGridNode.js
Source/WebInspectorUI/UserInterface/Views/SourceCodeTextEditor.js
Source/WebInspectorUI/UserInterface/Views/TextContentView.js
Source/WebInspectorUI/UserInterface/Views/TextEditor.js
Source/WebInspectorUI/UserInterface/Views/TimelineDataGrid.js

index 47a7e69..49e83f7 100644 (file)
@@ -1,5 +1,14 @@
 2015-03-06  Joseph Pecoraro  <pecoraro@apple.com>
 
+        Web Inspector: Adopt Object Literal Shorthand Property Construction Syntax
+        https://bugs.webkit.org/show_bug.cgi?id=142374
+
+        Reviewed by Timothy Hatcher.
+
+        * inspector/InjectedScriptSource.js:
+
+2015-03-06  Joseph Pecoraro  <pecoraro@apple.com>
+
         ES6: Object Literal Extensions - Methods
         https://bugs.webkit.org/show_bug.cgi?id=142390
 
index 8b362fe..b4b7ae3 100644 (file)
@@ -605,12 +605,12 @@ InjectedScript.prototype = {
         function createFakeValueDescriptor(name, descriptor, isOwnProperty, possibleNativeBindingGetter)
         {
             try {
-                var descriptor = {name: name, value: object[name], writable: descriptor.writable || false, configurable: descriptor.configurable || false, enumerable: descriptor.enumerable || false};
+                var descriptor = {name, value: object[name], writable: descriptor.writable || false, configurable: descriptor.configurable || false, enumerable: descriptor.enumerable || false};
                 if (possibleNativeBindingGetter)
                     descriptor.nativeGetter = true;
                 return descriptor;
             } catch (e) {
-                var errorDescriptor = {name: name, value: e, wasThrown: true};
+                var errorDescriptor = {name, value: e, wasThrown: true};
                 if (isOwnProperty)
                     errorDescriptor.isOwn = true;
                 return errorDescriptor;
@@ -795,7 +795,7 @@ InjectedScript.prototype = {
                 continue;
             }
 
-            entries.push({value: value});
+            entries.push({value});
 
             if (numberToFetch && entries.length === numberToFetch)
                 break;
@@ -814,7 +814,7 @@ InjectedScript.prototype = {
                 continue;
             }
 
-            entries.push({key: key, value: value});
+            entries.push({key, value});
 
             if (numberToFetch && entries.length === numberToFetch)
                 break;
@@ -1022,14 +1022,14 @@ InjectedScript.RemoteObject.prototype = {
             // Getter/setter.
             if (!("value" in descriptor)) {
                 preview.lossless = false;
-                this._appendPropertyPreview(preview, internal, {name: name, type: "accessor"}, propertiesThreshold);
+                this._appendPropertyPreview(preview, internal, {name, type: "accessor"}, propertiesThreshold);
                 continue;
             }
 
             // Null value.
             var value = descriptor.value;
             if (value === null) {
-                this._appendPropertyPreview(preview, internal, {name: name, type: "object", subtype: "null", value: "null"}, propertiesThreshold);
+                this._appendPropertyPreview(preview, internal, {name, type: "object", subtype: "null", value: "null"}, propertiesThreshold);
                 continue;
             }
 
@@ -1049,7 +1049,7 @@ InjectedScript.RemoteObject.prototype = {
                     value = this._abbreviateString(value, maxLength, true);
                     preview.lossless = false;
                 }
-                this._appendPropertyPreview(preview, internal, {name: name, type: type, value: toString(value)}, propertiesThreshold);
+                this._appendPropertyPreview(preview, internal, {name, type, value: toString(value)}, propertiesThreshold);
                 continue;
             }
 
@@ -1060,12 +1060,12 @@ InjectedScript.RemoteObject.prototype = {
                     symbolString = this._abbreviateString(symbolString, maxLength, true);
                     preview.lossless = false;
                 }
-                this._appendPropertyPreview(preview, internal, {name: name, type: type, value: symbolString}, propertiesThreshold);
+                this._appendPropertyPreview(preview, internal, {name, type, value: symbolString}, propertiesThreshold);
                 return;
             }
 
             // Object.
-            var property = {name: name, type: type};
+            var property = {name, type};
             var subtype = injectedScript._subtype(value);
             if (subtype)
                 property.subtype = subtype;
index 00bc450..9b367f8 100644 (file)
@@ -1,3 +1,12 @@
+2015-03-06  Joseph Pecoraro  <pecoraro@apple.com>
+
+        Web Inspector: Adopt Object Literal Shorthand Property Construction Syntax
+        https://bugs.webkit.org/show_bug.cgi?id=142374
+
+        Reviewed by Timothy Hatcher.
+
+        Mechanical change touching lots of files.
+
 2015-03-06  Jono Wells  <jonowells@apple.com>
 
         Web Inspector: Populate Debugger sidebar with all debuggable resources
index 1199e93..40d2cdd 100644 (file)
@@ -48,7 +48,7 @@ WebInspector.EventListenerSet.prototype = {
         if (!emitterIsValid || !type || !callback)
             return;
 
-        this._listeners.push({listener: new WebInspector.EventListener(thisObject || this._defaultThisObject), emitter: emitter, type: type, callback: callback, usesCapture: usesCapture});
+        this._listeners.push({listener: new WebInspector.EventListener(thisObject || this._defaultThisObject), emitter, type, callback, usesCapture});
     },
 
     unregister: function()
index 62b7dd3..514aef3 100644 (file)
@@ -65,7 +65,7 @@ WebInspector.Object.addEventListener = function(eventType, listener, thisObject)
             return;
     }
 
-    listeners.push({thisObject: thisObject, listener: listener});
+    listeners.push({thisObject, listener});
 };
 
 WebInspector.Object.removeEventListener = function(eventType, listener, thisObject)
index 2f7ca54..4177476 100644 (file)
@@ -67,7 +67,7 @@ function parseSecurityOrigin(securityOrigin)
     var host = match[2].toLowerCase();
     var port = Number(match[3]) || null;
 
-    return {scheme: scheme, host: host, port: port};
+    return {scheme, host, port};
 }
 
 function parseURL(url)
@@ -106,7 +106,7 @@ function parseURL(url)
             lastPathComponent = path.substring(lastSlashIndex + 1, path.length - endOffset);
     }
 
-    return {scheme: scheme, host: host, port: port, path: path, queryString: queryString, fragment: fragment, lastPathComponent: lastPathComponent};
+    return {scheme, host, port, path, queryString, fragment, lastPathComponent};
 }
 
 function absoluteURL(partialURL, baseURL)
index 7f67ec5..537838a 100644 (file)
@@ -525,12 +525,12 @@ Object.defineProperty(String, "tokenizeFormatString",
 
         function addStringToken(str)
         {
-            tokens.push({ type: "string", value: str });
+            tokens.push({type: "string", value: str});
         }
 
         function addSpecifierToken(specifier, precision, substitutionIndex)
         {
-            tokens.push({ type: "specifier", specifier: specifier, precision: precision, substitutionIndex: substitutionIndex });
+            tokens.push({type: "specifier", specifier, precision, substitutionIndex});
         }
 
         var index = 0;
@@ -655,7 +655,7 @@ Object.defineProperty(String, "format",
     value: function(format, substitutions, formatters, initialValue, append)
     {
         if (!format || !substitutions || !substitutions.length)
-            return { formattedResult: append(initialValue, format), unusedSubstitutions: substitutions };
+            return {formattedResult: append(initialValue, format), unusedSubstitutions: substitutions};
 
         function prettyFunctionName()
         {
@@ -716,7 +716,7 @@ Object.defineProperty(String, "format",
             unusedSubstitutions.push(substitutions[i]);
         }
 
-        return {formattedResult: result, unusedSubstitutions: unusedSubstitutions};
+        return {formattedResult: result, unusedSubstitutions};
     }
 });
 
@@ -910,7 +910,7 @@ function parseMIMEType(fullMimeType)
             encoding = subparts[1].replace("^\"|\"$", ""); // Trim quotes.
     }
 
-    return {type: type, boundary: boundary || null, encoding: encoding || null};
+    return {type, boundary: boundary || null, encoding: encoding || null};
 }
 
 function simpleGlobStringToRegExp(globString, regExpFlags)
index 88dc9cb..e8a07be 100644 (file)
@@ -192,7 +192,7 @@ WebInspector.ApplicationCacheManager.prototype = {
 
         delete this._applicationCacheObjects[frame.id];
 
-        this.dispatchEventToListeners(WebInspector.ApplicationCacheManager.Event.FrameManifestRemoved, {frame: frame});
+        this.dispatchEventToListeners(WebInspector.ApplicationCacheManager.Event.FrameManifestRemoved, {frame});
     }
 };
 
index 8b27b50..2dd8aab 100644 (file)
@@ -432,7 +432,7 @@ WebInspector.CodeMirrorCompletionController.prototype = {
             startOffset = tempEndOffset;
         }
 
-        return {string: string.substring(startOffset, endOffset), startOffset: startOffset, endOffset: endOffset};
+        return {string: string.substring(startOffset, endOffset), startOffset, endOffset};
     },
 
     _completeAtCurrentPosition: function(force)
index 5ab5fc6..b1c3b94 100644 (file)
@@ -96,9 +96,9 @@ WebInspector.CodeMirrorDragToAdjustNumberController.prototype = {
 
         var containsNumber = token.type.indexOf("number") !== -1;
         this._hoveredTokenInfo = {
-            token: token,
+            token,
             line: position.line,
-            containsNumber: containsNumber,
+            containsNumber,
             startPosition: {
                 ch: token.start,
                 line: position.line
index dd699f1..d7a8fd9 100644 (file)
@@ -174,7 +174,7 @@ WebInspector.CodeMirrorTokenTrackingController.prototype = {
         this.removeHighlightedRange();
 
         var className = this._classNameForHighlightedRange || "";
-        this._codeMirrorMarkedText = this._codeMirror.markText(range.start, range.end, {className: className});
+        this._codeMirrorMarkedText = this._codeMirror.markText(range.start, range.end, {className});
 
         window.addEventListener("mousemove", this, true);
     },
@@ -326,9 +326,9 @@ WebInspector.CodeMirrorTokenTrackingController.prototype = {
         var innerMode = CodeMirror.innerMode(this._codeMirror.getMode(), token.state);
         var codeMirrorModeName = innerMode.mode.alternateName || innerMode.mode.name;
         this._hoveredTokenInfo = {
-            token: token,
-            position: position,
-            innerMode: innerMode,
+            token,
+            position,
+            innerMode,
             modeName: codeMirrorModeName
         };
 
@@ -499,7 +499,7 @@ WebInspector.CodeMirrorTokenTrackingController.prototype = {
         return {
             hoveredToken: this._hoveredTokenInfo.token,
             hoveredTokenRange: {start: startPosition, end: endPosition},
-            expression: expression,
+            expression,
             expressionRange: {start: expressionStartPosition, end: endPosition},
         };
     },
index 08ed48e..84e4cdf 100644 (file)
@@ -141,8 +141,8 @@ WebInspector.DOMTreeManager.prototype = {
         if (!node)
             return;
         node._setAttribute(name, value);
-        this.dispatchEventToListeners(WebInspector.DOMTreeManager.Event.AttributeModified, { node: node, name: name });
-        node.dispatchEventToListeners(WebInspector.DOMNode.Event.AttributeModified, {name: name});
+        this.dispatchEventToListeners(WebInspector.DOMTreeManager.Event.AttributeModified, {node, name});
+        node.dispatchEventToListeners(WebInspector.DOMNode.Event.AttributeModified, {name});
     },
 
     _attributeRemoved: function(nodeId, name)
@@ -151,8 +151,8 @@ WebInspector.DOMTreeManager.prototype = {
         if (!node)
             return;
         node._removeAttribute(name);
-        this.dispatchEventToListeners(WebInspector.DOMTreeManager.Event.AttributeRemoved, { node: node, name: name });
-        node.dispatchEventToListeners(WebInspector.DOMNode.Event.AttributeRemoved, {name: name});
+        this.dispatchEventToListeners(WebInspector.DOMTreeManager.Event.AttributeRemoved, {node, name});
+        node.dispatchEventToListeners(WebInspector.DOMNode.Event.AttributeRemoved, {name});
     },
 
     _inlineStyleInvalidated: function(nodeIds)
@@ -175,7 +175,7 @@ WebInspector.DOMTreeManager.prototype = {
             var node = this._idToDOMNode[nodeId];
             if (node) {
                 node._setAttributesPayload(attributes);
-                this.dispatchEventToListeners(WebInspector.DOMTreeManager.Event.AttributeModified, { node: node, name: "style" });
+                this.dispatchEventToListeners(WebInspector.DOMTreeManager.Event.AttributeModified, { node, name: "style" });
                 node.dispatchEventToListeners(WebInspector.DOMNode.Event.AttributeModified, {name: "style"});
             }
         }
@@ -193,7 +193,7 @@ WebInspector.DOMTreeManager.prototype = {
     {
         var node = this._idToDOMNode[nodeId];
         node._nodeValue = newValue;
-        this.dispatchEventToListeners(WebInspector.DOMTreeManager.Event.CharacterDataModified, {node: node});
+        this.dispatchEventToListeners(WebInspector.DOMTreeManager.Event.CharacterDataModified, {node});
     },
 
     nodeForId: function(nodeId)
@@ -245,7 +245,7 @@ WebInspector.DOMTreeManager.prototype = {
         var prev = this._idToDOMNode[prevId];
         var node = parent._insertChild(prev, payload);
         this._idToDOMNode[node.id] = node;
-        this.dispatchEventToListeners(WebInspector.DOMTreeManager.Event.NodeInserted, {node: node, parent: parent});
+        this.dispatchEventToListeners(WebInspector.DOMTreeManager.Event.NodeInserted, {node, parent});
     },
 
     _childNodeRemoved: function(parentId, nodeId)
@@ -254,7 +254,7 @@ WebInspector.DOMTreeManager.prototype = {
         var node = this._idToDOMNode[nodeId];
         parent._removeChild(node);
         this._unbind(node);
-        this.dispatchEventToListeners(WebInspector.DOMTreeManager.Event.NodeRemoved, {node:node, parent: parent});
+        this.dispatchEventToListeners(WebInspector.DOMTreeManager.Event.NodeRemoved, {node:node, parent});
     },
 
     _unbind: function(node)
@@ -275,7 +275,7 @@ WebInspector.DOMTreeManager.prototype = {
     {
         var node = this._idToDOMNode[nodeId];
         if (node)
-            this.dispatchEventToListeners(WebInspector.DOMTreeManager.Event.DOMNodeWasInspected, {node: node});
+            this.dispatchEventToListeners(WebInspector.DOMTreeManager.Event.DOMNodeWasInspected, {node});
 
         this._inspectModeEnabled = false;
         this.dispatchEventToListeners(WebInspector.DOMTreeManager.Event.InspectModeStateChanged);
@@ -360,7 +360,7 @@ WebInspector.DOMTreeManager.prototype = {
 
         this._highlightedDOMNodeId = nodeId;
         if (nodeId)
-            DOMAgent.highlightNode.invoke({nodeId: nodeId, highlightConfig: this._buildHighlightConfig(mode)});
+            DOMAgent.highlightNode.invoke({nodeId, highlightConfig: this._buildHighlightConfig(mode)});
         else
             DOMAgent.hideHighlight();
     },
@@ -374,7 +374,7 @@ WebInspector.DOMTreeManager.prototype = {
             height: rect.height,
             color: {r: 111, g: 168, b: 220, a: 0.66},
             outlineColor: {r: 255, g: 229, b: 153, a: 0.66},
-            usePageCoordinates: usePageCoordinates
+            usePageCoordinates
         });
     },
 
@@ -468,7 +468,7 @@ WebInspector.DOMTreeManager.prototype = {
                 }
                 contentFlows.push(contentFlow);
             }
-            this.dispatchEventToListeners(WebInspector.DOMTreeManager.Event.ContentFlowListWasUpdated, {documentNodeIdentifier: documentNodeIdentifier, flows: contentFlows});
+            this.dispatchEventToListeners(WebInspector.DOMTreeManager.Event.ContentFlowListWasUpdated, {documentNodeIdentifier, flows: contentFlows});
         }
 
         if (window.CSSAgent && CSSAgent.getNamedFlowCollection)
index 7477f7b..021f8c5 100644 (file)
@@ -329,7 +329,7 @@ WebInspector.DebuggerManager.prototype = {
 
     continueToLocation: function(scriptIdentifier, lineNumber, columnNumber)
     {
-        DebuggerAgent.continueToLocation({scriptId: scriptIdentifier, lineNumber: lineNumber, columnNumber: columnNumber});
+        DebuggerAgent.continueToLocation({scriptId: scriptIdentifier, lineNumber, columnNumber});
     },
 
     addBreakpoint: function(breakpoint, skipEventDispatch, shouldSpeculativelyResolve)
@@ -362,7 +362,7 @@ WebInspector.DebuggerManager.prototype = {
             this._setBreakpoint(breakpoint, shouldSpeculativelyResolve ? speculativelyResolveBreakpoint.bind(null, breakpoint) : null);
 
         if (!skipEventDispatch)
-            this.dispatchEventToListeners(WebInspector.DebuggerManager.Event.BreakpointAdded, {breakpoint: breakpoint});
+            this.dispatchEventToListeners(WebInspector.DebuggerManager.Event.BreakpointAdded, {breakpoint});
     },
 
     removeBreakpoint: function(breakpoint)
@@ -402,7 +402,7 @@ WebInspector.DebuggerManager.prototype = {
         breakpoint.disabled = true;
         breakpoint.clearActions();
 
-        this.dispatchEventToListeners(WebInspector.DebuggerManager.Event.BreakpointRemoved, {breakpoint: breakpoint});
+        this.dispatchEventToListeners(WebInspector.DebuggerManager.Event.BreakpointRemoved, {breakpoint});
     },
 
     breakpointResolved: function(breakpointIdentifier, location)
@@ -550,7 +550,7 @@ WebInspector.DebuggerManager.prototype = {
             scripts.push(script);
         }
 
-        this.dispatchEventToListeners(WebInspector.DebuggerManager.Event.ScriptAdded, {script: script});
+        this.dispatchEventToListeners(WebInspector.DebuggerManager.Event.ScriptAdded, {script});
     },
 
     isBreakpointRemovable: function(breakpoint)
@@ -714,13 +714,13 @@ WebInspector.DebuggerManager.prototype = {
                 urlRegex: undefined,
                 columnNumber: breakpoint.sourceCodeLocation.columnNumber,
                 condition: breakpoint.condition,
-                options: options
+                options
             }, didSetBreakpoint.bind(this));
         } else if (breakpoint.scriptIdentifier) {
             DebuggerAgent.setBreakpoint.invoke({
                 location: {scriptId: breakpoint.scriptIdentifier, lineNumber: breakpoint.sourceCodeLocation.lineNumber, columnNumber: breakpoint.sourceCodeLocation.columnNumber},
                 condition: breakpoint.condition,
-                options: options
+                options
             }, didSetBreakpoint.bind(this));
         }
     },
@@ -766,7 +766,7 @@ WebInspector.DebuggerManager.prototype = {
             // Add the breakpoint at its new lineNumber and get a new id.
             this._setBreakpoint(breakpoint);
 
-            this.dispatchEventToListeners(WebInspector.DebuggerManager.Event.BreakpointMoved, {breakpoint: breakpoint});
+            this.dispatchEventToListeners(WebInspector.DebuggerManager.Event.BreakpointMoved, {breakpoint});
         }
     },
 
index 4ecb2df..0ae1c3a 100644 (file)
@@ -83,7 +83,7 @@ WebInspector.FormatterSourceMap.prototype = {
             var columnNumber = position;
         else
             var columnNumber = position - lineEndings[lineNumber - 1] - 1;
-        return {lineNumber: lineNumber, columnNumber: columnNumber};
+        return {lineNumber, columnNumber};
     },
 
     _convertPosition: function(positions1, positions2, positionInPosition1)
index 41502e4..d8214e9 100644 (file)
@@ -172,7 +172,7 @@ WebInspector.FrameResourceManager.prototype = {
 
         frame.clearExecutionContexts();
 
-        this.dispatchEventToListeners(WebInspector.FrameResourceManager.Event.FrameWasRemoved, {frame: frame});
+        this.dispatchEventToListeners(WebInspector.FrameResourceManager.Event.FrameWasRemoved, {frame});
 
         if (this._mainFrame !== oldMainFrame)
             this._mainFrameDidChange(oldMainFrame);
@@ -575,7 +575,7 @@ WebInspector.FrameResourceManager.prototype = {
 
     _dispatchFrameWasAddedEvent: function(frame)
     {
-        this.dispatchEventToListeners(WebInspector.FrameResourceManager.Event.FrameWasAdded, {frame: frame});
+        this.dispatchEventToListeners(WebInspector.FrameResourceManager.Event.FrameWasAdded, {frame});
     },
 
     _mainFrameDidChange: function(oldMainFrame)
@@ -584,7 +584,7 @@ WebInspector.FrameResourceManager.prototype = {
             oldMainFrame.unmarkAsMainFrame();
         if (this._mainFrame)
             this._mainFrame.markAsMainFrame();
-        this.dispatchEventToListeners(WebInspector.FrameResourceManager.Event.MainFrameDidChange, {oldMainFrame: oldMainFrame});
+        this.dispatchEventToListeners(WebInspector.FrameResourceManager.Event.MainFrameDidChange, {oldMainFrame});
     },
 
     _extraDomainsActivated: function(event)
index 6db37a2..590cf83 100644 (file)
@@ -61,7 +61,7 @@ WebInspector.IssueManager.prototype = {
         var issue = new WebInspector.IssueMessage(source, level, text, url, modifiedLineNumber, parameters);
         this._issues.push(issue);
 
-        this.dispatchEventToListeners(WebInspector.IssueManager.Event.IssueWasAdded, {issue: issue});
+        this.dispatchEventToListeners(WebInspector.IssueManager.Event.IssueWasAdded, {issue});
     },
 
     issuesForSourceCode: function(sourceCode)
index 0c9bf8d..dde40fa 100644 (file)
@@ -119,11 +119,7 @@ WebInspector.LayerTreeManager.prototype = {
                 return !nodeIdsInNewLayers.contains(nodeId) && !layerIdsInNewLayers.contains(layer.layerId);
         });
 
-        return {
-            preserved: preserved,
-            additions: additions,
-            removals: removals
-        };
+        return {preserved, additions, removals};
     },
 
     layersForNode: function(node, callback)
index f59125b..a09d30f 100644 (file)
@@ -75,7 +75,7 @@ WebInspector.LogManager.prototype = {
     {
         // Called from WebInspector.ConsoleObserver.
 
-        this.dispatchEventToListeners(WebInspector.LogManager.Event.PreviousMessageRepeatCountUpdated, {count: count});
+        this.dispatchEventToListeners(WebInspector.LogManager.Event.PreviousMessageRepeatCountUpdated, {count});
     },
 
     requestClearMessages: function()
index 42de592..9d9459c 100644 (file)
@@ -160,7 +160,7 @@ WebInspector.ProbeManager.prototype = {
             if (!probeSet.probes.length) {
                 this._probeSetsByBreakpoint.delete(probeSet.breakpoint);
                 probeSet.willRemove();
-                this.dispatchEventToListeners(WebInspector.ProbeManager.Event.ProbeSetRemoved, {probeSet: probeSet});
+                this.dispatchEventToListeners(WebInspector.ProbeManager.Event.ProbeSetRemoved, {probeSet});
             }
         }, this);
     },
index 6994bc0..5cf9dc2 100644 (file)
@@ -496,7 +496,7 @@ WebInspector.ReplayManager.prototype = {
                 throw error;
             });
 
-        this.dispatchEventToListeners(WebInspector.ReplayManager.Event.SessionAdded, {sessionId: sessionId});
+        this.dispatchEventToListeners(WebInspector.ReplayManager.Event.SessionAdded, {sessionId});
     },
 
     sessionModified: function(sessionId)
@@ -528,7 +528,7 @@ WebInspector.ReplayManager.prototype = {
                 manager._sessionPromises.delete(sessionId);
                 var removedSession = manager._sessions.take(sessionId);
                 console.assert(removedSession);
-                manager.dispatchEventToListeners(WebInspector.ReplayManager.Event.SessionRemoved, {removedSession: removedSession});
+                manager.dispatchEventToListeners(WebInspector.ReplayManager.Event.SessionRemoved, {removedSession});
             });
     },
 
@@ -589,7 +589,7 @@ WebInspector.ReplayManager.prototype = {
                 manager._segmentPromises.delete(segmentId);
                 var removedSegment = manager._segments.take(segmentId);
                 console.assert(removedSegment);
-                manager.dispatchEventToListeners(WebInspector.ReplayManager.Event.SessionSegmentRemoved, {removedSegment: removedSegment});
+                manager.dispatchEventToListeners(WebInspector.ReplayManager.Event.SessionSegmentRemoved, {removedSegment});
             });
     },
 
index d30e850..77d9046 100644 (file)
@@ -67,7 +67,7 @@ WebInspector.RuntimeManager.prototype = {
         if (WebInspector.debuggerManager.activeCallFrame) {
             // COMPATIBILITY (iOS 6): "generatePreview" did not exist.
             // COMPATIBILITY (iOS 8): "saveResult" did not exist.
-            DebuggerAgent.evaluateOnCallFrame.invoke({callFrameId: WebInspector.debuggerManager.activeCallFrame.id, expression: expression, objectGroup: objectGroup, includeCommandLineAPI: includeCommandLineAPI, doNotPauseOnExceptionsAndMuteConsole: doNotPauseOnExceptionsAndMuteConsole, returnByValue: returnByValue, generatePreview: generatePreview, saveResult: saveResult}, evalCallback.bind(this));
+            DebuggerAgent.evaluateOnCallFrame.invoke({callFrameId: WebInspector.debuggerManager.activeCallFrame.id, expression, objectGroup, includeCommandLineAPI, doNotPauseOnExceptionsAndMuteConsole, returnByValue, generatePreview, saveResult}, evalCallback.bind(this));
             return;
         }
 
@@ -76,7 +76,7 @@ WebInspector.RuntimeManager.prototype = {
         // COMPATIBILITY (iOS 6): "generatePreview" did not exist.
         // COMPATIBILITY (iOS 8): "saveResult" did not exist.
         var contextId = WebInspector.quickConsole.executionContextIdentifier;
-        RuntimeAgent.evaluate.invoke({expression: expression, objectGroup: objectGroup, includeCommandLineAPI: includeCommandLineAPI, doNotPauseOnExceptionsAndMuteConsole: doNotPauseOnExceptionsAndMuteConsole, contextId: contextId, frameId: contextId, returnByValue: returnByValue, generatePreview: generatePreview, saveResult: saveResult}, evalCallback.bind(this));
+        RuntimeAgent.evaluate.invoke({expression, objectGroup, includeCommandLineAPI, doNotPauseOnExceptionsAndMuteConsole, contextId, frameId: contextId, returnByValue, generatePreview, saveResult}, evalCallback.bind(this));
     },
 
     saveResult: function(remoteObject, callback)
index 29f35c7..ceece30 100644 (file)
@@ -77,7 +77,7 @@ WebInspector.StorageManager.prototype = {
         var domStorage = new WebInspector.DOMStorageObject(id, host, isLocalStorage);
 
         this._domStorageObjects.push(domStorage);
-        this.dispatchEventToListeners(WebInspector.StorageManager.Event.DOMStorageObjectWasAdded, {domStorage: domStorage});
+        this.dispatchEventToListeners(WebInspector.StorageManager.Event.DOMStorageObjectWasAdded, {domStorage});
     },
 
     databaseWasAdded: function(id, host, name, version)
@@ -85,7 +85,7 @@ WebInspector.StorageManager.prototype = {
         var database = new WebInspector.DatabaseObject(id, host, name, version);
 
         this._databaseObjects.push(database);
-        this.dispatchEventToListeners(WebInspector.StorageManager.Event.DatabaseWasAdded, {database: database});
+        this.dispatchEventToListeners(WebInspector.StorageManager.Event.DatabaseWasAdded, {database});
     },
 
     domStorageWasUpdated: function(id)
@@ -119,7 +119,7 @@ WebInspector.StorageManager.prototype = {
         console.assert(database);
         if (!database)
             return;
-        this.dispatchEventToListeners(WebInspector.StorageManager.Event.DatabaseWasInspected, {database: database});
+        this.dispatchEventToListeners(WebInspector.StorageManager.Event.DatabaseWasInspected, {database});
     },
 
     inspectDOMStorage: function(id)
@@ -128,7 +128,7 @@ WebInspector.StorageManager.prototype = {
         console.assert(domStorage);
         if (!domStorage)
             return;
-        this.dispatchEventToListeners(WebInspector.StorageManager.Event.DOMStorageObjectWasInspected, {domStorage: domStorage});
+        this.dispatchEventToListeners(WebInspector.StorageManager.Event.DOMStorageObjectWasInspected, {domStorage});
     },
 
     // Protected
@@ -256,7 +256,7 @@ WebInspector.StorageManager.prototype = {
             var indexedDatabase = new WebInspector.IndexedDatabase(databasePayload.name, securityOrigin, databasePayload.version, objectStores);
 
             this._indexedDatabases.push(indexedDatabase);
-            this.dispatchEventToListeners(WebInspector.StorageManager.Event.IndexedDatabaseWasAdded, {indexedDatabase: indexedDatabase});
+            this.dispatchEventToListeners(WebInspector.StorageManager.Event.IndexedDatabaseWasAdded, {indexedDatabase});
         }
 
         function processKeyPath(keyPathPayload)
index aa653a3..9701114 100644 (file)
@@ -429,7 +429,7 @@ WebInspector.TimelineManager.prototype = {
 
         this._legacyFirstRecordedTimestamp = NaN;
         this._activeRecording = newRecording;
-        this.dispatchEventToListeners(WebInspector.TimelineManager.Event.RecordingLoaded, {oldRecording: oldRecording});
+        this.dispatchEventToListeners(WebInspector.TimelineManager.Event.RecordingLoaded, {oldRecording});
     },
 
     _callFramesFromPayload: function(payload)
index 5fc0cf2..ec059e1 100644 (file)
@@ -171,7 +171,7 @@ WebInspector.CSSStyleDeclaration.prototype = {
 
         function delayed()
         {
-            this.dispatchEventToListeners(WebInspector.CSSStyleDeclaration.Event.PropertiesChanged, {addedProperties: addedProperties, removedProperties: removedProperties});
+            this.dispatchEventToListeners(WebInspector.CSSStyleDeclaration.Event.PropertiesChanged, {addedProperties, removedProperties});
         }
 
         // Delay firing the PropertiesChanged event so DOMNodeStyles has a chance to mark overridden and associated properties.
index 59026a3..25a3ef6 100644 (file)
@@ -517,11 +517,7 @@ WebInspector.DOMNode.prototype = {
 
     _addAttribute: function(name, value)
     {
-        var attr = {
-            name: name,
-            value: value,
-            _node: this
-        };
+        var attr = {name, value, _node: this};
         this._attributesMap[name] = attr;
         this._attributes.push(attr);
     },
index bb22a24..7252671 100644 (file)
@@ -240,7 +240,7 @@ WebInspector.DOMNodeStyles.prototype = {
             // Delete the previous saved significant change flag so we rescan for a significant change next time.
             delete this._previousSignificantChange;
 
-            this.dispatchEventToListeners(WebInspector.DOMNodeStyles.Event.Refreshed, {significantChange: significantChange});
+            this.dispatchEventToListeners(WebInspector.DOMNodeStyles.Event.Refreshed, {significantChange});
         }
 
         CSSAgent.getMatchedStylesForNode.invoke({nodeId: this._node.id, includePseudo: true, includeInherited: true}, fetchedMatchedStyles.bind(this));
@@ -262,7 +262,7 @@ WebInspector.DOMNodeStyles.prototype = {
 
         selector = this._node.appropriateSelectorFor(true);
 
-        CSSAgent.addRule.invoke({contextNodeId: this._node.id, selector: selector}, addedRule.bind(this));
+        CSSAgent.addRule.invoke({contextNodeId: this._node.id, selector}, addedRule.bind(this));
     },
 
     get matchedRules()
index b3f8a40..8f17597 100644 (file)
@@ -114,19 +114,19 @@ WebInspector.DOMStorageObject.prototype = {
     itemRemoved: function(key)
     {
         this._entries.delete(key);
-        this.dispatchEventToListeners(WebInspector.DOMStorageObject.Event.ItemRemoved, {key: key});
+        this.dispatchEventToListeners(WebInspector.DOMStorageObject.Event.ItemRemoved, {key});
     },
 
     itemAdded: function(key, value)
     {
         this._entries.set(key, value);
-        this.dispatchEventToListeners(WebInspector.DOMStorageObject.Event.ItemAdded, {key: key, value: value});
+        this.dispatchEventToListeners(WebInspector.DOMStorageObject.Event.ItemAdded, {key, value});
     },
 
     itemUpdated: function(key, oldValue, value)
     {
         this._entries.set(key, value);
-        var data = {key: key, oldValue: oldValue, value: value};
+        var data = {key, oldValue, value};
         this.dispatchEventToListeners(WebInspector.DOMStorageObject.Event.ItemUpdated, data);
     }
 };
index ce63843..00c5f50 100644 (file)
@@ -211,7 +211,7 @@ WebInspector.DOMTree.prototype = {
             // COMPATIBILITY (iOS 6): Execution context identifiers (contextId) did not exist
             // in iOS 6. Fallback to including the frame identifier (frameId).
             var contextId = this._frame.pageExecutionContext ? this._frame.pageExecutionContext.id : undefined;
-            RuntimeAgent.evaluate.invoke({expression: "document", objectGroup: "", includeCommandLineAPI: false, doNotPauseOnExceptionsAndMuteConsole: true, contextId: contextId, frameId: this._frame.id, returnByValue: false, generatePreview: false}, rootObjectAvailable.bind(this));
+            RuntimeAgent.evaluate.invoke({expression: "document", objectGroup: "", includeCommandLineAPI: false, doNotPauseOnExceptionsAndMuteConsole: true, contextId, frameId: this._frame.id, returnByValue: false, generatePreview: false}, rootObjectAvailable.bind(this));
         }
     },
 
@@ -314,7 +314,7 @@ WebInspector.DOMTree.prototype = {
         console.assert(!this._flowMap.hasOwnProperty(flowId));
         this._flowMap[flowId] = flow;
 
-        this.dispatchEventToListeners(WebInspector.DOMTree.Event.ContentFlowWasAdded, {flow: flow});
+        this.dispatchEventToListeners(WebInspector.DOMTree.Event.ContentFlowWasAdded, {flow});
     },
 
     _contentFlowWasRemoved: function(event)
@@ -327,7 +327,7 @@ WebInspector.DOMTree.prototype = {
         console.assert(this._flowMap.hasOwnProperty(flowId));
         delete this._flowMap[flowId];
 
-        this.dispatchEventToListeners(WebInspector.DOMTree.Event.ContentFlowWasRemoved, {flow: flow});
+        this.dispatchEventToListeners(WebInspector.DOMTree.Event.ContentFlowWasRemoved, {flow});
     }
 };
 
index 06d2049..8454f22 100644 (file)
@@ -108,10 +108,10 @@ WebInspector.Frame.prototype = {
             this._dispatchMainResourceDidChangeEvent(oldMainResource);
 
         if (this._securityOrigin !== oldSecurityOrigin)
-            this.dispatchEventToListeners(WebInspector.Frame.Event.SecurityOriginDidChange, {oldSecurityOrigin: oldSecurityOrigin});
+            this.dispatchEventToListeners(WebInspector.Frame.Event.SecurityOriginDidChange, {oldSecurityOrigin});
 
         if (this._name !== oldName)
-            this.dispatchEventToListeners(WebInspector.Frame.Event.NameDidChange, {oldName: oldName});
+            this.dispatchEventToListeners(WebInspector.Frame.Event.NameDidChange, {oldName});
     },
 
     startProvisionalLoad: function(provisionalMainResource)
@@ -163,7 +163,7 @@ WebInspector.Frame.prototype = {
             this._dispatchMainResourceDidChangeEvent(oldMainResource);
 
         if (this._securityOrigin !== oldSecurityOrigin)
-            this.dispatchEventToListeners(WebInspector.Frame.Event.SecurityOriginDidChange, {oldSecurityOrigin: oldSecurityOrigin});
+            this.dispatchEventToListeners(WebInspector.Frame.Event.SecurityOriginDidChange, {oldSecurityOrigin});
     },
 
     clearProvisionalLoad: function(skipProvisionalLoadClearedEvent)
@@ -358,7 +358,7 @@ WebInspector.Frame.prototype = {
 
         childFrame._parentFrame = null;
 
-        this.dispatchEventToListeners(WebInspector.Frame.Event.ChildFrameWasRemoved, {childFrame: childFrame});
+        this.dispatchEventToListeners(WebInspector.Frame.Event.ChildFrameWasRemoved, {childFrame});
     },
 
     removeAllChildFrames: function()
@@ -427,10 +427,10 @@ WebInspector.Frame.prototype = {
 
         if (this._isProvisionalResource(resource)) {
             this._provisionalResourceCollection.addResource(resource);
-            this.dispatchEventToListeners(WebInspector.Frame.Event.ProvisionalResourceWasAdded, {resource: resource});
+            this.dispatchEventToListeners(WebInspector.Frame.Event.ProvisionalResourceWasAdded, {resource});
         } else {
             this._resourceCollection.addResource(resource);
-            this.dispatchEventToListeners(WebInspector.Frame.Event.ResourceWasAdded, {resource: resource});
+            this.dispatchEventToListeners(WebInspector.Frame.Event.ResourceWasAdded, {resource});
         }
     },
 
@@ -444,7 +444,7 @@ WebInspector.Frame.prototype = {
 
         this._disassociateWithResource(resource);
 
-        this.dispatchEventToListeners(WebInspector.Frame.Event.ResourceWasRemoved, {resource: resource});
+        this.dispatchEventToListeners(WebInspector.Frame.Event.ResourceWasRemoved, {resource});
     },
 
     removeAllResources: function()
@@ -496,7 +496,7 @@ WebInspector.Frame.prototype = {
 
     _dispatchMainResourceDidChangeEvent: function(oldMainResource)
     {
-        this.dispatchEventToListeners(WebInspector.Frame.Event.MainResourceDidChange, {oldMainResource: oldMainResource});
+        this.dispatchEventToListeners(WebInspector.Frame.Event.MainResourceDidChange, {oldMainResource});
     }
 };
 
index 03f68df..7204deb 100644 (file)
@@ -104,7 +104,7 @@ WebInspector.Gradient = {
                 if (!color)
                     continue;
 
-                var stop = {color: color};
+                var stop = {color};
                 if (component.length && component[0].substr(-1) === "%")
                     stop.offset = parseFloat(component.shift()) / 100;
                 return stop;
index edaf77e..1f020f1 100644 (file)
@@ -86,7 +86,7 @@ WebInspector.ProbeSet.prototype = {
 
         var oldTable = this._dataTable;
         this._createDataTable();
-        this.dispatchEventToListeners(WebInspector.ProbeSet.Event.SamplesCleared, {oldTable: oldTable});
+        this.dispatchEventToListeners(WebInspector.ProbeSet.Event.SamplesCleared, {oldTable});
     },
 
     createProbe: function(expression)
index 287a0bb..84fdaf6 100644 (file)
@@ -175,7 +175,7 @@ WebInspector.ProfileNode.prototype = {
         var selfTime = totalTime - childNodesTotalTime;
         var averageTime = selfTime / callCount;
 
-        return {startTime: startTime, endTime: endTime, totalTime: totalTime, selfTime: selfTime, callCount: callCount, averageTime: averageTime};
+        return {startTime, endTime, totalTime, selfTime, callCount, averageTime};
     },
 
     traverseNextProfileNode: function(stayWithin)
index c11a3ed..92a6242 100644 (file)
@@ -76,7 +76,7 @@ WebInspector.ReplaySession.prototype = {
         Promise.all(pendingSegments).then(
             function(segmentsArray) {
                 session._segments = segmentsArray;
-                session.dispatchEventToListeners(WebInspector.ReplaySession.Event.SegmentsChanged, {oldSegments: oldSegments});
+                session.dispatchEventToListeners(WebInspector.ReplaySession.Event.SegmentsChanged, {oldSegments});
             },
             function(error) {
                 console.error("Problem resolving segments: ", error);
index 763d013..219f640 100644 (file)
@@ -477,7 +477,7 @@ WebInspector.Resource.prototype = {
             // Delete the URL components so the URL is re-parsed the next time it is requested.
             delete this._urlComponents;
 
-            this.dispatchEventToListeners(WebInspector.Resource.Event.URLDidChange, {oldURL: oldURL});
+            this.dispatchEventToListeners(WebInspector.Resource.Event.URLDidChange, {oldURL});
         }
 
         this.dispatchEventToListeners(WebInspector.Resource.Event.RequestHeadersDidChange);
@@ -516,18 +516,18 @@ WebInspector.Resource.prototype = {
             // Delete the URL components so the URL is re-parsed the next time it is requested.
             delete this._urlComponents;
 
-            this.dispatchEventToListeners(WebInspector.Resource.Event.URLDidChange, {oldURL: oldURL});
+            this.dispatchEventToListeners(WebInspector.Resource.Event.URLDidChange, {oldURL});
         }
 
         if (oldMIMEType !== mimeType) {
             // Delete the MIME-type components so the MIME-type is re-parsed the next time it is requested.
             delete this._mimeTypeComponents;
 
-            this.dispatchEventToListeners(WebInspector.Resource.Event.MIMETypeDidChange, {oldMIMEType: oldMIMEType});
+            this.dispatchEventToListeners(WebInspector.Resource.Event.MIMETypeDidChange, {oldMIMEType});
         }
 
         if (oldType !== type)
-            this.dispatchEventToListeners(WebInspector.Resource.Event.TypeDidChange, {oldType: oldType});
+            this.dispatchEventToListeners(WebInspector.Resource.Event.TypeDidChange, {oldType});
 
         console.assert(isNaN(this._size));
         console.assert(isNaN(this._transferSize));
@@ -573,7 +573,7 @@ WebInspector.Resource.prototype = {
 
         this._lastDataReceivedTimestamp = elapsedTime || NaN;
 
-        this.dispatchEventToListeners(WebInspector.Resource.Event.SizeDidChange, {previousSize: previousSize});
+        this.dispatchEventToListeners(WebInspector.Resource.Event.SizeDidChange, {previousSize});
 
         // The transferSize is based off of size when status is not 304 or Content-Length is missing.
         if (isNaN(this._transferSize) && this._statusCode !== 304 && !this._responseHeaders.valueForCaseInsensitiveKey("Content-Length"))
@@ -709,7 +709,7 @@ WebInspector.Resource.prototype = {
         if (this._type === WebInspector.Resource.Type.Other) {
             var oldType = this._type;
             this._type = WebInspector.Resource.Type.Script;
-            this.dispatchEventToListeners(WebInspector.Resource.Event.TypeDidChange, {oldType: oldType});
+            this.dispatchEventToListeners(WebInspector.Resource.Event.TypeDidChange, {oldType});
         }
     },
 
index dee0cee..8e8f6be 100644 (file)
@@ -218,7 +218,7 @@ WebInspector.ScriptSyntaxTree.prototype = {
                 for (var param of node.params) {
                     allRequests.push({
                         typeInformationDescriptor: WebInspector.ScriptSyntaxTree.TypeProfilerSearchDescriptor.NormalExpression,
-                        sourceID: sourceID,
+                        sourceID,
                         divot: param.range[0]
                     });
                     allRequestNodes.push(param);
@@ -226,7 +226,7 @@ WebInspector.ScriptSyntaxTree.prototype = {
 
                 allRequests.push({
                     typeInformationDescriptor: WebInspector.ScriptSyntaxTree.TypeProfilerSearchDescriptor.FunctionReturn,
-                    sourceID: sourceID,
+                    sourceID,
                     divot: node.body.range[0]
                 });
                 allRequestNodes.push(node);
@@ -235,7 +235,7 @@ WebInspector.ScriptSyntaxTree.prototype = {
                 for (var identifier of this.gatherIdentifiersInVariableDeclaration(node)) {
                     allRequests.push({
                         typeInformationDescriptor: WebInspector.ScriptSyntaxTree.TypeProfilerSearchDescriptor.NormalExpression,
-                        sourceID: sourceID,
+                        sourceID,
                         divot: identifier.range[0]
                     });
                     allRequestNodes.push(identifier);
index 7ecc1ad..9959748 100644 (file)
@@ -204,9 +204,9 @@ WebInspector.SourceCode.prototype = {
         delete this._ignoreRevisionContentDidChangeEvent;
 
         return Promise.resolve({
-            error: error,
+            error,
             sourceCode: this,
-            content: content,
+            content,
         });
     }
 };
index 7d95384..5743c7d 100644 (file)
@@ -434,14 +434,14 @@ WebInspector.SourceCodeLocation.prototype = {
 
         if (displayLocationChanged || anyLocationChanged) {
             var oldData = {
-                oldSourceCode: oldSourceCode,
-                oldLineNumber: oldLineNumber,
-                oldColumnNumber: oldColumnNumber,
-                oldFormattedLineNumber: oldFormattedLineNumber,
-                oldFormattedColumnNumber: oldFormattedColumnNumber,
-                oldDisplaySourceCode: oldDisplaySourceCode,
-                oldDisplayLineNumber: oldDisplayLineNumber,
-                oldDisplayColumnNumber: oldDisplayColumnNumber
+                oldSourceCode,
+                oldLineNumber,
+                oldColumnNumber,
+                oldFormattedLineNumber,
+                oldFormattedColumnNumber,
+                oldDisplaySourceCode,
+                oldDisplayLineNumber,
+                oldDisplayColumnNumber
             };
             if (displayLocationChanged)
                 this.dispatchEventToListeners(WebInspector.SourceCodeLocation.Event.DisplayLocationChanged, oldData);
index e225efe..308a641 100644 (file)
@@ -93,9 +93,9 @@ WebInspector.SourceMapResource.prototype = {
             this.markAsFailed();
             return Promise.resolve({
                 error: WebInspector.UIString("An error occurred trying to load the resource."),
-                content: content,
-                mimeType: mimeType,
-                statusCode: statusCode
+                content,
+                mimeType,
+                statusCode
             });
         }
 
@@ -122,10 +122,10 @@ WebInspector.SourceMapResource.prototype = {
             this.markAsFinished();
 
             return Promise.resolve({
-                content: content,
-                mimeType: mimeType,
-                base64encoded: base64encoded,
-                statusCode: statusCode
+                content,
+                mimeType,
+                base64encoded,
+                statusCode
             });
         }
 
index ed0ba5e..e435e99 100644 (file)
@@ -117,7 +117,7 @@ WebInspector.Timeline.prototype = {
 
         this._updateTimesIfNeeded(record);
 
-        this.dispatchEventToListeners(WebInspector.Timeline.Event.RecordAdded, {record: record});
+        this.dispatchEventToListeners(WebInspector.Timeline.Event.RecordAdded, {record});
     },
 
     saveIdentityToCookie: function(cookie)
index d20a2a4..68c46a8 100644 (file)
@@ -144,7 +144,7 @@ WebInspector.TimelineRecording.prototype = {
         this._timelines.set(timeline.type, timeline);
 
         timeline.addEventListener(WebInspector.Timeline.Event.TimesUpdated, this._timelineTimesUpdated, this);
-        this.dispatchEventToListeners(WebInspector.TimelineRecording.Event.TimelineAdded, {timeline: timeline});
+        this.dispatchEventToListeners(WebInspector.TimelineRecording.Event.TimelineAdded, {timeline});
     },
 
     removeTimeline: function(timeline)
@@ -156,7 +156,7 @@ WebInspector.TimelineRecording.prototype = {
         this._timelines.delete(timeline.type);
 
         timeline.removeEventListener(WebInspector.Timeline.Event.TimesUpdated, this._timelineTimesUpdated, this);
-        this.dispatchEventToListeners(WebInspector.TimelineRecording.Event.TimelineRemoved, {timeline: timeline});
+        this.dispatchEventToListeners(WebInspector.TimelineRecording.Event.TimelineRemoved, {timeline});
     },
 
     addEventMarker: function(eventMarker)
@@ -200,7 +200,7 @@ WebInspector.TimelineRecording.prototype = {
         sourceCodeTimeline.addRecord(record);
 
         if (newTimeline)
-            this.dispatchEventToListeners(WebInspector.TimelineRecording.Event.SourceCodeTimelineAdded, {sourceCodeTimeline: sourceCodeTimeline});
+            this.dispatchEventToListeners(WebInspector.TimelineRecording.Event.SourceCodeTimelineAdded, {sourceCodeTimeline});
     },
 
     computeElapsedTime: function(timestamp)
index 0d4d7c0..5c478bc 100644 (file)
@@ -76,7 +76,7 @@ WebInspector.BoxModelDetailsSectionRow.prototype = {
         var top = this._getPropertyValueAsPx(computedStyle, componentName + "-top" + suffix);
         var right = this._getPropertyValueAsPx(computedStyle, componentName + "-right" + suffix);
         var bottom = this._getPropertyValueAsPx(computedStyle, componentName + "-bottom" + suffix);
-        return { left: left, top: top, right: right, bottom: bottom };
+        return {left, top, right, bottom};
     },
 
     _highlightDOMNode: function(showHighlight, mode, event)
@@ -264,7 +264,7 @@ WebInspector.BoxModelDetailsSectionRow.prototype = {
         if (targetElement.title)
             targetElement.textContent = targetElement.title;
 
-        var context = {box: box, styleProperty: styleProperty};
+        var context = {box, styleProperty};
         var boundKeyDown = this._handleKeyDown.bind(this, context, styleProperty);
         context.keyDownHandler = boundKeyDown;
         targetElement.addEventListener("keydown", boundKeyDown, false);
index 73f588e..19045b6 100644 (file)
 
             var startChar = line === range.start.line ? range.start.ch : (lineContent.length - lineContent.trimLeft().length);
             var endChar = line === range.end.line ? range.end.ch : lineContent.length;
-            var firstCharCoords = this.cursorCoords({ch: startChar, line: line});
-            var endCharCoords = this.cursorCoords({ch: endChar, line: line});
+            var firstCharCoords = this.cursorCoords({ch: startChar, line});
+            var endCharCoords = this.cursorCoords({ch: endChar, line});
 
             // Handle line wrapping.
             if (firstCharCoords.bottom !== endCharCoords.bottom) {
                 var maxY = -Number.MAX_VALUE;
                 for (var ch = startChar; ch <= endChar; ++ch) {
-                    var coords = this.cursorCoords({ch: ch, line: line});
+                    var coords = this.cursorCoords({ch, line});
                     if (coords.bottom > maxY) {
                         if (ch > startChar) {
-                            var maxX = Math.ceil(this.cursorCoords({ch: ch - 1, line: line}).right);
+                            var maxX = Math.ceil(this.cursorCoords({ch: ch - 1, line}).right);
                             lineRects.push(new WebInspector.Rect(minX, minY, maxX - minX, maxY - minY));
                         }
                         var minX = Math.floor(coords.left);
index 7acc47f..1cffc49 100644 (file)
@@ -142,7 +142,7 @@ WebInspector.ConsolePrompt.prototype = {
 
     pushHistoryItem: function(text)
     {
-        this._commitHistoryEntry({text: text});
+        this._commitHistoryEntry({text});
     },
 
     // Protected
index 59a6611..406a35f 100644 (file)
@@ -122,7 +122,7 @@ WebInspector.DOMStorageContentView.prototype = {
                 return;
         }
 
-        var data = {key: key, value: value};
+        var data = {key, value};
         this._dataGrid.appendChild(new WebInspector.DataGridNode(data, false));
         this._sortDataGrid();
     },
index 5163c0b..4ff0107 100644 (file)
@@ -66,11 +66,11 @@ WebInspector.FolderizedTreeElement.prototype = {
         console.assert(typeof treeElementConstructor === "function");
 
         var settings = {
-            type: type,
-            folderDisplayName: folderDisplayName,
-            validateRepresentedObjectCallback: validateRepresentedObjectCallback,
-            countChildrenCallback: countChildrenCallback,
-            treeElementConstructor: treeElementConstructor
+            type,
+            folderDisplayName,
+            validateRepresentedObjectCallback,
+            countChildrenCallback,
+            treeElementConstructor
         };
 
         this._folderizeSettingsMap.set(type, settings);
index 366cd8b..69b2e76 100644 (file)
@@ -935,8 +935,8 @@ WebInspector.LogContentView.prototype = {
 
         matchRanges.forEach(function (range, index) {
             this._searchMatches.push({
-                message: message,
-                range: range,
+                message,
+                range,
                 highlight: highlightedElements[index]
             });
 
index a5f74b8..e460c7b 100644 (file)
@@ -221,7 +221,7 @@ WebInspector.Popover.prototype = {
         for (var edgeName in WebInspector.RectEdge) {
             var edge = WebInspector.RectEdge[edgeName];
             var item = {
-                edge: edge,
+                edge,
                 metrics: this._bestMetricsForEdge(this._preferredSize, targetFrame, containerFrame, edge)
             };
             var preferredIndex = preferredEdges.indexOf(edge);
index cde7d3c..ed3691b 100644 (file)
@@ -354,7 +354,7 @@ WebInspector.ResourceDetailsSidebarPanel.prototype = {
                 addDataGridNode(data[i]);
         } else {
             for (var name in data)
-                addDataGridNode({name: name, value: data[name] || ""});
+                addDataGridNode({name, value: data[name] || ""});
         }
 
         dataGrid.addEventListener(WebInspector.DataGrid.Event.SortChanged, sortDataGrid, this);
index 4def57e..4138fda 100644 (file)
@@ -74,7 +74,7 @@ WebInspector.ScopeBarItem.prototype = {
 
         this._selectedSetting.value = selected;
 
-        this.dispatchEventToListeners(WebInspector.ScopeBarItem.Event.SelectionChanged, {withModifier: withModifier});
+        this.dispatchEventToListeners(WebInspector.ScopeBarItem.Event.SelectionChanged, {withModifier});
     },
 
     // Private
index f27190e..f3a7abd 100644 (file)
@@ -141,7 +141,7 @@ WebInspector.ScriptContentView.prototype = {
     get saveData()
     {
         var url = this._script.url || "web-inspector:///" + encodeURI(this._script.displayName) + ".js";
-        return {url: url, content: this._textEditor.string};
+        return {url, content: this._textEditor.string};
     },
 
     get supportsSearch()
index 8811328..915f2af 100644 (file)
@@ -74,7 +74,7 @@ WebInspector.ScriptTimelineDataGridNode.prototype = {
         var duration = Math.min(this._record.startTime + this._record.duration, this._rangeEndTime) - startTime;
         var callFrameOrSourceCodeLocation = this._record.initiatorCallFrame || this._record.sourceCodeLocation;
 
-        return {eventType: this._record.eventType, startTime: startTime, selfTime: duration, totalTime: duration,
+        return {eventType: this._record.eventType, startTime, selfTime: duration, totalTime: duration,
             averageTime: duration, callCount: 1, location: callFrameOrSourceCodeLocation};
     },
 
index 7ced00c..0920e96 100644 (file)
@@ -867,7 +867,7 @@ WebInspector.SourceCodeTextEditor.prototype = {
 
         // Paused. Add Continue to Here option only if we have a script identifier for the location.
         if (WebInspector.debuggerManager.paused) {
-            var editorLineInfo = {lineNumber:lineNumber, columnNumber:columnNumber};
+            var editorLineInfo = {lineNumbercolumnNumber};
             var unformattedLineInfo = this._unformattedLineInfoForEditorLineInfo(editorLineInfo);
             var sourceCodeLocation = this._sourceCode.createSourceCodeLocation(unformattedLineInfo.lineNumber, unformattedLineInfo.columnNumber);
 
@@ -964,7 +964,7 @@ WebInspector.SourceCodeTextEditor.prototype = {
         if (!this._supportsDebugging)
             return null;
 
-        var editorLineInfo = {lineNumber:lineNumber, columnNumber:columnNumber};
+        var editorLineInfo = {lineNumbercolumnNumber};
         var unformattedLineInfo = this._unformattedLineInfoForEditorLineInfo(editorLineInfo);
         var sourceCodeLocation = this._sourceCode.createSourceCodeLocation(unformattedLineInfo.lineNumber, unformattedLineInfo.columnNumber);
         var breakpoint = new WebInspector.Breakpoint(sourceCodeLocation);
@@ -993,7 +993,7 @@ WebInspector.SourceCodeTextEditor.prototype = {
         if (!this._supportsDebugging)
             return;
 
-        var lineInfo = {lineNumber: lineNumber, columnNumber: columnNumber};
+        var lineInfo = {lineNumber, columnNumber};
         var breakpoint = this._breakpointForEditorLineInfo(lineInfo);
         console.assert(breakpoint);
         if (!breakpoint)
@@ -1039,7 +1039,7 @@ WebInspector.SourceCodeTextEditor.prototype = {
         if (!this._supportsDebugging)
             return;
 
-        var breakpoint = this._breakpointForEditorLineInfo({lineNumber: lineNumber, columnNumber: columnNumber});
+        var breakpoint = this._breakpointForEditorLineInfo({lineNumber, columnNumber});
         console.assert(breakpoint);
         if (!breakpoint)
             return;
@@ -1282,7 +1282,7 @@ WebInspector.SourceCodeTextEditor.prototype = {
 
         var allRequests = [{
             typeInformationDescriptor: WebInspector.ScriptSyntaxTree.TypeProfilerSearchDescriptor.NormalExpression,
-            sourceID: sourceID,
+            sourceID,
             divot: offset
         }];
 
index 88513f3..d1c5627 100644 (file)
@@ -108,7 +108,7 @@ WebInspector.TextContentView.prototype = {
     get saveData()
     {
         var url = "web-inspector:///" + encodeURI(WebInspector.UIString("Untitled")) + ".txt";
-        return {url: url, content: this._textEditor.string, forceSaveAs: true};
+        return {url, content: this._textEditor.string, forceSaveAs: true};
     },
 
     get supportsSearch()
index 05d9300..92f3e9e 100644 (file)
@@ -673,7 +673,7 @@ WebInspector.TextEditor.prototype = {
             endOffset = this._codeMirror.getDoc().indexFromPos({line: visibleRange.to, ch: 0});
         }
 
-        return {startOffset: startOffset, endOffset: endOffset};
+        return {startOffset, endOffset};
     },
 
     originalOffsetToCurrentPosition: function(offset)
@@ -884,7 +884,7 @@ WebInspector.TextEditor.prototype = {
 
         var start = {line: textRange.startLine, ch: textRange.startColumn};
         var end = {line: textRange.endLine, ch: textRange.endColumn};
-        return {start: start, end: end};
+        return {start, end};
     },
 
     _revealPendingPositionIfPossible: function()
@@ -1260,7 +1260,7 @@ WebInspector.TextEditor.prototype = {
         if (this._delegate && typeof this._delegate.textEditorGutterContextMenu === "function") {
             var breakpoints = [];
             for (var columnNumber in this._breakpoints[lineNumber])
-                breakpoints.push({lineNumber:lineNumber, columnNumber:columnNumber});
+                breakpoints.push({lineNumbercolumnNumber});
 
             this._delegate.textEditorGutterContextMenu(this, lineNumber, 0, breakpoints, event);
         }
index 27f2cf3..74ca3d5 100644 (file)
@@ -367,7 +367,7 @@ WebInspector.TimelineDataGrid.prototype = {
         this._updateScopeBarForcedVisibility();
 
         var columnIdentifier = event.target.columnIdentifier;
-        this.dispatchEventToListeners(WebInspector.TimelineDataGrid.Event.FiltersDidChange, {columnIdentifier: columnIdentifier});
+        this.dispatchEventToListeners(WebInspector.TimelineDataGrid.Event.FiltersDidChange, {columnIdentifier});
     },
 
     _dataGridSelectedNodeChanged: function(event)