Changeset 189965 in webkit
- Timestamp:
- Sep 17, 2015, 11:04:41 PM (10 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r189964 r189965 1 2015-09-17 Joseph Pecoraro <pecoraro@apple.com> 2 3 Web Inspector: Simplify some functional callbacks 4 https://bugs.webkit.org/show_bug.cgi?id=149333 5 6 Reviewed by Brian Burg. 7 8 * UserInterface/Controllers/LogManager.js: 9 (WebInspector.LogManager.prototype.messageWasAdded): 10 * UserInterface/Models/Color.js: 11 (WebInspector.Color): 12 * UserInterface/Models/Geometry.js: 13 (WebInspector.CubicBezier.fromCoordinates): 14 * UserInterface/Models/ObjectPreview.js: 15 (WebInspector.ObjectPreview.fromPayload): 16 * UserInterface/Models/TypeDescription.js: 17 (WebInspector.TypeDescription.fromPayload): 18 * UserInterface/Protocol/RemoteObject.js: 19 (WebInspector.RemoteObject.prototype.getCollectionEntries): 20 (WebInspector.RemoteObject.prototype.getCollectionEntries.): Deleted. 21 * UserInterface/Views/TextEditor.js: 22 (WebInspector.TextEditor.prototype.get markers): 23 (WebInspector.TextEditor.prototype.markersAtPosition): 24 1 25 2015-09-17 Joseph Pecoraro <pecoraro@apple.com> 2 26 -
trunk/Source/WebInspectorUI/UserInterface/Controllers/LogManager.js
r186645 r189965 48 48 49 49 if (parameters) 50 parameters = parameters.map( function(x) { return WebInspector.RemoteObject.fromPayload(x); });50 parameters = parameters.map(WebInspector.RemoteObject.fromPayload); 51 51 52 52 var message = new WebInspector.ConsoleMessage(source, level, text, type, url, line, column, repeatCount, parameters, stackTrace, null); -
trunk/Source/WebInspectorUI/UserInterface/Models/Color.js
r182113 r189965 39 39 this._rgba = components; 40 40 41 this.valid = !components.some(function(component) { 42 return isNaN(component); 43 }); 41 this.valid = !components.some(isNaN); 44 42 } 45 43 -
trunk/Source/WebInspectorUI/UserInterface/Models/Geometry.js
r188028 r189965 350 350 return null; 351 351 352 coordinates = coordinates.map( (x) => Number(x));352 coordinates = coordinates.map(Number); 353 353 if (coordinates.includes(NaN)) 354 354 return null; -
trunk/Source/WebInspectorUI/UserInterface/Models/ObjectPreview.js
r183025 r189965 52 52 { 53 53 if (payload.properties) 54 payload.properties = payload.properties.map( function(property) { return WebInspector.PropertyPreview.fromPayload(property); });54 payload.properties = payload.properties.map(WebInspector.PropertyPreview.fromPayload); 55 55 if (payload.entries) 56 payload.entries = payload.entries.map( function(entry) { return WebInspector.CollectionEntryPreview.fromPayload(entry); });56 payload.entries = payload.entries.map(WebInspector.CollectionEntryPreview.fromPayload); 57 57 58 58 if (payload.subtype === "array") { -
trunk/Source/WebInspectorUI/UserInterface/Models/TypeDescription.js
r184736 r189965 52 52 var structures = undefined; 53 53 if (payload.structures) 54 structures = payload.structures.map( function(x) { return WebInspector.StructureDescription.fromPayload(x); });54 structures = payload.structures.map(WebInspector.StructureDescription.fromPayload); 55 55 56 56 return new WebInspector.TypeDescription(payload.leastCommonAncestor, typeSet, structures, payload.isValid, payload.isTruncated); -
trunk/Source/WebInspectorUI/UserInterface/Protocol/RemoteObject.js
r189373 r189965 392 392 393 393 RuntimeAgent.getCollectionEntries(this._objectId, objectGroup, start, numberToFetch, function(error, entries) { 394 entries = entries.map( function(entry) { return WebInspector.CollectionEntry.fromPayload(entry); });394 entries = entries.map(WebInspector.CollectionEntry.fromPayload); 395 395 callback(entries); 396 396 }); -
trunk/Source/WebInspectorUI/UserInterface/Views/TextEditor.js
r189872 r189965 621 621 get markers() 622 622 { 623 return this._codeMirror.getAllMarks().map(function(codeMirrorTextMarker) { 624 return WebInspector.TextMarker.textMarkerForCodeMirrorTextMarker(codeMirrorTextMarker); 625 }); 623 return this._codeMirror.getAllMarks().map(WebInspector.TextMarker.textMarkerForCodeMirrorTextMarker); 626 624 } 627 625 628 626 markersAtPosition(position) 629 627 { 630 return this._codeMirror.findMarksAt(position).map(function(codeMirrorTextMarker) { 631 return WebInspector.TextMarker.textMarkerForCodeMirrorTextMarker(codeMirrorTextMarker); 632 }); 628 return this._codeMirror.findMarksAt(position).map(WebInspector.TextMarker.textMarkerForCodeMirrorTextMarker); 633 629 } 634 630
Note:
See TracChangeset
for help on using the changeset viewer.