2f938ae52e7f170bd1282063b9f32f866a4e215b
[WebKit-https.git] / Source / WebInspectorUI / ChangeLog
1 2015-03-22  Matt Baker  <mattbaker@apple.com>
2
3         Web Inspector: Adopt ES6 Class Syntax for all Controller Objects
4         https://bugs.webkit.org/show_bug.cgi?id=142890
5
6         Reviewed by Joseph Pecoraro.
7
8         - Convert all UserInterface/Controllers objects to classes
9         - Convert constructor functions to constructor methods
10         - Convert "constructor.method" to class static methods where possible
11         - Convert all methods to method syntax, eliminate commas between methods
12         - Convert all superclass calls in classes to use "super"
13         - Removed FIXME from WebInspector.Object subclasses, added calls to super.
14         - Fixed strict mode issues now that classes enforce strict mode (see below).
15
16         * Tools/PrettyPrinting/Formatter.js:
17         * Tools/PrettyPrinting/FormatterContentBuilder.js:
18         Updated to match corresponding files in UserInterface/Controllers.
19
20         * UserInterface/Controllers/*.js:
21         Many files modified mostly mechanically (regex find-replace).
22
23         * UserInterface/Controllers/CodeMirrorCompletionController.js:
24         * UserInterface/Controllers/FormatterContentBuilder.js:
25         Replaced const usage with var. Use of const is prohibited in strict mode, which is implicit within a class.
26
27         * UserInterface/Controllers/CodeMirrorTokenTrackingController.js:
28         * UserInterface/Controllers/DOMTreeManager.js:
29         Moved function declarations out of if statements. Strict mode does not allow function declarations in a lexically nested statement.
30
31 2015-03-20  Nikita Vasilyev  <nvasilyev@apple.com>
32
33         Web Inspector: Fast typing lags in the Styles sidebar or Console
34         https://bugs.webkit.org/show_bug.cgi?id=142919
35
36         Asynchronous autocomplete causes a race condition in CodeMirror,
37         which results in skipped characters in while typing. Completing immediately
38         fixes the issues.
39
40         Reviewed by Timothy Hatcher.
41
42         * UserInterface/Controllers/CodeMirrorCompletionController.js:
43         (WebInspector.CodeMirrorCompletionController.prototype.hideCompletions):
44         (WebInspector.CodeMirrorCompletionController.prototype._completeAtCurrentPosition):
45         (WebInspector.CodeMirrorCompletionController.prototype.):
46
47 2015-03-19  Joseph Pecoraro  <pecoraro@apple.com>
48
49         Web Inspector: Adopt ES6 Class Syntax for all Model Objects
50         https://bugs.webkit.org/show_bug.cgi?id=142858
51
52         Reviewed by Timothy Hatcher.
53
54           - Convert WebInspector.Object to a class
55           - Convert all UserInterface/Models objects to classes
56           - Convert constructor functions to constructor methods
57           - Convert "constructor.method" to class static methods where possible
58           - Convert all methods to method syntax, eliminate commas between methods
59           - Convert all superclass calls in classes to use "super"
60           - Workaround <https://webkit.org/b/142862> and add empty constructors
61           - Added "deprecated" prefix to addConstructorFunctions, since it is not needed with classes
62           - Added many missing calls to super in constructors
63           - Added FIXME to WebInspector.Object subclasses not yet moved to classes.
64           - Cleaned up SourceMap global properties, moved to constructor instead of prototype
65           - Cleaned up Timeline factory constructor to static "create" factory method
66           - Fixed any style issues noticed in the mass edit
67           - Fixed strict mode issues now that classes enforce strict mode
68               - RunLoopTimelineRecord.js was missing a `var` for a local variable
69               - "const" is not allowed, converted to "var"
70               - "arguments.callee" is not allowed in strict mode
71
72         * UserInterface/**/*.js:
73         Many files modified mostly mechanically.
74
75 2015-03-19  Jono Wells  <jonowells@apple.com>
76
77         Web Inspector: Debugger sidebar header should say "Scripts" instead of "Breakpoints", appear only on pause
78         https://bugs.webkit.org/show_bug.cgi?id=142847
79
80         Reviewed by Timothy Hatcher.
81
82         Add a `paused` class on the debugger sidebar panel. Use that class to adjust the sidebar styles so that, when
83         the debugger is not paused: there is no header for the scripts section, there is no border beneath the scripts
84         section, and the scripts section cannot be collapsed (which could be done while the debugger is paused). The
85         header has changed to say "Scripts" instead of "Breakpoints" when it is showing.
86
87         * UserInterface/Views/DebuggerSidebarPanel.css:
88         (.sidebar > .panel.navigation.debugger .details-section.scripts):
89         (.sidebar > .panel.navigation.debugger .details-section.scripts .header):
90         (.sidebar > .panel.navigation.debugger .details-section.scripts.collapsed > .content):
91         (.sidebar > .panel.navigation.debugger.paused .details-section.scripts):
92         (.sidebar > .panel.navigation.debugger.paused .details-section.scripts .header):
93         (.sidebar > .panel.navigation.debugger.paused .details-section.scripts.collapsed > .content):
94         Adjust styles to hide header and border.
95
96         * UserInterface/Views/DebuggerSidebarPanel.js:
97         (WebInspector.DebuggerSidebarPanel):
98         (WebInspector.DebuggerSidebarPanel.prototype._debuggerDidPause):
99         (WebInspector.DebuggerSidebarPanel.prototype._debuggerDidResume):
100         Add a `paused` class to the debugger sidebar when it is paused.
101
102 2015-03-19  Jono Wells  <jonowells@apple.com>
103
104         Web Inspector: FilterBar for debugger sidebar hides breakpoints for displayed resources
105         https://bugs.webkit.org/show_bug.cgi?id=142777
106
107         Reviewed by Brian Burg.
108
109         Typing into the text input on the filter bar for the debugger sidebar no longer incorrectly hides the
110         breakpoints for scripts that match the text input.
111
112         * UserInterface/Views/BreakpointTreeElement.js:
113         (WebInspector.BreakpointTreeElement.prototype.get filterableData): Added.
114
115 2015-03-18  Joseph Pecoraro  <pecoraro@apple.com>
116
117         Web Inspector: Replace last use of ObjectPropertiesSection with ObjectTreeView
118         https://bugs.webkit.org/show_bug.cgi?id=142834
119
120         Reviewed by Timothy Hatcher.
121
122         * UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
123         (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshProperties):
124         Use properties only ObjectTreeView instead of ObjectPropertiesSection.
125         This doesn't fix the functionality issues, but fixes the appearance.
126
127         * UserInterface/Views/DetailsSection.css:
128         (.details-section > .content > .group:first-child > .row.simple:first-child > *): Deleted.
129         (body.mac-platform.legacy .details-section > .content > .group:first-child > .row.simple:first-child > *): Deleted.
130         (.details-section > .content > .group > .row.properties:not(.empty)): Deleted.
131         (body.mac-platform.legacy .details-section > .content > .group > .row.properties:not(.empty)): Deleted.
132         Re-add back the small padding at the top of sections. This actually
133         broke padding in a few sections (Event Listeners) at the expense
134         of eliminating a few pixels of whitespace at the top of other sections.
135         We should focus on addressing the extra whitespace separately.
136
137         * UserInterface/Main.html:
138         * UserInterface/Views/ObjectPropertiesSection.js: Removed.
139         * UserInterface/Views/TypePropertiesSection.js:
140         * WebInspectorUI.vcxproj/WebInspectorUI.vcxproj:
141         * WebInspectorUI.vcxproj/WebInspectorUI.vcxproj.filters:
142         Remove new unused class.
143
144 2015-03-18  Joseph Pecoraro  <pecoraro@apple.com>
145
146         Web Inspector: Debugger Popovers and Probes should use FormattedValue/ObjectTreeView instead of Custom/ObjectPropertiesSection
147         https://bugs.webkit.org/show_bug.cgi?id=142830
148
149         Reviewed by Timothy Hatcher.
150
151         * UserInterface/Views/ProbeSetDataGrid.css:
152         (.details-section.probe-set .data-grid .object-tree > :matches(.title, .object-preview)::before):
153         Another line-height fix for object tree disclosure triangles.
154
155         * UserInterface/Views/ProbeSetDataGridNode.js:
156         (WebInspector.ProbeSetDataGridNode.prototype.createCellContent):
157         Create an ObjectTree / FormattedValue for the RemoteObject.
158
159         * UserInterface/Views/SourceCodeTextEditor.css:
160         (.popover .debugger-popover-content > .title):
161         (.popover .debugger-popover-content > .body):
162         (.popover .debugger-popover-content.function > .body):
163         Be more specific and don't accidentally style ".title" within the body.
164
165         * UserInterface/Views/SourceCodeTextEditor.js:
166         (WebInspector.SourceCodeTextEditor.prototype._showPopoverForObject):
167         Show a properties only ObjectTree instead of an ObjectPropertiesSection.
168
169         (WebInspector.SourceCodeTextEditor.prototype._showPopoverForString): Deleted.
170         (WebInspector.SourceCodeTextEditor.prototype._showPopoverForRegExp): Deleted.
171         (WebInspector.SourceCodeTextEditor.prototype._showPopoverForNumber): Deleted.
172         (WebInspector.SourceCodeTextEditor.prototype._showPopoverForBoolean): Deleted.
173         (WebInspector.SourceCodeTextEditor.prototype._showPopoverForNull): Deleted.
174         (WebInspector.SourceCodeTextEditor.prototype._showPopoverForUndefined): Deleted.
175         (WebInspector.SourceCodeTextEditor.prototype._showPopoverWithFormattedValue):
176         Reduce most of these to a single popover for formatted values.
177
178 2015-03-18  Joseph Pecoraro  <pecoraro@apple.com>
179
180         Web Inspector: Scopes sidebar should use new ObjectTreeView and not ObjectPropertiesSection
181         https://bugs.webkit.org/show_bug.cgi?id=142808
182
183         Reviewed by Timothy Hatcher.
184
185         * UserInterface/Models/PropertyPath.js:
186         (WebInspector.PropertyPath):
187         (WebInspector.PropertyPath.emptyPropertyPathForScope):
188         Allow a special property empty path for "Scopes". This way for a
189         "<scopeObject>.property" we can show just the tooltip "property".
190
191         * UserInterface/Views/ObjectTreeView.css:
192         (.object-tree.properties-only > :matches(.title, .object-preview)):
193         (.object-tree.properties-only .object-tree-outline):
194         (.object-tree.properties-only .object-tree-property .property-name):
195         Tweak styles for only properties view, which won't have a top-level
196         preview and doesn't fade out enumerable properties.
197
198         * UserInterface/Views/ObjectTreeView.js:
199         (WebInspector.ObjectTreeView.prototype.get treeOutline):
200         Access the TreeOutline.
201
202         (WebInspector.ObjectTreeView.prototype.showOnlyProperties):
203         Properties only view modifies the display slightly.
204
205         (WebInspector.ObjectTreeView.prototype.appendExtraPropertyDescriptor):
206         (WebInspector.ObjectTreeView.prototype._updateProperties):
207         Allow the client to add its own property descriptors to display
208         as a property in this ObjectTreeView.
209
210         * UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
211         (WebInspector.ScopeChainDetailsSidebarPanel.prototype.refresh):
212         Switch to using an ObjectTreeView.
213
214         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._propertyPathIdentifierForTreeElement):
215         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._objectTreeAddHandler):
216         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._objectTreeExpandHandler):
217         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._objectTreeCollapseHandler):
218         Keep track of what properties were expanded so we can auto-expand
219         them again when the sidebar refreshes.
220
221         * UserInterface/Main.html:
222         * UserInterface/Views/ScopeVariableTreeElement.js: Removed.
223         * WebInspectorUI.vcxproj/WebInspectorUI.vcxproj:
224         * WebInspectorUI.vcxproj/WebInspectorUI.vcxproj.filters:
225         Remove the now unused ScopeVariableTreeElement.js.
226
227 2015-03-17  Joseph Pecoraro  <pecoraro@apple.com>
228
229         Web Inspector: Debugger Sidebar Icons Misaligned
230         https://bugs.webkit.org/show_bug.cgi?id=142654
231
232         Reviewed by Timothy Hatcher.
233
234         The debugger sidebar content was accidentally 1px too small. The
235         TreeOutline being inside of a .detail-section was getting a smaller
236         font-size. We should just have the normal font-size for the
237         debugger navigation sidebar. This matches the Resources sidebar
238         in the TreeOutline, and icons line up better.
239
240         * UserInterface/Views/DebuggerSidebarPanel.css:
241         (.sidebar > .panel.navigation.debugger .details-section):
242
243 2015-03-17  Tobias Reiss  <tobi+webkit@basecode.de>
244
245         Web Inspector: Removal of multiline completion hint broken in Details sidebar
246         https://bugs.webkit.org/show_bug.cgi?id=142796
247
248         Reviewed by Joseph Pecoraro.
249
250         Prioritize CodeMirrorCompletionController over CSSStyleDeclarationTextEditor.
251         Both classes control the current CodeMirror instance of the Details Sidebar.
252         This change prevents possible race conditions during complete or delete-complete phases,
253         especially during operations on multiple styles in one line.
254
255         * UserInterface/Views/CSSStyleDeclarationTextEditor.js:
256         (WebInspector.CSSStyleDeclarationTextEditor):
257
258 2015-03-17  Matt Baker  <mattbaker@apple.com>
259
260         Web Inspector: Show rendering frames (and FPS) in Layout and Rendering timeline
261         https://bugs.webkit.org/show_bug.cgi?id=142029
262
263         Reviewed by Timothy Hatcher.
264
265         Add UI for showing runloop records and their child records as a frame histogram,
266         with the recording time on the x-axis and the frame duration on the y-axis. Each frame
267         is comprised of colored regions representing the time spent in various activities (script,
268         layout, etc).
269
270         Eventually the Frames timeline will replace the Layout & Rendering timeline. Until the views
271         for the new timeline are finalized the Layout & Rendering timeline will remain in place.
272
273         * Localizations/en.lproj/localizedStrings.js:
274         * UserInterface/Main.html:
275         New string and files.
276
277         * UserInterface/Controllers/TimelineManager.js:
278         (WebInspector.TimelineManager.prototype.eventRecorded):
279         (WebInspector.TimelineManager.prototype.pageDidLoad):
280         (WebInspector.TimelineManager.prototype._processNestedRecords):
281         (WebInspector.TimelineManager.prototype._processRecord):
282         (WebInspector.TimelineManager.prototype._processEvent):
283         (WebInspector.TimelineManager.prototype._loadNewRecording):
284         (WebInspector.TimelineManager.prototype.eventRecorded.processRecord): Deleted.
285         Added support for new runloop record type and nested record handling.
286
287         * UserInterface/Images/Frames.png: Added.
288         * UserInterface/Images/Frames@2x.png: Added.
289         * UserInterface/Images/FramesLarge.png: Added.
290         * UserInterface/Images/FramesLarge@2x.png: Added.
291         New images for runloop timeline overview graph and runloop tree records.
292
293         * UserInterface/Models/RunLoopTimelineRecord.js: Added.
294         (WebInspector.RunLoopTimelineRecord):
295         (WebInspector.RunLoopTimelineRecord.prototype.get children):
296         (WebInspector.RunLoopTimelineRecord.prototype.get durationRemainder):
297         (WebInspector.RunLoopTimelineRecord.prototype.durationForRecords.get var):
298         Extends TimelineRecord to add child records and subframe duration details.
299
300         * UserInterface/Models/Timeline.js:
301         (WebInspector.Timeline.prototype.get displayName):
302         (WebInspector.Timeline.prototype.get iconClassName):
303         New UI strings and icons.
304
305         * UserInterface/Models/TimelineRecord.js:
306         * UserInterface/Views/ContentView.js:
307         (WebInspector.ContentView):
308         * UserInterface/Views/LayoutTimelineView.js:
309         (WebInspector.LayoutTimelineView.prototype._layoutTimelineRecordAdded):
310         * UserInterface/Views/TimelineRecordTreeElement.js:
311         (WebInspector.TimelineRecordTreeElement):
312         Added support for new runloop record type.
313
314         * UserInterface/Views/RunLoopTimelineOverviewGraph.css: Added.
315         (.timeline-overview-graph.runloop > .divider):
316         (.timeline-overview-graph.runloop > .divider > span):
317         New styles for runloop timeline graph.
318
319         * UserInterface/Views/RunLoopTimelineOverviewGraph.js: Added.
320         (WebInspector.RunLoopTimelineOverviewGraph):
321         (WebInspector.RunLoopTimelineOverviewGraph.prototype.updateLayout.createFrame):
322         (WebInspector.RunLoopTimelineOverviewGraph.prototype.get graphHeightSeconds.this):
323         (WebInspector.RunLoopTimelineOverviewGraph.prototype.get graphHeightSeconds):
324         (WebInspector.RunLoopTimelineOverviewGraph.prototype._updateDividers.createDividerAtPosition.get if):
325         New overview graph for displaying TimelineRecordFrames and horizontal frame budget dividers.
326
327         * UserInterface/Views/TimelineIcons.css:
328         (.runloop-icon .icon):
329         (.runloop-icon.large .icon):
330         (.runloop-record .icon):
331         * UserInterface/Views/TimelineSidebarPanel.js:
332         New runloop icon styles.
333
334         * UserInterface/Views/TimelineOverviewGraph.js:
335         (WebInspector.TimelineOverviewGraph):
336         Updated factory to support creation of the new overview graph.
337
338         * UserInterface/Views/TimelineRecordFrame.css: Added.
339         (.timeline-record-frame):
340         (.timeline-record-frame > .frame):
341         (.timeline-record-frame > .dropped):
342         (.timeline-record-frame > .frame > .duration):
343         (.timeline-record-frame > .frame > .duration:first-child):
344         (.timeline-record-frame > .frame > .duration:last-child):
345         (.timeline-record-frame > .frame > .duration.timeline-record-type-network):
346         (.timeline-record-frame > .frame > .duration.timeline-record-type-layout):
347         (.timeline-record-frame > .frame > .duration.timeline-record-type-script):
348         New styles for frame bars in the runloop timeline graph.
349
350         * UserInterface/Views/TimelineRecordFrame.js: Added.
351         (WebInspector.TimelineRecordFrame):
352         (WebInspector.TimelineRecordFrame.createCombinedFrames):
353         (WebInspector.TimelineRecordFrame.prototype.get element):
354         (WebInspector.TimelineRecordFrame.prototype.get duration):
355         (WebInspector.TimelineRecordFrame.prototype.get records):
356         (WebInspector.TimelineRecordFrame.prototype.set records):
357         (WebInspector.TimelineRecordFrame.prototype._updateChildElements.createDurationElement):
358         New view representing a single frame within the runloop overview graph.
359
360         * WebInspectorUI.vcxproj/WebInspectorUI.vcxproj:
361         * WebInspectorUI.vcxproj/WebInspectorUI.vcxproj.filters:
362         New files.
363
364 2015-03-16  Joseph Pecoraro  <pecoraro@apple.com>
365
366         Web Inspector: Add more DOM Native Function parameter strings
367         https://bugs.webkit.org/show_bug.cgi?id=142760
368
369         Reviewed by Timothy Hatcher.
370
371         * UserInterface/Models/NativeFunctionParameters.js:
372         Add native parameter strings generated and hand modified
373         for DOM built-in classes.
374
375         * UserInterface/Views/ObjectTreePropertyTreeElement.js:
376         For native constructors "FooConstructor" the description is just
377         the name of the Constructor not the function string.
378
379 2015-03-16  Joseph Pecoraro  <pecoraro@apple.com>
380
381         Web Inspector: Object Previews in Indexed DB tables
382         https://bugs.webkit.org/show_bug.cgi?id=140813
383
384         Reviewed by Timothy Hatcher.
385
386         * UserInterface/Views/FormattedValue.js:
387         (WebInspector.FormattedValue.createObjectTreeOrFormattedValueForRemoteObject):
388         Add a boolean param for ObjectTree construction if it should force allowing object expansion.
389
390         * UserInterface/Views/IndexedDatabaseEntryDataGridNode.js:
391         (WebInspector.IndexedDatabaseEntryDataGridNode.prototype.createCellContent):
392         Switch to creating an ObjectTree or FormattedValue.
393
394         * UserInterface/Views/IndexedDatabaseObjectStoreContentView.css:
395         (.content-view.indexed-database-object-store > .data-grid tr.selected):
396         Change row selection color to match the console's lighter blue instead of dark blue.
397
398         (.content-view.indexed-database-object-store > .data-grid .object-tree > :matches(.title, .object-preview)::before):
399         Adjust object tree disclosure triangle placement for larger line heights.
400
401         (.content-view.indexed-database-object-store > .data-grid td .section .header): Deleted.
402         (.content-view.indexed-database-object-store > .data-grid td .section .header::before): Deleted.
403         (.content-view.indexed-database-object-store > .data-grid td .section .header .title): Deleted.
404         (.content-view.indexed-database-object-store > .data-grid:focus tr.selected td .section .header::before): Deleted.
405         (.content-view.indexed-database-object-store > .data-grid:focus tr.selected td .section.expanded .header::before): Deleted.
406         (.content-view.indexed-database-object-store > .data-grid:focus tr.selected td .properties-tree li.parent::before): Deleted.
407         (.content-view.indexed-database-object-store > .data-grid:focus tr.selected td .properties-tree li.parent.expanded::before): Deleted.
408         (.content-view.indexed-database-object-store > .data-grid:focus tr.selected td .properties-tree li *): Deleted.
409         Remove now unnecessary styles.
410
411         * UserInterface/Views/ObjectTreeArrayIndexTreeElement.css:
412         (.object-tree .object-tree-array-index > .icon):
413         Increase the specificity to override ".data-grid td .icon" styles.
414
415 2015-03-16  Joseph Pecoraro  <pecoraro@apple.com>
416
417         Web Inspector: Better Console Previews for Arrays / Small Objects
418         https://bugs.webkit.org/show_bug.cgi?id=142322
419
420         Reviewed by Timothy Hatcher.
421
422         * UserInterface/Views/ObjectPreviewView.js:
423         If there is a sub-preview, show the sub-preview.
424
425         * UserInterface/Views/ObjectTreeView.js:
426         (WebInspector.ObjectTreeView):
427         For an ObjectTree that is not a root (e.g. one inside of
428         an array/set/map property tree element) allow it to be
429         expanded even if the preview is lossless.
430
431 2015-03-16  Nikita Vasilyev  <nvasilyev@apple.com>
432
433         Web Inspector: Rename ConsoleMessage and ConsoleMessageImpl to LegacyConsoleMessage and LegacyConsoleMessageImpl respectively
434         https://bugs.webkit.org/show_bug.cgi?id=142712
435
436         As a first step of ConsoleMessage refactoring (https://bugs.webkit.org/show_bug.cgi?id=142599):
437
438           - Rename WebInspector.ConsoleMessage class to WebInspector.LegacyConsoleMessage
439           - Rename WebInspector.ConsoleMessageImpl class to WebInspector.LegacyConsoleMessageImpl
440           - Rename ConsoleMessage.js file to LegacyConsoleMessage.js
441           - Rename ConsoleMessageImpl file to LegacyConsoleMessageImpl.js
442
443         Reviewed by Joseph Pecoraro.
444
445         * UserInterface/Controllers/JavaScriptLogViewController.js:
446         (WebInspector.JavaScriptLogViewController.prototype._appendConsoleMessage):
447         * UserInterface/Controllers/LogManager.js:
448         (WebInspector.LogManager.prototype.messageWasAdded):
449         * UserInterface/Main.html:
450         * UserInterface/Models/DefaultDashboard.js:
451         (WebInspector.DefaultDashboard.prototype._incrementConsoleMessageType):
452         * UserInterface/Views/ConsoleCommandResult.js:
453         (WebInspector.ConsoleCommandResult):
454         (WebInspector.ConsoleCommandResult.prototype.toMessageElement):
455         * UserInterface/Views/ConsoleGroup.js:
456         (WebInspector.ConsoleGroup.prototype.render):
457         * UserInterface/Views/LegacyConsoleMessage.js: Renamed from Source/WebInspectorUI/UserInterface/Views/ConsoleMessage.js.
458         (WebInspector.LegacyConsoleMessage):
459         (WebInspector.LegacyConsoleMessage.prototype.isErrorOrWarning):
460         (WebInspector.LegacyConsoleMessage.prototype.updateRepeatCount):
461         (WebInspector.LegacyConsoleMessage.prototype.clone):
462         (WebInspector.LegacyConsoleMessage.create):
463         * UserInterface/Views/LegacyConsoleMessageImpl.js: Renamed from Source/WebInspectorUI/UserInterface/Views/ConsoleMessageImpl.js.
464         (WebInspector.LegacyConsoleMessageImpl):
465         (WebInspector.LegacyConsoleMessageImpl.prototype._formatMessage):
466         (WebInspector.LegacyConsoleMessageImpl.prototype._shouldDumpStackTrace):
467         (WebInspector.LegacyConsoleMessageImpl.prototype._shouldHideURL):
468         (WebInspector.LegacyConsoleMessageImpl.prototype._firstNonNativeCallFrame):
469         (WebInspector.LegacyConsoleMessageImpl.prototype.get message):
470         (WebInspector.LegacyConsoleMessageImpl.prototype.get formattedMessage):
471         (WebInspector.LegacyConsoleMessageImpl.prototype._linkifyLocation):
472         (WebInspector.LegacyConsoleMessageImpl.prototype._linkifyCallFrame):
473         (WebInspector.LegacyConsoleMessageImpl.prototype.isErrorOrWarning):
474         (WebInspector.LegacyConsoleMessageImpl.prototype._format):
475         (WebInspector.LegacyConsoleMessageImpl.prototype._isExpandable):
476         (WebInspector.LegacyConsoleMessageImpl.prototype._formatParameter):
477         (WebInspector.LegacyConsoleMessageImpl.prototype._formatParameterAsValue):
478         (WebInspector.LegacyConsoleMessageImpl.prototype._formatParameterAsObject):
479         (WebInspector.LegacyConsoleMessageImpl.prototype._formatParameterAsString):
480         (WebInspector.LegacyConsoleMessageImpl.prototype._formatParameterAsNode):
481         (WebInspector.LegacyConsoleMessageImpl.prototype._formatParameterAsArray):
482         (WebInspector.LegacyConsoleMessageImpl.prototype._rootPropertyPathForObject):
483         (WebInspector.LegacyConsoleMessageImpl.prototype._userProvidedColumnNames):
484         (WebInspector.LegacyConsoleMessageImpl.prototype._formatParameterAsTable):
485         (WebInspector.LegacyConsoleMessageImpl.prototype.):
486         (WebInspector.LegacyConsoleMessageImpl.prototype.stringFormatter):
487         (WebInspector.LegacyConsoleMessageImpl.prototype.floatFormatter):
488         (WebInspector.LegacyConsoleMessageImpl.prototype.integerFormatter):
489         (WebInspector.LegacyConsoleMessageImpl.prototype.styleFormatter):
490         (WebInspector.LegacyConsoleMessageImpl.prototype.isWhitelistedProperty):
491         (WebInspector.LegacyConsoleMessageImpl.prototype.append):
492         (WebInspector.LegacyConsoleMessageImpl.prototype._formatWithSubstitutionString):
493         (WebInspector.LegacyConsoleMessageImpl.prototype.decorateMessageElement):
494         (WebInspector.LegacyConsoleMessageImpl.prototype.toMessageElement):
495         (WebInspector.LegacyConsoleMessageImpl.prototype._populateStackTraceTreeElement):
496         (WebInspector.LegacyConsoleMessageImpl.prototype.updateRepeatCount):
497         (WebInspector.LegacyConsoleMessageImpl.prototype.toString):
498         (WebInspector.LegacyConsoleMessageImpl.prototype.get text):
499         (WebInspector.LegacyConsoleMessageImpl.prototype.isEqual):
500         (WebInspector.LegacyConsoleMessageImpl.prototype.get stackTrace):
501         (WebInspector.LegacyConsoleMessageImpl.prototype.clone):
502         (WebInspector.LegacyConsoleMessageImpl.prototype.get levelString):
503         (WebInspector.LegacyConsoleMessageImpl.prototype.get clipboardPrefixString):
504         (WebInspector.LegacyConsoleMessageImpl.prototype.toClipboardString):
505         * UserInterface/Views/LogContentView.js:
506         (WebInspector.LogContentView.prototype.didAppendConsoleMessage):
507         (WebInspector.LogContentView.prototype._messageAdded):
508         (WebInspector.LogContentView.prototype._filterMessages):
509         (WebInspector.LogContentView.prototype._reappendProvisionalMessages):
510         * WebInspectorUI.vcxproj/WebInspectorUI.vcxproj:
511         * WebInspectorUI.vcxproj/WebInspectorUI.vcxproj.filters:
512
513 2015-03-16  Commit Queue  <commit-queue@webkit.org>
514
515         Unreviewed, rolling out r181517.
516         https://bugs.webkit.org/show_bug.cgi?id=142718
517
518         This patch broke GTK+ build (Requested by NVI on #webkit).
519
520         Reverted changeset:
521
522         "Web Inspector: Rename ConsoleMessage and ConsoleMessageImpl
523         to LegacyConsoleMessage and LegacyConsoleMessageImpl
524         respectively"
525         https://bugs.webkit.org/show_bug.cgi?id=142712
526         http://trac.webkit.org/changeset/181517
527
528 2015-03-15  Nikita Vasilyev  <nvasilyev@apple.com>
529
530         Web Inspector: Console Scrolls Unexpectedly when Clicking inside un-selected Expanding Object
531         https://bugs.webkit.org/show_bug.cgi?id=142655
532
533         Don't scroll when selection change is triggered by clicking, e.g.
534         only scroll on arrow up and down key press events.
535
536         Reviewed by Joseph Pecoraro.
537
538         * UserInterface/Views/LogContentView.js:
539         (WebInspector.LogContentView.prototype._mousemove):
540         (WebInspector.LogContentView.prototype._updateMessagesSelection):
541         (WebInspector.LogContentView.prototype._upArrowWasPressed):
542         (WebInspector.LogContentView.prototype._downArrowWasPressed):
543
544 2015-03-15  Nikita Vasilyev  <nvasilyev@apple.com>
545
546         Web Inspector: Rename ConsoleMessage and ConsoleMessageImpl to LegacyConsoleMessage and LegacyConsoleMessageImpl respectively
547         https://bugs.webkit.org/show_bug.cgi?id=142712
548
549         As a first step of ConsoleMessage refactoring (https://bugs.webkit.org/show_bug.cgi?id=142599):
550
551           - Rename WebInspector.ConsoleMessage class to WebInspector.LegacyConsoleMessage
552           - Rename WebInspector.ConsoleMessageImpl class to WebInspector.LegacyConsoleMessageImpl
553           - Rename ConsoleMessage.js file to LegacyConsoleMessage.js
554           - Rename ConsoleMessageImpl file to LegacyConsoleMessageImpl.js
555
556         Reviewed by Joseph Pecoraro.
557
558         * UserInterface/Controllers/JavaScriptLogViewController.js:
559         (WebInspector.JavaScriptLogViewController.prototype._appendConsoleMessage):
560         * UserInterface/Controllers/LogManager.js:
561         (WebInspector.LogManager.prototype.messageWasAdded):
562         * UserInterface/Main.html:
563         * UserInterface/Models/DefaultDashboard.js:
564         (WebInspector.DefaultDashboard.prototype._incrementConsoleMessageType):
565         * UserInterface/Views/ConsoleCommandResult.js:
566         (WebInspector.ConsoleCommandResult):
567         (WebInspector.ConsoleCommandResult.prototype.toMessageElement):
568         * UserInterface/Views/ConsoleGroup.js:
569         (WebInspector.ConsoleGroup.prototype.render):
570         * UserInterface/Views/LegacyConsoleMessage.js: Renamed from Source/WebInspectorUI/UserInterface/Views/ConsoleMessage.js.
571         (WebInspector.LegacyConsoleMessage):
572         (WebInspector.LegacyConsoleMessage.prototype.isErrorOrWarning):
573         (WebInspector.LegacyConsoleMessage.prototype.updateRepeatCount):
574         (WebInspector.LegacyConsoleMessage.prototype.clone):
575         (WebInspector.LegacyConsoleMessage.create):
576         * UserInterface/Views/LegacyConsoleMessageImpl.js: Renamed from Source/WebInspectorUI/UserInterface/Views/ConsoleMessageImpl.js.
577         (WebInspector.LegacyConsoleMessageImpl):
578         (WebInspector.LegacyConsoleMessageImpl.prototype._formatMessage):
579         (WebInspector.LegacyConsoleMessageImpl.prototype._shouldDumpStackTrace):
580         (WebInspector.LegacyConsoleMessageImpl.prototype._shouldHideURL):
581         (WebInspector.LegacyConsoleMessageImpl.prototype._firstNonNativeCallFrame):
582         (WebInspector.LegacyConsoleMessageImpl.prototype.get message):
583         (WebInspector.LegacyConsoleMessageImpl.prototype.get formattedMessage):
584         (WebInspector.LegacyConsoleMessageImpl.prototype._linkifyLocation):
585         (WebInspector.LegacyConsoleMessageImpl.prototype._linkifyCallFrame):
586         (WebInspector.LegacyConsoleMessageImpl.prototype.isErrorOrWarning):
587         (WebInspector.LegacyConsoleMessageImpl.prototype._format):
588         (WebInspector.LegacyConsoleMessageImpl.prototype._isExpandable):
589         (WebInspector.LegacyConsoleMessageImpl.prototype._formatParameter):
590         (WebInspector.LegacyConsoleMessageImpl.prototype._formatParameterAsValue):
591         (WebInspector.LegacyConsoleMessageImpl.prototype._formatParameterAsObject):
592         (WebInspector.LegacyConsoleMessageImpl.prototype._formatParameterAsString):
593         (WebInspector.LegacyConsoleMessageImpl.prototype._formatParameterAsNode):
594         (WebInspector.LegacyConsoleMessageImpl.prototype._formatParameterAsArray):
595         (WebInspector.LegacyConsoleMessageImpl.prototype._rootPropertyPathForObject):
596         (WebInspector.LegacyConsoleMessageImpl.prototype._userProvidedColumnNames):
597         (WebInspector.LegacyConsoleMessageImpl.prototype._formatParameterAsTable):
598         (WebInspector.LegacyConsoleMessageImpl.prototype.):
599         (WebInspector.LegacyConsoleMessageImpl.prototype.stringFormatter):
600         (WebInspector.LegacyConsoleMessageImpl.prototype.floatFormatter):
601         (WebInspector.LegacyConsoleMessageImpl.prototype.integerFormatter):
602         (WebInspector.LegacyConsoleMessageImpl.prototype.styleFormatter):
603         (WebInspector.LegacyConsoleMessageImpl.prototype.isWhitelistedProperty):
604         (WebInspector.LegacyConsoleMessageImpl.prototype.append):
605         (WebInspector.LegacyConsoleMessageImpl.prototype._formatWithSubstitutionString):
606         (WebInspector.LegacyConsoleMessageImpl.prototype.decorateMessageElement):
607         (WebInspector.LegacyConsoleMessageImpl.prototype.toMessageElement):
608         (WebInspector.LegacyConsoleMessageImpl.prototype._populateStackTraceTreeElement):
609         (WebInspector.LegacyConsoleMessageImpl.prototype.updateRepeatCount):
610         (WebInspector.LegacyConsoleMessageImpl.prototype.toString):
611         (WebInspector.LegacyConsoleMessageImpl.prototype.get text):
612         (WebInspector.LegacyConsoleMessageImpl.prototype.isEqual):
613         (WebInspector.LegacyConsoleMessageImpl.prototype.get stackTrace):
614         (WebInspector.LegacyConsoleMessageImpl.prototype.clone):
615         (WebInspector.LegacyConsoleMessageImpl.prototype.get levelString):
616         (WebInspector.LegacyConsoleMessageImpl.prototype.get clipboardPrefixString):
617         (WebInspector.LegacyConsoleMessageImpl.prototype.toClipboardString):
618         * UserInterface/Views/LogContentView.js:
619         (WebInspector.LogContentView.prototype.didAppendConsoleMessage):
620         (WebInspector.LogContentView.prototype._messageAdded):
621         (WebInspector.LogContentView.prototype._filterMessages):
622         (WebInspector.LogContentView.prototype._reappendProvisionalMessages):
623         * WebInspectorUI.vcxproj/WebInspectorUI.vcxproj:
624         * WebInspectorUI.vcxproj/WebInspectorUI.vcxproj.filters:
625
626 2015-03-12  Jono Wells  <jonowells@apple.com>
627
628         Web Inspector: Debugger sidebar should group global breakpoints together
629         https://bugs.webkit.org/show_bug.cgi?id=142607
630
631         Reviewed by Timothy Hatcher.
632
633         Update the DebuggerSidebarPanel class to hold global breakpoints such as "All Exceptions" in one container. This
634         will be the place future such breakpoints are added.
635
636         * Localizations/en.lproj/localizedStrings.js: Added string.
637         * UserInterface/Main.html: Small rearrangement.
638
639         * UserInterface/Views/DebuggerSidebarPanel.js: Change how exception breaking options are displayed.
640         (WebInspector.DebuggerSidebarPanel):
641         (WebInspector.DebuggerSidebarPanel.prototype._treeElementSelected):
642         (WebInspector.DebuggerSidebarPanel.prototype._compareTopLevelTreeElements):
643
644         * UserInterface/Views/FolderTreeElement.js: Support additional classes for icons.
645         * UserInterface/Views/ResourceSidebarPanel.js: Change call to FolderTreeElement constructor.
646
647 2015-03-12  Joseph Pecoraro  <pecoraro@apple.com>
648
649         Web Inspector: Console Errors during provisional document loads get lost with "Clear Log on Reload"
650         https://bugs.webkit.org/show_bug.cgi?id=142603
651
652         Reviewed by Timothy Hatcher.
653
654         * UserInterface/Views/LogContentView.js:
655         (WebInspector.LogContentView.prototype._messageAdded):
656         (WebInspector.LogContentView.prototype._provisionalLoadStarted):
657         Detect a provisional load has started to start save messages that come in at this time.
658
659         (WebInspector.LogContentView.prototype._sessionStarted):
660         Reappend provisional load messages if we auto-cleared.
661
662         (WebInspector.LogContentView.prototype._reappendProvisionalMessages):
663         (WebInspector.LogContentView.prototype._clearProvisionalState):
664         Helpers for dealing with the provisional loading state.
665
666 2015-03-11  Joseph Pecoraro  <pecoraro@apple.com>
667
668         Web Inspector: CSS parser errors in the console should include column numbers
669         https://bugs.webkit.org/show_bug.cgi?id=114313
670
671         Reviewed by Darin Adler.
672
673         * UserInterface/Views/ConsoleMessageImpl.js:
674         (WebInspector.ConsoleMessageImpl.prototype._linkifyLocation):
675         Column numbers in console messages are also 1 based and should be adjusted.
676
677 2015-03-11  Commit Queue  <commit-queue@webkit.org>
678
679         Unreviewed, rolling out r181367.
680         https://bugs.webkit.org/show_bug.cgi?id=142581
681
682         Caused crashes on the debug bots (Requested by cdumez on
683         #webkit).
684
685         Reverted changeset:
686
687         "Web Inspector: CSS parser errors in the console should
688         include column numbers"
689         https://bugs.webkit.org/show_bug.cgi?id=114313
690         http://trac.webkit.org/changeset/181367
691
692 2015-03-11  Joseph Pecoraro  <pecoraro@apple.com>
693
694         Web Inspector: Reload after Global Search results in empty Resources Sidebar.
695         https://bugs.webkit.org/show_bug.cgi?id=142572
696
697         Reviewed by Timothy Hatcher.
698
699         If you reload when the search content tree outline is showing, break out
700         to show the resource tree outline.
701
702         * UserInterface/Views/ResourceSidebarPanel.js:
703         (WebInspector.ResourceSidebarPanel.prototype._showResourcesContentTreeOutline):
704         (WebInspector.ResourceSidebarPanel.prototype._showSearchContentTreeOutline):
705
706 2015-03-11  Joseph Pecoraro  <pecoraro@apple.com>
707
708         Web Inspector: SearchResultTreeElement.representedObject is missing a saveIdentityToCookie implementation
709         https://bugs.webkit.org/show_bug.cgi?id=134698
710
711         Reviewed by Timothy Hatcher.
712
713         This will restore selection of a global search tree element if you
714         close and reopen the inspector in such a case.
715
716         * UserInterface/Models/DOMSearchMatchObject.js:
717         (WebInspector.DOMSearchMatchObject.prototype.get resource):
718         (WebInspector.DOMSearchMatchObject.titleForDOMNode):
719         Cookie has the resource URL, DOM Node title, and text range.
720
721         * UserInterface/Models/SourceCodeSearchMatchObject.js:
722         (WebInspector.SourceCodeSearchMatchObject.prototype.get sourceCodeTextRange):
723         Cookie has the source code URL and text range.
724
725 2015-03-10  Joseph Pecoraro  <pecoraro@apple.com>
726
727         Web Inspector: CSS parser errors in the console should include column numbers
728         https://bugs.webkit.org/show_bug.cgi?id=114313
729
730         Reviewed by Benjamin Poulain.
731
732         * UserInterface/Views/ConsoleMessageImpl.js:
733         (WebInspector.ConsoleMessageImpl.prototype._linkifyLocation):
734         Column numbers in console messages are also 1 based and should be adjusted.
735
736 2015-03-10  Joseph Pecoraro  <pecoraro@apple.com>
737
738         Web Inspector: console.error output broken, does not produce ObjectTree
739         https://bugs.webkit.org/show_bug.cgi?id=142554
740
741         Reviewed by Timothy Hatcher.
742
743         * UserInterface/Models/IssueMessage.js:
744         (WebInspector.IssueMessage):
745         * UserInterface/Protocol/ConsoleObserver.js:
746         (WebInspector.ConsoleObserver.prototype.messageAdded):
747
748 2015-03-10  Saam Barati  <saambarati1@gmail.com>
749
750         Web Inspector: Destructuring function parameters should show type information
751         https://bugs.webkit.org/show_bug.cgi?id=142233
752
753         Reviewed by Joseph Pecoraro.
754
755         JSC supports a function's formal parameter being a destructuring pattern, 
756         and so should the type profiler in the Inspector. This was just an oversight 
757         not to have this in bug 141215.
758
759         This patch also does a bit of refactoring to not have duplicate code
760         that traverses AST nodes in TypeTokenAnnotator and ScriptSyntaxTree.
761         Before, both of these classes were responsible for traversing the AST
762         in an identical way, this is bad. Now, ScriptSyntaxTree contains the
763         canonical implementation of how the AST should be traversed and which
764         AST nodes should be collected for type profiling. ScriptSyntaxTree will
765         pass this information back to TypeTokenAnnotator.
766
767         * UserInterface/Controllers/TypeTokenAnnotator.js:
768         (WebInspector.TypeTokenAnnotator.prototype._insertTypeToken):
769         (WebInspector.TypeTokenAnnotator.prototype._insertTypeTokensForEachNode): Deleted.
770         * UserInterface/Models/ScriptSyntaxTree.js:
771         (WebInspector.ScriptSyntaxTree.prototype.):
772         (WebInspector.ScriptSyntaxTree.prototype.updateTypes):
773         (WebInspector.ScriptSyntaxTree.prototype._gatherIdentifiersInDeclaration):
774         (WebInspector.ScriptSyntaxTree.prototype.gatherIdentifiersInVariableDeclaration): Deleted.
775
776 2015-03-09  Joseph Pecoraro  <pecoraro@apple.com>
777
778         Web Inspector: Inline Error / Warning message for Issues
779         https://bugs.webkit.org/show_bug.cgi?id=142520
780
781         Reviewed by Timothy Hatcher.
782
783         * Localizations/en.lproj/localizedStrings.js:
784         * UserInterface/Main.html:
785         New strings and new files.
786
787         * UserInterface/Controllers/IssueManager.js:
788         (WebInspector.IssueManager.prototype.issueWasAdded):
789         * UserInterface/Models/IssueMessage.js:
790         (WebInspector.IssueMessage):
791         (WebInspector.IssueMessage.prototype.get columnNumber):
792         * UserInterface/Protocol/ConsoleObserver.js:
793         (WebInspector.ConsoleObserver.prototype.messageAdded):
794         Correctly pass the column number into IssueMessage.
795
796         * UserInterface/Models/LineWidget.js:
797         (WebInspector.LineWidget):
798         (WebInspector.LineWidget.prototype.get codeMirrorLineWidget):
799         (WebInspector.LineWidget.prototype.get widgetElement):
800         Create a new Model class for a LineWidget. The root element
801         should never change, but its children can be updated.
802
803         * UserInterface/Views/SourceCodeTextEditor.css:
804         (.source-code.text-editor .CodeMirror-linewidget):
805         Override styles so that widgets can overlap line content.
806
807         (.source-code.text-editor > .CodeMirror .issue-widget):
808         (.source-code.text-editor > .CodeMirror .issue-widget.inline):
809         Float issue widgets to the right side of the editor.
810
811         (.source-code.text-editor > .CodeMirror .issue-widget > .arrow):
812         (.source-code.text-editor > .CodeMirror .issue-widget.inline > .arrow):
813         Pure CSS arrow for widgets on the same line as their issue.
814
815         (.source-code.text-editor > .CodeMirror .issue-widget > .icon):
816         (.source-code.text-editor > .CodeMirror .issue-widget > .icon.icon-warning):
817         (.source-code.text-editor > .CodeMirror .issue-widget > .icon.icon-error):
818         Issue icon styles for the different issue types.
819
820         (.source-code.text-editor > .CodeMirror .issue-widget.warning):
821         (.source-code.text-editor > .CodeMirror .issue-widget.inline.warning):
822         (.source-code.text-editor > .CodeMirror .issue-widget.inline.warning > .arrow):
823         (.source-code.text-editor > .CodeMirror .issue-widget.error):
824         (.source-code.text-editor > .CodeMirror .issue-widget.inline.error):
825         (.source-code.text-editor > .CodeMirror .issue-widget.inline.error > .arrow):
826         Different colors for the different issue types.
827
828         (.source-code.text-editor > .CodeMirror .issue-widget > .text):
829         (.source-code.text-editor > .CodeMirror .issue-widget.inline > .text):
830         Text positioning when on the same line or when expanded.
831
832         * UserInterface/Views/SourceCodeTextEditor.js:
833         (WebInspector.SourceCodeTextEditor.prototype._addIssue):
834         (WebInspector.SourceCodeTextEditor.prototype._iconClassNameForIssueLevel):
835         (WebInspector.SourceCodeTextEditor.prototype._updateIssueWidgetForIssues):
836         (WebInspector.SourceCodeTextEditor.prototype._isWidgetToggleable):
837         (WebInspector.SourceCodeTextEditor.prototype._handleWidgetClick):
838         Create widgets for issues.
839
840         (WebInspector.SourceCodeTextEditor.prototype._contentDidPopulate):
841         (WebInspector.SourceCodeTextEditor.prototype.textEditorUpdatedFormatting):
842         (WebInspector.SourceCodeTextEditor.prototype._clearWidgets):
843         (WebInspector.SourceCodeTextEditor.prototype._reinsertAllIssues):
844         Update all widgets in certain cases.
845
846         * UserInterface/Views/TextEditor.js:
847         (WebInspector.TextEditor.prototype.addStyleClassToLine):
848         This assertion is known to happen for issues added to an editor
849         before the content has loaded.
850
851         (WebInspector.TextEditor.prototype.createWidgetForLine):
852         Create a widget for a line.
853
854 2015-03-06  Joseph Pecoraro  <pecoraro@apple.com>
855
856         Web Inspector: JS Pretty Printing: "case" or "default" outside of switch causes unbalanced indentation
857         https://bugs.webkit.org/show_bug.cgi?id=142428
858
859         Reviewed by Timothy Hatcher.
860
861         * Tools/PrettyPrinting/CodeMirrorFormatters.js:
862         * UserInterface/Views/CodeMirrorFormatters.js:
863         Fix "case" and "default" indentation rules to only happen inside a switch.
864
865         * Tools/PrettyPrinting/js-tests/switch-case-default-expected.js:
866         * Tools/PrettyPrinting/js-tests/switch-case-default.js:
867         Add tests for "case" and "default" nested inside and outside of switches.
868
869 2015-03-06  Joseph Pecoraro  <pecoraro@apple.com>
870
871         Web Inspector: ES6: Improved Support for Iterator Objects
872         https://bugs.webkit.org/show_bug.cgi?id=142420
873
874         Reviewed by Timothy Hatcher.
875
876         * UserInterface/Views/ConsoleMessageImpl.js:
877         (WebInspector.ConsoleMessageImpl):
878         Treat an iterator like an object.
879
880         * UserInterface/Views/ObjectPreviewView.js:
881         Output iterator previews with []s, not {}s.
882
883 2015-03-06  Joseph Pecoraro  <pecoraro@apple.com>
884
885         Web Inspector: Adopt Object Literal Method Property Syntax
886         https://bugs.webkit.org/show_bug.cgi?id=142409
887
888         Reviewed by Timothy Hatcher.
889
890         Mechanical change touching lots of files.
891
892 2015-03-06  Joseph Pecoraro  <pecoraro@apple.com>
893
894         Web Inspector: Adopt Object Literal Shorthand Property Construction Syntax
895         https://bugs.webkit.org/show_bug.cgi?id=142374
896
897         Reviewed by Timothy Hatcher.
898
899         Mechanical change touching lots of files.
900
901 2015-03-06  Jono Wells  <jonowells@apple.com>
902
903         Web Inspector: Populate Debugger sidebar with all debuggable resources
904         https://bugs.webkit.org/show_bug.cgi?id=141232
905
906         Reviewed by Timothy Hatcher.
907
908         All debuggable resources now show in the debugger sidebar. The _resourceAdded handler now adds a script resource
909         to the sidebar regardless of whether it has any breakpoints set on it. The new function
910         _getTreeElementForSourceCodeAndAddToContentTreeOutline adds the element to the debugger sidebar before
911         _addBreakpointsForSourceCode is called. Removing all breakpoints from a resource no longer removes that
912         resource from the debugger sidebar. TreeOutline.prototype.removeChild has been updated so the disclosure
913         button will disappear and reappear correctly when removing/adding breakpoints.
914
915         * UserInterface/Views/DebuggerSidebarPanel.js:
916         (WebInspector.DebuggerSidebarPanel.prototype._addBreakpoint): Expand resource if first breakpoint is added.
917         (WebInspector.DebuggerSidebarPanel.prototype._getTreeElementForSourceCodeAndAddToContentTreeOutline): Created.
918         (WebInspector.DebuggerSidebarPanel.prototype._resourceAdded): Checks resource type and adds scripts to sidebar.
919         (WebInspector.DebuggerSidebarPanel.prototype._mainResourceChanged):
920         (WebInspector.DebuggerSidebarPanel.prototype._scriptAdded):
921         (WebInspector.DebuggerSidebarPanel.prototype._removeBreakpointTreeElement): No longer removes empty parent.
922         (WebInspector.DebuggerSidebarPanel.prototype._treeElementSelected): Displays scripts without breakpoints now.
923
924         * UserInterface/Views/GeneralTreeElement.js:
925         (WebInspector.GeneralTreeElement.prototype.get disclosureButton): Drive-by fix. Unused. Deleted.
926
927         * UserInterface/Views/TreeOutline.js:
928         (TreeOutline.prototype.removeChild):
929         Remove parent class and set hasChildren to false if necessary to properly hide and reveal disclosure button
930         for elements whose children have been removed.
931
932 2015-03-05  Joseph Pecoraro  <pecoraro@apple.com>
933
934         Web Inspector: Follow-up fixes to ObjectTreeBaseTreeElement
935         https://bugs.webkit.org/show_bug.cgi?id=142367
936
937         Reviewed by Timothy Hatcher.
938
939         * UserInterface/Views/ObjectTreeMapEntryTreeElement.js:
940         (WebInspector.ObjectTreeMapEntryTreeElement.prototype.propertyPathType):
941         * UserInterface/Views/ObjectTreeSetIndexTreeElement.js:
942         (WebInspector.ObjectTreeSetIndexTreeElement.prototype.resolvedValuePropertyPath):
943         (WebInspector.ObjectTreeSetIndexTreeElement.prototype._titleFragment):
944
945 2015-03-05  Tobias Reiss  <tobi+webkit@basecode.de>
946
947         Web Inspector: console.debug/info should show up in Log Console Filter
948         https://bugs.webkit.org/show_bug.cgi?id=142300
949
950         Reviewed by Joseph Pecoraro.
951
952         Add WebInspector.ConsoleMessage.MessageLevel.Debug case that allows console.debug/info
953         to show up in Log Console Filter.
954
955         * UserInterface/Views/LogContentView.js:
956         (WebInspector.LogContentView.prototype._filterMessages):
957
958 2015-03-05  Joseph Pecoraro  <pecoraro@apple.com>
959
960         Web Inspector: Add ObjectTreeBaseTreeElement to share functionality
961         https://bugs.webkit.org/show_bug.cgi?id=142323
962
963         Reviewed by Timothy Hatcher.
964
965         By making this change:
966
967           - Share lots of duplicated code.
968           - Array / Set / Map tree elements get context menu support
969
970         * UserInterface/Main.html:
971         * UserInterface/Views/ObjectTreeBaseTreeElement.js: Added.
972         (WebInspector.ObjectTreeBaseTreeElement):
973         (WebInspector.ObjectTreeBaseTreeElement.prototype.get property):
974         (WebInspector.ObjectTreeBaseTreeElement.prototype.get propertyPath):
975         (WebInspector.ObjectTreeBaseTreeElement.prototype.oncontextmenu):
976         (WebInspector.ObjectTreeBaseTreeElement.prototype.resolvedValue):
977         (WebInspector.ObjectTreeBaseTreeElement.prototype.resolvedValuePropertyPath):
978         (WebInspector.ObjectTreeBaseTreeElement.prototype.thisPropertyPath):
979         (WebInspector.ObjectTreeBaseTreeElement.prototype.hadError):
980         (WebInspector.ObjectTreeBaseTreeElement.prototype.propertyPathType):
981         (WebInspector.ObjectTreeBaseTreeElement.prototype.propertyPathString):
982         (WebInspector.ObjectTreeBaseTreeElement.prototype.createInteractiveGetterElement):
983         (WebInspector.ObjectTreeBaseTreeElement.prototype.createReadOnlyIconElement):
984         New file, copying most of the code from PropertyTreeElement so it can be shared.
985
986         * UserInterface/Views/ObjectTreeArrayIndexTreeElement.js:
987         (WebInspector.ObjectTreeArrayIndexTreeElement):
988         (WebInspector.ObjectTreeArrayIndexTreeElement.prototype.invokedGetter):
989         (WebInspector.ObjectTreeArrayIndexTreeElement.prototype._titleFragment):
990         (WebInspector.ObjectTreeArrayIndexTreeElement.prototype.get property): Deleted.
991         (WebInspector.ObjectTreeArrayIndexTreeElement.prototype._resolvedValue): Deleted.
992         (WebInspector.ObjectTreeArrayIndexTreeElement.prototype._propertyPathType): Deleted.
993         (WebInspector.ObjectTreeArrayIndexTreeElement.prototype._resolvedValuePropertyPath): Deleted.
994         (WebInspector.ObjectTreeArrayIndexTreeElement.prototype._thisPropertyPath): Deleted.
995         (WebInspector.ObjectTreeArrayIndexTreeElement.prototype._propertyPathString): Deleted.
996         (WebInspector.ObjectTreeArrayIndexTreeElement.prototype._updateTitle): Deleted.
997         (WebInspector.ObjectTreeArrayIndexTreeElement.prototype._createInteractiveGetterElement.): Deleted.
998         (WebInspector.ObjectTreeArrayIndexTreeElement.prototype._createReadOnlyIconElement): Deleted.
999         * UserInterface/Views/ObjectTreePropertyTreeElement.js:
1000         (WebInspector.ObjectTreePropertyTreeElement):
1001         (WebInspector.ObjectTreePropertyTreeElement.prototype.invokedGetter):
1002         (WebInspector.ObjectTreePropertyTreeElement.prototype._updateHasChildren):
1003         (WebInspector.ObjectTreePropertyTreeElement.prototype._updateTooltips):
1004         (WebInspector.ObjectTreePropertyTreeElement.prototype._titleFragment):
1005         (WebInspector.ObjectTreePropertyTreeElement.prototype._createTitlePrototype):
1006         (WebInspector.ObjectTreePropertyTreeElement.prototype._createTitlePropertyStyle):
1007         (WebInspector.ObjectTreePropertyTreeElement.prototype._createTitleAPIStyle):
1008         (WebInspector.ObjectTreePropertyTreeElement.prototype._alwaysDisplayAsProperty):
1009         (WebInspector.ObjectTreePropertyTreeElement.prototype._updateChildren):
1010         (WebInspector.ObjectTreePropertyTreeElement.prototype._updateChildrenInternal):
1011         (WebInspector.ObjectTreePropertyTreeElement.prototype._updateEntries):
1012         (WebInspector.ObjectTreePropertyTreeElement.prototype._updateProperties):
1013         (WebInspector.ObjectTreePropertyTreeElement.prototype.get property): Deleted.
1014         (WebInspector.ObjectTreePropertyTreeElement.prototype.oncontextmenu): Deleted.
1015         (WebInspector.ObjectTreePropertyTreeElement.prototype._resolvedValue): Deleted.
1016         (WebInspector.ObjectTreePropertyTreeElement.prototype._propertyPathType): Deleted.
1017         (WebInspector.ObjectTreePropertyTreeElement.prototype._resolvedValuePropertyPath): Deleted.
1018         (WebInspector.ObjectTreePropertyTreeElement.prototype._thisPropertyPath): Deleted.
1019         (WebInspector.ObjectTreePropertyTreeElement.prototype._updateTitleAndIcon): Deleted.
1020         (WebInspector.ObjectTreePropertyTreeElement.prototype._createInteractiveGetterElement.): Deleted.
1021         (WebInspector.ObjectTreePropertyTreeElement.prototype._createReadOnlyIconElement): Deleted.
1022         (WebInspector.ObjectTreePropertyTreeElement.prototype): Deleted.
1023         Subclass ObjectTreeBaseTreeElement and eliminate the code now
1024         automatically handled by the base class.
1025
1026         * UserInterface/Views/ObjectTreeMapEntryTreeElement.js:
1027         (WebInspector.ObjectTreeMapEntryTreeElement):
1028         (WebInspector.ObjectTreeMapEntryTreeElement.prototype.resolvedValue):
1029         (WebInspector.ObjectTreeMapEntryTreeElement.prototype._titleFragment):
1030         (WebInspector.ObjectTreeMapEntryTreeElement.prototype._propertyPathString): Deleted.
1031         * UserInterface/Views/ObjectTreeSetIndexTreeElement.js:
1032         (WebInspector.ObjectTreeSetIndexTreeElement):
1033         (WebInspector.ObjectTreeSetIndexTreeElement.prototype.resolvedValue):
1034         (WebInspector.ObjectTreeSetIndexTreeElement.prototype._titleFragment):
1035         (WebInspector.ObjectTreeSetIndexTreeElement.prototype._resolvedValuePropertyPath): Deleted.
1036         Override resolved value since these are not about PropertyDescriptors.
1037         This will make context menus work automatically.
1038
1039 2015-03-04  Joseph Pecoraro  <pecoraro@apple.com>
1040
1041         Web Inspector: Improve display of previews with overflow
1042         https://bugs.webkit.org/show_bug.cgi?id=142321
1043
1044         Reviewed by Timothy Hatcher.
1045
1046         * UserInterface/Views/ObjectPreviewView.js:
1047         (WebInspector.ObjectPreviewView.prototype._appendEntryPreviews):
1048         (WebInspector.ObjectPreviewView.prototype._appendPropertyPreviews):
1049
1050 2015-03-04  Joseph Pecoraro  <pecoraro@apple.com>
1051
1052         Web Inspector: Array/Collection Sizes should be visible and distinct
1053         https://bugs.webkit.org/show_bug.cgi?id=142254
1054
1055         Reviewed by Timothy Hatcher.
1056
1057         * UserInterface/Models/ObjectPreview.js:
1058         (WebInspector.ObjectPreview):
1059         (WebInspector.ObjectPreview.fromPayload):
1060         (WebInspector.ObjectPreview.prototype.get size):
1061         (WebInspector.ObjectPreview.prototype.hasSize):
1062         * UserInterface/Protocol/RemoteObject.js:
1063         (WebInspector.RemoteObject):
1064         (WebInspector.RemoteObject.fromPrimitiveValue):
1065         (WebInspector.RemoteObject.fromPayload):
1066         (WebInspector.RemoteObject.prototype.get size):
1067         (WebInspector.RemoteObject.prototype.hasSize):
1068         Check if this type has a size and get the size.
1069         Gracefully handle construction for legacy protocols.
1070
1071         * UserInterface/Views/ObjectPreviewView.css:
1072         (.object-preview > .size):
1073         * UserInterface/Views/FormattedValue.css:
1074         (:matches(.formatted-array, .formatted-map, .formatted-set, .formatted-weakmap) > .size):
1075         Style the array/collection size.
1076
1077         * UserInterface/Views/ObjectPreviewView.js:
1078         (WebInspector.ObjectPreviewView):
1079         * UserInterface/Views/FormattedValue.js:
1080         (WebInspector.FormattedValue.createElementForTypesAndValue):
1081         (WebInspector.FormattedValue.createElementForRemoteObject):
1082         (WebInspector.FormattedValue.createElementForObjectPreview):
1083         (WebInspector.FormattedValue.createElementForPropertyPreview):
1084         Add an element showing the array/collection size.
1085
1086         * UserInterface/Views/ObjectTreePropertyTreeElement.js:
1087         (WebInspector.ObjectTreePropertyTreeElement.prototype):
1088         Remove special handling for Array sizes now that this is handled earlier.
1089
1090         * UserInterface/Controllers/StorageManager.js:
1091         (WebInspector.StorageManager.prototype.processData):
1092         (WebInspector.StorageManager.prototype.requestIndexedDatabaseData):
1093         Fix what looks like broken RemoteObject construction.
1094
1095 2015-03-04  Brian J. Burg  <burg@cs.washington.edu>
1096
1097         Web Inspector: TimelineViews should be displayed in a ContentViewContainer
1098         https://bugs.webkit.org/show_bug.cgi?id=142290
1099
1100         Reviewed by Timothy Hatcher.
1101
1102         TimelineRecordingContentView has a bunch of logic to manage the currently visible TimelineView.
1103         This could be delegated to a ContentViewContainer to simplify the logic. It also opens the possibility
1104         for other views to be displayed beneath the timeline overview graphs when it makes sense to do so.
1105
1106         In order to be displayable in the container, TimelineView and its subclasses have been upgraded to
1107         be ContentView subclasses. This also reduces some code duplication for basic view management.
1108
1109         * UserInterface/Views/ContentView.js:
1110         (WebInspector.ContentView): Move base class instantiation pattern from TimelineView to here.
1111         (WebInspector.ContentView.isViewable):
1112         * UserInterface/Views/LayoutTimelineView.js: Use ContentView events and base methods.
1113         (WebInspector.LayoutTimelineView.prototype.shown):
1114         (WebInspector.LayoutTimelineView.prototype.hidden):
1115         (WebInspector.LayoutTimelineView.prototype._dataGridNodeSelected):
1116         * UserInterface/Views/NetworkTimelineView.js: Use ContentView events and base methods.
1117         (WebInspector.NetworkTimelineView.prototype.shown):
1118         (WebInspector.NetworkTimelineView.prototype.hidden):
1119         (WebInspector.NetworkTimelineView.prototype._dataGridNodeSelected):
1120         * UserInterface/Views/OverviewTimelineView.js: Use ContentView events and base methods.
1121         (WebInspector.OverviewTimelineView.prototype.shown):
1122         (WebInspector.OverviewTimelineView.prototype._dataGridNodeSelected):
1123         (WebInspector.OverviewTimelineView.prototype._treeElementSelected):
1124         * UserInterface/Views/ScriptTimelineView.js: Use ContentView events and base methods.
1125         (WebInspector.ScriptTimelineView.prototype.shown):
1126         (WebInspector.ScriptTimelineView.prototype.hidden):
1127         (WebInspector.ScriptTimelineView.prototype._dataGridNodeSelected):
1128         * UserInterface/Views/TimelineRecordingContentView.css: Use WebInspector.ContentViewContainer class.
1129         (.content-view.timeline-recording > .content-view-container):
1130         (.content-view.timeline-recording > .content-view-container > .timeline-view > .data-grid td):
1131         (.content-view.timeline-recording > .content-view-container > .timeline-view > .data-grid table.data):
1132         (.content-view.timeline-recording > .view-container): Deleted.
1133         (.content-view.timeline-recording > .view-container > .timeline-view > .data-grid td): Deleted.
1134         (.content-view.timeline-recording > .view-container > .timeline-view > .data-grid table.data): Deleted.
1135
1136         * UserInterface/Views/TimelineRecordingContentView.js:
1137         Many of the changes here mirror the implementation of ClusterContentView. Searching is disabled since
1138         none of the timeline views are currently searchable using ContentViewContainer's full-text search.
1139
1140         In cases where we update the current timeline view, the currentTimelineView accessor returns the
1141         content view if a TimelineView is shown in the content view container, otherwise null.
1142
1143         (WebInspector.TimelineRecordingContentView):
1144         (WebInspector.TimelineRecordingContentView.prototype.showOverviewTimelineView):
1145         (WebInspector.TimelineRecordingContentView.prototype.showTimelineViewForTimeline):
1146         (WebInspector.TimelineRecordingContentView.prototype.get supplementalRepresentedObjects):
1147         (WebInspector.TimelineRecordingContentView.prototype.get handleCopyEvent):
1148         (WebInspector.TimelineRecordingContentView.prototype.get supportsSave):
1149         (WebInspector.TimelineRecordingContentView.prototype.get saveData):
1150         (WebInspector.TimelineRecordingContentView.prototype.get currentTimelineView):
1151         (WebInspector.TimelineRecordingContentView.prototype.shown):
1152         (WebInspector.TimelineRecordingContentView.prototype.hidden):
1153         (WebInspector.TimelineRecordingContentView.prototype.closed):
1154         (WebInspector.TimelineRecordingContentView.prototype.canGoBack):
1155         (WebInspector.TimelineRecordingContentView.prototype.canGoForward):
1156         (WebInspector.TimelineRecordingContentView.prototype.goBack):
1157         (WebInspector.TimelineRecordingContentView.prototype.goForward):
1158         (WebInspector.TimelineRecordingContentView.prototype.updateLayout):
1159         (WebInspector.TimelineRecordingContentView.prototype.saveToCookie):
1160         (WebInspector.TimelineRecordingContentView.prototype.get filterDidChange):
1161         (WebInspector.TimelineRecordingContentView.prototype._currentContentViewDidChange):
1162         (WebInspector.TimelineRecordingContentView.prototype._contentViewSelectionPathComponentDidChange):
1163         (WebInspector.TimelineRecordingContentView.prototype._contentViewSupplementalRepresentedObjectsDidChange):
1164         (WebInspector.TimelineRecordingContentView.prototype._updateTimes):
1165         (WebInspector.TimelineRecordingContentView.prototype._timelineRemoved):
1166         (WebInspector.TimelineRecordingContentView.prototype._timelineCountChanged):
1167         (WebInspector.TimelineRecordingContentView.prototype._timeRangeSelectionChanged):
1168         (WebInspector.TimelineRecordingContentView.prototype.filterDidChange): Deleted.
1169         (WebInspector.TimelineRecordingContentView.prototype._timelineViewSelectionPathComponentsDidChange): Deleted.
1170         (WebInspector.TimelineRecordingContentView.prototype._showTimelineView): Deleted.
1171         * UserInterface/Views/TimelineView.js: Remove duplicated functionality and use ContentView equivalents instead.
1172         (WebInspector.TimelineView):
1173         (WebInspector.TimelineView.prototype.filterUpdated):
1174         (WebInspector.TimelineView.prototype.needsLayout):
1175         (WebInspector.TimelineView.prototype.get representedObject): Deleted.
1176         (WebInspector.TimelineView.prototype.get visible): Deleted.
1177         (WebInspector.TimelineView.prototype.shown): Deleted.
1178         (WebInspector.TimelineView.prototype.hidden): Deleted.
1179
1180 2015-03-03  Brian J. Burg  <burg@cs.washington.edu>
1181
1182         Web Inspector: selecting overview timeline tree elements without source locations doesn't update selection components
1183         https://bugs.webkit.org/show_bug.cgi?id=142248
1184
1185         Reviewed by Timothy Hatcher.
1186
1187         Add a missing event dispatch to trigger recalculation of path components when showing the overview timeline view.
1188
1189         * UserInterface/Views/OverviewTimelineView.js:
1190         (WebInspector.OverviewTimelineView.prototype._treeElementSelected):
1191
1192 2015-03-03  Nikita Vasilyev  <nvasilyev@apple.com>
1193
1194         Web Inspector: Refactoring: separate ConsoleSession from ConsoleGroup
1195         https://bugs.webkit.org/show_bug.cgi?id=142141
1196
1197         ConsoleSession doesn't have a title and it's not collapsible either.
1198         Simplify ConsoleSession by removing excessive markup.
1199
1200         Reviewed by Timothy Hatcher.
1201
1202         * UserInterface/Controllers/JavaScriptLogViewController.js:
1203         (WebInspector.JavaScriptLogViewController):
1204         (WebInspector.JavaScriptLogViewController.prototype.startNewSession):
1205         (WebInspector.JavaScriptLogViewController.prototype._appendConsoleMessage):
1206         (WebInspector.JavaScriptLogViewController.prototype.get topConsoleGroup): Deleted.
1207         * UserInterface/Main.html:
1208         * UserInterface/Views/ConsoleGroup.js:
1209         (WebInspector.ConsoleGroup):
1210         (WebInspector.ConsoleGroup.prototype.render):
1211         (WebInspector.ConsoleGroup.prototype.addMessage):
1212         (WebInspector.ConsoleGroup.prototype.append):
1213         (WebInspector.ConsoleGroup.prototype.hasMessages): Deleted.
1214         * UserInterface/Views/ConsoleSession.js: Added.
1215         (WebInspector.ConsoleSession):
1216         (WebInspector.ConsoleSession.prototype.addMessage):
1217         (WebInspector.ConsoleSession.prototype.append):
1218         (WebInspector.ConsoleSession.prototype.hasMessages):
1219         * UserInterface/Views/LogContentView.css:
1220         (.console-session + .console-session):
1221         (.console-group.new-session .console-group-messages .console-item:first-child): Deleted.
1222         (.console-group.new-session): Deleted.
1223
1224 2015-03-03  Brian J. Burg  <burg@cs.washington.edu>
1225
1226         Web Inspector: popover should use requestAnimationFrame to drive move/resize animations
1227         https://bugs.webkit.org/show_bug.cgi?id=142218
1228
1229         Reviewed by Timothy Hatcher.
1230
1231         Remove setTimeout workaround now that Inspector runs in its own process.
1232
1233         * UserInterface/Views/Popover.js:
1234         (WebInspector.Popover.prototype.drawBackground):
1235         (WebInspector.Popover.prototype._animateFrame):
1236
1237 2015-03-03  Brian J. Burg  <burg@cs.washington.edu>
1238
1239         Web Inspector: Console log level selector loses selection on reload
1240         https://bugs.webkit.org/show_bug.cgi?id=142199
1241
1242         Reviewed by Timothy Hatcher.
1243
1244         The selected items in the console scope bar were being saved as settings,
1245         but the "All" scope is forcibly selected on reload due to a logic bug.
1246
1247         * UserInterface/Base/Main.js:
1248         (WebInspector.showFullHeightConsole):
1249         The scope bar may already have selected items restored from WebInspector.Settings.
1250         Don't select a scope unless explicitly requested (i.e., clicking on dashboard buttons)
1251         or if no scopes are selected at all. (In the latter case, "All" is the default scope.)
1252
1253         * UserInterface/Views/LogContentView.js:
1254         (WebInspector.LogContentView): Don't specify a default value here to avoid trampling
1255         settings. The "All" scope is selected by default in showFullHeightConsole if
1256         nothing else is selected.
1257
1258 2015-03-02  Joseph Pecoraro  <pecoraro@apple.com>
1259
1260         Web Inspector: Remove native extensions now built-in
1261         https://bugs.webkit.org/show_bug.cgi?id=142203
1262
1263         Reviewed by Timothy Hatcher.
1264
1265         * UserInterface/Base/Utilities.js:
1266
1267 2015-03-02  Joseph Pecoraro  <pecoraro@apple.com>
1268
1269         Web Inspector: Context Menu to Log a Particular Object
1270         https://bugs.webkit.org/show_bug.cgi?id=142198
1271
1272         Reviewed by Timothy Hatcher.
1273
1274         * UserInterface/Controllers/JavaScriptLogViewController.js:
1275         (WebInspector.JavaScriptLogViewController.prototype.saveResultCallback):
1276         (WebInspector.JavaScriptLogViewController.prototype.appendImmediateExecutionWithResult):
1277         Add a way to show an execution and result immediately in the Log View.
1278
1279         * UserInterface/Views/ConsolePrompt.js:
1280         (WebInspector.ConsolePrompt.prototype.pushHistoryItem):
1281         (WebInspector.ConsolePrompt.prototype.commitTextOrInsertNewLine):
1282         (WebInspector.ConsolePrompt.prototype._handleEnterKey):
1283         (WebInspector.ConsolePrompt.prototype._commitHistoryEntry):
1284         Add a way to append a history item to the console prompt history.
1285
1286         * UserInterface/Views/ObjectTreePropertyTreeElement.js:
1287         (WebInspector.ObjectTreePropertyTreeElement.prototype):
1288         Add a context menu item to object tree properties to log the value.
1289
1290         * UserInterface/Protocol/RemoteObject.js:
1291         (WebInspector.RemoteObject.createCallArgument):
1292         (WebInspector.RemoteObject.prototype.callFunction):
1293         (WebInspector.RemoteObject.prototype.asCallArgument):
1294         Simplify CallArgument creation.
1295
1296         * UserInterface/Controllers/RuntimeManager.js:
1297         (WebInspector.RuntimeManager.prototype.mycallback):
1298         (WebInspector.RuntimeManager.prototype.saveResult):
1299         Wrap RuntimeAgent.saveResult. If supported, run the backend command
1300         and fetch a saved result index from the backend for the given value.
1301
1302         * Localizations/en.lproj/localizedStrings.js:
1303         * UserInterface/Base/Main.js:
1304         (WebInspector.contentLoaded):
1305         * UserInterface/Views/LogContentView.js:
1306         (WebInspector.LogContentView.prototype.get logViewController):
1307         Misc.
1308
1309 2015-03-02  Joseph Pecoraro  <pecoraro@apple.com>
1310
1311         Web Inspector: Add Context Menus to Object Tree properties
1312         https://bugs.webkit.org/show_bug.cgi?id=142125
1313
1314         Reviewed by Timothy Hatcher.
1315
1316         * Localizations/en.lproj/localizedStrings.js:
1317         * UserInterface/Views/ObjectPropertiesSection.js:
1318         (WebInspector.ObjectPropertyTreeElement.prototype._functionContextMenuEventFired):
1319         (WebInspector.ObjectPropertyTreeElement.prototype._functionContextMenuEventFired.revealFunction):
1320         Fix legacy implementation.
1321
1322         * UserInterface/Views/ObjectTreeArrayIndexTreeElement.js:
1323         * UserInterface/Views/ObjectTreePropertyTreeElement.js:
1324         (WebInspector.ObjectTreePropertyTreeElement.prototype._createTitlePrototype):
1325         Give prototype buttons a tooltip.
1326
1327         (WebInspector.ObjectTreePropertyTreeElement.prototype.oncontextmenu):
1328         (WebInspector.ObjectTreePropertyTreeElement.prototype._contextMenuHandler):
1329         (WebInspector.ObjectTreePropertyTreeElement.prototype._appendMenusItemsForObject):
1330         Context Menus based on the selected object.
1331
1332 2015-02-27  Joseph Pecoraro  <pecoraro@apple.com>
1333
1334         Web Inspector: Use Maps in ResourceCollection instead of objects
1335         https://bugs.webkit.org/show_bug.cgi?id=142101
1336
1337         Reviewed by Timothy Hatcher.
1338
1339         * UserInterface/Models/ResourceCollection.js:
1340         (WebInspector.ResourceCollection):
1341         (WebInspector.ResourceCollection.prototype.resourcesWithType):
1342         (WebInspector.ResourceCollection.prototype.removeAllResources):
1343         (WebInspector.ResourceCollection.prototype.resourceForURL):
1344         (WebInspector.ResourceCollection.prototype._associateWithResource):
1345         (WebInspector.ResourceCollection.prototype._disassociateWithResource):
1346         (WebInspector.ResourceCollection.prototype._resourceURLDidChange):
1347         (WebInspector.ResourceCollection.prototype._resourceTypeDidChange):
1348         Use Maps instead of objects.
1349
1350 2015-02-26  Nikita Vasilyev  <nvasilyev@apple.com>
1351
1352         Web Inspector: Add a subtle blue background for selected console messages
1353         https://bugs.webkit.org/show_bug.cgi?id=142073
1354
1355         Reviewed by Timothy Hatcher.
1356
1357         * UserInterface/Views/LogContentView.css:
1358         (.console-item.selected::after):
1359         (.console-messages:focus .console-item.selected):
1360         (.console-messages:focus .console-item.selected + .console-item):
1361         (.console-error-level + .console-item):
1362         (.console-error-level .section .header .title):
1363         (.console-warning-level):
1364         (.console-warning-level + .console-item):
1365
1366 2015-02-26  Joseph Pecoraro  <pecoraro@apple.com>
1367
1368         Web Inspector: Colored console messages apply text color to object tree properties
1369         https://bugs.webkit.org/show_bug.cgi?id=142051
1370
1371         Reviewed by Timothy Hatcher.
1372
1373         * UserInterface/Views/ObjectPreviewView.css:
1374         (.object-preview):
1375         * UserInterface/Views/ObjectTreeView.css:
1376         (.object-tree):
1377         Default the color to black within Object Tree and Object Preview views.
1378
1379 2015-02-26  Joseph Pecoraro  <pecoraro@apple.com>
1380
1381         Web Inspector: Clear Log on Reload clears some logs that were after reload
1382         https://bugs.webkit.org/show_bug.cgi?id=142070
1383
1384         Reviewed by Timothy Hatcher.
1385
1386         * UserInterface/Views/LogContentView.js:
1387         (WebInspector.LogContentView.prototype._sessionStarted):
1388         We can bail after calling clearLog, since that will already start
1389         a new session for us.
1390
1391         (WebInspector.LogContentView.prototype._clearLog):
1392         Don't trigger a backend clear messages, since that will cause us to
1393         clear messages received between the request and response.
1394
1395 2015-02-26  Joseph Pecoraro  <pecoraro@apple.com>
1396
1397         Web Inspector: Save Console Evaluations into Command Line variables $1-$99 ($n)
1398         https://bugs.webkit.org/show_bug.cgi?id=142061
1399
1400         Reviewed by Timothy Hatcher.
1401
1402         * UserInterface/Controllers/RuntimeManager.js:
1403         (WebInspector.RuntimeManager.prototype.evalCallback):
1404         (WebInspector.RuntimeManager.prototype.evaluateInInspectedWindow):
1405         Add a saveResult parameter for the new protocol command in parameter.
1406
1407         * UserInterface/Views/ConsoleMessageImpl.js:
1408         (WebInspector.ConsoleMessageImpl.prototype._formatMessage):
1409         (WebInspector.ConsoleMessageImpl.prototype._formatParameterAsObject):
1410         (WebInspector.ConsoleMessageImpl.prototype._formatParameterAsArray):
1411         (WebInspector.ConsoleMessageImpl.prototype._rootPropertyPathForObject):
1412         * UserInterface/Views/ObjectTreeView.js:
1413         (WebInspector.ObjectTreeView.prototype.appendTitleSuffix):
1414         For console evaluation results, show a "= $n" when the evaluation was
1415         given a saved result index.
1416
1417         * UserInterface/Views/LogContentView.css:
1418         (.console-saved-variable):
1419         * UserInterface/Views/ObjectPreviewView.css:
1420         (.object-preview-name):
1421         Make $n and class names in previews always non-italics.
1422
1423         * UserInterface/Controllers/JavaScriptLogViewController.js:
1424         (WebInspector.JavaScriptLogViewController.prototype.printResult):
1425         (WebInspector.JavaScriptLogViewController.prototype.consolePromptTextCommitted):
1426         * UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
1427         (get WebInspector.JavaScriptRuntimeCompletionProvider.prototype.):
1428         * UserInterface/Controllers/LogManager.js:
1429         (WebInspector.LogManager.prototype.messagesCleared):
1430         (WebInspector.LogManager.prototype._mainResourceDidChange):
1431         Try to provide better autocompletion for $n, by populating autocompletion menus
1432         from $1-$n where n is the maximum saved result index seen. Clear the maximum
1433         when we clear the console.
1434
1435         * UserInterface/Views/ConsoleCommandResult.js:
1436         (WebInspector.ConsoleCommandResult):
1437         (WebInspector.ConsoleCommandResult.clearMaximumSavedResultIndex):
1438         Keep track of the maximum savedResultIndex for console evaluation results.
1439
1440 2015-02-26  Joseph Pecoraro  <pecoraro@apple.com>
1441
1442         Web Inspector: Set/Map appear as lossless when they have lossy entries
1443         https://bugs.webkit.org/show_bug.cgi?id=142050
1444
1445         Reviewed by Timothy Hatcher.
1446
1447         * UserInterface/Views/ObjectPreviewView.js:
1448         (WebInspector.ObjectPreviewView.prototype._appendEntryPreviews):
1449         Take into account the lossless states of entry keys and values.
1450
1451 2015-02-26  Joseph Pecoraro  <pecoraro@apple.com>
1452
1453         Web Inspector: New ObjectTree UI for Arrays / Maps / Sets
1454         https://bugs.webkit.org/show_bug.cgi?id=142037
1455
1456         Reviewed by Timothy Hatcher.
1457
1458         * Localizations/en.lproj/localizedStrings.js:
1459         * UserInterface/Main.html:
1460         Miscellaneous changes.
1461
1462         * UserInterface/Models/PropertyDescriptor.js:
1463         (WebInspector.PropertyDescriptor.prototype.isIndexProperty):
1464         Useful for quickly checking if this property is numeric and possibly
1465         an array index.
1466
1467         * UserInterface/Models/PropertyPath.js:
1468         (WebInspector.PropertyPath.prototype.appendMapKey):
1469         (WebInspector.PropertyPath.prototype.appendMapValue):
1470         (WebInspector.PropertyPath.prototype.appendSetIndex):
1471         Be specific about property paths into maps / sets. Note that a map
1472         value may be displayable if the key is simple.
1473
1474         * UserInterface/Protocol/RemoteObject.js:
1475         (WebInspector.RemoteObject.prototype.hasValue):
1476         A simple value RemoteObject may have the value "undefined". So provide
1477         a falsey proof helper that actually checks if we have a value.
1478
1479         (WebInspector.RemoteObject.prototype.isArray):
1480         (WebInspector.RemoteObject.prototype.backendGetOwnPropertyDescriptor):
1481         (WebInspector.RemoteObject.prototype.wrappedCallback):
1482         (WebInspector.RemoteObject.prototype.getOwnPropertyDescriptor):
1483         Currently backend APIs exist only to get all properties. In the case
1484         of collections, we often want to get only one property (__proto__).
1485         This is a simple implementation on top of callFunctionOn.
1486
1487         * UserInterface/Views/ConsoleMessageImpl.js:
1488         (WebInspector.ConsoleMessageImpl.prototype._formatParameterAsObject):
1489         (WebInspector.ConsoleMessageImpl.prototype._formatParameterAsArray):
1490         (WebInspector.ConsoleMessageImpl.prototype.appendUndefined): Deleted.
1491         (WebInspector.ConsoleMessageImpl.prototype._printArray): Deleted.
1492         (WebInspector.ConsoleMessageImpl.prototype._formatAsArrayEntry): Deleted.
1493         Simplify array formatted to just use an ObjectTreeView. Add fixmes
1494         that we should seed the ObjectTreeView with a starting property path.
1495
1496         * UserInterface/Views/FormattedValue.css:
1497         (.formatted-node > ol):
1498         Sometimes, a node's display was getting overridden by various console styles.
1499         Force a node to always display block. We may be able to remove this later.
1500
1501         * UserInterface/Views/FormattedValue.js:
1502         (WebInspector.FormattedValue.createObjectTreeOrFormattedValueForRemoteObject):
1503         Helper for formatting a node / object / value more easily. This
1504         is used by all collection types.
1505
1506         * UserInterface/Views/ObjectPreviewView.js:
1507         (WebInspector.ObjectPreviewView.prototype._appendPropertyPreviews):
1508         We lost the nice sparse array support when switching to the new preview path,
1509         we should add it back.
1510
1511         * UserInterface/Views/ObjectTreeArrayIndexTreeElement.css:
1512         (.object-tree-array-index):
1513         (.object-tree-array-index > .titles):
1514         (.object-tree-array-index > .icon):
1515         (.object-tree-array-index .index-name):
1516         (.object-tree-array-index .index-value .object-tree):
1517         (.object-tree-array-index .index-value .object-tree .object-tree-outline):
1518         (.object-tree-property + ol .object-tree-array-index):
1519         New styles specific to array index tree elements.
1520
1521         * UserInterface/Views/ObjectTreeMapEntryTreeElement.css:
1522         (.object-tree-array-index.object-tree-map-entry > .titles > .title > .index-name):
1523         (.object-tree-map-entry.key):
1524         (.object-tree-map-entry.key:first-of-type):
1525         (.object-tree-map-entry):
1526         New styles specific to map key/value tree elements.
1527
1528         * UserInterface/Views/ObjectTreeCollectionTreeElement.js: Removed.
1529         Remove old collection implementation.
1530
1531         * UserInterface/Views/ObjectTreeArrayIndexTreeElement.js: Added.
1532         (WebInspector.ObjectTreeArrayIndexTreeElement):
1533         (WebInspector.ObjectTreeArrayIndexTreeElement.prototype.get property):
1534         (WebInspector.ObjectTreeArrayIndexTreeElement.prototype._resolvedValue):
1535         (WebInspector.ObjectTreeArrayIndexTreeElement.prototype._propertyPathType):
1536         (WebInspector.ObjectTreeArrayIndexTreeElement.prototype._resolvedValuePropertyPath):
1537         (WebInspector.ObjectTreeArrayIndexTreeElement.prototype._thisPropertyPath):
1538         (WebInspector.ObjectTreeArrayIndexTreeElement.prototype._propertyPathString):
1539         (WebInspector.ObjectTreeArrayIndexTreeElement.prototype._updateTitle):
1540         (WebInspector.ObjectTreeArrayIndexTreeElement.prototype._titleFragment):
1541         (WebInspector.ObjectTreeArrayIndexTreeElement.prototype._createInteractiveGetterElement.):
1542         (WebInspector.ObjectTreeArrayIndexTreeElement.prototype._createReadOnlyIconElement):
1543         Index followed by formatted value. Unfortunately a page can hack up an array
1544         with getter properties, so also support getter values in an array. This ends
1545         up copying a lot of ObjectTreePropertyTreeElement as a result.
1546
1547         * UserInterface/Views/ObjectTreeMapEntryTreeElement.js: Added.
1548         (WebInspector.ObjectTreeMapEntryTreeElement):
1549         (WebInspector.ObjectTreeMapEntryTreeElement.prototype.get object):
1550         (WebInspector.ObjectTreeMapEntryTreeElement.prototype._propertyPathString):
1551         (WebInspector.ObjectTreeMapEntryTreeElement.prototype._titleFragment):
1552         (WebInspector.ObjectTreeMapKeyTreeElement):
1553         (WebInspector.ObjectTreeMapKeyTreeElement.prototype.displayPropertyName):
1554         (WebInspector.ObjectTreeMapKeyTreeElement.prototype.resolvedValuePropertyPath):
1555         (WebInspector.ObjectTreeMapValueTreeElement):
1556         (WebInspector.ObjectTreeMapValueTreeElement.prototype.displayPropertyName):
1557         (WebInspector.ObjectTreeMapValueTreeElement.prototype.resolvedValuePropertyPath):
1558         Key/value followed by formatted value.
1559
1560         * UserInterface/Views/ObjectTreeSetIndexTreeElement.js: Added.
1561         (WebInspector.ObjectTreeSetIndexTreeElement):
1562         (WebInspector.ObjectTreeSetIndexTreeElement.prototype.get object):
1563         (WebInspector.ObjectTreeSetIndexTreeElement.prototype._resolvedValuePropertyPath):
1564         (WebInspector.ObjectTreeSetIndexTreeElement.prototype._titleFragment):
1565         Dot followed by formatted value.
1566
1567         * UserInterface/Views/ObjectTreePropertyTreeElement.css:
1568         (.object-tree-property > .titles):
1569         Reformat.
1570
1571         * UserInterface/Views/ObjectTreeView.css:
1572         (.object-tree-property :matches(.formatted-string, .formatted-regexp)):
1573         Upgrade generic styles.
1574
1575         * UserInterface/Views/ObjectTreePropertyTreeElement.js:
1576         (WebInspector.ObjectTreePropertyTreeElement.prototype._resolvedValue):
1577         (WebInspector.ObjectTreePropertyTreeElement.prototype._resolvedValuePropertyPath):
1578         (WebInspector.ObjectTreePropertyTreeElement.prototype._updateChildren):
1579         (WebInspector.ObjectTreePropertyTreeElement.prototype._updateChildrenInternal):
1580         (WebInspector.ObjectTreePropertyTreeElement.prototype._updateEntries):
1581         (WebInspector.ObjectTreePropertyTreeElement.prototype._updateProperties):
1582         * UserInterface/Views/ObjectTreeView.js:
1583         (WebInspector.ObjectTreeView):
1584         (WebInspector.ObjectTreeView.emptyMessageElement):
1585         (WebInspector.ObjectTreeView.prototype.expand):
1586         (WebInspector.ObjectTreeView.prototype.collapse):
1587         (WebInspector.ObjectTreeView.prototype.update):
1588         (WebInspector.ObjectTreeView.prototype._updateChildren):
1589         (WebInspector.ObjectTreeView.prototype._updateEntries):
1590         (WebInspector.ObjectTreeView.prototype._updateProperties):
1591         (WebInspector.ObjectTreeView.prototype._handlePreviewOrTitleElementClick):
1592         Both ObjectTreeView and ObjectTreePropertyTreeElement will fetch only collection
1593         entries or properties depending on the type of the object being expanded.
1594
1595         (WebInspector.ObjectTreeView.prototype._trackWeakEntries):
1596         (WebInspector.ObjectTreeView.prototype._untrackWeakEntries):
1597         Allow WeakMap entries to be Garbage Collected when the ObjectTreeView
1598         collapses or the console is cleared. FIXME for handling sub-tree WeakMaps.
1599
1600 2015-02-26  Brent Fulgham  <bfulgham@apple.com>
1601
1602         [Win] Make build logs more legible by reducing noise
1603         https://bugs.webkit.org/show_bug.cgi?id=142034
1604
1605         Reviewed by Alexey Proskuryakov.
1606
1607         Modify batch files, makefiles, and DOS commands to remove
1608         uninteresting/unhelpful output.
1609
1610         * WebInspectorUI.vcxproj/WebInspectorUI.make:
1611
1612 2015-02-25  Joseph Pecoraro  <pecoraro@apple.com>
1613
1614         Web Inspector: Improve Regex/Error output in Object Tree and Previews
1615         https://bugs.webkit.org/show_bug.cgi?id=142010
1616
1617         Reviewed by Timothy Hatcher.
1618
1619         * UserInterface/Views/ObjectPreviewView.js:
1620         (WebInspector.ObjectPreviewView):
1621         (WebInspector.ObjectPreviewView.prototype._initTitleElement):
1622         Since some object types may be formatted as simple values, ensure they get
1623         the formatted style even in the title view.
1624
1625         (WebInspector.ObjectPreviewView.prototype._appendPreview):
1626         Those object types that can be formatted as simple values should skip
1627         to the value formatting phase.
1628
1629         (WebInspector.ObjectPreviewView.prototype._appendPropertyPreviews):
1630         Do not show property previews for error objects. Always assume lossy
1631         so that it can be expanded.
1632
1633         * UserInterface/Views/ObjectTreeView.js:
1634         (WebInspector.ObjectTreeView):
1635         Make a similiar improvement for ObjectTree titles when previews are
1636         unavailable. This will make dir(value) show a stylized value in the
1637         title of the Object Tree.
1638
1639 2015-02-25  Joseph Pecoraro  <pecoraro@apple.com>
1640
1641         Web Inspector: Improve PropertyPath display strings for getters / values
1642         https://bugs.webkit.org/show_bug.cgi?id=142008
1643
1644         Reviewed by Timothy Hatcher.
1645
1646         * UserInterface/Base/Utilities.js:
1647         (doubleQuotedString):
1648         Helper to double quote a string and escape double quotes with-in it.
1649
1650         * UserInterface/Models/PropertyPath.js:
1651         (WebInspector.PropertyPath.prototype.get reducedPath):
1652         Compute the path eliminating unnecessary __proto__s. Note we don't
1653         property handle the case where a .__proto__.x is override earlier
1654         by a .x, but that case is rare.
1655
1656         (WebInspector.PropertyPath.prototype.displayPath):
1657         Helper for choosing fullPath or reducedPath display strings.
1658
1659         (WebInspector.PropertyPath.prototype.appendPropertyName):
1660         (WebInspector.PropertyPath.prototype.appendGetterPropertyName):
1661         (WebInspector.PropertyPath.prototype.appendSetterPropertyName):
1662         (WebInspector.PropertyPath.prototype.appendPropertyDescriptor):
1663         When appending a descriptor, specify if it is for a getter/setter or value.
1664         For getters / setters the actual function can be directly fetched via
1665         __lookupGetter__/__lookupSetter__. Continue to use the property name for values.
1666
1667         * UserInterface/Views/FormattedValue.js:
1668         (WebInspector.FormattedValue.createElementForTypesAndValue):
1669
1670         * UserInterface/Views/ObjectTreePropertyTreeElement.js:
1671         (WebInspector.ObjectTreePropertyTreeElement.prototype._propertyPathType):
1672         (WebInspector.ObjectTreePropertyTreeElement.prototype._resolvedValuePropertyPath):
1673         (WebInspector.ObjectTreePropertyTreeElement.prototype._thisPropertyPath):
1674         (WebInspector.ObjectTreePropertyTreeElement.prototype):
1675
1676 2015-02-24  Joseph Pecoraro  <pecoraro@apple.com>
1677
1678         Web Inspector: Eliminate console-formatted-* class names in favor of formatted-*
1679         https://bugs.webkit.org/show_bug.cgi?id=141948
1680
1681         Reviewed by Timothy Hatcher.
1682
1683         * UserInterface/Views/FormattedValue.js:
1684         (WebInspector.FormattedValue.createElementForNode):
1685         Helper for formatting a node as a DOMTreeOutline.
1686
1687         * UserInterface/Views/ConsoleMessageImpl.js:
1688         (WebInspector.ConsoleMessageImpl.prototype._formatParameter):
1689         (WebInspector.ConsoleMessageImpl.prototype._formatParameterAsString):
1690         (WebInspector.ConsoleMessageImpl.prototype._formatParameterAsNode):
1691         (WebInspector.ConsoleMessageImpl.prototype.appendUndefined):
1692         (WebInspector.ConsoleMessageImpl.prototype._printArray):
1693         (WebInspector.ConsoleMessageImpl.prototype.): Deleted.
1694         * UserInterface/Views/LogContentView.css:
1695         (.console-user-command-result):
1696         (.console-formatted-object): Deleted.
1697         (.console-object-preview): Deleted.
1698         (.expanded .console-object-preview): Deleted.
1699         (.console-object-preview .name): Deleted.
1700         (.expanded .console-object-preview > .console-object-preview-body): Deleted.
1701         (.console-object-preview > .console-object-preview-name.console-object-preview-name-Object): Deleted.
1702         (.console-object-preview-body .console-object-preview-name.console-object-preview-name-Object): Deleted.
1703         (.expanded .console-object-preview > .console-object-preview-name.console-object-preview-name-Object): Deleted.
1704         (.console-formatted-object, .console-formatted-node, .console-formatted-error, .console-formatted-map, .console-formatted-set, .console-formatted-weakmap): Deleted.
1705         (:matches(.console-formatted-object, .console-formatted-node, .console-formatted-error, .console-formatted-map, .console-formatted-set, .console-formatted-weakmap) .section): Deleted.
1706
1707         * UserInterface/Views/LogContentView.js:
1708         (WebInspector.LogContentView.prototype._leftArrowWasPressed):
1709         (WebInspector.LogContentView.prototype._rightArrowWasPressed):
1710         Add FIXMEs since this will no longer work with ObjectTree.
1711
1712         * UserInterface/Views/ObjectPreviewView.css:
1713         (.object-preview):
1714         * UserInterface/Views/ObjectTreeView.css:
1715         (.object-tree):
1716         Copy over the font styles from console-formatted-object.
1717
1718         * UserInterface/Views/ObjectPropertiesSection.js:
1719         (WebInspector.ObjectPropertyTreeElement.prototype.update):
1720         * UserInterface/Views/SourceCodeTextEditor.js:
1721         (WebInspector.SourceCodeTextEditor.prototype._showPopoverForFunction.didGetDetails):
1722         (WebInspector.SourceCodeTextEditor.prototype._showPopoverForFunction):
1723         (WebInspector.SourceCodeTextEditor.prototype._showPopoverForString):
1724         (WebInspector.SourceCodeTextEditor.prototype._showPopoverForRegExp):
1725         (WebInspector.SourceCodeTextEditor.prototype._showPopoverForNumber):
1726         (WebInspector.SourceCodeTextEditor.prototype._showPopoverForBoolean):
1727         (WebInspector.SourceCodeTextEditor.prototype._showPopoverForNull):
1728         (WebInspector.SourceCodeTextEditor.prototype._showPopoverForUndefined):
1729         Convert to formatted value class names.
1730
1731 2015-02-24  Joseph Pecoraro  <pecoraro@apple.com>
1732
1733         Web Inspector: Make Getter/Setter RemoteObject property and ObjectPreview handling consistent
1734         https://bugs.webkit.org/show_bug.cgi?id=141587
1735
1736         Reviewed by Timothy Hatcher.
1737
1738         * UserInterface/Models/CallFrame.js:
1739         (WebInspector.CallFrame.prototype.collectScopeChainVariableNames):
1740         * UserInterface/Models/PropertyDescriptor.js:
1741         (WebInspector.PropertyDescriptor.prototype.get nativeGetter):
1742         * UserInterface/Protocol/RemoteObject.js:
1743         (WebInspector.RemoteObject.fromPayload):
1744         (WebInspector.RemoteObject.prototype.getOwnPropertyDescriptors):
1745         (WebInspector.RemoteObject.prototype.getAllPropertyDescriptors):
1746         (WebInspector.RemoteObject.prototype.getDisplayablePropertyDescriptors):
1747         (WebInspector.RemoteObject.prototype._getPropertyDescriptors):
1748         (WebInspector.RemoteObject.prototype.if):
1749         (WebInspector.RemoteObject.prototype.deprecatedGetOwnProperties):
1750         (WebInspector.RemoteObject.prototype.deprecatedGetAllProperties):
1751         (WebInspector.RemoteObject.prototype._deprecatedGetProperties):
1752         (WebInspector.RemoteObject.prototype.getOwnAndGetterPropertyDescriptors): Deleted.
1753         (WebInspector.RemoteObject.prototype.callback): Deleted.
1754         (WebInspector.RemoteObject.prototype.getOwnProperties): Deleted.
1755         (WebInspector.RemoteObject.prototype.getOwnAndGetterProperties): Deleted.
1756         (WebInspector.RemoteObject.prototype.getAllProperties): Deleted.
1757         (WebInspector.RemoteObject.prototype.set else): Deleted.
1758         * UserInterface/Views/ConsoleMessageImpl.js:
1759         (WebInspector.ConsoleMessageImpl.prototype._formatParameterAsArray):
1760         * UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
1761         (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshProperties.nodePrototypesReady):
1762         * UserInterface/Views/ObjectPropertiesSection.js:
1763         (WebInspector.ObjectPropertiesSection.prototype.update):
1764         (WebInspector.ObjectPropertyTreeElement.prototype.onpopulate):
1765         * UserInterface/Views/ObjectTreePropertyTreeElement.js:
1766         (WebInspector.ObjectTreePropertyTreeElement.prototype.):
1767         (WebInspector.ObjectTreePropertyTreeElement.prototype):
1768         * UserInterface/Views/ObjectTreeView.js:
1769         (WebInspector.ObjectTreeView.prototype.update):
1770
1771 2015-02-24  Joseph Pecoraro  <pecoraro@apple.com>
1772
1773         Web Inspector: New Object Tree View UI
1774         https://bugs.webkit.org/show_bug.cgi?id=141932
1775
1776         Reviewed by Timothy Hatcher.
1777
1778         Part 1: Majority of the UI.
1779
1780         * Localizations/en.lproj/localizedStrings.js:
1781         * UserInterface/Images/Eye.svg: Added.
1782         * UserInterface/Images/TypeBoolean.svg: Added.
1783         * UserInterface/Images/TypeNull.svg: Added.
1784         * UserInterface/Images/TypeNumber.svg: Added.
1785         * UserInterface/Images/TypeObject.svg: Added.
1786         * UserInterface/Images/TypeRegex.svg: Added.
1787         * UserInterface/Images/TypeString.svg: Added.
1788         * UserInterface/Images/TypeSymbol.svg: Added.
1789         * UserInterface/Images/TypeUndefined.svg: Added.
1790         * UserInterface/Main.html:
1791         Miscellaneous.
1792
1793         * UserInterface/Views/FormattedValue.css:
1794         (.formatted-boolean):
1795         Give booleans a light purple color.
1796
1797         * UserInterface/Views/FormattedValue.js:
1798         (WebInspector.FormattedValue.createElementForTypesAndValue):
1799         Previously we were truncating function value logging in the console. E.g.
1800           js> multiLineFunction
1801           <-  function multiLineFunction() {
1802         No longer truncate so we display the full string.
1803
1804         * UserInterface/Models/PropertyPath.js: Added.
1805         (WebInspector.PropertyPath):
1806         (WebInspector.PropertyPath.prototype.get object):
1807         (WebInspector.PropertyPath.prototype.get parent):
1808         (WebInspector.PropertyPath.prototype.get isPrototype):
1809         (WebInspector.PropertyPath.prototype.get rootObject):
1810         (WebInspector.PropertyPath.prototype.get lastNonPrototypeObject):
1811         (WebInspector.PropertyPath.prototype.get pathComponent):
1812         (WebInspector.PropertyPath.prototype.get fullPath):
1813         (WebInspector.PropertyPath.prototype.isRoot):
1814         (WebInspector.PropertyPath.prototype.isPathComponentImpossible):
1815         (WebInspector.PropertyPath.prototype.isFullPathImpossible):
1816         (WebInspector.PropertyPath.prototype.appendPropertyName):
1817         (WebInspector.PropertyPath.prototype.appendPropertySymbol):
1818         (WebInspector.PropertyPath.prototype.appendInternalPropertyName):
1819         (WebInspector.PropertyPath.prototype.appendArrayIndex):
1820         (WebInspector.PropertyPath.prototype.appendCollectionIndex):
1821         (WebInspector.PropertyPath.prototype.appendPropertyDescriptor):
1822         (WebInspector.PropertyPath.prototype._canPropertyNameBeDotAccess):
1823         PropertyPaths are a linked list of remote object / patch component pairs.
1824         For a property like "foo['property 1'].__proto__.baz" we will have a PropertyPath
1825         chain with the RemoteObject for each component. This allows us to accurately
1826         select the RemoteObject on which we should invoke a getter. It also allows
1827         us to display the property path string from the root object, if possible.
1828
1829         * UserInterface/Protocol/RemoteObject.js:
1830         (WebInspector.RemoteObject.prototype.callFunction):
1831         (WebInspector.RemoteObject.prototype.backendInvokeGetter):
1832         (WebInspector.RemoteObject.prototype.invokeGetter):
1833         Provide a way to invoke a getter function on a remote object if we
1834         have a reference to the getter function. At the same time, improve
1835         the mostly unused callFunction API to automatically convert
1836         RemoteObjects / values to their Runtime.CallArgument format.
1837
1838         * UserInterface/Views/ObjectTreePropertyTreeElement.css: Added.
1839         (.object-tree-property):
1840         (.object-tree-property > .disclosure-button):
1841         (.object-tree-property.parent > .disclosure-button):
1842         (.object-tree-property.parent.expanded > .disclosure-button):
1843         (.object-tree-property > .titles):
1844         Focused styles for the ObjectTree property GeneralTreeElements.
1845         Reuse navigation sidebar disclosure-triangles.
1846
1847         (.object-tree-property > .icon):
1848         (.object-tree-property.boolean > .icon):
1849         (.object-tree-property.function > .icon):
1850         (.object-tree-property.number > .icon):
1851         (.object-tree-property.object > .icon):
1852         (.object-tree-property.object.null > .icon):
1853         (.object-tree-property.object.node > .icon):
1854         (.object-tree-property.regex > .icon):
1855         (.object-tree-property.string > .icon):
1856         (.object-tree-property.symbol > .icon):
1857         (.object-tree-property.undefined > .icon):
1858         Use different icons for different object types. Special case
1859         "accessor" to be undefined.
1860
1861         (.object-tree-property .prototype-name):
1862         (.object-tree-property .property-name.not-enumerable):
1863         Style property names in sans-serif font.
1864         Give non-enumerable properties a slightly transparent look.
1865
1866         (.object-tree-property.prototype-property):
1867         (.object-tree-property.prototype-property > .icon):
1868         (.object-tree-property.prototype-property + ol):
1869         Special styles for prototype properties and their children.
1870
1871         (.object-tree-property .getter):
1872         (.object-tree-property .getter:hover):
1873         (.object-tree-property .read-only):
1874         Styles for clickable getter button and non-interactive read-only indicator.
1875
1876         (.object-tree-property :matches(.formatted-string, .formatted-regexp)):
1877         Do not allow wrapping for values that previously allowed wrapping.
1878
1879         (.object-tree-property .value.error):
1880         If getting a value resulted in an error, display that error in red.
1881
1882         * UserInterface/Views/ObjectTreePropertyTreeElement.js:
1883         (WebInspector.ObjectTreePropertyTreeElement):
1884         Extend from GeneralTreeElement and set up class names on the root <li> object.
1885
1886         (WebInspector.ObjectTreePropertyTreeElement.prototype.onattach): Deleted.
1887         No longer needed by using GeneralTreeElement.
1888
1889         (WebInspector.ObjectTreePropertyTreeElement.prototype.onexpand):
1890         (WebInspector.ObjectTreePropertyTreeElement.prototype.oncollapse):
1891         Expand / collapse an associated ObjectPreview if we have one.
1892
1893         (WebInspector.ObjectTreePropertyTreeElement.prototype._resolvedValue):
1894         (WebInspector.ObjectTreePropertyTreeElement.prototype._resolvedValuePropertyPath):
1895         This PropertyTreeElement may be displaying for a value, or a getter that has
1896         gotten a value. Refer to this as the "resolvedValue".
1897
1898         (WebInspector.ObjectTreePropertyTreeElement.prototype._thisPropertyPath):
1899         A PropertyPath leaf used for tooltips.
1900
1901         (WebInspector.ObjectTreePropertyTreeElement.prototype._updateHasChildren):
1902         (WebInspector.ObjectTreePropertyTreeElement.prototype._updateTooltips):
1903         (WebInspector.ObjectTreePropertyTreeElement.prototype._updateTitleAndIcon):
1904         Helpers for updating small parts of the UI. When a getter is invoked,
1905         we need to update the entire UI of this TreeElement.
1906
1907         (WebInspector.ObjectTreePropertyTreeElement.prototype._titleFragment):
1908         (WebInspector.ObjectTreePropertyTreeElement.prototype._updateTitle): Deleted.
1909         (WebInspector.ObjectTreePropertyTreeElement.prototype._updateTitlePropertyStyle): Deleted.
1910         (WebInspector.ObjectTreePropertyTreeElement.prototype._updateTitleAPIStyle): Deleted.
1911         (WebInspector.ObjectTreePropertyTreeElement.prototype._createTitlePrototype):
1912         (WebInspector.ObjectTreePropertyTreeElement.prototype._createTitlePropertyStyle):
1913         (WebInspector.ObjectTreePropertyTreeElement.prototype._createTitleAPIStyle):
1914         Create the UI for the mainTitle of this PropertyTreeElement.
1915         
1916         (WebInspector.ObjectTreePropertyTreeElement.prototype._createInteractiveGetterElement):
1917         (WebInspector.ObjectTreePropertyTreeElement.prototype._createReadOnlyIconElement):
1918         Helpers for creating the small components of the title UI.
1919
1920         (WebInspector.ObjectTreePropertyTreeElement.prototype._alwaysDisplayAsProperty):
1921         Establish when a property should still be displayed as a "property" even when in API mode.
1922         For example a value property on a prototype, should still display as an expandable property.
1923
1924         * UserInterface/Views/ObjectTreeView.css:
1925         (.object-tree > :matches(.title, .object-preview)::before):
1926         (.object-tree:not(.lossless-preview) > :matches(.title, .object-preview)):
1927         (.object-tree.expanded > :matches(.title, .object-preview)::before):
1928         (.object-tree .object-tree-outline):
1929         (.object-tree-outline ol):
1930         (.object-tree-outline li .empty-message):
1931         (:matches(.console-formatted-object, .console-formatted-node, .console-formatted-error, .console-formatted-map, .console-formatted-set, .console-formatted-weakmap) .object-tree-outline):
1932         (.object-tree > .title): Deleted.
1933         (.object-tree-outline): Deleted.
1934         (.object-tree-outline li): Deleted.
1935         (.object-tree-outline li.parent): Deleted.
1936         (.object-tree-outline li.parent::before): Deleted.
1937         (.object-tree-outline li.parent.expanded::before): Deleted.
1938         (.object-tree-property .name): Deleted.
1939         (.object-tree-property .name.not-enumerable): Deleted.
1940         (.object-tree-property .value.error): Deleted.
1941         (.console-group-messages .object-tree:not(.lossless-preview)): Deleted.
1942         (.console-group-messages .object-tree:not(.lossless-preview) > :matches(.title, .object-preview)): Deleted.
1943         (.console-group-messages .object-tree:not(.lossless-preview) > :matches(.title, .object-preview)::before): Deleted.
1944         (.console-group-messages :matches(.console-formatted-object, .console-formatted-node, .console-formatted-error, .console-formatted-map, .console-formatted-set, .console-formatted-weakmap) .object-tree): Deleted.
1945         (.console-group-messages :matches(.console-formatted-object, .console-formatted-node, .console-formatted-error, .console-formatted-map, .console-formatted-set, .console-formatted-weakmap) .object-tree-outline): Deleted.
1946         Move most PropertyTreeElement specific styles into ObjectPropertyTreeElement.css.
1947         Plenty of console specific files were eliminated.
1948
1949         * UserInterface/Views/ObjectTreeView.js:
1950         (WebInspector.ObjectTreeView.prototype.update):
1951         (WebInspector.ObjectTreeView.prototype._updateProperties):
1952
1953
1954         Part 2: Provide better parameter lists for native functions.
1955
1956         When expanding an object's prototype chain, with authored code
1957         you will accurately see parameter lists for user authored functions
1958         because we can get this by parsing Function.prototype.toString.
1959         For native code, we don't get any parameter information. In such cases
1960         we can detect we are a native function, and provide our own strings.
1961
1962         This fills in most of the JavaScript built-ins and some DOM
1963         functions, however we should autogenerate the rest of the DOM.
1964
1965         * UserInterface/Base/Utilities.js:
1966         (isFunctionStringNativeCode):
1967         Helper to check if a function is native or not based on its string.
1968
1969         * UserInterface/Main.html:
1970         * UserInterface/Models/NativeFunctionParameters.js: Added.
1971         Dictionary of parameter lists for native constructor functions
1972         and prototype functions.
1973
1974         * UserInterface/Views/ObjectTreePropertyTreeElement.js:
1975         (WebInspector.ObjectTreePropertyTreeElement):
1976         (WebInspector.ObjectTreePropertyTreeElement.prototype._functionPropertyString):
1977         (WebInspector.ObjectTreePropertyTreeElement.prototype._functionParameterString):
1978         (WebInspector.ObjectTreePropertyTreeElement.prototype):
1979         When we have a native function, try to provide a better parameter string.
1980
1981
1982         Part 3: Better handle errors when invoking getters.
1983
1984         * UserInterface/Protocol/RemoteObject.js:
1985         (WebInspector.RemoteObject.prototype.callFunction):
1986         (WebInspector.RemoteObject.prototype.invokeGetter):
1987         Pass the error, wasThrown, and result through to the caller so they can
1988         act on all the information possible. Provide encapsulation though
1989         and auto-convert the result to a RemoteObject for the callback.
1990
1991         * UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
1992         (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshProperties.nodeResolved):
1993         (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshProperties.nodePrototypesReady):
1994         * UserInterface/Views/DOMTreeElement.js:
1995         (WebInspector.DOMTreeElement.prototype._createTooltipForNode.setTooltip):
1996         (WebInspector.DOMTreeElement.prototype._createTooltipForNode.resolvedNode):
1997         (WebInspector.DOMTreeElement.prototype._createTooltipForNode):
1998         Update current users of callFunctionOn for the new callback parameters.
1999
2000         * UserInterface/Views/ObjectTreePropertyTreeElement.css:
2001         (.object-tree-property.had-error > .icon):
2002         * UserInterface/Views/ObjectTreePropertyTreeElement.js:
2003         (WebInspector.ObjectTreePropertyTreeElement):
2004         (WebInspector.ObjectTreePropertyTreeElement.prototype._updateHasChildren):
2005         (WebInspector.ObjectTreePropertyTreeElement.prototype._updateTitleAndIcon):
2006         (WebInspector.ObjectTreePropertyTreeElement.prototype._createTitlePropertyStyle):
2007         (WebInspector.ObjectTreePropertyTreeElement.prototype._createInteractiveGetterElement.):
2008         Better style getters with errors.
2009
2010 2015-02-24  Joseph Pecoraro  <pecoraro@apple.com>
2011
2012         Web Inspector: Do not show "{}" after Date description in Object Previews
2013         https://bugs.webkit.org/show_bug.cgi?id=141898
2014
2015         Reviewed by Timothy Hatcher.
2016
2017         * UserInterface/Views/ObjectPreviewView.js:
2018         (WebInspector.ObjectPreviewView.prototype._appendPropertyPreviews):
2019         Only show "{...}" section for Date objects that have user
2020         defined properties. Otherwise, Dates do not have properties.
2021
2022 2015-02-23  Joseph Pecoraro  <pecoraro@apple.com>
2023
2024         Web Inspector: Remove unused console-object-preview styles - replaced by ObjectPreviewView
2025         https://bugs.webkit.org/show_bug.cgi?id=141945
2026
2027         Reviewed by Timothy Hatcher.
2028
2029         * UserInterface/Views/LogContentView.css:
2030         (.console-object-preview): Deleted.
2031         (.expanded .console-object-preview): Deleted.
2032         (.console-object-preview .name): Deleted.
2033         (.expanded .console-object-preview > .console-object-preview-body): Deleted.
2034         (.console-object-preview > .console-object-preview-name.console-object-preview-name-Object): Deleted.
2035         (.console-object-preview-body .console-object-preview-name.console-object-preview-name-Object): Deleted.
2036         (.expanded .console-object-preview > .console-object-preview-name.console-object-preview-name-Object): Deleted.
2037
2038 2015-02-23  Saam Barati  <saambarati1@gmail.com>
2039
2040         Web Inspector: BasicBlockAnnotator ranges should be inclusive of both the start and end offset
2041         https://bugs.webkit.org/show_bug.cgi?id=141334
2042
2043         Reviewed by Timothy Hatcher.
2044
2045         * UserInterface/Views/TextEditor.js:
2046         (WebInspector.TextEditor.prototype.addStyleToTextRange):
2047
2048 2015-02-22  Joseph Pecoraro  <pecoraro@apple.com>
2049
2050         Web Inspector: Lazily Create GeneralTreeElement Status Elements
2051         https://bugs.webkit.org/show_bug.cgi?id=141873
2052
2053         Reviewed by Timothy Hatcher.
2054
2055         * UserInterface/Views/GeneralTreeElement.js:
2056         (WebInspector.GeneralTreeElement.prototype.set status):
2057         (WebInspector.GeneralTreeElement.prototype.onattach):
2058         (WebInspector.GeneralTreeElement.prototype._createElementsIfNeeded):
2059         (WebInspector.GeneralTreeElement.prototype._updateStatusElement):
2060         Lazily create and attach the status element container if
2061         "this.status" is actually used by a GeneralTreeElement subclass.
2062
2063         * UserInterface/Views/ResourceTreeElement.js:
2064         (WebInspector.ResourceTreeElement.prototype._updateStatus):
2065         Set to the empty string instead of null to avoid inadvertently
2066         creating status elements for no reason.
2067
2068 2015-02-22  Joseph Pecoraro  <pecoraro@apple.com>
2069
2070         Web Inspector: Give ObjectPreviewView a showTitle/showPreview toggle
2071         https://bugs.webkit.org/show_bug.cgi?id=141874
2072
2073         Reviewed by Timothy Hatcher.
2074
2075         Refactor ObjectTree/ObjectPreview a bit to make it easier
2076         to use expanding/collapsing previews in other places.
2077
2078         * UserInterface/Views/ObjectPreviewView.js:
2079         (WebInspector.ObjectPreviewView):
2080         (WebInspector.ObjectPreviewView.prototype.showTitle):
2081         (WebInspector.ObjectPreviewView.prototype.showPreview):
2082         Maintain both a titleElement and previewElement. Show only
2083         one at a time based on showTitle/showPreview APIs.
2084
2085         * UserInterface/Views/ObjectTreeView.css:
2086         (.object-tree.expanded .object-preview):
2087         * UserInterface/Views/ObjectTreeView.js:
2088         (WebInspector.ObjectTreeView):
2089         (WebInspector.ObjectTreeView.prototype.expand):
2090         (WebInspector.ObjectTreeView.prototype.collapse):
2091         If we have a preview, let PreviewView handle toggling
2092         between a title and preview display.
2093
2094 2015-02-22  Joseph Pecoraro  <pecoraro@apple.com>
2095
2096         Web Inspector: Make Console UI icons / lines slightly larger
2097         https://bugs.webkit.org/show_bug.cgi?id=141876
2098
2099         Reviewed by Timothy Hatcher.
2100
2101         In preparation for a new ObjectTree design with larger icons,
2102         increase the size of existing output in the Console / Log
2103         so they don't look so small in comparison. This:
2104
2105           - bumps minimum height of lines from 16px to 21px
2106           - 10x10 icons to be 12x12
2107           - recenters icons to match console prompt
2108           - realigns icons with console log / object output
2109
2110         * UserInterface/Views/LogContentView.css:
2111         (.console-user-command-result.console-log-level::before):
2112         (.console-message, .console-user-command):
2113         (.console-item::before):
2114         (.console-user-command::before):
2115         (:matches(.console-warning-level, .console-error-level, .console-log-level).console-message):
2116         (:matches(.console-warning-level, .console-error-level, .console-log-level)::before):
2117         (.outline-disclosure li):
2118         (.outline-disclosure .expanded li):
2119         Fix a case breaking single-line message height.
2120         Only add padding to expanded trees, not collapsed trees.
2121
2122         * UserInterface/Views/QuickConsole.css:
2123         (.quick-console > .console-prompt::before):
2124
2125 2015-02-21  Joseph Pecoraro  <pecoraro@apple.com>
2126
2127         Web Inspector: Generate Previews more often for RemoteObject interaction
2128         https://bugs.webkit.org/show_bug.cgi?id=141875
2129
2130         Reviewed by Timothy Hatcher.
2131
2132         * UserInterface/Models/PropertyDescriptor.js:
2133         (WebInspector.PropertyDescriptor.fromPayload):
2134         Fix InternalPropertyDescriptor ingestion. There was no ".internal"
2135         property on these objects, so take a flag.
2136
2137         * UserInterface/Protocol/RemoteObject.js:
2138         (WebInspector.RemoteObject.prototype._getPropertyDescriptors):
2139         Fix InternalPropertyDescriptor ingestion by specifying during
2140         importing the internal properties. Also, get previews.
2141
2142         (WebInspector.RemoteObject.prototype.callFunction):
2143         Always get previews when using callFunctionOn.
2144
2145 2015-02-20  Ronald Jett  <rjett@apple.com>
2146
2147         Web Inspector: Add a setting for clearing the console on page reload
2148         https://bugs.webkit.org/show_bug.cgi?id=134414
2149
2150         Reviewed by Timothy Hatcher.
2151
2152         Created a new setting "clear-log-on-reload", which defaults to true.
2153         Users can toggle this setting with an item added to the console's context menu. 
2154         When enabled, the console will clear on page reload. When disabled, the console
2155         content will remain during page reloads. 
2156
2157         * Localizations/en.lproj/localizedStrings.js:
2158         * UserInterface/Views/LogContentView.js:
2159         (WebInspector.LogContentView):
2160         (WebInspector.LogContentView.prototype._sessionStarted):
2161         (WebInspector.LogContentView.prototype._handleContextMenuEvent):
2162         (WebInspector.LogContentView.prototype._toggleClearLogOnReloadSetting):
2163
2164 2015-02-19  Saam Barati  <saambarati1@gmail.com>
2165
2166         Web Inspector: merge in upstream Esprima to support parsing more of ES6
2167         https://bugs.webkit.org/show_bug.cgi?id=141215
2168
2169         Reviewed by Timothy Hatcher.
2170
2171         This patch merges in a new esprima that has some ES6 support.
2172         Specifically, the ES6 support ScriptSyntaxTree now has is:
2173         - ForOf loops
2174         - Object destructuring
2175         - Array destructuring
2176
2177         ScriptSyntaxTree now uses Symbols for identifying AST node types
2178         instead of strings. This will prevent any direct usage of strings 
2179         for node types instead of a direct property access off the 
2180         ScriptSyntaxTree constructor.
2181
2182         This patch also does some gardening work: 
2183         - TypeTokenAnnotator only walks over the incoming type information
2184           data once to be more efficient. 
2185         - TypeTokenView is now smarter about updating its associated DOM node
2186           only if its display name has changed.
2187
2188         * UserInterface/Controllers/TypeTokenAnnotator.js:
2189         (WebInspector.TypeTokenAnnotator.prototype._insertTypeTokensForEachNode):
2190         * UserInterface/External/Esprima/esprima.js:
2191         (.):
2192         * UserInterface/Models/ScriptSyntaxTree.js:
2193         (WebInspector.ScriptSyntaxTree.prototype.gatherIdentifiersInVariableDeclaration):
2194         (WebInspector.ScriptSyntaxTree.prototype._recurse):
2195         (WebInspector.ScriptSyntaxTree.prototype._createInternalSyntaxTree):
2196         * UserInterface/Views/TypeTokenView.js:
2197         (WebInspector.TypeTokenView.prototype.update):
2198
2199 2015-02-19  Joseph Pecoraro  <pecoraro@apple.com>
2200
2201         Web Inspector: Use of Array.from for NodeList/Arguments to Array conversion
2202         https://bugs.webkit.org/show_bug.cgi?id=141819
2203
2204         Reviewed by Timothy Hatcher.
2205
2206         Array.from is clearer than Array.prototype.slice.call(arrayLike).
2207
2208         * UserInterface/Base/Test.js:
2209         (.console.logType):
2210         * UserInterface/Protocol/InspectorBackend.js:
2211         (InspectorBackend.Command.prototype.promise):
2212         (InspectorBackend.Command.prototype._invokeWithArguments):
2213         * UserInterface/Views/LogContentView.js:
2214         (WebInspector.LogContentView.prototype._allMessages):
2215
2216 2015-02-19  Joseph Pecoraro  <pecoraro@apple.com>
2217
2218         Follow-up fix to r180371. formatParameterAsValue expects full object, not just a description.
2219
2220         Reviewed by Timothy Hatcher.
2221
2222         * UserInterface/Views/ConsoleMessageImpl.js:
2223         (WebInspector.ConsoleMessageImpl.prototype._formatParameter):
2224
2225 2015-02-19  Joseph Pecoraro  <pecoraro@apple.com>
2226
2227         Web Inspector: Introduce FormattedValue helpers and use them in Console/ObjectTree
2228         https://bugs.webkit.org/show_bug.cgi?id=141812
2229
2230         Reviewed by Timothy Hatcher.
2231
2232         There were a few different ways to get styled values. Try to consolidate them
2233         all in FormattedValue. That is also a convenient place to have the styles.
2234
2235         * UserInterface/Main.html:
2236         * UserInterface/Views/ConsoleMessageImpl.js:
2237         (WebInspector.ConsoleMessageImpl.prototype._formatMessage):
2238         (WebInspector.ConsoleMessageImpl.prototype._formatParameter):
2239         (WebInspector.ConsoleMessageImpl.prototype._formatParameterAsValue):
2240         (WebInspector.ConsoleMessageImpl.prototype._formatParameterAsString):
2241
2242         (WebInspector.ConsoleMessageImpl.prototype._userProvidedColumnNames):
2243         (WebInspector.ConsoleMessageImpl.prototype._formatParameterAsTable):
2244         (WebInspector.ConsoleMessageImpl.prototype._populateStackTraceTreeElement):
2245         (WebInspector.ConsoleMessageImpl.prototype._propertyPreviewElement): Deleted.
2246         Fix console.table after renaming ObjectPreview.properties to ObjectPreview.propertyPreviews.
2247         Also, use FormattedValue to create the value elements. Also, remove class
2248         "source-code" as I do not see it actually being used in a meaningful way.
2249
2250         * UserInterface/Views/FormattedValue.css: Added.
2251         (.formatted-object, .formatted-node, .formatted-error, .formatted-map, .formatted-set, .formatted-weakmap):
2252         (.formatted-number):
2253         (.formatted-string, .formatted-regexp):
2254         (.formatted-string):
2255         (.formatted-regexp):
2256         (.formatted-symbol):
2257         (.formatted-null, .formatted-undefined):
2258         * UserInterface/Views/FormattedValue.js: Added.
2259         (WebInspector.FormattedValue.classNameForTypes):
2260         (WebInspector.FormattedValue.classNameForObject):
2261         (WebInspector.FormattedValue.createLinkifiedElementString):
2262         (WebInspector.FormattedValue.createElementForTypesAndValue):
2263         (WebInspector.FormattedValue.createElementForRemoteObject):
2264         (WebInspector.FormattedValue.createElementForObjectPreview):
2265         (WebInspector.FormattedValue.createElementForPropertyPreview):
2266         Styles and formatted value element creation.
2267
2268         * UserInterface/Views/LogContentView.css:
2269         (.expandable.source-code): Deleted.
2270         Remove ".source-code". I do not see it actually being used in a meaningful way.
2271
2272         * UserInterface/Views/ObjectPreviewView.js:
2273         (WebInspector.ObjectPreviewView.prototype._appendPropertyPreviews):
2274         (WebInspector.ObjectPreviewView.prototype._appendValuePreview):
2275         (WebInspector.ObjectPreviewView.prototype._formattedObjectElementForPreview): Deleted.
2276         * UserInterface/Views/ObjectTreePropertyTreeElement.js:
2277         (WebInspector.ObjectTreePropertyTreeElement.prototype._updateTitlePropertyStyle):
2278         (WebInspector.ObjectTreePropertyTreeElement.prototype._descriptionString): Deleted.
2279         * UserInterface/Views/ObjectTreeView.css:
2280         (.formatted-object, .formatted-node, .formatted-error, .formatted-map, .formatted-set, .formatted-weakmap): Deleted.
2281         (.formatted-number): Deleted.
2282         (.formatted-string, .formatted-regexp): Deleted.
2283         (.formatted-string): Deleted.
2284         (.formatted-regexp): Deleted.
2285         (.formatted-symbol): Deleted.
2286         (.formatted-null, .formatted-undefined): Deleted.
2287         * UserInterface/Views/ObjectTreeView.js:
2288         (WebInspector.ObjectTreeView.classNameForObject): Deleted.
2289         Extract styles and value formatting to FormattedValue helpers.
2290
2291 2015-02-19  Joseph Pecoraro  <pecoraro@apple.com>
2292
2293         Web Inspector: Disable DOM Tree Editing / Styles Editing of Shadow DOM Nodes
2294         https://bugs.webkit.org/show_bug.cgi?id=141793
2295
2296         Unreviewed follow-up. Fix prototypes.
2297
2298         * UserInterface/Views/ObjectPreviewView.js:
2299         * UserInterface/Views/ObjectTreeView.js:
2300
2301 2015-02-19  Joseph Pecoraro  <pecoraro@apple.com>
2302
2303         Web Inspector: Create Separate Model and View Objects for RemoteObjects / ObjectPreview / PropertyDescriptor
2304         https://bugs.webkit.org/show_bug.cgi?id=141696
2305
2306         Reviewed by Timothy Hatcher.
2307
2308         * UserInterface/Main.html:
2309         Add new files.
2310
2311         * UserInterface/Models/CollectionEntry.js: Added.
2312         (WebInspector.CollectionEntry):
2313         (WebInspector.CollectionEntry.fromPayload):
2314         (WebInspector.CollectionEntry.prototype.get key):
2315         (WebInspector.CollectionEntry.prototype.get value):
2316         * UserInterface/Models/CollectionEntryPreview.js: Added.
2317         (WebInspector.CollectionEntryPreview):
2318         (WebInspector.CollectionEntryPreview.fromPayload):
2319         (WebInspector.CollectionEntryPreview.prototype.get keyPreview):
2320         (WebInspector.CollectionEntryPreview.prototype.get valuePreview):
2321         * UserInterface/Models/ObjectPreview.js: Added.
2322         (WebInspector.ObjectPreview):
2323         (WebInspector.ObjectPreview.fromPayload):
2324         (WebInspector.ObjectPreview.prototype.get type):
2325         (WebInspector.ObjectPreview.prototype.get subtype):
2326         (WebInspector.ObjectPreview.prototype.get description):
2327         (WebInspector.ObjectPreview.prototype.get lossless):
2328         (WebInspector.ObjectPreview.prototype.get overflow):
2329         (WebInspector.ObjectPreview.prototype.get properties):
2330         (WebInspector.ObjectPreview.prototype.get entries):
2331         * UserInterface/Models/PropertyPreview.js: Added.
2332         (WebInspector.PropertyPreview):
2333         (WebInspector.PropertyPreview.fromPayload):
2334         (WebInspector.PropertyPreview.prototype.get name):
2335         (WebInspector.PropertyPreview.prototype.get type):
2336         (WebInspector.PropertyPreview.prototype.get subtype):
2337         (WebInspector.PropertyPreview.prototype.get value):
2338         (WebInspector.PropertyPreview.prototype.get valuePreview):
2339         * UserInterface/Models/PropertyDescriptor.js: Added.
2340         (WebInspector.PropertyDescriptor.fromPayload):
2341         (WebInspector.PropertyDescriptor.prototype.get name):
2342         (WebInspector.PropertyDescriptor.prototype.get value):
2343         (WebInspector.PropertyDescriptor.prototype.get writable):
2344         (WebInspector.PropertyDescriptor.prototype.get configurable):
2345         (WebInspector.PropertyDescriptor.prototype.get enumerable):
2346         (WebInspector.PropertyDescriptor.prototype.get isOwnProperty):
2347         (WebInspector.PropertyDescriptor.prototype.get wasThrown):
2348         (WebInspector.PropertyDescriptor.prototype.get isInternalProperty):
2349         (WebInspector.PropertyDescriptor.prototype.hasValue):
2350         (WebInspector.PropertyDescriptor.prototype.hasGetter):
2351         (WebInspector.PropertyDescriptor.prototype.hasSetter):
2352         New Model objects for different Protocol types.
2353         The only customizations right now are compatibility modifications
2354         and PropertyDescriptor's "hasValue", "hasGetter", and "hasSetter"
2355         functions to return reliable checks based on the descriptors contents.
2356
2357         * UserInterface/Protocol/RemoteObject.js:
2358         (WebInspector.RemoteObject):
2359         (WebInspector.RemoteObject.fromPayload):
2360         (WebInspector.RemoteObject.resolveNode):
2361         (WebInspector.RemoteObject.prototype.get value):
2362         (WebInspector.RemoteObject.prototype._isSymbol):
2363         (WebInspector.RemoteObject.prototype.isCollectionType):
2364         (WebInspector.RemoteObject.prototype.isWeakCollection):
2365         (WebInspector.RemoteObject.prototype.getCollectionEntries):
2366         (WebInspector.RemoteObject.prototype.arrayLength):
2367         Clean up the existing code to enforce more checks and use our
2368         style of member variables and public accessors.
2369
2370         (WebInspector.RemoteObject.prototype.getOwnPropertyDescriptors):
2371         (WebInspector.RemoteObject.prototype.getOwnAndGetterPropertyDescriptors):
2372         (WebInspector.RemoteObject.prototype.getAllPropertyDescriptors):
2373         (WebInspector.RemoteObject.prototype.callback):
2374         Provide a new way of getting properties that returns Model objects
2375         instead of raw protocol types.
2376
2377         * UserInterface/Views/ConsoleMessageImpl.js:
2378         (WebInspector.ConsoleMessageImpl.prototype._format):
2379         (WebInspector.ConsoleMessageImpl.prototype._formatParameter):
2380         (WebInspector.ConsoleMessageImpl.prototype._propertyPreviewElement):
2381         (WebInspector.ConsoleMessageImpl.prototype._formatParameterAsNode):
2382         (WebInspector.ConsoleMessageImpl.prototype._formatParameterAsTable):
2383         (WebInspector.ConsoleMessageImpl.prototype._formatAsArrayEntry):
2384         Always include a preview when possible. Now, when forced to be an object,
2385         force expansion even if the preview is lossless.
2386
2387         (WebInspector.ConsoleMessageImpl.prototype._formatParameterAsObject):
2388         Use an ObjectTreeView instead of ObjectPropertiesSection.
2389
2390         (WebInspector.ConsoleMessageImpl.prototype._appendPreview): Deleted.
2391         (WebInspector.ConsoleMessageImpl.prototype._appendEntryPreviews): Deleted.
2392         (WebInspector.ConsoleMessageImpl.prototype._appendPropertyPreviews): Deleted.
2393         (WebInspector.ConsoleMessageImpl.prototype._appendValuePreview): Deleted.
2394         This code is moved into ObjectPreviewView.
2395
2396
2397         * UserInterface/Views/ObjectPropertiesSection.js:
2398         (WebInspector.CollectionEntriesMainTreeElement.prototype.onexpand.callback):
2399         (WebInspector.CollectionEntriesMainTreeElement.prototype.onexpand):
2400         These types are now converted to Model types in Model objects, so do not do it here.
2401
2402         * UserInterface/Views/ObjectPreviewView.css: Added.
2403         (.object-preview):
2404         (.object-preview.lossless):
2405         (.object-preview .name):
2406         * UserInterface/Views/ObjectPreviewView.js: Added.
2407         (WebInspector.ObjectPreviewView):
2408         (WebInspector.ObjectPreviewView.prototype.get preview):
2409         (WebInspector.ObjectPreviewView.prototype.get element):
2410         (WebInspector.ObjectPreviewView.prototype.get mode):
2411         (WebInspector.ObjectPreviewView.prototype.get lossless):
2412         (WebInspector.ObjectPreviewView.prototype._numberOfPropertiesToShowInMode):
2413         (WebInspector.ObjectPreviewView.prototype._appendPreview):
2414         (WebInspector.ObjectPreviewView.prototype._appendEntryPreviews):
2415         (WebInspector.ObjectPreviewView.prototype._appendPropertyPreviews):
2416         (WebInspector.ObjectPreviewView.prototype._appendValuePreview):
2417         (WebInspector.ObjectPreviewView.prototype._formattedObjectElementForPreview):
2418         An ObjectPreviewView can create a full/brief view given a ObjectPreview.
2419         The view will contain formatted values everywhere possible.
2420
2421         * UserInterface/Views/ObjectTreePropertyTreeElement.js: Added.
2422         (WebInspector.ObjectTreePropertyTreeElement):
2423         (WebInspector.ObjectTreePropertyTreeElement.prototype.get property):
2424         (WebInspector.ObjectTreePropertyTreeElement.prototype.onpopulate):
2425         (WebInspector.ObjectTreePropertyTreeElement.prototype.onattach):
2426         (WebInspector.ObjectTreePropertyTreeElement.prototype._updateTitle):
2427         (WebInspector.ObjectTreePropertyTreeElement.prototype._updateTitlePropertyStyle):
2428         (WebInspector.ObjectTreePropertyTreeElement.prototype._updateTitleAPIStyle):
2429         (WebInspector.ObjectTreePropertyTreeElement.prototype._descriptionString):
2430         (WebInspector.ObjectTreePropertyTreeElement.prototype._functionParameterString):
2431         (WebInspector.ObjectTreePropertyTreeElement.prototype.mode):
2432         (WebInspector.ObjectTreePropertyTreeElement.prototype):
2433         * UserInterface/Views/ObjectTreeView.js: Added.
2434         (WebInspector.ObjectTreeView):
2435         (WebInspector.ObjectTreeView.classNameForObject):
2436         (WebInspector.ObjectTreeView.ComparePropertyDescriptors):
2437         (WebInspector.ObjectTreeView.prototype.get object):
2438         (WebInspector.ObjectTreeView.prototype.get element):
2439         (WebInspector.ObjectTreeView.prototype.get expanded):
2440         (WebInspector.ObjectTreeView.prototype.expand):
2441         (WebInspector.ObjectTreeView.prototype.collapse):
2442         (WebInspector.ObjectTreeView.prototype.update):
2443         (WebInspector.ObjectTreeView.prototype._updateProperties):
2444         (WebInspector.ObjectTreeView.prototype._handlePreviewOrTitleElementClick):
2445         Re-implementation of ObjectPropertiesSection for our Model objects
2446         without "Section" semantics / dependencies. An ObjectTree will creates
2447         an expandable tree for a RemoteObject. The top level clickable item
2448         will be an ObjectPreview if possible, otherwise just a title element.
2449
2450         * UserInterface/Views/ObjectTreeView.css: Added.
2451         (.object-tree):
2452         (.object-tree > .title):
2453         (.object-tree > :matches(.title, .object-preview)::before):
2454         (.object-tree.expanded > :matches(.title, .object-preview)::before):
2455         (.object-tree.lossless-preview > :matches(.title, .object-preview)::before):
2456         (.object-tree-outline):
2457         (.object-tree.expanded > .object-tree-outline):
2458         (.object-tree-outline li):
2459         (.object-tree-outline li.parent):
2460         (.object-tree-outline li.parent::before):
2461         (.object-tree-outline li.parent.expanded::before):
2462         (.object-tree-outline ol):
2463         (.object-tree-outline ol.expanded):
2464         (.object-tree-outline li .empty-message):
2465         (.object-tree-property .name):
2466         (.object-tree-property .name.not-enumerable):
2467         (.object-tree-property .value.error):
2468         (.formatted-object, .formatted-node, .formatted-error, .formatted-map, .formatted-set, .formatted-weakmap):
2469         (.formatted-number):
2470         (.formatted-string, .formatted-regexp):
2471         (.formatted-string):
2472         (.formatted-regexp):
2473         (.formatted-symbol):
2474         (.formatted-null, .formatted-undefined):
2475         (.console-group-messages .object-tree:not(.lossless-preview)):
2476         (.console-group-messages .object-tree:not(.lossless-preview) > :matches(.title, .object-preview)):
2477         (.console-group-messages .object-tree:not(.lossless-preview) > :matches(.title, .object-preview)::before):
2478         (.console-group-messages :matches(.console-formatted-object, .console-formatted-node, .console-formatted-error, .console-formatted-map, .console-formatted-set, .console-formatted-weakmap) .object-tree):
2479         (.console-group-messages :matches(.console-formatted-object, .console-formatted-node, .console-formatted-error, .console-formatted-map, .console-formatted-set, .console-formatted-weakmap) .object-tree-outline):
2480         All styles for ObjectTree / ObjectPreview. Independent from
2481         other styles in the inspector. Most of this is a copy of
2482         the styles applied to ObjectPropertiesSection, renamed.
2483
2484
2485         * UserInterface/Views/ObjectTreeCollectionTreeElement.js: Added.
2486         (WebInspector.ObjectTreeCollectionTreeElement):
2487         (WebInspector.ObjectTreeCollectionTreeElement.propertyDescriptorForEntry):
2488         (WebInspector.ObjectTreeCollectionTreeElement.prototype.get remoteObject):
2489         (WebInspector.ObjectTreeCollectionTreeElement.prototype.onexpand.callback):
2490         (WebInspector.ObjectTreeCollectionTreeElement.prototype.onexpand):
2491         (WebInspector.ObjectTreeCollectionTreeElement.prototype.oncollapse):
2492         (WebInspector.ObjectTreeCollectionTreeElement.prototype.ondetach):
2493         (WebInspector.ObjectTreeCollectionTreeElement.prototype._trackWeakEntries):
2494         (WebInspector.ObjectTreeCollectionTreeElement.prototype._untrackWeakEntries):
2495         (WebInspector.ObjectTreeCollectionEntryTreeElement):
2496         (WebInspector.ObjectTreeCollectionEntryTreeElement.prototype.onpopulate):
2497         (WebInspector.ObjectTreeCollectionEntryTreeElement.prototype.onattach):
2498         (WebInspector.ObjectTreeEmptyCollectionTreeElement):
2499         Essentially a copy of ObjectPropertiesSection Collection handling using
2500         the ObjectTree class names.
2501
2502         * UserInterface/Views/TreeOutlineDataGridSynchronizer.js:
2503         Fix prototype typo.
2504
2505 2015-02-19  Joseph Pecoraro  <pecoraro@apple.com>
2506
2507         Web Inspector: DOMTree / Node Details Sidebar do not update as <input> content changes
2508         https://bugs.webkit.org/show_bug.cgi?id=141790
2509
2510         Reviewed by Timothy Hatcher.
2511
2512         * UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
2513         (WebInspector.DOMNodeDetailsSidebarPanel):
2514         (WebInspector.DOMNodeDetailsSidebarPanel.prototype._characterDataModified):
2515         Update Node "Value" details if character data changes.
2516
2517         * UserInterface/Views/DOMTreeUpdater.js:
2518         (WebInspector.DOMTreeUpdater.prototype._updateModifiedNodes):
2519         Update the title of the parent. If the parent had a single text node child
2520         and now doesn't, it will need to update its display.
2521
2522 2015-02-19  Joseph Pecoraro  <pecoraro@apple.com>
2523
2524         Web Inspector: Disable DOM Tree Editing / Styles Editing of Shadow DOM Nodes
2525         https://bugs.webkit.org/show_bug.cgi?id=141793
2526
2527         Reviewed by Timothy Hatcher.
2528
2529         Currently the backend disallows editing of Shadow DOM nodes,
2530         so the frontend should not provide options that do not work.
2531         Long term we should allow editing Shadow DOM nodes.
2532
2533         * UserInterface/Models/CSSStyleDeclaration.js:
2534         (WebInspector.CSSStyleDeclaration.prototype.get editable):
2535         Inline styles on a Shadow DOM node are not editable.
2536
2537         * UserInterface/Views/DOMTreeElement.js:
2538         (WebInspector.DOMTreeElement.prototype.ondelete):
2539         (WebInspector.DOMTreeElement.prototype._startEditingTarget):
2540         (WebInspector.DOMTreeElement.prototype._populateTagContextMenu):
2541         (WebInspector.DOMTreeElement.prototype._populateTextContextMenu):
2542         (WebInspector.DOMTreeElement.prototype._populateNodeContextMenu):
2543         (WebInspector.DOMTreeElement.prototype._startEditing):
2544         Disable context menus and keyboard shortcuts on Shadow DOM nodes.
2545         Only Context Menu item we keep is "Copy as HTML".
2546
2547         * UserInterface/Views/DOMTreeOutline.js:
2548         (WebInspector.DOMTreeOutline.prototype._contextMenuEventFired):
2549         (WebInspector.DOMTreeOutline.prototype.populateContextMenu):
2550         Eliminate double look-up.
2551
2552         * UserInterface/Views/RulesStyleDetailsPanel.js:
2553         (WebInspector.RulesStyleDetailsPanel.prototype.refresh.addNewRuleButton):
2554         Do not add the New Rule Button to the Styles Sidebar of Shadow DOM Nodes.
2555         Instead this will just be an empty divider.
2556
2557 2015-02-18  Nikita Vasilyev  <nvasilyev@apple.com>
2558
2559         Web Inspector: REGRESSION: Missing Divider line between console.log and console evaluation
2560         https://bugs.webkit.org/show_bug.cgi?id=141770
2561
2562         Reviewed by Timothy Hatcher.
2563
2564         * UserInterface/Views/LogContentView.css:
2565         (.console-item):
2566         (.console-message): Deleted.
2567
2568 2015-02-18  Jono Wells  <jonowells@apple.com>
2569
2570         Web Inspector: Inspecting a page where resources are in folders forces folder organization on every subsequent page
2571         https://bugs.webkit.org/show_bug.cgi?id=141397
2572
2573         Reviewed by Timothy Hatcher.
2574
2575         When removeChildren is called on an instance of a FolderizedTreeElement, the element's _groupedIntoFolders flag
2576         will now be set to false. This will prevent unnecessary folderization upon a frame navigation. Also during an
2577         onpopulate event, addChildForRepresentedObject is called repeatedly and much of the work done during each call
2578         was unnecessary. That work has now been partially removed and partially relocated to a function that is only
2579         called at the beginning of an onpopulate event.
2580
2581         * UserInterface/Views/FolderizedTreeElement.js:
2582         (WebInspector.FolderizedTreeElement.prototype.set removeChildren): Set _groupedIntoFolders to false.
2583         (WebInspector.FolderizedTreeElement.prototype.addChildForRepresentedObject): Remove unnecessary treeOutline
2584         emptiness check, and move _shouldGroupIntoFolders() check to new function prepareToPopulate().
2585         (WebInspector.FolderizedTreeElement.prototype.prepareToPopulate): Create.
2586         (WebInspector.FolderizedTreeElement.prototype._populateFromNewChildQueue): Call prepareToPopulate().
2587
2588         * UserInterface/Views/FrameTreeElement.js:
2589         (WebInspector.FrameTreeElement.prototype.onpopulate): Call prepareToPopulate().
2590
2591         * UserInterface/Views/GeneralTreeElement.js: Drive-by inheritance style fix.
2592         * UserInterface/Views/ResourceTreeElement.js: Drive-by inheritance style fix.
2593
2594 2015-02-16  Joseph Pecoraro  <pecoraro@apple.com>
2595
2596         Web Inspector: ES6: Improved Console Support for Promise Objects
2597         https://bugs.webkit.org/show_bug.cgi?id=141634
2598
2599         Reviewed by Timothy Hatcher.
2600
2601         * UserInterface/Protocol/RemoteObject.js:
2602         For now just add Internal Properties and regular properties.
2603         We will address the UI later.
2604
2605 2015-02-16  Nikita Vasilyev  <nvasilyev@apple.com>
2606
2607         Web Inspector: Tweak the styles on the Console
2608         https://bugs.webkit.org/show_bug.cgi?id=140580
2609
2610             - Use non-monospace (default sans-serif) font for console messages, but keep using monospace font
2611               for objects, functions, and anything else that presumably code.
2612             - Display all expandable objects on a separate row.
2613
2614         Reviewed by Timothy Hatcher.
2615
2616         * UserInterface/Views/ConsoleCommand.js:
2617         (WebInspector.ConsoleCommand.prototype.decorateMessageElement):
2618         (WebInspector.ConsoleCommand.prototype.toMessageElement):
2619         * UserInterface/Views/ConsoleGroup.js:
2620         (WebInspector.ConsoleGroup.prototype.addMessage):
2621         * UserInterface/Views/ConsoleMessageImpl.js:
2622         (WebInspector.ConsoleMessageImpl.prototype._format):
2623         (WebInspector.ConsoleMessageImpl.prototype._isExpandable):
2624         (WebInspector.ConsoleMessageImpl.prototype._formatParameter):
2625         (WebInspector.ConsoleMessageImpl.prototype.append):
2626         (WebInspector.ConsoleMessageImpl.prototype._formatWithSubstitutionString):
2627         (WebInspector.ConsoleMessageImpl.prototype.decorateMessageElement):
2628         (WebInspector.ConsoleMessageImpl.prototype.toMessageElement):
2629         (WebInspector.ConsoleMessageImpl.prototype._formatParameterAsString): Deleted.
2630         * UserInterface/Views/LogContentView.css:
2631         (.console-messages):
2632         (.console-formatted-object):
2633         (.expandable.source-code):
2634         (.console-message):
2635         (.console-item.selected::after):
2636         (.console-messages:focus .console-item.selected::after):
2637         (.console-user-command-result.console-log-level::before):
2638         (.console-item::before):
2639         (.console-message .bubble):
2640         (.console-error-level):
2641         (.console-error-level .section .header .title):
2642         (.console-error-level::before):
2643         (.console-warning-level):
2644         (.console-warning-level .console-message-text):
2645         (.console-warning-level::before):
2646         (.console-user-command::before):
2647         (.console-group-messages .section):
2648         (.console-group-messages .section .header::before):
2649         (.console-group-messages .section .header .title):
2650         (.console-formatted-object, .console-formatted-node, .console-formatted-error, .console-formatted-map, .console-formatted-set, .console-formatted-weakmap):
2651         (.outline-disclosure li):
2652         (.outline-disclosure li.parent::before):
2653         (.console-item): Deleted.
2654         (.console-item.selected): Deleted.
2655         (.console-messages:focus .console-item.selected): Deleted.
2656         (.console-item.selected .console-message::after): Deleted.
2657         (.console-messages:focus .console-item.selected .data-grid tr.selected): Deleted.
2658         (.console-messages:focus .console-item.selected .console-message::after): Deleted.
2659         (.console-message, .console-user-command): Deleted.
2660         (.console-message::before, .console-user-command::before, .javascript-prompt::before, .console-group-title::before): Deleted.
2661         (.console-group): Deleted.
2662         (.console-debug-level .console-message-text): Deleted.
2663         (.console-debug-level::before): Deleted.
2664         (.console-group-messages .section .header): Deleted.
2665         (.console-group-messages .outline-disclosure): Deleted.
2666         (.console-group-messages .outline-disclosure > ol): Deleted.
2667         (.outline-disclosure li.elements-drag-over .selection): Deleted.
2668         (.outline-disclosure ol:focus li.selected .selection): Deleted.
2669         (.outline-disclosure > ol): Deleted.
2670         * UserInterface/Views/LogContentView.js:
2671         (WebInspector.LogContentView.prototype._mousemove):
2672         (WebInspector.LogContentView.prototype._updateMessagesSelection):
2673         (WebInspector.LogContentView.prototype._isMessageVisible):
2674         (WebInspector.LogContentView.prototype._isMessageSelected):
2675         (WebInspector.LogContentView.prototype._selectAllMessages):
2676         (WebInspector.LogContentView.prototype._unfilteredMessages):
2677         (WebInspector.LogContentView.prototype._visibleMessages):
2678         (WebInspector.LogContentView.prototype._filterMessages):
2679         (WebInspector.LogContentView.prototype._leftArrowWasPressed):
2680         (WebInspector.LogContentView.prototype._propertiesSectionDidUpdateContent):
2681         (WebInspector.LogContentView.prototype._performSearch):
2682         * UserInterface/Views/Section.css:
2683         (.section .header .title::before):
2684         (.section.expanded .header .title::before):
2685         (.section .header .title, .event-bar .header .title):
2686         (.properties-tree li.parent::before):
2687         (.section .header::before): Deleted.
2688         (.section.expanded .header::before): Deleted.
2689
2690 2015-02-15  Brian J. Burg  <burg@cs.washington.edu>
2691
2692         Web Inspector: remove unused XHR replay code
2693         https://bugs.webkit.org/show_bug.cgi?id=141622
2694
2695         Reviewed by Timothy Hatcher.
2696
2697         * UserInterface/Protocol/Legacy/7.0/InspectorBackendCommands.js:
2698         * UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js:
2699         * Versions/Inspector-iOS-7.0.json:
2700         * Versions/Inspector-iOS-8.0.json:
2701
2702 2015-02-14  Joseph Pecoraro  <pecoraro@apple.com>
2703
2704         Web Inspector: Remove specificity approximation
2705         https://bugs.webkit.org/show_bug.cgi?id=141600
2706
2707         Reviewed by Timothy Hatcher.
2708
2709         * Localizations/en.lproj/localizedStrings.js:
2710         * UserInterface/Views/CSSStyleDeclarationSection.js:
2711         (WebInspector.CSSStyleDeclarationSection.prototype.refresh.appendSelector):
2712
2713 2015-02-13  Timothy Hatcher  <timothy@apple.com>
2714
2715         Web Inspector: support better git diff of localizedStrings.js
2716         https://bugs.webkit.org/show_bug.cgi?id=137237
2717
2718         Reviewed by Joseph Pecoraro.
2719
2720         * .gitattributes: Added.
2721
2722 2015-02-12  Brian J. Burg  <burg@cs.washington.edu>
2723
2724         Web Inspector: add keyboard shortcut to enable/disable all breakpoints
2725         https://bugs.webkit.org/show_bug.cgi?id=141527
2726
2727         Reviewed by Joseph Pecoraro.
2728
2729         * Localizations/en.lproj/localizedStrings.js:
2730         * UserInterface/Views/DebuggerSidebarPanel.js:
2731         (WebInspector.DebuggerSidebarPanel): Bind Command/Control + Y to toggle breakpoints button.
2732
2733 2015-02-12  Brian J. Burg  <burg@cs.washington.edu>
2734
2735         Web Inspector: support adding and removing timelines to the timeline sidebar panel and overview
2736         https://bugs.webkit.org/show_bug.cgi?id=138434
2737
2738         Reviewed by Timothy Hatcher.
2739
2740         A timeline recording's timelines should not be static. This patch adds relevant machinery to
2741         dynamically add and remove timelines from the Timeline model object and its various views.
2742
2743         From the model side, this is a simple change that adds TimelineAdded and TimelineRemoved events.
2744         The timeline views and timeline sidebar require more extensive changes to support this functionality.
2745         Instead of keeping a fixed set of timeline tree elements, the sidebar view now adds and removes
2746         tree elements to reflect the available timelines for the displayed timeline recording.
2747
2748         This change also includes several minor cleanups, such as appending 'Element' to view properties that
2749         are DOM elements, and renaming TimelineContentView to TimelineRecordingContentView.
2750
2751         * UserInterface/Controllers/TimelineManager.js:
2752         (WebInspector.TimelineManager.prototype._loadNewRecording):
2753         Populate predefined network, layout, and script timelines here after constructing the recording.
2754
2755         * UserInterface/Main.html:
2756         * UserInterface/Models/Timeline.js:
2757         Move hardcoded class names and localized strings to these base class methods. This is not implemented
2758         using overridden methods because not all timeline types have their own subclasses. Add a dummy
2759         implementation of saveIdentityToCookie() to avoid warnings when saving sidebar panel selection state.
2760
2761         (WebInspector.Timeline.prototype.get type):
2762         (WebInspector.Timeline.prototype.get displayName): Added.
2763         (WebInspector.Timeline.prototype.get iconClassName): Added.
2764         (WebInspector.Timeline.prototype.addRecord):
2765         * UserInterface/Models/TimelineRecording.js:
2766         (WebInspector.TimelineRecording):
2767         (WebInspector.TimelineRecording.prototype.addTimeline.set timeline): Added.
2768         (WebInspector.TimelineRecording.prototype.addTimeline): Added.
2769         (WebInspector.TimelineRecording.prototype.removeTimeline.get this): Added.
2770         (WebInspector.TimelineRecording.prototype.removeTimeline): Added.
2771         * UserInterface/Views/ContentView.js:
2772         (WebInspector.ContentView):
2773         * UserInterface/Views/LayoutTimelineView.css:
2774         (.sidebar > .panel.navigation.timeline.timeline-recording-content-view-showing .navigation-sidebar-panel-content-tree-outline.layout .item .subtitle):
2775         (.sidebar > .panel.navigation.timeline.timeline-content-view-showing .navigation-sidebar-panel-content-tree-outline.layout .item .subtitle): Deleted.
2776         * UserInterface/Views/LayoutTimelineView.js:
2777         (WebInspector.LayoutTimelineView.prototype._treeElementSelected):
2778         (WebInspector.LayoutTimelineView.prototype._closeStatusButtonClicked):
2779         * UserInterface/Views/NavigationSidebarPanel.js:
2780         (WebInspector.NavigationSidebarPanel.prototype.saveStateToCookie): Fix error message formatting.
2781         (WebInspector.NavigationSidebarPanel.prototype._updateFilter):
2782         * UserInterface/Views/NetworkTimelineView.css:
2783         (.sidebar > .panel.navigation.timeline.timeline-recording-content-view-showing .navigation-sidebar-panel-content-tree-outline.network .item .subtitle):
2784         (.sidebar > .panel.navigation.timeline.timeline-content-view-showing .navigation-sidebar-panel-content-tree-outline.network .item .subtitle): Deleted.
2785         * UserInterface/Views/NetworkTimelineView.js:
2786         (WebInspector.NetworkTimelineView.prototype._closeStatusButtonClicked):
2787         * UserInterface/Views/ScriptTimelineView.css:
2788         (.sidebar > .panel.navigation.timeline.timeline-recording-content-view-showing .navigation-sidebar-panel-content-tree-outline.script .item .subtitle):
2789         (.sidebar > .panel.navigation.timeline.timeline-content-view-showing .navigation-sidebar-panel-content-tree-outline.script .item .subtitle): Deleted.
2790         * UserInterface/Views/ScriptTimelineView.js:
2791         (WebInspector.ScriptTimelineView.prototype._treeElementSelected):
2792         (WebInspector.ScriptTimelineView.prototype._closeStatusButtonClicked):
2793         * UserInterface/Views/TimelineOverview.js:
2794         Convert this class to use the representedObject class pattern. It manages its own mapping from timelines
2795         to overview graph views. Append 'Element' to some properties holding DOM elements.
2796         (WebInspector.TimelineOverview):
2797         (WebInspector.TimelineOverview.prototype.get visibleDuration):
2798         (WebInspector.TimelineOverview.prototype.reset):
2799         (WebInspector.TimelineOverview.prototype.updateLayout):
2800         (WebInspector.TimelineOverview.prototype._handleScrollEvent):
2801         (WebInspector.TimelineOverview.prototype._handleWheelEvent):
2802         (WebInspector.TimelineOverview.prototype._timelineRemoved):
2803         (WebInspector.TimelineOverview.prototype.updateLayoutIfNeeded):
2804         (WebInspector.TimelineOverview.prototype._timeRangeSelectionChanged):
2805         * UserInterface/Views/TimelineRecordingContentView.css: Renamed from Source/WebInspectorUI/UserInterface/Views/TimelineContentView.css.
2806         Remove hard-coded top offsets and heights that need to be dynamically calculated.
2807         (.content-view.timeline-recording > .timeline-overview):
2808         (.content-view.timeline-recording > .view-container):
2809         (.content-view.timeline-recording > .view-container > .timeline-view > .data-grid td):
2810         (.content-view.timeline-recording > .view-container > .timeline-view > .data-grid table.data):
2811         * UserInterface/Views/TimelineRecordingContentView.js: Renamed from Source/WebInspectorUI/UserInterface/Views/TimelineContentView.js.
2812         Manage timeline views and path components dynamically. Adjust view heights as necessary. Append 'Element'
2813         to some properties holding DOM elements.
2814         (WebInspector.TimelineRecordingContentView):
2815         (WebInspector.TimelineRecordingContentView.prototype.showOverviewTimelineView):
2816         (WebInspector.TimelineRecordingContentView.prototype.showTimelineViewForTimeline):
2817         (WebInspector.TimelineRecordingContentView.prototype.get allowedNavigationSidebarPanels):
2818         (WebInspector.TimelineRecordingContentView.prototype.get supportsSplitContentBrowser):
2819         (WebInspector.TimelineRecordingContentView.prototype.get navigationItems):
2820         (WebInspector.TimelineRecordingContentView.prototype.get currentTimelineView):
2821         (WebInspector.TimelineRecordingContentView.prototype.shown):
2822         (WebInspector.TimelineRecordingContentView.prototype.hidden):
2823         (WebInspector.TimelineRecordingContentView.prototype.filterDidChange):
2824         (WebInspector.TimelineRecordingContentView.prototype.updateLayout):
2825         (WebInspector.TimelineRecordingContentView.prototype.saveToCookie):
2826         (WebInspector.TimelineRecordingContentView.prototype.restoreFromCookie):
2827         (WebInspector.TimelineRecordingContentView.prototype.get matchTreeElementAgainstCustomFilters.checkTimeBounds):
2828         (WebInspector.TimelineRecordingContentView.prototype.get matchTreeElementAgainstCustomFilters):
2829         (WebInspector.TimelineRecordingContentView.prototype._pathComponentSelected):
2830         (WebInspector.TimelineRecordingContentView.prototype._timelineViewSelectionPathComponentsDidChange):
2831         (WebInspector.TimelineRecordingContentView.prototype._showTimelineView):
2832         (WebInspector.TimelineRecordingContentView.prototype._update):
2833         (WebInspector.TimelineRecordingContentView.prototype._updateTimes):
2834         (WebInspector.TimelineRecordingContentView.prototype._startUpdatingCurrentTime):
2835         (WebInspector.TimelineRecordingContentView.prototype._stopUpdatingCurrentTime):
2836         (WebInspector.TimelineRecordingContentView.prototype._capturingStarted):
2837         (WebInspector.TimelineRecordingContentView.prototype._capturingStopped):
2838         (WebInspector.TimelineRecordingContentView.prototype._debuggerPaused):
2839         (WebInspector.TimelineRecordingContentView.prototype._debuggerResumed):
2840         Fix a minor regression where we make a useless call to stop updating the time.
2841
2842         (WebInspector.TimelineRecordingContentView.prototype._recordingTimesUpdated):
2843         (WebInspector.TimelineRecordingContentView.prototype._clearTimeline):
2844         (WebInspector.TimelineRecordingContentView.prototype._timelineRemoved):
2845         (WebInspector.TimelineRecordingContentView.prototype._timelineCountChanged):
2846         (WebInspector.TimelineRecordingContentView.prototype._recordingReset):
2847         (WebInspector.TimelineRecordingContentView.prototype._recordingUnloaded):
2848         (WebInspector.TimelineRecordingContentView.prototype._timeRangeSelectionChanged):
2849         * UserInterface/Views/TimelineSidebarPanel.css:
2850         (.sidebar > .panel.navigation.timeline.timeline-recording-content-view-showing > .content):
2851         (.sidebar > .panel.navigation.timeline.timeline-content-view-showing > .content): Deleted.
2852         * UserInterface/Views/TimelineSidebarPanel.js:
2853         Manage timeline tree elements dynamically. Adjust view heights as necessary. Append 'Element'
2854         to some properties holding DOM elements. Keep track of the displayed recording and view explicitly.
2855         (WebInspector.TimelineSidebarPanel):
2856         (WebInspector.TimelineSidebarPanel.prototype.shown):
2857         (WebInspector.TimelineSidebarPanel.prototype.showDefaultContentView):
2858         (WebInspector.TimelineSidebarPanel.prototype.treeElementForRepresentedObject.looselyCompareRepresentedObjects):
2859         (WebInspector.TimelineSidebarPanel.prototype.showTimelineOverview):
2860         (WebInspector.TimelineSidebarPanel.prototype.updateFilter):
2861         (WebInspector.TimelineSidebarPanel.prototype.matchTreeElementAgainstCustomFilters):
2862         (WebInspector.TimelineSidebarPanel.prototype.canShowDifferentContentView):
2863         (WebInspector.TimelineSidebarPanel.prototype.saveStateToCookie):
2864         (WebInspector.TimelineSidebarPanel.prototype.get if):
2865         (WebInspector.TimelineSidebarPanel.prototype._contentBrowserCurrentContentViewDidChange):
2866         (WebInspector.TimelineSidebarPanel.prototype._recordingCountChanged):
2867         (WebInspector.TimelineSidebarPanel.prototype._recordingSelected):
2868         (WebInspector.TimelineSidebarPanel.prototype._recordingLoaded):
2869         (WebInspector.TimelineSidebarPanel.prototype._timelineRemoved):
2870         (WebInspector.TimelineSidebarPanel.prototype._timelineCountChanged):
2871         (WebInspector.TimelineSidebarPanel.createTimelineTreeElement): Deleted.
2872         (WebInspector.TimelineSidebarPanel.prototype.restoreStateFromCookie):
2873         * UserInterface/Views/TimelineView.css:
2874         (.panel.navigation.timeline.timeline-recording-content-view-showing > .content > .navigation-sidebar-panel-content-tree-outline):
2875         (.panel.navigation.timeline.timeline-content-view-showing > .content > .navigation-sidebar-panel-content-tree-outline): Deleted.
2876
2877 2015-02-12  Brian J. Burg  <burg@cs.washington.edu>
2878
2879         Web Inspector: Large background image fails to load in inspector
2880         https://bugs.webkit.org/show_bug.cgi?id=141405
2881
2882         Reviewed by Timothy Hatcher.
2883
2884         Convert base64-encoded resource data to binary data using Uint8Array and Blobs.
2885         Use object URLs for blobs instead of data URLs when setting image 'src' attribute
2886         and in @font-face urls. This conversion happens when the backend indicates that
2887         resource content is base64-encoded.
2888
2889         Update image and font clients of resource-fetching functionality so that they use
2890         object URLs correctly. Add some plumbing so that Blobs can be constructed with
2891         the correct mime-type.
2892
2893         * UserInterface/Base/Utilities.js:
2894         (decodeBase64ToBlob): Added.
2895         * UserInterface/Models/CSSStyleSheet.js:
2896         (WebInspector.CSSStyleSheet.prototype.get mimeType): Added.
2897         * UserInterface/Models/Resource.js:
2898         (WebInspector.Resource.prototype.createObjectURL): Added.
2899         (WebInspector.Resource.prototype.getImageSize.imageDidLoad):
2900         (WebInspector.Resource.prototype.getImageSize):
2901         (WebInspector.Resource.prototype.get contentURL): Deleted.
2902         * UserInterface/Models/Script.js:
2903         (WebInspector.Script.prototype.get mimeType): Added.
2904         * UserInterface/Models/SourceCode.js:
2905         (WebInspector.SourceCode.prototype.get mimeType): Added.
2906         (WebInspector.SourceCode.prototype._processContent):
2907         (WebInspector.SourceCode.prototype.get contentIsBase64Encoded): Deleted.
2908         * UserInterface/Models/SourceCodeRevision.js:
2909         (WebInspector.SourceCodeRevision):
2910         (WebInspector.SourceCodeRevision.prototype.copy):
2911         (WebInspector.SourceCodeRevision.prototype.get contentIsBase64Encoded): Deleted.
2912         (WebInspector.SourceCodeRevision.prototype.set contentIsBase64Encoded): Deleted.
2913         * UserInterface/Views/FontResourceContentView.js:
2914         (WebInspector.FontResourceContentView.prototype.hidden):
2915         (WebInspector.FontResourceContentView.prototype.closed):
2916         * UserInterface/Views/ImageResourceContentView.js:
2917         (WebInspector.ImageResourceContentView.prototype.contentAvailable):
2918
2919 2015-02-11  Nikita Vasilyev  <nvasilyev@apple.com>
2920
2921         Web Inspector: REGRESSION: Clicking selected item in the sidebar second time should scroll to the corresponding line
2922         https://bugs.webkit.org/show_bug.cgi?id=140280
2923
2924         Reviewed by Brian Burg.
2925
2926         * UserInterface/Views/ContentViewContainer.js:
2927         (WebInspector.ContentViewContainer.prototype.showContentView):
2928         Perform scolling regardless of the navigation history. Since scrolling source code doesn't introduce a BackForwardEntry,
2929         it's possible that the actual content view has a different scroll position.
2930
2931 2015-02-10  Joseph Pecoraro  <pecoraro@apple.com>
2932
2933         Web Inspector: Better handle unknown release versions
2934         https://bugs.webkit.org/show_bug.cgi?id=141454
2935
2936         Reviewed by Timothy Hatcher.
2937
2938         * UserInterface/Base/Platform.js:
2939         If given an unknown Mac OS X version, at least parse
2940         the version number in WebInspector.Platform.
2941
2942 2015-02-10  Nikita Vasilyev  <nvasilyev@apple.com>
2943
2944         Web Inspector: Make collapsed sidebars undraggable
2945         https://bugs.webkit.org/show_bug.cgi?id=140664
2946
2947         Reviewed by Timothy Hatcher.
2948
2949         * UserInterface/Views/Sidebar.css:
2950         (.sidebar.collapsed):
2951         (.sidebar.collapsed.right > .resizer): Deleted.
2952         (.sidebar.collapsed.left > .resizer): Deleted.
2953         * UserInterface/Views/Sidebar.js:
2954         (WebInspector.Sidebar):
2955         (WebInspector.Sidebar.prototype._resizerMouseDown):
2956         (WebInspector.Sidebar.prototype._resizerMouseMoved):
2957         (WebInspector.Sidebar.prototype._resizerDoubleClicked): Deleted.
2958
2959 2015-02-10  Joseph Pecoraro  <pecoraro@apple.com>
2960
2961         Web Inspector: CSS Pretty Printing: still fails fails to put space between rgb(...) and numbers in minified gradients
2962         https://bugs.webkit.org/show_bug.cgi?id=141411
2963
2964         Reviewed by Timothy Hatcher.
2965
2966         * Tools/PrettyPrinting/CodeMirrorFormatters.js:
2967         * UserInterface/Views/CodeMirrorFormatters.js:
2968         Token actually was "number m-css" so we should check token strings
2969         more robustly, like elsewhere in the formatters.
2970
2971 2015-02-09  Brian J. Burg  <burg@cs.washington.edu>
2972
2973         Web Inspector: Uncaught exception when reporting wrong backend command call signature
2974         https://bugs.webkit.org/show_bug.cgi?id=141401
2975
2976         Reviewed by Joseph Pecoraro.
2977
2978         * UserInterface/Protocol/InspectorBackend.js:
2979         (InspectorBackend.Command.prototype._invokeWithArguments): Fix wrong variable name.
2980
2981 2015-02-06  Jono Wells  <jonowells@apple.com>
2982
2983         Web Inspector: REGRESSION: CSS Resource appears as empty after editing it via Styles sidebar
2984         https://bugs.webkit.org/show_bug.cgi?id=140586
2985
2986         Reviewed by Timothy Hatcher.
2987
2988         Update SourceCode#_processContent to properly handle the promise returned from CSSAgent so that the content
2989         will properly update when a style has changed. Properly clear the existing _requestContentPromise on the
2990         stylesheet so that the content will update correctly.
2991
2992         * UserInterface/Controllers/CSSStyleManager.js: Drive-by style updates.
2993         (WebInspector.CSSStyleManager.prototype._fetchInfoForAllStyleSheets):
2994         * UserInterface/Models/CSSStyleSheet.js: Drive-by inheritance style update.
2995         (WebInspector.CSSStyleSheet.prototype.requestContentFromBackend): Remove unnecessary backend promise function call.
2996         * UserInterface/Models/Resource.js: Drive-by removal of unused variable.
2997         * UserInterface/Models/SourceCode.js:
2998         (WebInspector.SourceCode.prototype.markContentAsStale): Clear _requestContentPromise.
2999         (WebInspector.SourceCode.prototype._processContent): Handle `parameters.text` correctly.
3000
3001 2015-02-04  Jono Wells  <jonowells@apple.com>
3002
3003         Web Inspector: REGRESSION: Inline SourceMap resources show empty content when opened.
3004         https://bugs.webkit.org/show_bug.cgi?id=141225
3005
3006         Reviewed by Timothy Hatcher.
3007
3008         Change WebInspector.SourceMapResource.prototype.requestContentFromBackend to correctly and consistently handle
3009         calls to NetworkAgent. The helper function sourceMapResourceLoaded will now properly handle parameters as a single
3010         payload, including manual calls in the case where the source map content is in a data URI. Also
3011         WebInspector.SourceCode.prototype._processContent now properly handles an error string used for displaying
3012         resource loading error messages in the resource content view.
3013
3014         * UserInterface/Models/Resource.js: drive-by style fix.
3015
3016         * UserInterface/Models/SourceCode.js:
3017         (WebInspector.SourceCode.prototype._processContent):
3018         Properly handle error string.
3019
3020         * UserInterface/Models/SourceMapResource.js:
3021         (WebInspector.SourceMapResource.prototype.requestContentFromBackend):
3022         (WebInspector.SourceMapResource.prototype.requestContentFromBackend.sourceMapResourceLoaded):
3023         Formerly sourceMapResourceLoadError, now handles parameters from the NetworkAgent correctly.
3024
3025         (WebInspector.SourceMapResource.prototype.requestContentFromBackend.sourceMapResourceLoadError):
3026         This function now handles NetworkAgent errors only.
3027
3028 2015-02-05  Brian J. Burg  <burg@cs.washington.edu>
3029
3030         Web Inspector: eliminate some unnecessary layout/painting in timeline overview and ruler
3031         https://bugs.webkit.org/show_bug.cgi?id=141293
3032
3033         Reviewed by Timothy Hatcher.
3034
3035         The timeline overview's ruler was forcing repaints of divider labels even if the labels
3036         had not changed since the last requestAnimationFrame. Bail out early if nothing changed.
3037
3038         The timeline overview and its graphs were updating layout using requestAnimationFrame
3039         even when the TimelineContentView is not visible. Fix this by propagating visibility
3040         changes to subviews, and not updating layout when hidden.
3041
3042         The above change also fixes an assertion sometimes encountered when the timeline view
3043         tries to cache an element's offset width, but cannot because it isn't visible.
3044
3045         * UserInterface/Views/TimelineContentView.js:
3046         (WebInspector.TimelineContentView.prototype.shown):
3047         (WebInspector.TimelineContentView.prototype.hidden):
3048         * UserInterface/Views/TimelineOverview.js:
3049         (WebInspector.TimelineOverview.prototype.get visible):
3050         (WebInspector.TimelineOverview.prototype.shown):
3051         (WebInspector.TimelineOverview.prototype.hidden):
3052         (WebInspector.TimelineOverview.prototype._needsLayout):
3053         * UserInterface/Views/TimelineOverviewGraph.js:
3054         (WebInspector.TimelineOverviewGraph.prototype.get visible):
3055         (WebInspector.TimelineOverviewGraph.prototype.shown):
3056         (WebInspector.TimelineOverviewGraph.prototype.hidden):
3057         (WebInspector.TimelineOverviewGraph.prototype.needsLayout):
3058         * UserInterface/Views/TimelineRuler.js:
3059         (WebInspector.TimelineRuler.prototype.updateLayout):
3060
3061 2015-02-04  Joseph Pecoraro  <pecoraro@apple.com>
3062
3063         Web Inspector: ES6: Improved Console Support for Symbol Objects
3064         https://bugs.webkit.org/show_bug.cgi?id=141173
3065
3066         Reviewed by Timothy Hatcher.
3067
3068         * UserInterface/Protocol/RemoteObject.js:
3069         (WebInspector.RemoteObject):
3070         (WebInspector.RemoteObject.prototype._isSymbol):
3071         Symbols have an objectId because it is a non-primitive that cannot be passed
3072         by value, however it cannot have properties, so handle some cases.
3073
3074         * UserInterface/Views/LogContentView.css:
3075         (.console-formatted-symbol):
3076         Give Symbol's their own color.
3077
3078 2015-02-04  Nikita Vasilyev  <nvasilyev@apple.com>
3079
3080         Web Inspector: Insertion bar (caret) is hidden behind the placeholder text in the style editor
3081         https://bugs.webkit.org/show_bug.cgi?id=139659
3082
3083         Reviewed by Timothy Hatcher.
3084
3085         * UserInterface/Views/CSSStyleDeclarationTextEditor.css:
3086         (.css-style-text-editor > .CodeMirror .CodeMirror-placeholder):
3087         Use non-monospace font to fit the placeholder text on a single line and
3088         match the color if the native placeholder.
3089
3090 2015-02-04  Joseph Pecoraro  <pecoraro@apple.com>
3091
3092         Web Inspector: console.table with columnName filter for non-existent property should still show column
3093         https://bugs.webkit.org/show_bug.cgi?id=141066
3094
3095         Reviewed by Timothy Hatcher.
3096
3097         * UserInterface/Views/ConsoleMessageImpl.js:
3098         (WebInspector.ConsoleMessageImpl.prototype._appendPropertyPreviews):
3099         (WebInspector.ConsoleMessageImpl.prototype._userProvidedColumnNames):
3100         (WebInspector.ConsoleMessageImpl.prototype._formatParameterAsTable):
3101         If a second argument was provided to console.table, try to extract a list
3102         of string names to use for the object properties. Output a table with
3103         the provided column names, in the specified order. Also, use this
3104         opportunity to mark missing properties with an em dash.
3105
3106 2015-02-02  Joseph Pecoraro  <pecoraro@apple.com>
3107
3108         Web Inspector: CSS Autocompletion: Autodetect many color supporting properties
3109         https://bugs.webkit.org/show_bug.cgi?id=141166
3110
3111         Reviewed by Timothy Hatcher.
3112
3113         * UserInterface/Base/Utilities.js:
3114         Add String.prototype.endsWith. Group String extensions together.
3115
3116         * UserInterface/Models/CSSKeywordCompletions.js:
3117         (WebInspector.CSSKeywordCompletions.forProperty):
3118         If a property name ends in "color", provide CSS color completions.
3119
3120         (WebInspector.CSSKeywordCompletions.isColorAwareProperty): Deleted.
3121         This was unused and disagrees slightly with the implementation above.
3122
3123 2015-02-02  Joseph Pecoraro  <pecoraro@apple.com>
3124
3125         Web Inspector: Support console.table
3126         https://bugs.webkit.org/show_bug.cgi?id=141058
3127
3128         Reviewed by Timothy Hatcher.
3129
3130         * Localizations/en.lproj/localizedStrings.js:
3131         New "Index", "(Index)", "Value", table header strings.
3132
3133         * UserInterface/Views/ConsoleMessage.js:
3134         Add "Table", but add FIXMEs to consider using the protocol generated enums.
3135
3136         * UserInterface/Views/ConsoleMessageImpl.js:
3137         (WebInspector.ConsoleMessageImpl.prototype._format):
3138         Special case console.table messages.
3139
3140         (WebInspector.ConsoleMessageImpl.prototype._appendPropertyPreviews):
3141         (WebInspector.ConsoleMessageImpl.prototype._propertyPreviewElement):
3142         Factor out ProjectPreview printing. Also, replace newlines in strings
3143         with return characters, like we did elsewhere.
3144
3145         (WebInspector.ConsoleMessageImpl.prototype._formatParameterAsTable):
3146         Ultimately try to create a DataGrid from the output. Search first
3147         for rich object data in the list. If no rich object data is found
3148         just check for simple values. If the table is lossy, also do
3149         a log of the object in case the user wants to see more data.
3150
3151
3152         * UserInterface/Views/DataGrid.js:
3153         (WebInspector.DataGrid):
3154         The for..in enumeration is unordered and may not give us the
3155         column ordering we wanted. So include an optional preferred
3156         column names list to get the preferred order.
3157
3158         (WebInspector.DataGrid.createSortableDataGrid):
3159         Numerous bug fixes here. Accidental globals, typos, and sorting failures.
3160
3161         (WebInspector.DataGrid.prototype.autoSizeColumns):
3162         (WebInspector.DataGrid.prototype.textForDataGridNodeColumn):
3163         (WebInspector.DataGrid.prototype._copyTextForDataGridNode):
3164         Create a generic method to get the text for a datagrid node in a column.
3165         This is important for getting the text from console.table previews which
3166         contains Nodes.
3167
3168         * UserInterface/Views/LogContentView.css:
3169         (.console-messages:focus .console-item.selected .data-grid tr.selected):
3170         (.console-item .data-grid tr.selected):
3171         DataGrid selection colors while in the console which may or may
3172         not have selected console items.
3173
3174 2015-02-02  Joseph Pecoraro  <pecoraro@apple.com>
3175
3176         Web Inspector: Extend CSS.getSupportedCSSProperties to provide values for properties for CSS Augmented JSContext
3177         https://bugs.webkit.org/show_bug.cgi?id=141064
3178
3179         Reviewed by Timothy Hatcher.
3180
3181         * UserInterface/Models/CSSCompletions.js:
3182         * UserInterface/Models/CSSKeywordCompletions.js:
3183         (WebInspector.CSSKeywordCompletions.addCustomCompletions):
3184         (WebInspector.CSSKeywordCompletions.addPropertyCompletionValues):
3185         If a property is specified with custom values, extend the
3186         keyword completions map to make those values available
3187         in autocompletion.
3188
3189 2015-01-30  Joseph Pecoraro  <pecoraro@apple.com>
3190
3191         Remote Web Inspector should not show undock toolbar buttons
3192         https://bugs.webkit.org/show_bug.cgi?id=141061
3193
3194         Reviewed by Timothy Hatcher.
3195
3196         * UserInterface/Base/Main.js:
3197         (WebInspector.contentLoaded):
3198         Be sure to update the toolbar's dock navigation icons because they
3199         may need to be hidden (the default state).
3200
3201 2015-01-29  Saam Barati  <saambarati1@gmail.com>
3202
3203         Web Inspector: Allow text selection when the BasicBlockAnnotator is enabled
3204         https://bugs.webkit.org/show_bug.cgi?id=140987
3205
3206         Reviewed by Timothy Hatcher.
3207
3208         Because the BasicBlockAnnotator no longer sets the background color of
3209         lines that haven't executed to gray, text selection while the
3210         BasicBlockAnnotator is enabled no longer results in a bad user interface.
3211         This patch both allows text selection while the BasicBlockAnnotator is
3212         enabled and also removes the now unused listeners to CodeMirror's focus
3213         and blur events.
3214
3215         * UserInterface/Views/SourceCodeTextEditor.js:
3216         (WebInspector.SourceCodeTextEditor):
3217         (WebInspector.SourceCodeTextEditor.prototype._setTypeTokenAnnotatorEnabledState):
3218         (WebInspector.SourceCodeTextEditor.prototype._makeTypeTokenScrollEventHandler.scrollHandler):
3219         (WebInspector.SourceCodeTextEditor.prototype._makeTypeTokenScrollEventHandler):
3220         (WebInspector.SourceCodeTextEditor.prototype.gainedFocus): Deleted.
3221         (WebInspector.SourceCodeTextEditor.prototype.lostFocus): Deleted.
3222         * UserInterface/Views/TextEditor.js:
3223         (WebInspector.TextEditor):
3224         (WebInspector.TextEditor.prototype.gainedFocus): Deleted.
3225         (WebInspector.TextEditor.prototype.lostFocus): Deleted.
3226
3227 2015-01-29  Saam Barati  <saambarati1@gmail.com>
3228
3229         Web Inspector: Make BasicBlockAnnotator lessen the saturation of syntax highlighting instead of graying out unexecuted code
3230         https://bugs.webkit.org/show_bug.cgi?id=141011
3231
3232         Reviewed by Timothy Hatcher.
3233
3234         This patch removes a lot of the complicated logic associated around 
3235         determining which code can be grayed out by the BasicBlockAnnotator. 
3236         Instead, the BasicBlockAnnotator now applies a CSS class to all the
3237         code that has not executed which lessens the saturation of the 
3238         syntax coloring for the code. This creates both a nicer user
3239         interface and a nicer user experience because it makes reading
3240         source code with the BasicBlockAnnotator enabled more pleasant.
3241
3242         * UserInterface/Controllers/BasicBlockAnnotator.js:
3243         (WebInspector.BasicBlockAnnotator.prototype._annotateBasicBlockExecutionRanges.):
3244         (WebInspector.BasicBlockAnnotator.prototype._annotateBasicBlockExecutionRanges):
3245         (WebInspector.BasicBlockAnnotator.prototype.set _highlightTextForBasicBlock):
3246         (WebInspector.BasicBlockAnnotator.prototype._isTextRangeOnlyWhitespace): Deleted.
3247         (WebInspector.BasicBlockAnnotator.prototype._isTextRangeOnlyClosingBrace): Deleted.
3248         (_canGrayOutEntireLine): Deleted.
3249         (_grayOutLine): Deleted.
3250         (_clearRangeForBasicBlockMarker.get marker): Deleted.
3251         (_clearRangeForBasicBlockMarker): Deleted.
3252         * UserInterface/Views/SourceCodeTextEditor.css:
3253         (.hover-menu.color > img):
3254         (.basic-block-has-not-executed): Deleted.
3255         (.basic-block-has-not-executed-prepend::before): Deleted.
3256         * UserInterface/Views/SyntaxHighlightingDefaultTheme.css:
3257         (.cm-s-default .basic-block-has-not-executed):
3258         (.cm-s-default .basic-block-has-not-executed.cm-comment):
3259         (.cm-s-default .basic-block-has-not-executed.cm-m-css:matches(.cm-atom, .cm-meta, .cm-variable-3, .cm-property)):
3260         (.cm-s-default .basic-block-has-not-executed:matches(.cm-number, .cm-atom.cm-hex-color)):
3261         (.cm-s-default .basic-block-has-not-executed.cm-string):
3262         (.cm-s-default .basic-block-has-not-executed.cm-m-xml.cm-meta):
3263         (.cm-s-default .basic-block-has-not-executed.cm-m-xml.cm-attribute):
3264
3265 2015-01-29  Joseph Pecoraro  <pecoraro@apple.com>
3266
3267         Web Inspector: ES6: Improved Console Format for Set and Map Objects (like Arrays)
3268         https://bugs.webkit.org/show_bug.cgi?id=122867
3269
3270         Reviewed by Timothy Hatcher.
3271
3272         This includes Set/Map/WeakMap previews:
3273
3274             - Set previews: Set {1, 2, 3}
3275             - Map/WeakMap previews: Map {1 => 2, "key" => "value"}
3276
3277         For WeakMaps:
3278         
3279             - the preview itself shows up to 5 key/value pairs from when the object was logged
3280             - the previews are strings only, and thus do not retain the actual keys/values
3281             - when expanding, we get RemoteObjects and strongly retain the keys/values
3282             - when collapsing / clearing, we release the RemoteObjects so they can get collected
3283
3284         Currently you collapse the <entries> section, and re-expand later the
3285         collection may show you knew keys/values. The UI for this will change.
3286
3287         * Localizations/en.lproj/localizedStrings.js:
3288         * UserInterface/Protocol/RemoteObject.js:
3289         (WebInspector.RemoteObject.prototype.isCollectionType):
3290         (WebInspector.RemoteObject.prototype.isWeakCollection):
3291         (WebInspector.RemoteObject.prototype.getCollectionEntries):
3292         (WebInspector.RemoteObject.prototype.releaseWeakCollectionEntries):
3293         (WebInspector.RemoteObject.prototype.arrayLength):
3294         (WebInspector.RemoteObject.prototype._weakCollectionObjectGroup):
3295         High level functions for dealing with a RemoteObject that may be a
3296         collection / weak collection.
3297
3298         * UserInterface/Views/ConsoleMessageImpl.js:
3299         (WebInspector.ConsoleMessageImpl):
3300         (WebInspector.ConsoleMessageImpl.prototype._formatParameterAsObject):
3301         Include default formatters for collection types.
3302
3303         (WebInspector.ConsoleMessageImpl.prototype._appendPreview):
3304         (WebInspector.ConsoleMessageImpl.prototype._appendEntryPreviews):
3305         (WebInspector.ConsoleMessageImpl.prototype._appendPropertyPreviews):
3306         (WebInspector.ConsoleMessageImpl.prototype._appendValuePreview):
3307         (WebInspector.ConsoleMessageImpl.prototype._appendObjectPreview): Deleted.
3308         Refactor preview generation a bit and include a specific path for
3309         generation the output of a preview with "entries".
3310
3311         * UserInterface/Views/LogContentView.css:
3312         (.console-object-preview-body .console-object-preview-name.console-object-preview-name-Object):
3313         With nested Object previews ("Map {{a:1} => 1}") don't show "Object" for the inner
3314         object preview. Only show it if it has a unique type ("Map {Foo {a:1} => 1}")
3315
3316         (.console-formatted-object, .console-formatted-node, .console-formatted-error, .console-formatted-map, .console-formatted-set, .console-formatted-weakmap):
3317         (:matches(.console-formatted-object, .console-formatted-node, .console-formatted-error, .console-formatted-map, .console-formatted-set, .console-formatted-weakmap) .section):
3318         (:matches(.console-formatted-object, .console-formatted-node, .console-formatted-error, .console-formatted-map, .console-formatted-set, .console-formatted-weakmap) .properties):
3319         Make map/set/weakmap display like Objects.
3320
3321         * UserInterface/Views/ObjectPropertiesSection.js:
3322         (WebInspector.ObjectPropertiesSection.prototype.update):
3323         (WebInspector.ObjectPropertiesSection.prototype.updateProperties):
3324         (WebInspector.ObjectPropertyTreeElement.prototype.onpopulate.callback):
3325         (WebInspector.ObjectPropertyTreeElement.prototype.onpopulate):
3326         (WebInspector.CollectionEntriesMainTreeElement):
3327         (WebInspector.CollectionEntriesMainTreeElement.prototype.onexpand.callback):
3328         (WebInspector.CollectionEntriesMainTreeElement.prototype.onexpand):
3329         (WebInspector.CollectionEntriesMainTreeElement.prototype.oncollapse):
3330         (WebInspector.CollectionEntriesMainTreeElement.prototype.ondetach):
3331         (WebInspector.CollectionEntriesMainTreeElement.prototype._trackWeakEntries):
3332         (WebInspector.CollectionEntriesMainTreeElement.prototype._untrackWeakEntries):
3333         (WebInspector.CollectionEntryTreeElement):
3334         (WebInspector.CollectionEntryTreeElement.prototype.onpopulate):
3335         (WebInspector.CollectionEntryTreeElement.prototype.onattach):
3336         (WebInspector.EmptyCollectionTreeElement):
3337         (WebInspector.ObjectPropertiesSection.prototype.update.callback): Deleted.
3338         Add a quick UI for exploring the entries of a collection. We are actively
3339         changing the styles of objects in the Console, so this should change soon.
3340
3341 2015-01-28  Joseph Pecoraro  <pecoraro@apple.com>
3342
3343         Web Inspector: Change Main Frame Status Buttons when debugging Augmented JSContext
3344         https://bugs.webkit.org/show_bug.cgi?id=141006
3345
3346         Reviewed by Timothy Hatcher.
3347
3348         * Localizations/en.lproj/localizedStrings.js:
3349         New "Restart" string.
3350
3351         * UserInterface/Base/Main.js:
3352         (WebInspector.canArchiveMainFrame):
3353         * UserInterface/Views/FrameTreeElement.js:
3354         (WebInspector.FrameTreeElement.prototype.updateStatusForMainFrame):
3355         (WebInspector.FrameTreeElement.prototype._updateDownloadButton):
3356         Update the tooltip when in a non-Web debuggable, and only show
3357         the Download button when in a Web debuggable.
3358
3359         * UserInterface/Views/TreeElementStatusButton.js:
3360         (WebInspector.TreeElementStatusButton.prototype.set hidden):
3361         Oops! The implementation was backwards. Simplify with classList.toggle.
3362
3363 2015-01-28  Brian J. Burg  <burg@cs.washington.edu>
3364
3365         Web Inspector: remove CSS.setPropertyText, CSS.toggleProperty and related dead code
3366         https://bugs.webkit.org/show_bug.cgi?id=140961
3367
3368         Reviewed by Timothy Hatcher.
3369
3370         Setters for CSSProperty (except override) are not used, so delete them. These setters
3371         and their callees in DOMNodeStyles were the only clients of the removed protocol commands.
3372
3373         * UserInterface/Models/CSSProperty.js:
3374         (WebInspector.CSSProperty.prototype.update):
3375         (WebInspector.CSSProperty.prototype.get name):
3376         (WebInspector.CSSProperty.prototype.get value):
3377         (WebInspector.CSSProperty.prototype.get priority):
3378         (WebInspector.CSSProperty.prototype.hasOtherVendorNameOrKeyword):
3379         (WebInspector.CSSProperty.prototype.set text): Deleted.
3380         (WebInspector.CSSProperty.prototype.set name): Deleted.
3381         (WebInspector.CSSProperty.prototype.set value): Deleted.
3382         (WebInspector.CSSProperty.prototype.set important): Deleted.
3383         (WebInspector.CSSProperty.prototype.set priority): Deleted.
3384         (WebInspector.CSSProperty.prototype.set enabled): Deleted.
3385         (WebInspector.CSSProperty.prototype.add): Deleted.
3386         (WebInspector.CSSProperty.prototype.remove): Deleted.
3387         (WebInspector.CSSProperty.prototype._updatePropertySoon.performUpdate): Deleted.
3388         (WebInspector.CSSProperty.prototype._updatePropertySoon): Deleted.
3389         (WebInspector.CSSProperty.prototype._cancelPendingUpdate): Deleted.
3390         * UserInterface/Models/CSSStyleDeclaration.js:
3391         (WebInspector.CSSStyleDeclaration.prototype.addProperty): Deleted.
3392         (WebInspector.CSSStyleDeclaration.prototype.removeProperty): Deleted.
3393         * UserInterface/Models/DOMNodeStyles.js:
3394         (WebInspector.DOMNodeStyles.prototype.addEmptyRule):
3395         (WebInspector.DOMNodeStyles.prototype.addRule): Deleted.
3396         (WebInspector.DOMNodeStyles.prototype.changeProperty): Deleted.
3397         (WebInspector.DOMNodeStyles.prototype.changePropertyText): Deleted.
3398         (WebInspector.DOMNodeStyles.prototype.changePropertyEnabledState): Deleted.
3399         (WebInspector.DOMNodeStyles.prototype.addProperty): Deleted.
3400         (WebInspector.DOMNodeStyles.prototype.removeProperty): Deleted.
3401         (WebInspector.DOMNodeStyles.prototype._handlePropertyChange): Deleted.
3402         * UserInterface/Protocol/Legacy/6.0/InspectorBackendCommands.js:
3403         * UserInterface/Protocol/Legacy/7.0/InspectorBackendCommands.js:
3404         * UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js:
3405         * UserInterface/Views/RulesStyleDetailsPanel.js:
3406         (WebInspector.RulesStyleDetailsPanel.prototype._newRuleClicked):
3407         * Versions/Inspector-iOS-6.0.json:
3408         * Versions/Inspector-iOS-7.0.json:
3409         * Versions/Inspector-iOS-8.0.json:
3410
3411 2015-01-28  Dana Burkart  <dburkart@apple.com>
3412
3413         Move ASan flag settings from DebugRelease.xcconfig to Base.xcconfig
3414         https://bugs.webkit.org/show_bug.cgi?id=136765
3415
3416         Reviewed by Alexey Proskuryakov.
3417
3418         * Configurations/Base.xcconfig:
3419         * Configurations/DebugRelease.xcconfig:
3420
3421 2015-01-23  Joseph Pecoraro  <pecoraro@apple.com>
3422
3423         Web Inspector: Object Previews in the Console
3424         https://bugs.webkit.org/show_bug.cgi?id=129204
3425
3426         Reviewed by Timothy Hatcher.
3427
3428         * UserInterface/Controllers/JavaScriptLogViewController.js:
3429         (WebInspector.JavaScriptLogViewController.prototype.consolePromptTextCommitted):
3430         * UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
3431         (get WebInspector.JavaScriptRuntimeCompletionProvider.prototype.):
3432         Update RuntimeManager callsites that do not need object previews.
3433
3434         * UserInterface/Controllers/RuntimeManager.js:
3435         (WebInspector.RuntimeManager.prototype.evalCallback):
3436         (WebInspector.RuntimeManager.prototype.evaluateInInspectedWindow):
3437         Update the main evaluate method to include a boolean parameter for
3438         object previews. Most callers do not need them. Also, since previews
3439         were not available on iOS 6, switch to invoke, to conditionally
3440         include the command parameter.
3441
3442         * UserInterface/Protocol/RemoteObject.js:
3443         (WebInspector.RemoteObject):
3444         (WebInspector.RemoteObject.fromPayload):
3445         (WebInspector.RemoteObject.prototype.get preview):
3446         Store the preview from the payload.
3447
3448         * UserInterface/Views/ConsoleMessageImpl.js:
3449         (WebInspector.ConsoleMessageImpl.prototype._format):
3450         (WebInspector.ConsoleMessageImpl.prototype._formatParameter):
3451         (WebInspector.ConsoleMessageImpl.prototype._formatParameterAsNode):
3452         (WebInspector.ConsoleMessageImpl.prototype._formatParameterAsString):
3453         (WebInspector.ConsoleMessageImpl.prototype._formatAsArrayEntry):
3454         Pass an explicit false for most formatters to not use a preview if available.
3455         
3456         (WebInspector.ConsoleMessageImpl.prototype._formatParameterAsArray):
3457         (WebInspector.ConsoleMessageImpl.prototype._formatParameterAsObject):
3458         Currently only object types are previewed. Though we request previews
3459         for arrays, we don't use the preview because we show a better preview
3460         by just immediately requesting for a full non-preview property list.
3461         
3462         (WebInspector.ConsoleMessageImpl.prototype._appendObjectPreview):
3463         Quickly output an object preview into the title element. The format
3464         is "ClassName {prop: value...}". Elide the class name if it is "Object".
3465         Also skip over certain preview properties that may not be useful
3466         at a glance (like constructor, or accessors without values).
3467
3468         * UserInterface/Views/LogContentView.css:
3469         (.console-object-preview):
3470         (.console-formatted-array .console-object-preview):
3471         (.console-object-preview-lossless):
3472         (.expanded .console-object-preview):
3473         Show lossy previews in italics.
3474         Show lossless previews and array previews without italics.
3475         Do not show the class name in the preview in italics when expanded.
3476
3477         (.console-object-preview .name):
3478         Give preview property names the same color as ObjectPropertiesSection property names.
3479         
3480         (.expanded .console-object-preview > .console-object-preview-body):
3481         When expanding an object, hide the preview.
3482
3483         (.console-object-preview > .console-object-preview-name.console-object-preview-name-Object):
3484         (.expanded .console-object-preview > .console-object-preview-name.console-object-preview-name-Object):
3485         For "Object" previews, hide the name "Object" when not expanded, and show it when expanded.
3486
3487 2015-01-23  Saam Barati  <saambarati1@gmail.com>
3488
3489         Web Inspector: Disable *Annotators on minified files that aren't pretty printed
3490         https://bugs.webkit.org/show_bug.cgi?id=140550
3491
3492         Reviewed by Timothy Hatcher.
3493
3494         When SourceCodeTextEditor speculates that a file is minified it 
3495         sets a flag on itself that the Annotators will notice when pretty 
3496         printing and turning on type profiling. 
3497
3498         SourceCodeTextEditor enforces the following two behaviors:
3499
3500         1. Always pretty print a file if we think it's minified while 
3501         viewing type annotations. So, while viewing a minified file, 
3502         if you press the type profiling button, the pretty printer will 
3503         first reformat the file, then the type profiler will insert type annotations.
3504
3505         2. If the type profiler is enabled and we're viewing a pretty 
3506         printed file that we think originally was minified, and the 
3507         pretty printer is disabled via pressing the button, then the 
3508         type profiler will also be disabled.
3509
3510         These two behaviors maintain a good user experience because 
3511         it prevents a bad visual representation of profiler data and 
3512         also prevents bad performance.
3513
3514         * UserInterface/Controllers/TypeTokenAnnotator.js:
3515         (WebInspector.TypeTokenAnnotator.prototype.toggleTypeAnnotations): Deleted.
3516         * UserInterface/Views/SourceCodeTextEditor.js:
3517         (WebInspector.SourceCodeTextEditor):
3518         (WebInspector.SourceCodeTextEditor.prototype.shown):
3519         (WebInspector.SourceCodeTextEditor.prototype.contentDidChange):
3520         (WebInspector.SourceCodeTextEditor.prototype.toggleTypeAnnotations):
3521         (WebInspector.SourceCodeTextEditor.prototype.prettyPrint):
3522         (WebInspector.SourceCodeTextEditor.prototype._contentWillPopulate):
3523         (WebInspector.SourceCodeTextEditor.prototype._populateWithContent):
3524         (WebInspector.SourceCodeTextEditor.prototype._setTypeTokenAnnotatorEnabledState):
3525
3526 2015-01-22  Jonathan Wells  <jonowells@apple.com>
3527
3528         Web Inspector: ResourceContentView.js incorrectly contains call to WebInspector.UIString with a variable parameter
3529         https://bugs.webkit.org/show_bug.cgi?id=140268
3530
3531         Reviewed by Timothy Hatcher.
3532
3533         UIString no longer incorrectly used around variables. Drive-by fixes to prototype inheritance style.
3534         Use of Promises corrected such that requesting content for a resource resolves rather than rejects if
3535         a resource can't be found or has another error that isn't a web inspector error.
3536
3537         * Localizations/en.lproj/localizedStrings.js: Updated.
3538         * UserInterface/Models/Resource.js: Change reject to resolve.
3539         * UserInterface/Models/Script.js:
3540         (WebInspector.Script.prototype.requestContentFromBackend): Proper use of Error object.
3541         * UserInterface/Models/SourceCode.js: Use correct inheritance style.
3542         * UserInterface/Views/ResourceContentView.js:
3543         (WebInspector.ResourceContentView.prototype._contentAvailable): Handle error now that promise resolves.
3544         (WebInspector.ResourceContentView.prototype._contentError): Remove incorrect use of UIString.
3545         * UserInterface/Views/SourceCodeTextEditor.js:
3546         (WebInspector.SourceCodeTextEditor.prototype._contentAvailable): Handle error now that promise resolves.
3547
3548 2015-01-22  Nikita Vasilyev  <nvasilyev@apple.com>
3549
3550         Web Inspector: Expected gutter highlight when selecting console input line, just like output line
3551         https://bugs.webkit.org/show_bug.cgi?id=140696
3552
3553         Reviewed by Timothy Hatcher.
3554
3555         * UserInterface/Views/LogContentView.css:
3556
3557 2015-01-21  Saam Barati  <saambarati1@gmail.com>
3558
3559         Web Inspector: Change Annotator's isActive getter into an isActive() function.
3560         https://bugs.webkit.org/show_bug.cgi?id=140729
3561
3562         Reviewed by Timothy Hatcher.
3563
3564         This patch also makes the child classes of Annotator use
3565         the function instead of accessing the property directly.
3566
3567         * UserInterface/Controllers/Annotator.js:
3568         (WebInspector.Annotator.prototype.isActive):
3569         (WebInspector.Annotator.prototype.get isActive): Deleted.
3570         * UserInterface/Controllers/BasicBlockAnnotator.js:
3571         (WebInspector.BasicBlockAnnotator.prototype.insertAnnotations):
3572         * UserInterface/Controllers/TypeTokenAnnotator.js:
3573         (WebInspector.TypeTokenAnnotator.prototype.toggleTypeAnnotations):
3574         * UserInterface/Views/SourceCodeTextEditor.js:
3575         (WebInspector.SourceCodeTextEditor.prototype.toggleTypeAnnotations):
3576         (WebInspector.SourceCodeTextEditor.prototype.prettyPrint):
3577         (WebInspector.SourceCodeTextEditor.prototype._debuggerDidPause):
3578         (WebInspector.SourceCodeTextEditor.prototype._debuggerDidResume):
3579         (WebInspector.SourceCodeTextEditor.prototype._updateTokenTrackingControllerState):
3580
3581 2015-01-21  Saam Barati  <saambarati1@gmail.com>
3582
3583         Web Inspector: Don't allow the BasicBlockAnnotator to highlight a section if it's only a closing brace
3584         https://bugs.webkit.org/show_bug.cgi?id=140727
3585
3586         Reviewed by Timothy Hatcher.
3587
3588         * UserInterface/Controllers/BasicBlockAnnotator.js:
3589         (WebInspector.BasicBlockAnnotator.prototype.set _highlightTextForBasicBlock):
3590         (WebInspector.BasicBlockAnnotator.prototype._isTextRangeOnlyClosingBrace):
3591         BasicBlockAnnotator tries to no longer highlight a basic block if it is only
3592         whitespace and a closing brace. These ranges are often after statements
3593         that make these basic blocks unreachable, such as a return/break/continue
3594         statement occurring inside a if/else/while/for block. This check won't
3595         match every highlighted empty closing brace, but catches most of them 
3596         because it only does intra block analysis instead of inter block analysis.
3597
3598 2015-01-20  Joseph Pecoraro  <pecoraro@apple.com>
3599
3600         Web Inspector: Use spread operator in a few places
3601         https://bugs.webkit.org/show_bug.cgi?id=140699
3602
3603         Reviewed by Geoffrey Garen.
3604
3605         * UserInterface/Controllers/ProbeManager.js:
3606         (WebInspector.ProbeManager.prototype.get probeSets):
3607         Simplify by using the spread operator.
3608
3609         * UserInterface/Models/TimelineRecording.js:
3610         This actually fixes an issue. The one place this was used was expecting
3611         an array and called ".length" on the result. However, the iterator being
3612         returned does not have a ".length" property so it was always undefined.
3613
3614 2015-01-20  Joseph Pecoraro  <pecoraro@apple.com>
3615
3616         Web Inspector: Expanding event objects in console shows undefined for most values, it should have real values
3617         https://bugs.webkit.org/show_bug.cgi?id=137306
3618
3619         Reviewed by Timothy Hatcher.
3620
3621         When first expanding an object, show all the object's own properties and any
3622         getter properties that may be on its prototype chain. Now, we only fetch
3623         own properties, for __proto__ properties.
3624
3625         * UserInterface/Protocol/RemoteObject.js:
3626         (WebInspector.RemoteObject.prototype.getOwnProperties):
3627         (WebInspector.RemoteObject.prototype.getOwnAndGetterProperties):
3628         (WebInspector.RemoteObject.prototype.getAllProperties):
3629         (WebInspector.RemoteObject.prototype.get hasChildren): Deleted.
3630         * UserInterface/Views/ObjectPropertiesSection.js:
3631         (WebInspector.ObjectPropertiesSection):
3632         (WebInspector.ObjectPropertiesSection.prototype.update):
3633         (WebInspector.ObjectPropertyTreeElement.prototype.onpopulate):
3634
3635 2015-01-20  Joseph Pecoraro  <pecoraro@apple.com>
3636
3637         Web Inspector: Should show dynamic specificity values
3638         https://bugs.webkit.org/show_bug.cgi?id=140647
3639
3640         Reviewed by Benjamin Poulain.
3641
3642         For dynamic selectors, provide text in the tooltip describing that the
3643         specificity is dynamic and may change, and pointing out the element
3644         the current value was calculated against.
3645
3646         * Localizations/en.lproj/localizedStrings.js:
3647         * UserInterface/Models/CSSSelector.js:
3648         (WebInspector.CSSSelector):
3649         (WebInspector.CSSSelector.prototype.get specificity):
3650         (WebInspector.CSSSelector.prototype.get dynamic):
3651         * UserInterface/Models/DOMNodeStyles.js:
3652         (WebInspector.DOMNodeStyles.prototype._parseSelectorListPayload.return):
3653         (WebInspector.DOMNodeStyles.prototype._parseSelectorListPayload):
3654         * UserInterface/Views/CSSStyleDeclarationSection.js:
3655         (WebInspector.CSSStyleDeclarationSection.prototype.refresh.appendSelector):
3656
3657 2015-01-19  Saam Barati  <saambarati1@gmail.com>
3658
3659         Web Inspector: Provide a front end for JSC's Control Flow Profiler
3660         https://bugs.webkit.org/show_bug.cgi?id=138454
3661
3662         Reviewed by Timothy Hatcher.
3663
3664         This patch creates a user interface for JSC's control flow profiler.
3665         The Web Inspector gets basic block ranges from JSC, and displays
3666         basic blocks that have not executed as having a gray background.
3667         
3668         BasicBlockAnnotator is the class responsible for this UI logic.
3669         It also does a few nifty things when presenting a UI for this gray
3670         background color: if an entire line of code is within the basic 
3671         block's boundary, the annotator will not just highlight the background 
3672         behind the text, but the background of the entire line itself. This
3673         provides a nicer experience when glancing through large JavaScript files.
3674
3675         This patch also adds some necessary wrapper methods inside TextEditor
3676         for accessing CodeMirror's text highlighting functionality. It also
3677         creates a way for TextEditor and SourceCodeTextEditor to listen
3678         for focus events inside CodeMirror.
3679
3680         * UserInterface/Controllers/AnnotatorManager.js: Removed.
3681         * UserInterface/Controllers/BasicBlockAnnotator.js: Added.
3682         (WebInspector.BasicBlockAnnotator):
3683         (WebInspector.BasicBlockAnnotator.prototype.clearAnnotations):
3684         (WebInspector.BasicBlockAnnotator.prototype.insertAnnotations):
3685         (WebInspector.BasicBlockAnnotator.prototype._annotateBasicBlockExecutionRanges.):
3686         (WebInspector.BasicBlockAnnotator.prototype._annotateBasicBlockExecutionRanges):
3687         (WebInspector.BasicBlockAnnotator.prototype.set _highlightTextForBasicBlock):
3688         (WebInspector.BasicBlockAnnotator.prototype._isTextRangeOnlyWhitespace):
3689         (WebInspector.BasicBlockAnnotator.prototype._canGrayOutEntireLine):
3690         (WebInspector.BasicBlockAnnotator.prototype._grayOutLine):
3691         (WebInspector.BasicBlockAnnotator.prototype._clearRangeForBasicBlockMarker.get marker):
3692         (WebInspector.BasicBlockAnnotator.prototype._clearRangeForBasicBlockMarker):
3693         * UserInterface/Main.html:
3694         * UserInterface/Views/SourceCodeTextEditor.css:
3695         (.basic-block-has-not-executed):
3696         (.basic-block-has-not-executed-prepend::before):
3697         * UserInterface/Views/SourceCodeTextEditor.js:
3698         (WebInspector.SourceCodeTextEditor):
3699         (WebInspector.SourceCodeTextEditor.prototype.shown):
3700         (WebInspector.SourceCodeTextEditor.prototype.hidden):
3701         (WebInspector.SourceCodeTextEditor.prototype.canShowTypeAnnotations):
3702         (WebInspector.SourceCodeTextEditor.prototype.contentDidChange):
3703         (WebInspector.SourceCodeTextEditor.prototype.gainedFocus):
3704         (WebInspector.SourceCodeTextEditor.prototype.lostFocus):
3705         (WebInspector.SourceCodeTextEditor.prototype.toggleTypeAnnotations):
3706         (WebInspector.SourceCodeTextEditor.prototype.prettyPrint):
3707         (WebInspector.SourceCodeTextEditor.prototype._populateWithContent):
3708         (WebInspector.SourceCodeTextEditor.prototype._debuggerDidPause):
3709         (WebInspector.SourceCodeTextEditor.prototype._debuggerDidResume):
3710         (WebInspector.SourceCodeTextEditor.prototype._updateTokenTrackingControllerState):
3711         (WebInspector.SourceCodeTextEditor.prototype._makeTypeTokenAnnotator):
3712         (WebInspector.SourceCodeTextEditor.prototype._makeBasicBlockAnnotator):
3713         (WebInspector.SourceCodeTextEditor.prototype._makeTypeTokenScrollEventHandler.scrollHandler):
3714         (WebInspector.SourceCodeTextEditor.prototype._makeTypeTokenScrollEventHandler):
3715         * UserInterface/Views/TextEditor.js:
3716         (WebInspector.TextEditor):
3717         (WebInspector.TextEditor.prototype.getTextInRange):
3718         (WebInspector.TextEditor.prototype.addStyleToTextRange):
3719         (WebInspector.TextEditor.prototype.gainedFocus):
3720         (WebInspector.TextEditor.prototype.lostFocus):
3721
3722 2015-01-16  Nikita Vasilyev  <nvasilyev@apple.com>
3723
3724         Web Inspector: Make message selection in the console more readable
3725         https://bugs.webkit.org/show_bug.cgi?id=140385
3726
3727         Reviewed by Timothy Hatcher.
3728
3729         * UserInterface/Views/LogContentView.css:
3730         (.console-item.selected):
3731         (.console-messages:focus .console-item.selected):
3732         (.console-item.selected .console-message::after):
3733         (.console-messages:focus .console-item.selected .console-message::after):
3734         (.console-messages:focus .console-item.selected .go-to-link):
3735         * UserInterface/Views/Main.css:
3736         (.go-to-link):
3737         !important statements seem to be unnecessary, remove them.
3738
3739 2015-01-16  Joseph Pecoraro  <pecoraro@apple.com>
3740
3741         Web Inspector: Remove unused WebInspector.LocalJSONObject
3742         https://bugs.webkit.org/show_bug.cgi?id=140570
3743
3744         Reviewed by Timothy Hatcher.
3745
3746         * UserInterface/Protocol/RemoteObject.js:
3747         (WebInspector.RemoteObject.fromLocalObject): Deleted.
3748         (WebInspector.LocalJSONObject): Deleted.
3749         (WebInspector.LocalJSONObject.prototype.get description.switch.case.string_appeared_here): Deleted.
3750         (WebInspector.LocalJSONObject.prototype.get description.switch.default): Deleted.
3751         (WebInspector.LocalJSONObject.prototype.get description): Deleted.
3752         (WebInspector.LocalJSONObject.prototype._concatenate): Deleted.
3753         (WebInspector.LocalJSONObject.prototype.get type): Deleted.
3754         (WebInspector.LocalJSONObject.prototype.get subtype): Deleted.
3755         (WebInspector.LocalJSONObject.prototype.get hasChildren): Deleted.
3756         (WebInspector.LocalJSONObject.prototype.getOwnProperties): Deleted.
3757         (WebInspector.LocalJSONObject.prototype.getAllProperties): Deleted.
3758         (WebInspector.LocalJSONObject.prototype._children.buildProperty): Deleted.
3759         (WebInspector.LocalJSONObject.prototype._children): Deleted.
3760         (WebInspector.LocalJSONObject.prototype.isError): Deleted.
3761
3762 2015-01-15  Joseph Pecoraro  <pecoraro@apple.com>
3763
3764         Web Inspector: Uncaught exceptions, attempting to dispatch unimplemented Network WebSocket methods
3765         https://bugs.webkit.org/show_bug.cgi?id=140532
3766
3767         Reviewed by Timothy Hatcher.
3768
3769         * UserInterface/Protocol/NetworkObserver.js:
3770         (WebInspector.NetworkObserver.prototype.webSocketFrameReceived):
3771         (WebInspector.NetworkObserver.prototype.webSocketFrameError):
3772         (WebInspector.NetworkObserver.prototype.webSocketFrameSent):
3773         Add stubs to prevent an exception when trying to dispatch the event.
3774
3775 2015-01-15  Joseph Pecoraro  <pecoraro@apple.com>
3776
3777         Web Inspector: Reopening the inspector can selects a sub-frame instead of the Main Frame's DOM
3778         https://bugs.webkit.org/show_bug.cgi?id=140513
3779
3780         Reviewed by Timothy Hatcher.
3781
3782         * UserInterface/Models/Frame.js:
3783         (WebInspector.Frame.prototype.saveIdentityToCookie):
3784         Specifically identify the main frame, so that any sub-frames with the same
3785         URL, don't get choosen over the main frame when restoring state from cookie.
3786
3787 2015-01-15  Joseph Pecoraro  <pecoraro@apple.com>
3788
3789         Web Inspector: selecting Paint timeline records from sidebar does not trigger preview of paint