Web Inspector: Add application/vnd.api+json as a valid JSON MIME-type
[WebKit-https.git] / Source / WebInspectorUI / ChangeLog
1 2016-08-12  Timothy Hatcher  <timothy@apple.com>
2
3         Web Inspector: Add application/vnd.api+json as a valid JSON MIME-type
4         https://bugs.webkit.org/show_bug.cgi?id=160834
5         rdar://problem/27608536
6
7         Reviewed by Joseph Pecoraro.
8
9         * UserInterface/Views/CodeMirrorAdditions.js: Add Add application/vnd.api+json to extraJSONTypes.
10
11 2016-08-12  Nikita Vasilyev  <nvasilyev@apple.com>
12
13         Web Inspector: Command-Shift-O causes infinite loop if web page has frames
14         https://bugs.webkit.org/show_bug.cgi?id=160810
15
16         Reviewed by Joseph Pecoraro.
17
18         * UserInterface/Views/OpenResourceDialog.js:
19         (WebInspector.OpenResourceDialog.prototype._addResourcesForFrame):
20         "frame" doesn't change inside the loop.
21
22 2016-08-12  Joseph Pecoraro  <pecoraro@apple.com>
23
24         Web Inspector: Support for :lineNumber syntax in Open Resource Dialog
25         https://bugs.webkit.org/show_bug.cgi?id=159732
26         <rdar://problem/27684491>
27
28         Reviewed by Matt Baker.
29
30         Allow the Open Resource Dialog to support line/column syntax.
31         Other tools allow "<name>:<line>:<column>" syntax, where the
32         location data at the end is optional. If the <name> portion
33         is missing, the location can be used for the active content
34         view, assuming it has text data and has lines.
35
36         * UserInterface/Base/Main.js:
37         (WebInspector.focusedOrVisibleContentView):
38         Expose a function to access the current focused / visible content view.
39
40         (WebInspector.dialogWasDismissed):
41         Include passing on cookie data when showing a represented object.
42
43         * UserInterface/Views/Dialog.js:
44         (WebInspector.Dialog):
45         (WebInspector.Dialog.prototype.get visible):
46         (WebInspector.Dialog.prototype.get delegate):
47         (WebInspector.Dialog.prototype.get representedObject):
48         (WebInspector.Dialog.prototype.get cookie):
49         (WebInspector.Dialog.prototype.dismiss):
50         * UserInterface/Models/ResourceQueryResult.js:
51         (WebInspector.ResourceQueryResult):
52         (WebInspector.ResourceQueryResult.prototype.get cookie):
53         Include cookie data along with the represented object in matches
54         and dialog results.
55
56         * UserInterface/Controllers/ResourceQueryController.js:
57         (WebInspector.ResourceQueryController.prototype.executeQuery):
58         Cut off location data from a query, and stash it on the query result.
59         A query can be "<name>:<line>:<column>", and the line/column data
60         becomes cookie data for the resource.
61
62         * UserInterface/Views/OpenResourceDialog.js:
63         (WebInspector.OpenResourceDialog.prototype._populateResourceTreeOutline):
64         If the query is just ":<line>:<column>" have it jump to a location
65         in the current content view if applicable.
66
67         (WebInspector.OpenResourceDialog.prototype._handleKeydownEvent):
68         (WebInspector.OpenResourceDialog.prototype._treeSelectionDidChange):
69         When dismissing, include cookie data.
70
71 2016-08-11  Nikita Vasilyev  <nvasilyev@apple.com>
72
73         REGRESSION (r204264): Web Inspector: Uncaught Exception in Network tab when reloading a web page
74         https://bugs.webkit.org/show_bug.cgi?id=160781
75         <rdar://problem/27810452>
76
77         Reviewed by Matt Baker.
78
79         WebInspector.TimelineDataGrid.prototype.closed was removed in r204264.
80         Define a stub method on DataGrid so it's available to all its subclasses.
81
82         * UserInterface/Views/DataGrid.js:
83         this._dataGrid.closed()
84
85 2016-08-10  Joseph Pecoraro  <pecoraro@apple.com>
86
87         Web Inspector: Should be able to Edit Node Attributes and Styles for non-UserAgent Shadow DOM nodes
88         https://bugs.webkit.org/show_bug.cgi?id=160762
89         <rdar://problem/27798271>
90
91         Reviewed by Ryosuke Niwa.
92
93         * UserInterface/Models/DOMNode.js:
94         (WebInspector.DOMNode.prototype.isInUserAgentShadowTree):
95         (WebInspector.DOMNode.prototype.isShadowRoot):
96         (WebInspector.DOMNode.prototype.isUserAgentShadowRoot):
97         (WebInspector.DOMNode.prototype.ancestorShadowRoot):
98         (WebInspector.DOMNode.prototype.ancestorShadowHost):
99         Add methods for determining the shadow root, host, and easily
100         checking the type of shadow tree a node is in.
101
102         * UserInterface/Models/CSSStyleDeclaration.js:
103         (WebInspector.CSSStyleDeclaration.prototype.get editable):
104         * UserInterface/Views/DOMTreeElement.js:
105         (WebInspector.DOMTreeElement.prototype.get editable):
106         (WebInspector.DOMTreeElement.prototype._startEditingTarget):
107         (WebInspector.DOMTreeElement.prototype._populateTagContextMenu):
108         * UserInterface/Views/RulesStyleDetailsPanel.js:
109         (WebInspector.RulesStyleDetailsPanel.prototype.newRuleButtonClicked):
110         * UserInterface/Views/VisualStyleSelectorSection.js:
111         (WebInspector.VisualStyleSelectorSection.prototype._addNewRule):
112         Allow editing shadow DOM nodes as long as they are not in a UserAgent shadow tree.
113
114         * UserInterface/Views/DOMTreeOutline.js:
115         (WebInspector.DOMTreeOutline.prototype._populateContextMenu):
116         Disallow "Log Element" on UserAgent shadow tree nodes.
117
118 2016-08-10  Nikita Vasilyev  <nvasilyev@apple.com>
119
120         Web Inspector: Can't click on the lower half of "S" icon in JavaScript Allocations timeline
121         https://bugs.webkit.org/show_bug.cgi?id=160743
122         <rdar://problem/27790098>
123
124         Reviewed by Timothy Hatcher.
125
126         "S" icons are covered by .scroll-container, which has `z-index: calc(var(--z-index-resizer) + 1)`.
127         Set larger z-index on the "S" icons.
128
129         * UserInterface/Views/HeapAllocationsTimelineOverviewGraph.css:
130         (.timeline-overview-graph.heap-allocations > img.snapshot):
131
132 2016-08-08  Joseph Pecoraro  <pecoraro@apple.com>
133
134         Web Inspector: Popover for Color Picker should update position when window resizes
135         https://bugs.webkit.org/show_bug.cgi?id=160321
136
137         Reviewed by Brian Burg.
138
139         * UserInterface/Views/Popover.js:
140         (WebInspector.Popover):
141         (WebInspector.Popover.prototype.set windowResizeHandler):
142         (WebInspector.Popover.prototype.dismiss):
143         (WebInspector.Popover.prototype.handleEvent):
144         (WebInspector.Popover.prototype._addListenersIfNeeded):
145         The popover already has a set of window listeners, add "resize" to
146         the list. If there is a resize, invoke a resize handler. The resize
147         handler will only be called while the popover is visible.
148
149         * UserInterface/Views/HeapSnapshotDataGridTree.js:
150         (WebInspector.HeapSnapshotDataGridTree):
151         (WebInspector.HeapSnapshotDataGridTree.prototype.get visible):
152         (WebInspector.HeapSnapshotDataGridTree.prototype.get popoverNode):
153         (WebInspector.HeapSnapshotDataGridTree.prototype.set popoverNode):
154         (WebInspector.HeapSnapshotDataGridTree.prototype.get popoverTargetElement):
155         (WebInspector.HeapSnapshotDataGridTree.prototype.set popoverTargetElement):
156         (WebInspector.HeapSnapshotDataGridTree.prototype.get popover):
157         (WebInspector.HeapSnapshotDataGridTree.prototype.willDismissPopover):
158         * UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
159         Update heap snapshot popovers to reposition on window resize.
160         Set a target to reposition around, since the popover is shared.
161
162         * UserInterface/Views/ProbeSetDetailsSection.js:
163         (WebInspector.ProbeSetDetailsSection.prototype._addProbeButtonClicked):
164         Update probe expression popover to respect window resizes.
165
166         * UserInterface/Views/VisualStylePropertyEditor.js:
167         (WebInspector.VisualStylePropertyEditor.prototype._showPropertyInfoPopover):
168         Though not yet visible, update this to respect window resizes.
169
170         * UserInterface/Views/InlineSwatch.js:
171         (WebInspector.InlineSwatch.prototype._swatchElementClicked):
172         Add a window resize handler to reposition over the swatch element.
173
174         * UserInterface/Views/LayerTreeDetailsSidebarPanel.js:
175         (WebInspector.LayerTreeDetailsSidebarPanel.prototype._updatePopoverForSelectedNode):
176         (WebInspector.LayerTreeDetailsSidebarPanel): Deleted.
177         (WebInspector.LayerTreeDetailsSidebarPanel.prototype._windowResized): Deleted.
178         * UserInterface/Views/TimelineDataGrid.js:
179         (WebInspector.TimelineDataGrid.prototype._showPopoverForSelectedNodeSoon):
180         (WebInspector.TimelineDataGrid): Deleted.
181         (WebInspector.TimelineDataGrid.prototype.closed): Deleted.
182         (WebInspector.TimelineDataGrid.prototype.handleEvent): Deleted.
183         (WebInspector.TimelineDataGrid.prototype._windowResized): Deleted.
184         * UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
185         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._addWatchExpressionButtonClicked):
186         (WebInspector.ScopeChainDetailsSidebarPanel.prototype.willDismissPopover): Deleted.
187         Replace custom popover repositioning with standard Popover handling.
188
189 2016-08-07  Matt Baker  <mattbaker@apple.com>
190
191         REGRESSION (r201245): switching between Computed and Visual Styles panels causes internal error
192         https://bugs.webkit.org/show_bug.cgi?id=160604
193         <rdar://problem/27723416>
194
195         Reviewed by Timothy Hatcher.
196
197         * UserInterface/Views/StyleDetailsPanel.js:
198         (WebInspector.StyleDetailsPanel.prototype.shown):
199         Only perform a layout if needed. Subclasses access node style
200         data during layout, which may not exist yet.
201
202 2016-08-06  Matt Baker  <mattbaker@apple.com>
203
204         REGRESSION (r203253): Node details sidebar flickers while resizing
205         https://bugs.webkit.org/show_bug.cgi?id=160631
206         <rdar://problem/27733024>
207
208         Reviewed by Timothy Hatcher.
209
210         Sidebar panel layouts can be expensive, and should be performed only
211         when necessary (i.e., when the panel is shown for the first time, or
212         model data changed while the panel was hidden).
213
214         * UserInterface/Views/Sidebar.js:
215         (WebInspector.Sidebar.prototype._recalculateWidth):
216
217         * UserInterface/Views/SidebarPanel.js:
218         (WebInspector.SidebarPanel.prototype.shown):
219
220         * UserInterface/Views/View.js:
221         (WebInspector.View.prototype.updateLayoutIfNeeded):
222         Update the layout if an initial layout was never performed.
223
224 2016-08-04  Matt Baker  <mattbaker@apple.com>
225
226         Web Inspector: UI polish for Edit Breakpoint dialog
227         https://bugs.webkit.org/show_bug.cgi?id=160566
228         <rdar://problem/27706378>
229
230         Reviewed by Timothy Hatcher.
231
232         * UserInterface/Images/BreakpointActionAdd.svg: Removed.
233         * UserInterface/Images/BreakpointActionRemove.svg: Removed.
234         Use Plus13.svg and Minus.svg instead.
235
236         * UserInterface/Views/BreakpointActionView.css:
237         (.breakpoint-action-button-container):
238         (.breakpoint-action-append-button,):
239         (.breakpoint-action-append-button):
240         (.breakpoint-action-remove-button):
241         Button styles should match Xcode.
242         (.breakpoint-action-append-button:active,): Deleted.
243         Brightness on activation no longer needed.
244
245         * UserInterface/Views/BreakpointActionView.js:
246         (WebInspector.BreakpointActionView):
247         Add a button container so buttons can float together.
248
249         * UserInterface/Views/BreakpointPopoverController.css:
250         (.wide .edit-breakpoint-popover-condition > .CodeMirror):
251         Increase condition field width by the same amount as the popover.
252
253 2016-08-04  Matt Baker  <mattbaker@apple.com>
254
255         Web Inspector: Popover's arrow is misplaced
256         https://bugs.webkit.org/show_bug.cgi?id=151236
257         <rdar://problem/23527296>
258
259         Reviewed by Brian Burg.
260
261         * UserInterface/Views/Popover.js:
262         (WebInspector.Popover.prototype._setAnchorPoint):
263         Drive-by style fix.
264         (WebInspector.Popover.prototype._drawFrame):
265         Position the arrow so that the arrow head doesn't overlap the
266         rounded corners of its edge.
267
268 2016-08-04  Matt Baker  <mattbaker@apple.com>
269
270         Web Inspector: Add placeholder graphs to TimelineOverview while editing
271         https://bugs.webkit.org/show_bug.cgi?id=160485
272         <rdar://problem/27670755>
273
274         Reviewed by Brian Burg.
275
276         Insert placeholder elements in TimelineOverview's graph container
277         when editing instruments. This allows alternating overview graph styles
278         to be shown for disabled instruments, and ensures that every tree element
279         has a corresponding element in the overview during dragging/reordering
280         of instruments (see https://webkit.org/b/157957).
281
282         * UserInterface/Views/TimelineOverview.js:
283         (WebInspector.TimelineOverview.prototype._startEditingInstruments):
284         (WebInspector.TimelineOverview.prototype._stopEditingInstruments):
285
286 2016-08-04  Matt Baker  <mattbaker@apple.com>
287
288         Web Inspector: UI polish for Open Quickly and Goto Line dialogs
289         https://bugs.webkit.org/show_bug.cgi?id=159849
290         <rdar://problem/27383068>
291
292         Reviewed by Brian Burg.
293
294         * UserInterface/Images/Search.svg: Added.
295         Magnifying glass icon.
296
297         * UserInterface/Views/GoToLineDialog.css:
298         (.go-to-line-dialog):
299         (.go-to-line-dialog > div):
300         (.go-to-line-dialog > div::before):
301         * UserInterface/Views/OpenResourceDialog.css:
302         (.open-resource-dialog > .field):
303         (.open-resource-dialog > .field::before):
304         (.open-resource-dialog.has-results > .tree-outline):
305         (.open-resource-dialog > .tree-outline .item):
306         Add search icon to left of the input field in both dialogs,
307         and adjust styles to better match Xcode 8.
308
309         * UserInterface/Views/OpenResourceDialog.js:
310         (WebInspector.OpenResourceDialog):
311         Remove "input" event listener, as styles are now toggled in _updateFilter.
312         (WebInspector.OpenResourceDialog.prototype._updateFilter):
313         Toggle "has-results" and "non-empty" class names.
314         (WebInspector.OpenResourceDialog.prototype._handleInputEvent): Deleted.
315         (WebInspector.OpenResourceDialog.prototype._clear): Deleted.
316         Moved class toggle to _updateFilter.
317
318 2016-08-03  Chris Dumez  <cdumez@apple.com>
319
320         Drop DocumentType.internalSubset attribute
321         https://bugs.webkit.org/show_bug.cgi?id=160530
322
323         Reviewed by Alex Christensen.
324
325         Drop DocumentType.internalSubset attribute.
326
327         * UserInterface/Models/DOMNode.js:
328         (WebInspector.DOMNode): Deleted.
329         * UserInterface/Models/DOMSearchMatchObject.js:
330         (WebInspector.DOMSearchMatchObject.titleForDOMNode): Deleted.
331         * UserInterface/Views/DOMTreeElement.js:
332         (WebInspector.DOMTreeElement.prototype._nodeTitleInfo): Deleted.
333
334 2016-08-03  Matt Baker  <mattbaker@apple.com>
335
336         Web Inspector: Cmd-L shortcut for Jump to Line conflicts with selecting URL of inspected page
337         https://bugs.webkit.org/show_bug.cgi?id=158028
338         <rdar://problem/26516663>
339
340         Reviewed by Timothy Hatcher.
341
342         Remove Command-L shortcut for opening the Line Number dialog, since
343         we already support Control-G.
344
345         * UserInterface/Views/SourceCodeTextEditor.js:
346         (WebInspector.SourceCodeTextEditor): Deleted.
347
348 2016-08-01  Nikita Vasilyev  <nvasilyev@apple.com>
349
350         Web Inspector: Don't set `width:calc(100% - 0px); left:0px` on console messages
351         https://bugs.webkit.org/show_bug.cgi?id=160428
352         <rdar://problem/27646033>
353
354         Reviewed by Timothy Hatcher.
355
356         Console messages inside console.group() are indented. Console messages outside of
357         console.group() aren't and there is no reason to set inline styles that do nothing
358         on each one of them.
359
360         * UserInterface/Views/LogContentView.js:
361         (WebInspector.LogContentView.prototype.didAppendConsoleMessageView):
362
363 2016-08-01  Matt Baker  <mattbaker@apple.com>
364
365         Web Inspector: Grid column resizer elements positioned incorrectly
366         https://bugs.webkit.org/show_bug.cgi?id=160311
367         <rdar://problem/27595586>
368
369         Reviewed by Brian Burg.
370
371         Perform a resize layout on a newly shown tab content view if the tab
372         browser was resized before showing the tab.
373
374         * UserInterface/Views/TabBrowser.js:
375         (WebInspector.TabBrowser):
376         (WebInspector.TabBrowser.prototype.layout):
377         Mark all recent tab content views (except for the current view)
378         as needing a resize layout.
379
380         (WebInspector.TabBrowser.prototype._tabBarItemSelected):
381         If the tab browser was resized while the view was hidden, update the
382         view's layout for the new content view container size.
383
384 2016-08-01  Matt Baker  <mattbaker@apple.com>
385
386         Web Inspector: Waterfall graph in Network tab shows too much whitespace/dead time
387         https://bugs.webkit.org/show_bug.cgi?id=160373
388
389         Reviewed by Timothy Hatcher.
390
391         Track the start and end time separate from the ruler to remove
392         leading/trailing whitespace in the graph. Also prevent network
393         record bars from being clipped.
394
395         * UserInterface/Views/NetworkGridContentView.js:
396         (WebInspector.NetworkGridContentView):
397         (WebInspector.NetworkGridContentView.prototype.get zeroTime):
398         Set equal to the ruler start time.
399         (WebInspector.NetworkGridContentView.prototype.reset):
400         Reset start and end time.
401         (WebInspector.NetworkGridContentView.prototype.layout):
402         Set the initial values for ruler start/zero time if needed.
403         (WebInspector.NetworkGridContentView.prototype._networkTimelineRecordAdded):
404         Set the start time if needed.
405         Reduce debounce from 250ms to 150ms. This prevents the current time from
406         exceeding the end time by as wide a margin, while keeping the current
407         time "timer" from being restarted too frequently.
408
409         (WebInspector.NetworkGridContentView.prototype._stopUpdatingCurrentTime):
410         Update the ruler end time and schedule a layout.
411         Add padding equal to the time needed to draw a network bar at minimum width
412         to prevent bars from being clipped.
413
414 2016-07-29  Matt Baker  <mattbaker@apple.com>
415
416         Web Inspector: Inactive/active network bar segments overlap when latency is zero
417         https://bugs.webkit.org/show_bug.cgi?id=160147
418         <rdar://problem/27516007>
419
420         Reviewed by Joseph Pecoraro.
421
422         TimelineRecordBar should hide the inactive segment when its duration
423         is less than the minimum displayable size. The active segment can
424         assume the whole width of the bar.
425
426         * UserInterface/Views/TimelineOverviewGraph.js:
427         (WebInspector.TimelineOverviewGraph.prototype.get secondsPerPixel):
428         Make secondsPerPixel available during TimelineRecordBars.refresh.
429
430         * UserInterface/Views/TimelineRecordBar.js:
431         (WebInspector.TimelineRecordBar.prototype.refresh):
432         Check inactive duration against the minimum display size,
433         and add/remove DOM nodes and bar styles as needed.
434
435 2016-07-29  Nikita Vasilyev  <nvasilyev@apple.com>
436
437         REGRESSION (r195456): Web Inspector: Changing tabs in Styles sidebar shouldn't change sidebar's width
438         https://bugs.webkit.org/show_bug.cgi?id=159646
439         <rdar://problem/27286338>
440
441         Reviewed by Brian Burg.
442
443         Remember sidebar width on per tab basis. For example, Node, Styles, and Layers sidebar panels in
444         Elements tab should all have the same width, but Resource sidebar panel in Debugger tab should NOT
445         share its width Element tab's sidebar.
446
447         TabContentView stores the width but TabBrowser manages saving and restoring it.
448         The same way collapsed sidebar state is handled.
449
450         * UserInterface/Views/Sidebar.js:
451         (WebInspector.Sidebar.prototype.set collapsed):
452         Don't change sidebar's width when sidebar panels change.
453
454         (WebInspector.Sidebar.prototype._recalculateWidth):
455         (WebInspector.Sidebar.prototype.set selectedSidebarPanel): Deleted.
456         Pass newWidth as an argument so it can be saved in TabBrowser.
457
458         * UserInterface/Views/SidebarPanel.js:
459         (WebInspector.SidebarPanel): Deleted.
460         (WebInspector.SidebarPanel.prototype.get savedWidth): Deleted.
461         (WebInspector.SidebarPanel.prototype.sizeDidChange): Deleted.
462         Remove the per sidebar panel width setting that was added in r195456.
463
464         * UserInterface/Views/TabBrowser.js:
465         (WebInspector.TabBrowser):
466         (WebInspector.TabBrowser.prototype._detailsSidebarWidthDidChange):
467         (WebInspector.TabBrowser.prototype._showDetailsSidebarPanelsForTabContentView):
468         * UserInterface/Views/TabContentView.js:
469         (WebInspector.TabContentView):
470         (WebInspector.TabContentView.prototype.get detailsSidebarWidthSetting):
471         Store details sidebar width on TabContentView.
472
473 2016-07-29  Matt Baker  <mattbaker@apple.com>
474
475         Web Inspector: Assertion in NetworkGridContentView when updating data grid for the first time
476         https://bugs.webkit.org/show_bug.cgi?id=160330
477         <rdar://problem/27600905>
478
479         Reviewed by Brian Burg.
480
481         When the first grid node is added, a view layout and current time update
482         are scheduled. A view layout occurring before the current time is updated
483         should be skipped, since the ruler end time hasn't been set.
484
485         * UserInterface/Views/NetworkGridContentView.js:
486         (WebInspector.NetworkGridContentView.prototype.layout):
487         Skip layout until current time is updated.
488         (WebInspector.NetworkGridContentView.prototype._update):
489         Remove unused variables `startTime` and `endTime`. Don't force a layout
490         if the elapsed time is zero.
491
492 2016-07-28  Chris Dumez  <cdumez@apple.com>
493
494         Parameters to Event.initEvent() should be mandatory
495         https://bugs.webkit.org/show_bug.cgi?id=160320
496
497         Reviewed by Darin Adler.
498
499         Update WebInspector accordingly.
500
501         * UserInterface/Models/NativeFunctionParameters.js:
502
503 2016-07-28  Chris Dumez  <cdumez@apple.com>
504
505         First parameter to canvas.getContext() / probablySupportsContext() should be mandatory
506         https://bugs.webkit.org/show_bug.cgi?id=160312
507
508         Reviewed by Darin Adler.
509
510         Update WebInspector accordingly.
511
512         * UserInterface/Models/NativeFunctionParameters.js:
513
514 2016-07-28  Matt Baker  <mattbaker@apple.com>
515
516         Web Inspector: Hiding a column which contains a TimelineRuler as the headerview, doesn't hide the headerView
517         https://bugs.webkit.org/show_bug.cgi?id=160093
518         <rdar://problem/27499300>
519
520         Reviewed by Joseph Pecoraro.
521
522         * UserInterface/Views/DataGrid.js:
523         (WebInspector.DataGrid.prototype._positionHeaderViews):
524         Remove early return so that a header view in a hidden column will have
525         its width resized to zero, matching the column.
526
527 2016-07-28  Johan K. Jensen  <johan_jensen@apple.com>
528
529         Web Inspector: Waterfall view should be visible in Network tab and Network Timeline
530         https://bugs.webkit.org/show_bug.cgi?id=160061
531
532         Reviewed by Joseph Pecoraro.
533
534         Adds a Timeline-column (waterfall) to the Network tab and Network Timeline.
535
536         * Localizations/en.lproj/localizedStrings.js:
537         Add "Timeline" localized string.
538
539         * UserInterface/Views/NetworkGridContentView.js:
540         (WebInspector.NetworkGridContentView):
541         Add the Timeline-column with a TimelineRuler as the headerview,
542         and properties for updating current time.
543
544         (WebInspector.NetworkGridContentView.prototype.get secondsPerPixel):
545         (WebInspector.NetworkGridContentView.prototype.get startTime):
546         (WebInspector.NetworkGridContentView.prototype.get currentTime):
547         (WebInspector.NetworkGridContentView.prototype.get endTime):
548         Acting as a graphDataSource used by TimelineDataGridNode.
549
550         (WebInspector.NetworkGridContentView.prototype.shown):
551         (WebInspector.NetworkGridContentView.prototype.reset):
552         (WebInspector.NetworkGridContentView.prototype.layout):
553         Refresh graphs and update the TimelineRuler on layout changes.
554
555         (WebInspector.NetworkGridContentView.prototype._networkTimelineRecordAdded):
556         Add listeners for when resources are finished to stop the timer.
557
558         (WebInspector.NetworkGridContentView.prototype._update):
559         (WebInspector.NetworkGridContentView.prototype._startUpdatingCurrentTime):
560         (WebInspector.NetworkGridContentView.prototype._stopUpdatingCurrentTime):
561         Adding a timer which updates the TimelineRuler and the layout
562         if any non-finished requests are running.
563
564         * UserInterface/Views/NetworkTimelineView.js:
565         (WebInspector.NetworkTimelineView):
566         Add the Timeline-column with a TimelineRuler as the headerview.
567
568         (WebInspector.NetworkTimelineView.prototype.get secondsPerPixel):
569         (WebInspector.NetworkTimelineView.prototype.layout):
570         Refresh graphs on layout changes.
571
572         * UserInterface/Views/TimelineDataGrid.css:
573         (.tree-outline.timeline-data-grid .item:hover .subtitle):
574         (.data-grid.timeline th):
575         (.data-grid.timeline th.graph-column > .timeline-ruler):
576         (.data-grid.timeline td.graph-column):
577         (.data-grid.timeline td.graph-column > .cell-content):
578         (.data-grid.timeline td.graph-column .timeline-record-bar):
579
580 2016-07-28  Chris Dumez  <cdumez@apple.com>
581
582         Parameter to table.deleteRow() / body.deleteRow() should be mandatory
583         https://bugs.webkit.org/show_bug.cgi?id=160307
584
585         Reviewed by Ryosuke Niwa.
586
587         Update WebInspector accordingly.
588
589         * UserInterface/Models/NativeFunctionParameters.js:
590
591 2016-07-28  Chris Dumez  <cdumez@apple.com>
592
593         2 first parameters to input.setSelectionRange() should be mandatory
594         https://bugs.webkit.org/show_bug.cgi?id=160310
595
596         Reviewed by Alex Christensen.
597
598         Update WebInspector accordingly.
599
600         * UserInterface/Models/NativeFunctionParameters.js:
601
602 2016-07-28  Chris Dumez  <cdumez@apple.com>
603
604         Parameter to tr.deleteCell() should be mandatory
605         https://bugs.webkit.org/show_bug.cgi?id=160308
606
607         Reviewed by Ryosuke Niwa.
608
609         Report tr.deleteCell() parameter as mandatory.
610
611         * UserInterface/Models/NativeFunctionParameters.js:
612
613 2016-07-27  Nikita Vasilyev  <nvasilyev@apple.com>
614
615         Web Inspector: Visual Styles Sidebar should have only one column when it's narrow
616         https://bugs.webkit.org/show_bug.cgi?id=159905
617         <rdar://problem/27413248>
618
619         Reviewed by Joseph Pecoraro.
620
621         Many CSS values often get clipped in the two colunm layout. Change the layout to one colunm
622         when visual style rows get too narrow.
623
624         * UserInterface/Views/VisualStyleDetailsPanel.css:
625         (.sidebar > .panel.details.css-style .visual > .details-section .details-section > .content .group > .row):
626         (.sidebar > .panel.details.css-style .visual > .details-section .details-section > .content .group > .metric-section-row):
627         Wrap all rows except for position/padding/margin controls.
628
629         (.sidebar > .panel.details.css-style .visual > .details-section .details-section > .content .group > .row > .visual-style-property-container:not(.layout-reversed):last-child): Deleted.
630         Margin between the first and the second column doesn't make sense one column layout.
631         Set the margin in .visual-style-property-container instead.
632
633         * UserInterface/Views/VisualStyleDetailsPanel.js:
634         (WebInspector.VisualStyleDetailsPanel.prototype._generateMetricSectionRows):
635         * UserInterface/Views/VisualStylePropertyEditor.css:
636         (.visual-style-property-container):
637
638 2016-07-27  Joseph Pecoraro  <pecoraro@apple.com>
639
640         [Mac] Web Inspector: CodeMirror-based editor bindings for Home and End don't match system behavior
641         https://bugs.webkit.org/show_bug.cgi?id=160267
642         <rdar://problem/27575553>
643
644         Reviewed by Brian Burg.
645
646         * UserInterface/Views/CodeMirrorEditor.js:
647         (WebInspector.CodeMirrorEditor.create):
648         (WebInspector.CodeMirrorEditor):
649         Add some key map overrides for Home and End to better match system Mac
650         behavior. This scrolls to the start or end of a document and does not
651         change the cursor position.
652
653 2016-07-27  Brian Burg  <bburg@apple.com>
654
655         Regression(r203535): Uncaught Exception: TypeError: Not enough arguments at LayerTreeDataGridNode.js:47
656         https://bugs.webkit.org/show_bug.cgi?id=160187
657         <rdar://problem/27540435>
658
659         Reviewed by Eric Carlson.
660
661         After r203535, document.createTextNode() requires an argument.
662
663         * UserInterface/Views/LayerTreeDataGridNode.js:
664         (WebInspector.LayerTreeDataGridNode.prototype.createCellContent):
665         Since this use-site is for creating a cell in an unknown column,
666         initialize it to '–'. Previously it would have been the string
667         "undefined" or empty.
668
669 2016-07-24  Matt Baker  <mattbaker@apple.com>
670
671         Web Inspector: Filtering is broken in the Overview timeline view
672         https://bugs.webkit.org/show_bug.cgi?id=160152
673         <rdar://problem/27517481>
674
675         Reviewed by Joseph Pecoraro.
676
677         * UserInterface/Views/SourceCodeTimelineTimelineDataGridNode.js:
678         (WebInspector.SourceCodeTimelineTimelineDataGridNode.prototype.filterableDataForColumn):
679         Non-resource nodes should be filtered based on their display name.
680
681 2016-07-23  Nikita Vasilyev  <nvasilyev@apple.com>
682
683         REGRESSION (r202876): Web Inspector: Switching away from Console tab with a lot of messages is slow
684         https://bugs.webkit.org/show_bug.cgi?id=160112
685
686         Reviewed by Joseph Pecoraro.
687
688         Showing NavigationSidebar before removing previous TabContentView can be very slow when
689         TabContentView is ConsoleTabContentView with a lot of messages. The order of operations
690         (show sidebar, change content view, show sidebar) caused more forced layouts. This patch
691         reduces the number of forced layouts by changes the order to: show content view, show sidebar,
692         show sidebar.
693
694         * UserInterface/Views/TabBrowser.js:
695         (WebInspector.TabBrowser.prototype._tabBarItemSelected):
696
697 2016-07-20  Joseph Pecoraro  <pecoraro@apple.com>
698
699         Web Inspector: Pausing when Debugger tab is closed opens tab in wrong state
700         https://bugs.webkit.org/show_bug.cgi?id=159946
701         <rdar://problem/27429886>
702
703         Reviewed by Timothy Hatcher.
704
705         * UserInterface/Views/DebuggerSidebarPanel.js:
706         (WebInspector.DebuggerSidebarPanel):
707         At the end of construction, update the UI to match the current state
708         of the world. Such as updating the UI if we are paused, or if the
709         Timeline is capturing and we are temporarily disabling breakpoints.
710
711 2016-07-15  Timothy Hatcher  <timothy@apple.com>
712
713         Web Inspector: Make Open Quickly and Goto Line dialogs match Xcode 8
714         https://bugs.webkit.org/show_bug.cgi?id=159823
715         rdar://problem/27376501
716
717         Reviewed by Brian Burg.
718
719         * UserInterface/Views/GoToLineDialog.css:
720         (.go-to-line-dialog):
721         (.go-to-line-dialog > div > input):
722         (.go-to-line-dialog > div > input::placeholder):
723         (.go-to-line-dialog > div > img):
724         (.go-to-line-dialog > div): Deleted.
725         * UserInterface/Views/OpenResourceDialog.css:
726         (.open-resource-dialog):
727         (.open-resource-dialog > .field):
728         (.open-resource-dialog > .field > input):
729         (.open-resource-dialog > .field > input::placeholder):
730         (.open-resource-dialog > .field > img):
731         (.open-resource-dialog > .tree-outline .item): Deleted.
732         (.open-resource-dialog > .tree-outline .item:first-child): Deleted.
733
734 2016-07-14  Joseph Pecoraro  <pecoraro@apple.com>
735
736         Web Inspector: Rename CCTNode to CallingContextTreeNode
737         https://bugs.webkit.org/show_bug.cgi?id=159782
738
739         Reviewed by Timothy Hatcher.
740
741         * UserInterface/Models/CallingContextTree.js:
742         * UserInterface/Models/CallingContextTreeNode.js:
743         Extra to its own file and rename.
744
745         * UserInterface/Main.html:
746         * UserInterface/Test.html:
747         * UserInterface/TestStub.html:
748         Include the new file.
749
750         * UserInterface/Views/ProfileDataGridNode.js:
751         (WebInspector.ProfileDataGridNode):
752         * UserInterface/Views/ProfileDataGridTree.js:
753         (WebInspector.ProfileDataGridTree.prototype._updateCurrentFocusDetails):
754         Rename shorthand "cctnode".
755
756 2016-07-14  Matt Baker  <mattbaker@apple.com>
757
758         Web Inspector: SidebarPanel classes should use View.layout instead of "refresh"
759         https://bugs.webkit.org/show_bug.cgi?id=159745
760         <rdar://problem/27335252>
761
762         Reviewed by Timothy Hatcher.
763
764         * UserInterface/Views/ApplicationCacheDetailsSidebarPanel.js:
765         (WebInspector.ApplicationCacheDetailsSidebarPanel.prototype.set applicationCacheFrame):
766         Use needsLayout.
767
768         * UserInterface/Views/CSSStyleDetailsSidebarPanel.js:
769         (WebInspector.CSSStyleDetailsSidebarPanel.prototype.layout):
770         Move refresh logic to layout.
771         (WebInspector.CSSStyleDetailsSidebarPanel.prototype.initialLayout):
772         (WebInspector.CSSStyleDetailsSidebarPanel.prototype._styleSheetAddedOrRemoved):
773         Defer layout to coalesce updates.
774         (WebInspector.CSSStyleDetailsSidebarPanel):
775         (WebInspector.CSSStyleDetailsSidebarPanel.prototype.refresh): Deleted.
776
777         * UserInterface/Views/DOMDetailsSidebarPanel.js:
778         (WebInspector.DOMDetailsSidebarPanel.prototype.set domNode):
779         Use needsLayout.
780
781         * UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
782         Move refresh logic to layout.
783
784         * UserInterface/Views/DetailsSidebarPanel.js:
785         (WebInspector.DetailsSidebarPanel.prototype.shown): Deleted.
786         Base class already forces a layout when shown.
787         (WebInspector.DetailsSidebarPanel.prototype.needsRefresh): Deleted.
788         No longer needed.
789         (WebInspector.DetailsSidebarPanel.prototype.refresh): Deleted.
790         Renamed layout.
791         (WebInspector.DetailsSidebarPanel): Deleted.
792
793         * UserInterface/Views/LayerTreeDetailsSidebarPanel.js:
794         (WebInspector.LayerTreeDetailsSidebarPanel.prototype.supportsDOMNode):
795         (WebInspector.LayerTreeDetailsSidebarPanel.prototype._layerTreeDidChange):
796         Use needsLayout.
797         (WebInspector.LayerTreeDetailsSidebarPanel.prototype.shown):
798         Base class already forces a layout when shown.
799
800         * UserInterface/Views/ResourceDetailsSidebarPanel.js:
801         (WebInspector.ResourceDetailsSidebarPanel.prototype.set resource):
802         Use needsLayout.
803
804         * UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
805         (WebInspector.ScopeChainDetailsSidebarPanel):
806         (WebInspector.ScopeChainDetailsSidebarPanel.prototype.set callFrame):
807         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._addWatchExpression):
808         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._removeWatchExpression):
809         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._clearAllWatchExpressions):
810         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._refreshAllWatchExpressionsButtonClicked):
811         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._didEvaluateExpression):
812         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._mainResourceDidChange):
813         Use needsLayout.
814
815 2016-07-14  Joseph Pecoraro  <pecoraro@apple.com>
816
817         Web Inspector: Maintain selected function when switching between different profile representations
818         https://bugs.webkit.org/show_bug.cgi?id=159778
819         <rdar://problem/27355913>
820
821         Reviewed by Timothy Hatcher.
822
823         * UserInterface/Models/CallingContextTree.js:
824         (WebInspector.CCTNode):
825         (WebInspector.CCTNode.prototype.get hash):
826         (WebInspector.CCTNode.prototype.findOrMakeChild):
827         (WebInspector.CCTNode.prototype.equals):
828         Expose the hash so two nodes can be compared cheaply.
829
830         * UserInterface/Views/ProfileView.js:
831         (WebInspector.ProfileView.prototype._repopulateDataGridFromTree):
832         (WebInspector.ProfileView.prototype._restoreSharedState):
833         (WebInspector.ProfileView.prototype._dataGridNodeSelected):
834         Share data between multiple ProfileViews. Currently just remembering
835         and restoring the selected function.
836
837         * UserInterface/Views/ScriptProfileTimelineView.js:
838         (WebInspector.ScriptProfileTimelineView):
839         (WebInspector.ScriptProfileTimelineView.prototype._showProfileViewForOrientation):
840         Include the shared data when constructing new ProfileViews.
841
842 2016-07-13  Matt Baker  <mattbaker@apple.com>
843
844         Uncaught Exception: TypeError: null is not an object (evaluating 'this._contentViewContainer.currentContentView.showsFilterBar')
845         https://bugs.webkit.org/show_bug.cgi?id=159696
846         <rdar://problem/27312356>
847
848         Reviewed by Joseph Pecoraro.
849
850         * UserInterface/Views/TimelineRecordingContentView.js:
851         (WebInspector.TimelineRecordingContentView.prototype._contentViewSelectionPathComponentDidChange):
852         Early return if content view not visible, since the event is sent during
853         tab teardown and the current TimelineView may be invalid.
854
855 2016-07-12  Joseph Pecoraro  <pecoraro@apple.com>
856
857         REGRESSION(r192789): Web Inspector: Log Value context menu appears twice
858         https://bugs.webkit.org/show_bug.cgi?id=159681
859         <rdar://problem/27304804>
860
861         Reviewed by Brian Burg.
862
863         In r192789 contextmenu events may bubble up so that multiple handlers
864         may append ContextMenuItems. In nested ObjectTrees / ObjectPreviews
865         this could result in duplicate items. Add a flag on the bubbling event
866         so that we only include Object Tree context menu items for the deepest
867         part of the Object Tree, but still allow bubbling up to the root.
868
869         * UserInterface/Views/ObjectPreviewView.js:
870         (WebInspector.ObjectPreviewView.prototype._contextMenuHandler):
871         (WebInspector.ObjectPreviewView):
872         * UserInterface/Views/ObjectTreeBaseTreeElement.js:
873         (WebInspector.ObjectTreeBaseTreeElement.prototype._contextMenuHandler):
874
875 2016-07-12  Johan K. Jensen  <johan_jensen@apple.com>
876
877         Web Inspector: ER: Copy as cURL
878         https://bugs.webkit.org/show_bug.cgi?id=159380
879
880         Reviewed by Joseph Pecoraro.
881
882         Inspired by https://chromium.googlesource.com/chromium/src/+/b7c1115dbae65030ad96e773d9a270465a05f5c4/third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js
883
884         This "Copy as cURL" feature only approximates the original request as only some parts of
885         that request is known to the frontend.
886
887         * UserInterface/Models/Resource.js:
888         (WebInspector.Resource.prototype.generateCURLCommand.escapeStringPosix.escapeCharacter):
889         (WebInspector.Resource.prototype.generateCURLCommand.escapeStringPosix):
890         (WebInspector.Resource.prototype.generateCURLCommand):
891         (WebInspector.Resource):
892         * UserInterface/Views/ResourceTimelineDataGridNode.js:
893         (WebInspector.ResourceTimelineDataGridNode.prototype.appendContextMenuItems):
894
895 2016-07-12  Joseph Pecoraro  <pecoraro@apple.com>
896
897         Web Inspector: Use separate files for TreeOutline/TreeElement and DataGrid/DataGridNode
898         https://bugs.webkit.org/show_bug.cgi?id=159659
899
900         Reviewed by Timothy Hatcher.
901
902         * UserInterface/Main.html:
903         * UserInterface/Views/DataGrid.js:
904         * UserInterface/Views/DataGridNode.js: Added.
905         * UserInterface/Views/TreeElement.js: Added.
906         * UserInterface/Views/TreeOutline.js:
907         Extra the component classes to their own file.
908
909 2016-07-11  Joseph Pecoraro  <pecoraro@apple.com>
910
911         Web Inspector: ProfileView sometimes shows Top Functions data despite Top Functions being disabled
912         https://bugs.webkit.org/show_bug.cgi?id=159660
913         <rdar://problem/27291647>
914
915         Reviewed by Timothy Hatcher.
916
917         * UserInterface/Views/ScriptProfileTimelineView.js:
918         (WebInspector.ScriptProfileTimelineView.prototype._profileOrientationButtonClicked):
919         Pass the value of the setting, not the setting itself.
920
921 2016-07-11  Nikita Vasilyev  <nvasilyev@apple.com>
922
923         Web Inspector: Transition and Animation sections in Visual Styles sidebar should have more spacing to their left
924         https://bugs.webkit.org/show_bug.cgi?id=159633
925         <rdar://problem/27281805>
926
927         Reviewed by Timothy Hatcher.
928
929         * UserInterface/Views/VisualStyleDetailsPanel.css:
930         (.visual-style-property-container.animation):
931
932 2016-07-08  Nikita Vasilyev  <nvasilyev@apple.com>
933
934         Web Inspector: Command-Shift-S in the Styles sidebar should always show the save dialog
935         https://bugs.webkit.org/show_bug.cgi?id=156858
936         <rdar://problem/25859098>
937
938         Reviewed by Timothy Hatcher.
939
940         * UserInterface/Views/CSSStyleDeclarationSection.js:
941         (WebInspector.CSSStyleDeclarationSection):
942
943 2016-07-07  Joseph Pecoraro  <pecoraro@apple.com>
944
945         Web Inspector, regression: JS/JSON pretty-printing sporadically broken in STP8
946         https://bugs.webkit.org/show_bug.cgi?id=159511
947         <rdar://problem/27218435>
948
949         Reviewed by Timothy Hatcher.
950
951         * UserInterface/Workers/Formatter/FormatterWorker.js:
952         (FormatterWorker.prototype.formatJavaScript):
953         Attempt to format invalid JSON that can be evaluated to an object.
954
955 2016-07-07  Timothy Hatcher  <timothy@apple.com>
956
957         Web Inspector: scrolled Snapshot list is reset to top and drawn blank after switching back from Snapshot Comparison view
958         https://bugs.webkit.org/show_bug.cgi?id=158218
959         rdar://problem/26545000
960
961         Reviewed by Brian Burg.
962
963         * UserInterface/Views/ClusterContentView.js:
964         (WebInspector.ClusterContentView.prototype.get scrollableElements): Added.
965         A default implementation for all cluster views.
966
967         * UserInterface/Views/DOMStorageContentView.js:
968         (WebInspector.DOMStorageContentView.prototype.get scrollableElements): Deleted.
969         This was duplicated in the class, removed one.
970
971         * UserInterface/Views/HeapAllocationsTimelineView.js:
972         (WebInspector.HeapAllocationsTimelineView): Initialize _snapshotListScrollTop.
973         (WebInspector.HeapAllocationsTimelineView.prototype.get scrollableElements): Added. Return elements
974         based on what is showing.
975
976         (WebInspector.HeapAllocationsTimelineView.prototype.showHeapSnapshotList): Restore the scroll position
977         of the DataGrid after it is added to the view.
978
979         (WebInspector.HeapAllocationsTimelineView.prototype.showHeapSnapshotTimelineRecord): Save the scroll position
980         of the DataGrid before it is removed from the view.
981
982         * UserInterface/Views/ScriptClusterTimelineView.js:
983         (WebInspector.ScriptClusterTimelineView.prototype.get scrollableElements): Deleted. Handled by the base class now.
984
985 2016-07-06  Timothy Hatcher  <timothy@apple.com>
986
987         Web Inspector: REGRESSION: Hitting ⌘T in Web Inspector no longer opens in new tab in Safari
988         https://bugs.webkit.org/show_bug.cgi?id=159487
989         rdar://problem/27188047
990
991         Change Command-T to Command-Option-T to open a new tab.
992
993         I also changed Command-1, etc. to Command-Option-1, etc. to switch tabs. The number commands
994         conflicted similarly with Safari and didn't work for me as a Web Inspector shortcut at all.
995         We can't use Command-Shift because of Command-Shift-3 and Command-Shift-4 for screenshots.
996
997         Reviewed by Joseph Pecoraro.
998
999         * UserInterface/Base/Main.js:
1000         (WebInspector.contentLoaded):
1001
1002 2016-07-06  Joseph Pecoraro  <pecoraro@apple.com>
1003
1004         Web Inspector: sometimes reloading a page with main resource selected will show an empty content view
1005         https://bugs.webkit.org/show_bug.cgi?id=158069
1006         <rdar://problem/26516710>
1007
1008         Reviewed by Timothy Hatcher.
1009
1010         * UserInterface/Views/DebuggerSidebarPanel.js:
1011         (WebInspector.DebuggerSidebarPanel.prototype.showDefaultContentView):
1012         Continue until we get one that works.
1013
1014         * UserInterface/Views/NavigationSidebarPanel.js:
1015         (WebInspector.NavigationSidebarPanel.prototype.showDefaultContentViewForTreeElement):
1016         Avoid showing a content view for a background tab if it could steal
1017         the content view from a foreground tab. This is a targeted fix for
1018         reload + tab content view loading behavior. A more general fix would
1019         be reducing the work done by non-foreground tabs.
1020
1021         * UserInterface/Views/TabBrowser.js:
1022         (WebInspector.TabBrowser.prototype._tabBarItemSelected):
1023         Update navigation sidebar first so it is set when showing the TabContentView.
1024
1025 2016-07-06  Brian Burg  <bburg@apple.com>
1026
1027         Web Inspector: Uncaught Exception reporter should include the currently dispatching protocol event or request/response if applicable
1028         https://bugs.webkit.org/show_bug.cgi?id=159320
1029         <rdar://problem/27117754>
1030
1031         Reviewed by Timothy Hatcher and Joseph Pecoraro.
1032
1033         Keep track of the currently dispatched protocol response or protocol event and make
1034         them available to the uncaught exception reporter. If an internal exception is reported
1035         while dispatching an event or response, dump the protocol message(s) into the pre-filled
1036         bug report.
1037
1038         * UserInterface/Debug/UncaughtExceptionReporter.js:
1039         (stringifyAndTruncateObject): Added.
1040         Rearrange the code that generates the pre-filled report so it's easier to add optional sections.
1041
1042         * UserInterface/Protocol/InspectorBackend.js:
1043         (InspectorBackendClass):
1044         (InspectorBackendClass.prototype.get currentDispatchState): Expose the dispatching state.
1045         (InspectorBackendClass.prototype._sendCommandToBackendWithCallback):
1046         (InspectorBackendClass.prototype._sendCommandToBackendExpectingPromise):
1047         Store the originating command request with the pendingResponse data so that we can examine
1048         the originating request if the response causes an error. This will cause request message objects
1049         to be garbage-collected after their responses are dispatched rather than when the request is sent.
1050         But, I don't forsee this being a performance problem since we should always get a command response
1051         and pending command responses do not typically accumulate except when the inspector first loads.
1052
1053         (InspectorBackendClass.prototype._dispatchResponse): Save the response being dispatched.
1054         (InspectorBackendClass.prototype._dispatchResponseToCallback): Simplify exception reporting.
1055         (InspectorBackendClass.prototype._dispatchEvent): Save the event being dispatched.
1056
1057 2016-07-05  Timothy Hatcher  <timothy@apple.com>
1058
1059         Web Inspector: Switch last uses of -webkit-linear-gradient() to linear-gradient()
1060         https://bugs.webkit.org/show_bug.cgi?id=159438
1061         rdar://problem/27183417
1062
1063         Reviewed by Joseph Pecoraro.
1064
1065         * UserInterface/Views/RenderingFrameTimelineOverviewGraph.css:
1066         (.timeline-overview-graph.rendering-frame > .frame-marker):
1067         (body.window-inactive .timeline-overview-graph.rendering-frame > .frame-marker):
1068         * UserInterface/Views/TimelineRecordFrame.css:
1069         (.timeline-record-frame.tall):
1070         (.timeline-record-frame.selected):
1071         (body.window-inactive .timeline-record-frame.selected):
1072
1073 2016-07-05  Timothy Hatcher  <timothy@apple.com>
1074
1075         Web Inspector: Drop -webkit-calc() in completions and a single use
1076         https://bugs.webkit.org/show_bug.cgi?id=159435
1077         rdar://problem/27179340
1078
1079         Reviewed by Dean Jackson.
1080
1081         * UserInterface/Models/CSSKeywordCompletions.js:
1082         * UserInterface/Views/VisualStylePropertyEditorLink.css:
1083         (.visual-style-property-editor-link > .visual-style-property-editor-link-border):
1084
1085 2016-07-05  Timothy Hatcher  <timothy@apple.com>
1086
1087         Web Inspector: Drop the prefix from -webkit-image-set()
1088         https://bugs.webkit.org/show_bug.cgi?id=159433
1089         rdar://problem/27178887
1090
1091         Reviewed by Dean Jackson.
1092
1093         * UserInterface/Models/CSSKeywordCompletions.js:
1094         * UserInterface/Views/ApplicationCacheIcons.css:
1095         (.application-cache-manifest .icon):
1096         (.application-cache-frame .icon):
1097         * UserInterface/Views/CookieIcon.css:
1098         (.cookie-icon .icon):
1099         * UserInterface/Views/DOMStorageIcons.css:
1100         (.local-storage-icon .icon):
1101         (.session-storage-icon .icon):
1102         * UserInterface/Views/DatabaseIcon.css:
1103         (.database-icon .icon):
1104         * UserInterface/Views/DatabaseTableIcon.css:
1105         (.database-table-icon .icon):
1106         * UserInterface/Views/FolderIcon.css:
1107         (.folder-icon .icon):
1108         * UserInterface/Views/GradientSlider.css:
1109         (.gradient-slider-knob):
1110         (.gradient-slider-knob.selected):
1111         * UserInterface/Views/HoverMenu.css:
1112         (.hover-menu > img):
1113         * UserInterface/Views/ResourceIcons.css:
1114         (.resource-icon .icon):
1115         (.resource-icon.resource-type-document .icon):
1116         (.resource-icon.resource-type-image .icon):
1117         (.resource-icon.resource-type-font .icon):
1118         (.resource-icon.resource-type-stylesheet .icon):
1119         (.resource-icon.resource-type-script .icon):
1120         (.anonymous-script-icon .icon):
1121         (.source-map-resource.resource-icon .icon):
1122         (.source-map-resource.resource-icon.resource-type-stylesheet .icon):
1123         (.source-map-resource.resource-icon.resource-type-script .icon):
1124         (.large .resource-icon .icon):
1125         (.large .resource-icon.resource-type-document .icon):
1126         (.large .resource-icon.resource-type-image .icon):
1127         (.large .resource-icon.resource-type-font .icon):
1128         (.large .resource-icon.resource-type-stylesheet .icon):
1129         (.large .resource-icon.resource-type-script .icon):
1130         (.large .anonymous-script-icon .icon):
1131         (.large .source-map-resource.resource-icon .icon):
1132         (.large .source-map-resource.resource-icon.resource-type-stylesheet .icon):
1133         (.large .source-map-resource.resource-icon.resource-type-script .icon):
1134         * UserInterface/Views/Slider.css:
1135         (.slider > img):
1136         (.slider > img.dragging):
1137         * UserInterface/Views/SourceCodeTextEditor.css:
1138         (.hover-menu.color > img):
1139         * UserInterface/Views/TextEditor.css:
1140         (.text-editor > .CodeMirror .has-breakpoint .CodeMirror-linenumber::before):
1141         (.text-editor > .CodeMirror .breakpoint-resolved .CodeMirror-linenumber::before):
1142         (.text-editor > .CodeMirror .execution-line .CodeMirror-linenumber::after):
1143         * UserInterface/Views/TimelineIcons.css:
1144         (body:not(.mac-platform, .windows-platform) .network-icon .icon):
1145         (body:not(.mac-platform, .windows-platform) .network-icon.large .icon):
1146         (body:not(.mac-platform, .windows-platform) .layout-icon .icon):
1147         (body:not(.mac-platform, .windows-platform) .layout-icon.large .icon):
1148         (body:not(.mac-platform, .windows-platform) .script-icon .icon):
1149         (body:not(.mac-platform, .windows-platform) .script-icon.large .icon):
1150         (body:not(.mac-platform, .windows-platform) .rendering-frame-icon .icon):
1151         (body:not(.mac-platform, .windows-platform) .memory-icon .icon):
1152         (body:not(.mac-platform, .windows-platform) .heap-allocations-icon .icon):
1153         (body:not(.mac-platform, .windows-platform) .stopwatch-icon .icon):
1154
1155 2016-07-02  Joseph Pecoraro  <pecoraro@apple.com>
1156
1157         Web Inspector: CallFrame console.assert seen in tests (sourceCodeLocation instanceof SourceCodeLocation)
1158         https://bugs.webkit.org/show_bug.cgi?id=159368
1159
1160         Reviewed by Timothy Hatcher.
1161
1162         * UserInterface/Test.html:
1163         SourceCodeLocation was already included earlier. This redefines it and
1164         thereby breaks some things.
1165
1166 2016-07-02  Joseph Pecoraro  <pecoraro@apple.com>
1167
1168         inspector/debugger/command-line-api-exception.html flakily times out on mac
1169         https://bugs.webkit.org/show_bug.cgi?id=152029
1170         <rdar://problem/23813812>
1171
1172         Reviewed by Timothy Hatcher.
1173
1174         * UserInterface/Base/Object.js:
1175         (WebInspector.Object.addEventListener):
1176         Return the listener, this makes it cleaner to write tests.
1177
1178 2016-07-01  Joseph Pecoraro  <pecoraro@apple.com>
1179
1180         Web Inspector: Make enabling protocol logging in inspector tests easy to remember
1181         https://bugs.webkit.org/show_bug.cgi?id=159323
1182
1183         Reviewed by Brian Burg.
1184
1185         Now you just need to type InspectorTest.debug() or
1186         ProtocolTest.debug() and it will include stderr logging.
1187
1188         * UserInterface/Test/FrontendTestHarness.js:
1189         (FrontendTestHarness.prototype.debug):
1190         * UserInterface/Test/ProtocolTestHarness.js:
1191         (ProtocolTestHarness.prototype.debug):
1192         (ProtocolTestHarness):
1193         * UserInterface/Test/TestHarness.js:
1194         (TestHarness.prototype.debug):
1195
1196 2016-06-30  Matt Baker  <mattbaker@apple.com>
1197
1198         Unreviewed build fix.
1199
1200         * Localizations/en.lproj/localizedStrings.js:
1201         Add "Area" localized string.
1202
1203 2016-06-30  Joseph Pecoraro  <pecoraro@apple.com>
1204
1205         Web Inspector: Wrong function name next to scope
1206         https://bugs.webkit.org/show_bug.cgi?id=158210
1207         <rdar://problem/26543093>
1208
1209         Reviewed by Timothy Hatcher.
1210
1211         * UserInterface/Controllers/DebuggerManager.js:
1212         (WebInspector.DebuggerManager.prototype._scopeChainNodeFromPayload):
1213         Include new payload data in the construction call.
1214         All the new data is optional, so we gracefully handle
1215         legacy backends.
1216
1217         * UserInterface/Models/ScopeChainNode.js:
1218         (WebInspector.ScopeChainNode):
1219         (WebInspector.ScopeChainNode.prototype.get type):
1220         (WebInspector.ScopeChainNode.prototype.get objects):
1221         (WebInspector.ScopeChainNode.prototype.get name):
1222         (WebInspector.ScopeChainNode.prototype.get location):
1223         (WebInspector.ScopeChainNode.prototype.get hash):
1224         Hash is a rough (name:sourceId:line:column) string for quick comparisons.
1225
1226         (WebInspector.ScopeChainNode.prototype.makeLocalScope):
1227         Make this an action you take on a scope, to avoid having to
1228         do it at construction time, or making it a generic setting.
1229
1230         * UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
1231         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateCallFramesSection):
1232         This was wrong before. Move the work to CallFrame
1233         and change it to be correct.
1234
1235         * UserInterface/CallFrame.js:
1236         (WebInspector.CallFrame.prototype.mergedScopeChain):
1237
1238         This transforms the scope chain for a call frame from:
1239         
1240              scope1  scope2  scope3  scope4  scope5  scope6  scope7
1241               foo     foo     foo     bar     bar      -       -
1242              Block  Closure Closure Closure Closure   GLE     GBL
1243
1244         To:
1245              scope1  scope2&3   scope4&5  scope6  scope7
1246               foo      foo*       bar*      -       -
1247              Block    Local     Closure    GLE     GBL
1248
1249         Doing a few things:
1250
1251             - Merge the first two Closure scopes sharing a location.
1252               These are the "var" and "let" Closure scopes in a function,
1253               and it is better to present these together in the UI.
1254
1255             - Mark the first Closure scope within a function (*). When
1256               this is displayed in the UI, we can provide the name of
1257               the function: "Closure Scope (name)", and we even have
1258               location information that we can use to display a goto
1259               arrow if needed.
1260
1261             - Make the first Closure scope the Local scope if it
1262               matches the Call Frame's function name. This lets us
1263               display the section as "Local Variables".
1264
1265 2016-06-30  Matt Baker  <mattbaker@apple.com>
1266
1267         Web Inspector: add pixel area column to layout timeline view
1268         https://bugs.webkit.org/show_bug.cgi?id=148677
1269         <rdar://problem/22518762>
1270
1271         Reviewed by Timothy Hatcher.
1272
1273         The view can simply add the column. LayoutTimelineDataGridNode
1274         already includes area data and cell formatting.
1275
1276         * UserInterface/Views/LayoutTimelineView.js:
1277         (WebInspector.LayoutTimelineView):
1278
1279 2016-06-30  Brian Burg  <bburg@apple.com>
1280
1281         Web Inspector: the last normal tab cannot be closed with "Close Tab" context menu item
1282         https://bugs.webkit.org/show_bug.cgi?id=159317
1283         <rdar://problem/27042491>
1284
1285         Reviewed by Timothy Hatcher.
1286
1287         * UserInterface/Views/TabBarItem.js:
1288         (WebInspector.TabBarItem.prototype._handleContextMenuEvent):
1289         (WebInspector.TabBarItem): fix the expression that controls whether the item is disabled.
1290
1291 2016-06-30  Nikita Vasilyev  <nvasilyev@apple.com>
1292
1293         Web Inspector: Add "spring" to transition-timing-function value autocompletion
1294         https://bugs.webkit.org/show_bug.cgi?id=159313
1295         <rdar://problem/27114269>
1296
1297         Reviewed by Timothy Hatcher.
1298
1299         * UserInterface/Models/CSSKeywordCompletions.js:
1300
1301 2016-06-30  Commit Queue  <commit-queue@webkit.org>
1302
1303         Unreviewed, rolling out r202659.
1304         https://bugs.webkit.org/show_bug.cgi?id=159305
1305
1306         The test for this change times out on mac-wk2 debug and caused
1307         an existing test to crash. (Requested by ryanhaddad on
1308         #webkit).
1309
1310         Reverted changeset:
1311
1312         "Web Inspector: Wrong function name next to scope"
1313         https://bugs.webkit.org/show_bug.cgi?id=158210
1314         http://trac.webkit.org/changeset/202659
1315
1316 2016-06-29  Joseph Pecoraro  <pecoraro@apple.com>
1317
1318         Web Inspector: Wrong function name next to scope
1319         https://bugs.webkit.org/show_bug.cgi?id=158210
1320         <rdar://problem/26543093>
1321
1322         Reviewed by Brian Burg.
1323
1324         * UserInterface/Controllers/DebuggerManager.js:
1325         (WebInspector.DebuggerManager.prototype._scopeChainNodeFromPayload):
1326         Include new payload data in the construction call.
1327         All the new data is optional, so we gracefully handle
1328         legacy backends.
1329
1330         * UserInterface/Models/ScopeChainNode.js:
1331         (WebInspector.ScopeChainNode):
1332         (WebInspector.ScopeChainNode.prototype.get type):
1333         (WebInspector.ScopeChainNode.prototype.get objects):
1334         (WebInspector.ScopeChainNode.prototype.get name):
1335         (WebInspector.ScopeChainNode.prototype.get location):
1336         (WebInspector.ScopeChainNode.prototype.get hash):
1337         Hash is a rough (name:sourceId:line:column) string for quick comparisons.
1338
1339         (WebInspector.ScopeChainNode.prototype.makeLocalScope):
1340         Make this an action you take on a scope, to avoid having to
1341         do it at construction time, or making it a generic setting.
1342
1343         * UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
1344         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateCallFramesSection):
1345         This was wrong before. Move the work to CallFrame
1346         and change it to be correct.
1347
1348         * UserInterface/CallFrame.js:
1349         (WebInspector.CallFrame.prototype.mergedScopeChain):
1350
1351         This transforms the scope chain for a call frame from:
1352         
1353              scope1  scope2  scope3  scope4  scope5  scope6  scope7
1354               foo     foo     foo     bar     bar      -       -
1355              Block  Closure Closure Closure Closure   GLE     GBL
1356
1357         To:
1358              scope1  scope2&3   scope4&5  scope6  scope7
1359               foo      foo*       bar*      -       -
1360              Block    Local     Closure    GLE     GBL
1361
1362         Doing a few things:
1363
1364             - Merge the first two Closure scopes sharing a location.
1365               These are the "var" and "let" Closure scopes in a function,
1366               and it is better to present these together in the UI.
1367
1368             - Mark the first Closure scope within a function (*). When
1369               this is displayed in the UI, we can provide the name of
1370               the function: "Closure Scope (name)", and we even have
1371               location information that we can use to display a goto
1372               arrow if needed.
1373
1374             - Make the first Closure scope the Local scope if it
1375               matches the Call Frame's function name. This lets us
1376               display the section as "Local Variables".
1377
1378 2016-06-29  Brian Burg  <bburg@apple.com>
1379
1380         Web Inspector: Uncaught Exception page never shows if exception is thrown while processing a protocol event
1381         https://bugs.webkit.org/show_bug.cgi?id=159182
1382
1383         Reviewed by Joseph Pecoraro.
1384
1385         Since we catch exceptions raised during the handling of protocol responses and events, there
1386         is no way for these exceptions to trigger the global exception handler that shows the Uncaught
1387         Exception Reporter sheet. We should show these in the sheet because it makes them get fixed faster.
1388
1389         Add a new entry point, WebInspector.reportInternalError, that takes an error or string and
1390         a free-form map of strings to strings for storing additional information such as message data.
1391         Pass the error and any other relevant details to this entry point, which decides whether to
1392         show the uncaught exception reporter or quietly log the error to Inspector^2 console.
1393
1394         In future patches, I would like to do the following once the common errors are fixed:
1395          - enable reporting via Uncaught Exception Reporter for all engineering builds
1396          - move internal console.error call sites to use WebInspector.reportInternalError
1397
1398         * UserInterface/Base/Main.js: Add reportInternalError, which redirects to the uncaught
1399         exception reporter sheet or does console.error. It also adds a console.assert that could
1400         cause the debugger to pause if desired.
1401
1402         * UserInterface/Debug/UncaughtExceptionReporter.css:
1403         (.sheet-container): Make the report scrollable now that we could potentially show a lot of text.
1404
1405         * UserInterface/Debug/UncaughtExceptionReporter.js:
1406         (handleError): Also pass along the 'details' poperty.
1407         (formattedEntry): Refactor the code so it additionally prints out the keys and values of
1408         the 'details' property. It does not do any coercions, so callers must convert values to strings.
1409
1410         * UserInterface/Protocol/InspectorBackend.js:
1411         (InspectorBackendClass.prototype._dispatchResponse): Inlined a function.
1412         (InspectorBackendClass.prototype._dispatchResponseToCallback):
1413         (InspectorBackendClass.prototype._dispatchEvent):
1414         Report uncaught exceptions via WebInspector.reportInternalError.
1415
1416         (InspectorBackendClass.prototype._reportProtocolError): Deleted, inlined into the single use site.
1417
1418 2016-06-29  Joseph Pecoraro  <pecoraro@apple.com>
1419
1420         Web Inspector: Show Shadow Root type in DOM Tree
1421         https://bugs.webkit.org/show_bug.cgi?id=159236
1422         <rdar://problem/27068521>
1423
1424         Reviewed by Timothy Hatcher.
1425
1426         * Localizations/en.lproj/localizedStrings.js:
1427         "Shadow Content (type)" string.
1428
1429         * UserInterface/Models/DOMNode.js:
1430         (WebInspector.DOMNode):
1431         (WebInspector.DOMNode.prototype.shadowRoots):
1432         (WebInspector.DOMNode.prototype.shadowRootType):
1433         Initialize state and add accessors.
1434
1435         * UserInterface/Views/DOMTreeElement.js:
1436         (WebInspector.DOMTreeElement.shadowRootTypeDisplayName):
1437         (WebInspector.DOMTreeElement.prototype._nodeTitleInfo):
1438         Better string when an element is a Shadow Root.
1439
1440         * UserInterface/Views/DOMTreeElementPathComponent.js:
1441         (WebInspector.DOMTreeElementPathComponent):
1442         Better to check the Shadow Root type.
1443
1444         * UserInterface/Views/DOMTreeOutline.css:
1445         (.tree-outline.dom .html-fragment.shadow):
1446         Opacity looks poor when there is a selection. Switch to gray.
1447
1448 2016-06-28  Nikita Vasilyev  <nvasilyev@apple.com>
1449
1450         REGRESSION (r188730): Web Inspector: Warning icons incorrectly positioned in CSS Rules sidebar
1451         https://bugs.webkit.org/show_bug.cgi?id=157869
1452         <rdar://problem/26356520>
1453
1454         Reviewed by Timothy Hatcher.
1455
1456         Before r188730, CSS text always had a line break as a prefix. r188730 started trimming text.
1457         This patch keeps trimming unnecessary whitespace but brings back required line break prefix.
1458
1459         * UserInterface/Models/CSSStyleDeclaration.js:
1460         (WebInspector.CSSStyleDeclaration.prototype.set text):
1461         * UserInterface/Views/CSSStyleDeclarationTextEditor.js:
1462         Make PrefixWhitespace and SuffixWhitespace public.
1463
1464         (WebInspector.CSSStyleDeclarationTextEditor.prototype._formattedContent):
1465         (WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkers.update):
1466         (WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkers):
1467         Remove an if conditional as it's always true.
1468
1469 2016-06-28  Brian Burg  <bburg@apple.com>
1470
1471         Web Inspector: QuickConsole should update its selection when RuntimeManager.defaultExecutionContextIdentifier changes
1472         https://bugs.webkit.org/show_bug.cgi?id=159183
1473
1474         Reviewed by Timothy Hatcher.
1475
1476         Currently, the UI listens for state changes in the Frame tree to decide when to reset
1477         the selected execution context back to its default value. This is no good, because this
1478         should happen even if we have no UI (i.e., testing models only). The UI should simply
1479         display changes to the model rather than driving them based on other model changes.
1480
1481         Move the logic to reset the execution context into RuntimeManager. When the selected
1482         context changes, an event is fired which causes the QuickConsole to rebuild its path components.
1483
1484         * UserInterface/Controllers/RuntimeManager.js:
1485         (WebInspector.RuntimeManager):
1486         (WebInspector.RuntimeManager.prototype.set defaultExecutionContextIdentifier):
1487         Fire an event when the execution context actually changes.
1488
1489         (WebInspector.RuntimeManager.prototype._frameExecutionContextsCleared):
1490         Added. If the selected context was cleared, reset back to default.
1491
1492         * UserInterface/Models/Frame.js:
1493         (WebInspector.Frame.prototype.clearExecutionContexts):
1494         Include the contexts that were cleared so clients can match against them.
1495
1496         * UserInterface/Views/QuickConsole.js:
1497         (WebInspector.QuickConsole):
1498         Use the proper constant name. Both the old and new names evaluated to `undefined`.
1499         No need to keep track of the selected path component, it will always match the
1500         defaultExecutionContextIdentifier in RuntimeManager.
1501
1502         (WebInspector.QuickConsole.prototype.get selectedExecutionContextIdentifier):
1503         (WebInspector.QuickConsole.prototype.set selectedExecutionContextIdentifier):
1504         Forward to RuntimeManager. This name is less awkward for the UI code that manages selections.
1505
1506         (WebInspector.QuickConsole.prototype._executionContextPathComponentsToDisplay):
1507         Special-case for the main frame execution context.
1508
1509         (WebInspector.QuickConsole.prototype._framePageExecutionContextsChanged):
1510         Remove indirection.
1511
1512         (WebInspector.QuickConsole.prototype._frameExecutionContextsCleared):
1513         Fix the guard to handle undefined execution contexts in the case where it represents the main frame (undefined).
1514
1515         (WebInspector.QuickConsole.prototype._defaultExecutionContextChanged):
1516         Rebuild when the model changes.
1517
1518         (WebInspector.QuickConsole.prototype._pathComponentSelected): Simplify.
1519         (WebInspector.QuickConsole.prototype.get executionContextIdentifier):
1520         (WebInspector.QuickConsole.prototype._removeExecutionContextPathComponentForFrame):
1521         Move the fallback selection behavior into RuntimeManager.
1522
1523         (WebInspector.QuickConsole.prototype._updateExecutionContextPathComponentForFrame): Deleted.
1524         This has been dead code ever since we removed iOS 6 legacy support.
1525
1526 2016-06-27  Joseph Pecoraro  <pecoraro@apple.com>
1527
1528         Web Inspector: When modifying sessionStorage, localStorage gets updated
1529         https://bugs.webkit.org/show_bug.cgi?id=159181
1530         <rdar://problem/27043447>
1531
1532         Reviewed by Timothy Hatcher.
1533
1534         * UserInterface/Test/Test.js:
1535         (WebInspector.loaded):
1536         Add registration for StorageManager and StorageObserver.
1537
1538 2016-06-27  Brian Burg  <bburg@apple.com>
1539
1540         Web Inspector: RuntimeManager should not use view object WebInspector.quickConsole
1541         https://bugs.webkit.org/show_bug.cgi?id=128092
1542         <rdar://problem/15966526>
1543
1544         Reviewed by Timothy Hatcher.
1545
1546         This is a layering violation which makes it harder to use RuntimeManager.evaluateInInspectedWindow
1547         from a testing context where the QuickConsole view does not exist.
1548
1549         Store the selected execution context identifier on RuntimeManager and use it
1550         when doing subsequent evaluations that act on the currently selected frame.
1551
1552         * UserInterface/Controllers/RuntimeManager.js:
1553         (WebInspector.RuntimeManager.prototype.evaluateInInspectedWindow):
1554         (WebInspector.RuntimeManager.prototype.saveResult):
1555         Use local state.
1556
1557         (WebInspector.RuntimeManager.prototype.get defaultExecutionContextIdentifier):
1558         (WebInspector.RuntimeManager.prototype.set defaultExecutionContextIdentifier):
1559         Added.
1560
1561         (WebInspector.RuntimeManager):
1562         * UserInterface/Models/ExecutionContext.js:
1563         (WebInspector.ExecutionContext):
1564         Move the symbolic name for the top level execution context to RuntimeManager.
1565
1566         * UserInterface/Test/Test.js:
1567         (WebInspector.loaded): No need to stub out WebInspector.QuickConsole any more.
1568
1569         * UserInterface/Views/QuickConsole.js:
1570         (WebInspector.QuickConsole.prototype._framePageExecutionContextsChanged):
1571         (WebInspector.QuickConsole.prototype._removeExecutionContextPathComponentForFrame):
1572         (WebInspector.QuickConsole.prototype._updateExecutionContextPathComponentForFrame):
1573         (WebInspector.QuickConsole.prototype._pathComponentSelected):
1574         For now, set RuntimeManager's selected execution context whenever we set the
1575         selected path component. In a future patch, we should invert the dependency and have
1576         the selected component change whenever RuntimeManager.defaultExecutionContext changes.
1577
1578 2016-06-23  Joseph Pecoraro  <pecoraro@apple.com>
1579
1580         Web Inspector: first heap snapshot taken when a page is reloaded happens before the reload navigation
1581         https://bugs.webkit.org/show_bug.cgi?id=158995
1582         <rdar://problem/26923778>
1583
1584         Reviewed by Brian Burg.
1585
1586         Let instruments decide to do work or not based on programmatic
1587         (backend initiated) starts and stop.
1588
1589         Programmatic start can happen due to Auto Capture or console.profile.
1590         Programmatic stop can happen due to console.profileEnd.
1591
1592         For example, this allows the frontend to avoid sending agents start/stop
1593         messages when the backend would have already started/stopped the agents.
1594
1595         * UserInterface/Controllers/TimelineManager.js:
1596         (WebInspector.TimelineManager):
1597         (WebInspector.TimelineManager.prototype.startCapturing):
1598         (WebInspector.TimelineManager.prototype.capturingStopped):
1599         (WebInspector.TimelineManager.prototype.autoCaptureStarted):
1600         (WebInspector.TimelineManager.prototype.programmaticCaptureStarted):
1601         Call Recording.start/stop with a programmatic flag so the frontend
1602         instruments can perform a more informed start/stop.
1603
1604         * UserInterface/Models/TimelineRecording.js:
1605         (WebInspector.TimelineRecording.prototype.start):
1606         (WebInspector.TimelineRecording.prototype.stop):
1607         Let the instruments decide to do work based on the start/stop
1608         being initiated by the backend or not.
1609
1610         * UserInterface/Models/HeapAllocationsInstrument.js:
1611         (WebInspector.HeapAllocationsInstrument.prototype.startInstrumentation):
1612         (WebInspector.HeapAllocationsInstrument.prototype.stopInstrumentation):
1613         * UserInterface/Models/Instrument.js:
1614         (WebInspector.Instrument.startLegacyTimelineAgent):
1615         (WebInspector.Instrument.prototype.startInstrumentation):
1616         (WebInspector.Instrument.prototype.stopInstrumentation):
1617         (WebInspector.Instrument):
1618         * UserInterface/Models/MemoryInstrument.js:
1619         (WebInspector.MemoryInstrument.prototype.startInstrumentation):
1620         (WebInspector.MemoryInstrument.prototype.stopInstrumentation):
1621         (WebInspector.MemoryInstrument):
1622         * UserInterface/Models/NetworkInstrument.js:
1623         * UserInterface/Models/ScriptInstrument.js:
1624         (WebInspector.ScriptInstrument.prototype.startInstrumentation):
1625         (WebInspector.ScriptInstrument.prototype.stopInstrumentation):
1626         (WebInspector.ScriptInstrument):
1627         Avoid sending start/stop tracking messages when programmatic.
1628         This still allows the instruments to do their own frontend tracking,
1629         such as the Heap agent triggering periodic snapshots.
1630
1631 2016-06-23  Joseph Pecoraro  <pecoraro@apple.com>
1632
1633         Web Inspector: Snapshots should be cleared at some point
1634         https://bugs.webkit.org/show_bug.cgi?id=157907
1635         <rdar://problem/26373610>
1636
1637         Reviewed by Timothy Hatcher.
1638
1639         Invalidate HeapSnapshotProxy objects when the page navigates.
1640         This allows us to clear our frontend data for the snapshots.
1641         When a snapshot is invalidated, it is disabled in the UI.
1642         This means you cannot select the snapshot or see content
1643         views for the snapshot. If you are in a snapshot when it is
1644         invalidated, you are taken out to the snapshot list.
1645
1646         * UserInterface/Main.html:
1647         New files.
1648
1649         * UserInterface/Proxies/HeapSnapshotProxy.js:
1650         (WebInspector.HeapSnapshotProxy):
1651         (WebInspector.HeapSnapshotProxy.invalidateSnapshotProxies):
1652         (WebInspector.HeapSnapshotProxy.prototype.get invalid):
1653         (WebInspector.HeapSnapshotProxy.prototype._invalidate):
1654         Keep track of valid snapshots, and provide a static method to invalidate them.
1655
1656         (WebInspector.HeapSnapshotProxy.prototype.updateForCollectionEvent):
1657         (WebInspector.HeapSnapshotProxy.prototype.allocationBucketCounts):
1658         (WebInspector.HeapSnapshotProxy.prototype.instancesWithClassName):
1659         (WebInspector.HeapSnapshotProxy.prototype.update):
1660         (WebInspector.HeapSnapshotProxy.prototype.nodeWithIdentifier):
1661         UI should only act on valid snapshots.
1662
1663         * UserInterface/Proxies/HeapSnapshotDiffProxy.js:
1664         (WebInspector.HeapSnapshotDiffProxy.prototype.get invalid):
1665         (WebInspector.HeapSnapshotDiffProxy.prototype.updateForCollectionEvent):
1666         (WebInspector.HeapSnapshotDiffProxy.prototype.allocationBucketCounts):
1667         (WebInspector.HeapSnapshotDiffProxy.prototype.instancesWithClassName):
1668         (WebInspector.HeapSnapshotDiffProxy.prototype.update):
1669         (WebInspector.HeapSnapshotDiffProxy.prototype.nodeWithIdentifier):
1670         UI should only act on valid snapshots.
1671
1672         * UserInterface/Proxies/HeapSnapshotWorkerProxy.js:
1673         (WebInspector.HeapSnapshotWorkerProxy.prototype._mainResourceDidChange):
1674         Invalidate and discard snapshots when the main frame navigates.
1675
1676         (WebInspector.HeapSnapshotWorkerProxy.prototype._handleMessage):
1677         (WebInspector.HeapSnapshotWorkerProxy):
1678         * UserInterface/Workers/HeapSnapshot/HeapSnapshotWorker.js:
1679         (HeapSnapshotWorker.prototype.clearSnapshots):
1680         (HeapSnapshotWorker.prototype._handleMessage):
1681         (HeapSnapshotWorker):
1682         A message may come in for a snapshot before it has been cleared.
1683         If that is the case, the object may not exist. Return an error so
1684         that the callback can be deleted on the calling side.
1685
1686         * UserInterface/Views/HeapAllocationsTimelineDataGridNodePathComponent.js:
1687         (WebInspector.HeapAllocationsTimelineDataGridNodePathComponent.prototype.get previousSibling):
1688         (WebInspector.HeapAllocationsTimelineDataGridNodePathComponent.prototype.get nextSibling):
1689         (WebInspector.HeapAllocationsTimelineDataGridNodePathComponent):
1690         Don't show invalid snapshots in page component picker.
1691
1692         * UserInterface/Views/HeapAllocationsTimelineOverviewGraph.css:
1693         (.timeline-overview-graph.heap-allocations > img.snapshot.invalid):
1694         * UserInterface/Views/HeapAllocationsTimelineDataGridNode.js:
1695         (WebInspector.HeapAllocationsTimelineDataGridNode):
1696         (WebInspector.HeapAllocationsTimelineDataGridNode.prototype.createCellContent):
1697         (WebInspector.HeapAllocationsTimelineDataGridNode.prototype.createCells):
1698         (WebInspector.HeapAllocationsTimelineDataGridNode.prototype._heapSnapshotInvalidated):
1699         Give invalid snapshots an invalidated appearance in the snapshot list.
1700
1701         * UserInterface/Views/HeapAllocationsTimelineOverviewGraph.js:
1702         (WebInspector.HeapAllocationsTimelineOverviewGraph.prototype.layout):
1703         * UserInterface/Views/HeapAllocationsTimelineView.css:
1704         (.timeline-view.heap-allocations > .data-grid tr.invalid):
1705         (.timeline-view.heap-allocations > .data-grid:not(:focus, .force-focus) tr.selected.invalid):
1706         Give invalid snapshots an invalidated appearance in the overview graph.
1707
1708         * UserInterface/Views/HeapAllocationsTimelineView.js:
1709         (WebInspector.HeapAllocationsTimelineView):
1710         (WebInspector.HeapAllocationsTimelineView.prototype.get selectionPathComponents):
1711         (WebInspector.HeapAllocationsTimelineView.prototype.closed):
1712         (WebInspector.HeapAllocationsTimelineView.prototype._heapSnapshotCollectionEvent.updateHeapSnapshotForEvent):
1713         (WebInspector.HeapAllocationsTimelineView.prototype._heapSnapshotCollectionEvent):
1714         (WebInspector.HeapAllocationsTimelineView.prototype._heapSnapshotInvalidated):
1715         (WebInspector.HeapAllocationsTimelineView.prototype._updateCompareHeapSnapshotButton):
1716         (WebInspector.HeapAllocationsTimelineView.prototype._dataGridNodeSelected):
1717         Handle interactions when snapshots in the list are invalidated.
1718
1719 2016-06-22  Brian Burg  <bburg@apple.com>
1720
1721         Web Inspector: don't start auto capturing if the Inspector window is not visible
1722         https://bugs.webkit.org/show_bug.cgi?id=159014
1723
1724         Reviewed by Joseph Pecoraro.
1725         <rdar://problem/26931269>
1726
1727         Followup, add a missing super.closed() call mentioned in review comments.
1728
1729         * UserInterface/Views/TimelineTabContentView.js:
1730         (WebInspector.TimelineTabContentView.prototype.closed):
1731
1732 2016-06-22  Brian Burg  <bburg@apple.com>
1733
1734         Web Inspector: don't start auto capturing if the Inspector window is not visible
1735         https://bugs.webkit.org/show_bug.cgi?id=159014
1736         <rdar://problem/26931269>
1737
1738         Reviewed by Joseph Pecoraro.
1739
1740         TimelineTabContentView should not tell the timeline manager to enable
1741         auto-capturing unless the Web Inspector UI is visible. If it is preloaded
1742         but not shown to the user, then auto-capturing may inadvertently disable
1743         the debugger, causing it to miss `debugger` statements and not bring the
1744         inspector to front.
1745
1746         * UserInterface/Controllers/TimelineManager.js:
1747         (WebInspector.TimelineManager.prototype.set autoCaptureOnPageLoad):
1748         Bail out if nothing changed. Coerce to a boolean since the backend requires a boolean.
1749
1750         * UserInterface/Views/TimelineTabContentView.js:
1751         (WebInspector.TimelineTabContentView): Listen for UI visibility changes.
1752         (WebInspector.TimelineTabContentView.prototype.shown):
1753         Enable auto-capturing if the UI is visible.
1754
1755         (WebInspector.TimelineTabContentView.prototype.closed): Added.
1756         Remove listeners on global objects so this tab doesn't leak.
1757
1758         (WebInspector.TimelineTabContentView.prototype._inspectorVisibilityChanged):
1759         Update the auto-capturing setting if the UI became visible or not visible.
1760
1761 2016-06-22  Nikita Vasilyev  <nvasilyev@apple.com>
1762
1763         Web Inspector: Simplify CSS rule for ContentBrowser navigation bar items
1764         https://bugs.webkit.org/show_bug.cgi?id=159000
1765
1766         Reviewed by Timothy Hatcher.
1767
1768         * UserInterface/Views/ContentBrowser.css:
1769         (.content-browser > .navigation-bar > .item):
1770         Both these values result in 28px, but `100%` is simplier.
1771
1772 2016-06-21  Nikita Vasilyev  <nvasilyev@apple.com>
1773
1774         REGRESSION(r201177): Web Inspector: ContentBrowser navigation bar should fit on a single line
1775         https://bugs.webkit.org/show_bug.cgi?id=158700
1776         <rdar://problem/26772058>
1777
1778         Reviewed by Joseph Pecoraro.
1779
1780         * UserInterface/Views/ContentBrowser.css:
1781         (.content-browser > .navigation-bar > .item):
1782         Set the height to 28px, as it was before r201177.
1783         Make it one pixel shorter than the navigation bar for better vertical alignment.
1784
1785 2016-06-20  Joseph Pecoraro  <pecoraro@apple.com>
1786
1787         Web Inspector: UncaughtExceptionReporter should handle null event.error
1788         https://bugs.webkit.org/show_bug.cgi?id=158971
1789
1790         Reviewed by Brian Burg.
1791
1792         * UserInterface/Debug/UncaughtExceptionReporter.js:
1793         Since `typeof null === "object"` handle uncaught exceptions where the
1794         Error object itself is null.
1795
1796 2016-06-20  Joseph Pecoraro  <pecoraro@apple.com>
1797
1798         Web Inspector: Snapshot List should show the total size and the total live size
1799         https://bugs.webkit.org/show_bug.cgi?id=157904
1800         <rdar://problem/26372833>
1801
1802         Reviewed by Brian Burg.
1803
1804         Include the live size of a snapshot in the snapshot list.
1805
1806         * Localizations/en.lproj/localizedStrings.js:
1807         New "Live Size" string.
1808
1809         * UserInterface/Workers/HeapSnapshot/HeapSnapshot.js:
1810         (HeapSnapshot):
1811         (HeapSnapshot.updateCategoriesAndMetadata):
1812         (HeapSnapshot.prototype.update):
1813         (HeapSnapshot.prototype.serialize):
1814         (HeapSnapshotDiff):
1815         (HeapSnapshotDiff.prototype.update):
1816         (HeapSnapshot.buildCategories): Deleted.
1817         (HeapSnapshot.prototype.updateCategories): Deleted.
1818         (HeapSnapshotDiff.prototype.updateCategories): Deleted.
1819         * UserInterface/Proxies/HeapSnapshotDiffProxy.js:
1820         (WebInspector.HeapSnapshotDiffProxy.prototype.updateForCollectionEvent):
1821         (WebInspector.HeapSnapshotDiffProxy.prototype.update):
1822         (WebInspector.HeapSnapshotDiffProxy.prototype.updateCategories): Deleted.
1823         * UserInterface/Proxies/HeapSnapshotProxy.js:
1824         (WebInspector.HeapSnapshotProxy):
1825         (WebInspector.HeapSnapshotProxy.deserialize):
1826         (WebInspector.HeapSnapshotProxy.prototype.get liveSize):
1827         (WebInspector.HeapSnapshotProxy.prototype.updateForCollectionEvent):
1828         (WebInspector.HeapSnapshotProxy.prototype.update):
1829         (WebInspector.HeapSnapshotProxy.prototype.updateCategories): Deleted.
1830         Rename "updateCategories" to "update" and update both categories
1831         and metadata, like the liveSize.
1832
1833         * UserInterface/Views/HeapAllocationsTimelineDataGridNode.js:
1834         (WebInspector.HeapAllocationsTimelineDataGridNode):
1835         (WebInspector.HeapAllocationsTimelineDataGridNode.prototype.createCellContent):
1836         (WebInspector.HeapAllocationsTimelineDataGridNode.prototype._heapSnapshotCollectedNodes):
1837         Update live size after collection.
1838
1839         * UserInterface/Views/HeapAllocationsTimelineView.js:
1840         (WebInspector.HeapAllocationsTimelineView):
1841         Include a live size column in the DataGrid.
1842         (WebInspector.HeapAllocationsTimelineView.prototype.closed):
1843         Cleanup listeners appropriately.
1844
1845 2016-06-20  Joseph Pecoraro  <pecoraro@apple.com>
1846
1847         Web Inspector: console.profile should use the new Sampling Profiler
1848         https://bugs.webkit.org/show_bug.cgi?id=153499
1849         <rdar://problem/24352431>
1850
1851         Reviewed by Timothy Hatcher.
1852
1853         * UserInterface/Controllers/TimelineManager.js:
1854         (WebInspector.TimelineManager.prototype.programmaticCaptureStarted):
1855         (WebInspector.TimelineManager.prototype.programmaticCaptureStopped):
1856         (WebInspector.TimelineManager.prototype.scriptProfilerProgrammaticCaptureStarted):
1857         (WebInspector.TimelineManager.prototype.scriptProfilerProgrammaticCaptureStopped):
1858         For programmatic captures, automatically show the Script Timeline, since
1859         that is guarenteed to have been started by the backend. Start capturing
1860         without creating a new recording.
1861
1862         * UserInterface/Models/TimelineRecording.js:
1863         (WebInspector.TimelineRecording.prototype.stop):
1864         (WebInspector.TimelineRecording.prototype.addScriptInstrumentForProgrammaticCapture):
1865         When stopping for programmatic capture we don't need to disable
1866         instruments, the backend would have already done this.
1867
1868         * UserInterface/Protocol/ScriptProfilerObserver.js:
1869         (WebInspector.ScriptProfilerObserver.prototype.programmaticCaptureStarted):
1870         (WebInspector.ScriptProfilerObserver.prototype.programmaticCaptureStopped):
1871         (WebInspector.ScriptProfilerObserver):
1872         * UserInterface/Protocol/TimelineObserver.js:
1873         (WebInspector.TimelineObserver.prototype.programmaticCaptureStarted):
1874         (WebInspector.TimelineObserver.prototype.programmaticCaptureStopped):
1875         (WebInspector.TimelineObserver):
1876         Pass through Web and JSContext programmatic capture events.
1877
1878 2016-06-19  Nikita Vasilyev  <nvasilyev@apple.com>
1879
1880         Web Inspector: Remove Sidebar z-index:0 workaround for scrollbars and position:sticky section headers
1881         https://bugs.webkit.org/show_bug.cgi?id=158882
1882
1883         Reviewed by Darin Adler.
1884
1885         The z-index:0 workaround is no longer needed as it doesn't change anything.
1886
1887         * UserInterface/Views/Sidebar.css:
1888         (.sidebar > .panel): Deleted.
1889
1890 2016-06-17  Commit Queue  <commit-queue@webkit.org>
1891
1892         Unreviewed, rolling out r202152.
1893         https://bugs.webkit.org/show_bug.cgi?id=158897
1894
1895         The new test is very unstable, timing out frequently
1896         (Requested by ap on #webkit).
1897
1898         Reverted changeset:
1899
1900         "Web Inspector: console.profile should use the new Sampling
1901         Profiler"
1902         https://bugs.webkit.org/show_bug.cgi?id=153499
1903         http://trac.webkit.org/changeset/202152
1904
1905 2016-06-16  Joseph Pecoraro  <pecoraro@apple.com>
1906
1907         Web Inspector: console.profile should use the new Sampling Profiler
1908         https://bugs.webkit.org/show_bug.cgi?id=153499
1909         <rdar://problem/24352431>
1910
1911         Reviewed by Timothy Hatcher.
1912
1913         * UserInterface/Controllers/TimelineManager.js:
1914         (WebInspector.TimelineManager.prototype.programmaticCaptureStarted):
1915         (WebInspector.TimelineManager.prototype.programmaticCaptureStopped):
1916         (WebInspector.TimelineManager.prototype.scriptProfilerProgrammaticCaptureStarted):
1917         (WebInspector.TimelineManager.prototype.scriptProfilerProgrammaticCaptureStopped):
1918         For programmatic captures, automatically show the Script Timeline, since
1919         that is guarenteed to have been started by the backend. Start capturing
1920         without creating a new recording.
1921
1922         * UserInterface/Models/TimelineRecording.js:
1923         (WebInspector.TimelineRecording.prototype.stop):
1924         (WebInspector.TimelineRecording.prototype.addScriptInstrumentForProgrammaticCapture):
1925         When stopping for programmatic capture we don't need to disable
1926         instruments, the backend would have already done this.
1927
1928         * UserInterface/Protocol/ScriptProfilerObserver.js:
1929         (WebInspector.ScriptProfilerObserver.prototype.programmaticCaptureStarted):
1930         (WebInspector.ScriptProfilerObserver.prototype.programmaticCaptureStopped):
1931         (WebInspector.ScriptProfilerObserver):
1932         * UserInterface/Protocol/TimelineObserver.js:
1933         (WebInspector.TimelineObserver.prototype.programmaticCaptureStarted):
1934         (WebInspector.TimelineObserver.prototype.programmaticCaptureStopped):
1935         (WebInspector.TimelineObserver):
1936         Pass through Web and JSContext programmatic capture events.
1937
1938 2016-06-16  Joseph Pecoraro  <pecoraro@apple.com>
1939
1940         REGRESSION (r201538): Web Inspector: Border over Allocations Views is too thick
1941         https://bugs.webkit.org/show_bug.cgi?id=158846
1942
1943         Reviewed by Timothy Hatcher.
1944
1945         * UserInterface/Views/HeapAllocationsTimelineView.css:
1946         (.timeline-view.heap-allocations > .content-view-container > .content-view): Deleted.
1947
1948 2016-06-16  Matt Baker  <mattbaker@apple.com>
1949
1950         Unreviewed build fix.
1951
1952         * UserInterface/Views/DataGrid.js:
1953         (WebInspector.DataGrid.prototype.createSettings):
1954         "showColumn" -> "setColumnVisible".
1955
1956 2016-06-16  Matt Baker  <mattbaker@apple.com>
1957
1958         Web Inspector: DataGrid should manage its own settings
1959         https://bugs.webkit.org/show_bug.cgi?id=158675
1960         <rdar://problem/26761338>
1961
1962         Reviewed by Timothy Hatcher.
1963
1964         Move grid sorting settings (sort order, column identifier) into DataGrid,
1965         removing duplicated code from various views. A new grid method, "createSettings",
1966         takes an identifier which is used as a prefix for naming the grid's settings.
1967
1968         So that the new behavior is easy to use and hard to misuse, default values
1969         for each setting are set to the current value of the associated property.
1970         The result is that:
1971
1972             grid.sortColumnIdentifier = "columnA";
1973             grid.createSettings("myGrid");
1974
1975         will use "columnA" as the default value the first time the setting is created.
1976
1977         * UserInterface/Views/ApplicationCacheFrameContentView.js:
1978         (WebInspector.ApplicationCacheFrameContentView.prototype._createDataGrid):
1979         * UserInterface/Views/CookieStorageContentView.js:
1980         (WebInspector.CookieStorageContentView.prototype._rebuildTable):
1981         * UserInterface/Views/DOMStorageContentView.js:
1982         (WebInspector.DOMStorageContentView):
1983         * UserInterface/Views/DataGrid.js:
1984         (WebInspector.DataGrid):
1985         (WebInspector.DataGrid.prototype.createSettings):
1986         (WebInspector.DataGrid.prototype.get identifier): Deleted.
1987         (WebInspector.DataGrid.prototype.set identifier): Deleted.
1988         (WebInspector.DataGrid.prototype.set sortOrderSetting): Deleted.
1989         (WebInspector.DataGrid.prototype.set sortColumnIdentifierSetting): Deleted.
1990         * UserInterface/Views/HeapAllocationsTimelineView.js:
1991         (WebInspector.HeapAllocationsTimelineView):
1992         * UserInterface/Views/HeapSnapshotContentView.js:
1993         (WebInspector.HeapSnapshotContentView):
1994         * UserInterface/Views/LayerTreeDetailsSidebarPanel.js:
1995         (WebInspector.LayerTreeDetailsSidebarPanel.prototype._buildDataGridSection):
1996         * UserInterface/Views/LayoutTimelineView.js:
1997         (WebInspector.LayoutTimelineView):
1998         * UserInterface/Views/NetworkGridContentView.js:
1999         (WebInspector.NetworkGridContentView):
2000         * UserInterface/Views/NetworkTimelineView.js:
2001         (WebInspector.NetworkTimelineView):
2002         * UserInterface/Views/ProfileView.js:
2003         (WebInspector.ProfileView):
2004         * UserInterface/Views/RenderingFrameTimelineView.js:
2005         (WebInspector.RenderingFrameTimelineView):
2006         * UserInterface/Views/ScriptDetailsTimelineView.js:
2007         (WebInspector.ScriptDetailsTimelineView):
2008
2009 2016-06-15  Joseph Pecoraro  <pecoraro@apple.com>
2010
2011         Uncaught Exception: TypeError: undefined is not an object (evaluating 'imageElement.classList')
2012         https://bugs.webkit.org/show_bug.cgi?id=158808
2013         <rdar://problem/26821034>
2014
2015         Reviewed by Brian Burg.
2016
2017         * UserInterface/Views/HeapAllocationsTimelineOverviewGraph.js:
2018         (WebInspector.HeapAllocationsTimelineOverviewGraph.prototype._updateSnapshotMarkers):
2019         If the record is out of the layout bounds of the overview graph, the overview graph
2020         may not have created an image element yet, so bail. Later, when the image element
2021         is created, it would get the appropriate style if the record is selected.
2022
2023 2016-06-14  Matt Baker  <mattbaker@apple.com>
2024
2025         Web Inspector: Rename DataGrid.showColumn to setColumnVisible
2026         https://bugs.webkit.org/show_bug.cgi?id=158764
2027         <rdar://problem/26801448>
2028
2029         Reviewed by Joseph Pecoraro.
2030
2031         * UserInterface/Views/DataGrid.js:
2032         (WebInspector.DataGrid):
2033         Drive-by update to initialize "this._columnChooserEnabled".
2034
2035         (WebInspector.DataGrid.prototype.set identifier):
2036         (WebInspector.DataGrid.prototype.insertColumn):
2037         (WebInspector.DataGrid.prototype._collapseColumnGroupWithCell):
2038         Use new method name.
2039
2040         (WebInspector.DataGrid.prototype._contextMenuInHeader):
2041         Drive-by style update.
2042
2043 2016-06-14  Matt Baker  <mattbaker@apple.com>
2044
2045         Web Inspector: Storage tab should allow hiding columns in the cookies grid
2046         https://bugs.webkit.org/show_bug.cgi?id=158767
2047         <rdar://problem/26803568>
2048
2049         Reviewed by Joseph Pecoraro.
2050
2051         * UserInterface/Views/CookieStorageContentView.js:
2052         (WebInspector.CookieStorageContentView.prototype._rebuildTable):
2053         Enable column chooser, exclude Name and Value columns.
2054
2055 2016-06-14  Nikita Vasilyev  <nvasilyev@apple.com>
2056
2057         Web Inspector: Visual Sidebar: Remove "Text -> Content" subsection
2058         https://bugs.webkit.org/show_bug.cgi?id=158758
2059         <rdar://problem/26799628>
2060
2061         Reviewed by Timothy Hatcher.
2062
2063         "content" CSS property only works with pseudo elements ::before and ::after.
2064         It doesn't do anything for regular (non pseudo) elements. Remove it to
2065         reduce UI clutter.
2066
2067         * UserInterface/Views/VisualStyleDetailsPanel.js:
2068         (WebInspector.VisualStyleDetailsPanel.prototype.initialLayout):
2069         (WebInspector.VisualStyleDetailsPanel.prototype._populateContentSection): Deleted.
2070         * UserInterface/Views/VisualStylePropertyEditor.css:
2071         (.visual-style-property-container > *:first-child:matches(.visual-style-property-value-container)): Deleted.
2072
2073 2016-06-14  Joseph Pecoraro  <pecoraro@apple.com>
2074
2075         Web Inspector: Rename Timeline.setAutoCaptureInstruments to Timeline.setInstruments
2076         https://bugs.webkit.org/show_bug.cgi?id=158762
2077
2078         Reviewed by Timothy Hatcher.
2079
2080         * UserInterface/Controllers/TimelineManager.js:
2081         (WebInspector.TimelineManager.prototype._updateAutoCaptureInstruments):
2082         (WebInspector.TimelineManager):
2083
2084 2016-06-14  Benjamin Poulain  <bpoulain@apple.com>
2085
2086         Add the unprefixed version of the pseudo element ::placeholder
2087         https://bugs.webkit.org/show_bug.cgi?id=158653
2088
2089         Reviewed by Dean Jackson.
2090
2091         * UserInterface/Views/FilterBar.css:
2092         (.filter-bar > input[type="search"]::placeholder):
2093         (.filter-bar > input[type="search"]::-webkit-input-placeholder): Deleted.
2094         * UserInterface/Views/FindBanner.css:
2095         (.find-banner.console-find-banner > input[type="search"]::placeholder):
2096         (.find-banner.console-find-banner > input[type="search"]::-webkit-input-placeholder): Deleted.
2097         * UserInterface/Views/GoToLineDialog.css:
2098         (.go-to-line-dialog > div > input::placeholder):
2099         (.go-to-line-dialog > div > input::-webkit-input-placeholder): Deleted.
2100         * UserInterface/Views/OpenResourceDialog.css:
2101         (.open-resource-dialog > .field > input::placeholder):
2102         (.open-resource-dialog > .field > input::-webkit-input-placeholder): Deleted.
2103         * UserInterface/Views/SearchBar.css:
2104         (.search-bar > input[type="search"]::placeholder):
2105         (.search-bar > input[type="search"]::-webkit-input-placeholder): Deleted.
2106         * UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.css:
2107
2108 2016-06-14  Nikita Vasilyev  <nvasilyev@apple.com>
2109
2110         Web Inspector: Introduce --navigation-bar-height CSS variable
2111         https://bugs.webkit.org/show_bug.cgi?id=158752
2112
2113         Reviewed by Timothy Hatcher.
2114
2115         Abstract a commonly repeated height value (29px) into a variable.
2116
2117         * UserInterface/Views/CSSStyleDetailsSidebarPanel.css:
2118         (.sidebar > .panel.details.css-style > .content.has-filter-bar):
2119         * UserInterface/Views/DebuggerSidebarPanel.css:
2120         (.sidebar > .panel.navigation.debugger > :matches(.content, .empty-content-placeholder)):
2121         * UserInterface/Views/FilterBar.css:
2122         (.filter-bar):
2123         * UserInterface/Views/NavigationBar.css:
2124         (.navigation-bar):
2125         * UserInterface/Views/NavigationSidebarPanel.css:
2126         (.sidebar > .panel.navigation > .content):
2127         (.sidebar > .panel.navigation > .overflow-shadow.top):
2128         * UserInterface/Views/NetworkSidebarPanel.css:
2129         (.sidebar > .panel.navigation.network > .title-bar):
2130         * UserInterface/Views/ResourceSidebarPanel.css:
2131         (.sidebar > .panel.navigation.resource > :matches(.content, .empty-content-placeholder)):
2132         * UserInterface/Views/SearchSidebarPanel.css:
2133         (.sidebar > .panel.navigation.search > :matches(.content, .empty-content-placeholder)):
2134         (.sidebar > .panel.navigation.search > .search-bar):
2135         * UserInterface/Views/Sidebar.css:
2136         (.sidebar.has-navigation-bar > .panel):
2137         * UserInterface/Views/StorageSidebarPanel.css:
2138         (.sidebar > .panel.navigation.storage > :matches(.content, .empty-content-placeholder)):
2139         * UserInterface/Views/TimelineRecordingContentView.css:
2140         (.content-view.timeline-recording > .content-browser .recording-progress):
2141         * UserInterface/Views/Variables.css:
2142         (:root):
2143
2144 2016-06-14  Saam Barati  <sbarati@apple.com>
2145
2146         Follow up to: Web Inspector: Call Trees view should have a 'Top Functions'-like mode
2147         https://bugs.webkit.org/show_bug.cgi?id=158555
2148         <rdar://problem/26712544>
2149
2150         Unreviewed follow up patch.
2151
2152         - Move a long if-else sequence to a switch statement.
2153         - Fix a copy-paste typo in a Symbol(.) enum.
2154
2155         * UserInterface/Models/CallingContextTree.js:
2156         (WebInspector.CallingContextTree.prototype.updateTreeWithStackTrace):
2157
2158 2016-06-13  Joseph Pecoraro  <pecoraro@apple.com>
2159
2160         Web Inspector: Show Exception Stack in UncaughtExceptionReporter view
2161         https://bugs.webkit.org/show_bug.cgi?id=158657
2162         <rdar://problem/26754441>
2163
2164         Reviewed by Darin Adler.
2165
2166         * UserInterface/Debug/UncaughtExceptionReporter.css:
2167         (.uncaught-exception-sheet li):
2168         Make newlines significant.
2169
2170         * UserInterface/Debug/UncaughtExceptionReporter.js:
2171         (unblockEventHandlers):
2172         (handleError):
2173         (handleLinkClick):
2174         (formattedEntry):
2175         Format the exception and a possible stack with a bit of sanitizing.
2176
2177 2016-06-13  Matt Baker  <mattbaker@apple.com>
2178
2179         Web Inspector: Filter Records not applying to new records
2180         https://bugs.webkit.org/show_bug.cgi?id=158213
2181         <rdar://problem/26543912>
2182
2183         Reviewed by Timothy Hatcher.
2184
2185         This patch makes the following improvements to timeline grid filtering:
2186
2187             - Records are filtered as they are added to the grid.
2188             - Timeline view no longer triggers a filter refresh while the
2189               current time changes while recording.
2190             - Filters are refreshed whenever the current timeline view changes.
2191
2192         * UserInterface/Views/DataGrid.js:
2193         (WebInspector.DataGrid.prototype.hasFilters):
2194         Helper function to check for custom and text filters.
2195
2196         (WebInspector.DataGrid.prototype._applyFiltersToNodeAndDispatchEvent):
2197         Encapsulate node state change and event dispatch, which was previously
2198         done in multiple places.
2199
2200         (WebInspector.DataGrid.prototype.insertChild):
2201         Filter incoming node if needed.
2202
2203         (WebInspector.DataGrid.prototype._updateFilter.createIteratorForNodesToBeFiltered):
2204         (WebInspector.DataGrid.prototype._updateFilter):
2205         (WebInspector.DataGrid.prototype.yieldableTaskWillProcessItem):
2206         Use new convenience functions.
2207
2208         (WebInspector.DataGrid.prototype.hasCustomFilters): Deleted.
2209         Renamed `hasFilters`.
2210
2211         * UserInterface/Views/TimelineRecordingContentView.js:
2212         (WebInspector.TimelineRecordingContentView.prototype._currentContentViewDidChange):
2213         Refresh grid filters on view change.
2214
2215         * UserInterface/Views/TimelineView.js:
2216         (WebInspector.TimelineView.prototype.set startTime):
2217         (WebInspector.TimelineView.prototype.set endTime):
2218         Schedule filter change notification when selection bounds changes.
2219
2220         (WebInspector.TimelineView.prototype._timesDidChange):
2221         (WebInspector.TimelineView.prototype._scheduleFilterDidChange):
2222         (WebInspector.TimelineView):
2223
2224 2016-06-13  Saam Barati  <sbarati@apple.com>
2225
2226         Web Inspector: Call Trees view should have a 'Top Functions'-like mode
2227         https://bugs.webkit.org/show_bug.cgi?id=158555
2228         <rdar://problem/26712544>
2229
2230         Reviewed by Timothy Hatcher.
2231
2232         This patch adds a Top Functions view that is similar to Instruments'
2233         Top Functions view. I really wanted to add this view because I've
2234         been doing a lot of performance debugging and I've exclusively 
2235         used the Top Functions view and I want the Inspector to also have
2236         this view. I like to think of it as a more sophisticated version of the bottom-up view.
2237         
2238         Top Functions works by treating every frame as a root in the tree.
2239         Top functions view then presents a list of "roots". This is the same
2240         as all other views, which also present a list of roots, but in this case,
2241         every frame is a root. Bottom Up is great for nailing in specific performance
2242         problems in exactly one frame. But Bottom Up doesn't give you good context about where
2243         a specific frame is in the call tree and how frames are related by having
2244         a caller or some path of shared callers. For example, consider this call tree:
2245                  (program)
2246                  /        \
2247                 /          \
2248            (many nodes...)  
2249               / 
2250              /
2251             (parent)
2252             /   \
2253            /     \
2254          (leaf1)  (leaf2)
2255         
2256         Suppose that 'leaf1' is super hot, and 'leaf2' is moderately hot.
2257         If we look at this through Bottom Up view, we will see 'leaf1'
2258         is super hot, but it will take more scrolling to see that 'leaf2'
2259         is moderately hot. Lets say that 'parent' is also moderately hot,
2260         but that the majority of its time isn't self time. With Bottom Up view,
2261         there is no good way to see that 'leaf1' and 'leaf2' are both nodes under 'parent'.
2262         With Top Down, you can find this information, but it requires a ton of drilling down into
2263         the tree (i.e, you must expand past the 'many nodes...' I drew above). It's inconvenient to
2264         use Top Down here for indentation alone. Bottom up will tell you that 'leaf1' is super hot,
2265         and that 'leaf2' and 'parent' are moderately hot, but it doesn't show how they're related
2266         in the original tree. It's important to see that 'parent's total time is very high
2267         because it itself is moderately hot, and it has a child node that is super hot, and
2268         another child that's moderately 'hot'. For the sake of this example, let's pretend
2269         that 85% of the program's time is spent inside 'parent'. Seeing this information through
2270         'Top Functions' is easy because this information filters to the top of the list. Specifically,
2271         when using 'Top Functions' sorted by Total Time. Because every node is a root, there will be
2272         a top-level entry for every frame in the program. Specifically, there will be a top-level node
2273         for 'parent' in my above example. Because I've sorted this view by Total Time, I will see '(program)'
2274         first. That's because 100% of execution time is under the '(program)' frame. Then, I might see
2275         a few other nodes that also run the entire time because '(program)' calls them, and they eventually
2276         call into other things that never leave the stack. These will also have time ranges near 100%.
2277         But, only a few nodes after that, I'll see 'parent' in the list because it accounts for 85% of
2278         execution time. Immediately, I will see that it has some self time, and that it has two child
2279         nodes that have self time. This is really helpful.
2280         
2281         Let's consider another example where it's not easy in Top Down to get the full picture of 'parent':
2282                    (program)
2283                     /  |  \
2284                  (... many nodes...)
2285                   /           \
2286             (many nodes...)   (many nodes...)
2287                  /             \
2288                parent         parent
2289                  |              |
2290                 leaf1          leaf2
2291         
2292         
2293         If we viewed this program in Top Down, we don't get a full picture of 'parent'
2294         because it has its time distributed in two different subsections of the tree.
2295         Specifically, lets say it has 70% of time in the leaf1 path, and 30% of the
2296         time in the leaf2 path. We want a way to see these things together. It's impossible
2297         to do this in Top Down or Bottom Up. But, in Top Functions view, we get the view that
2298         we want to see because we treat 'parent' as a root of the tree. Because we do this,
2299         we will create the following sub tree in the Top Functions view:
2300                 parent
2301                /      \
2302              leaf1   leaf2
2303         This happens naturally because when 'parent' is a root, we add all its children
2304         to its subtree.
2305         
2306         Constructing this tree is really easy. What we do is take any arbitrary stack
2307         trace of length n, and treat is as n separate stack traces. Specifically, we
2308         perform the following operation for any stack trace S.
2309         
2310         S = [A, B, C, D]
2311         (A is the entry frame, and D is the top of the stack).
2312         We will transform this into a list of stack traces S' like so:
2313         S' = [[A, B, C, D], [B, C, D], [C, D], [D]]
2314         
2315         If we then run the normal top down tree algorithm on this set of stack
2316         traces, all nodes get treated as roots, and voila, we get the Top Functions view.
2317
2318         * Localizations/en.lproj/localizedStrings.js:
2319         * UserInterface/Controllers/TimelineManager.js:
2320         * UserInterface/Main.html:
2321         * UserInterface/Models/CallingContextTree.js:
2322         * UserInterface/Models/TimelineRecording.js:
2323         * UserInterface/Views/ScriptProfileTimelineView.js:
2324         * UserInterface/Views/TextToggleButtonNavigationItem.css: Added.
2325         * UserInterface/Views/TextToggleButtonNavigationItem.js: Added.
2326
2327 2016-06-13  Matt Baker  <mattbaker@apple.com>
2328
2329         Web Inspector: Add ability to show/hide DataGird columns
2330         https://bugs.webkit.org/show_bug.cgi?id=158676
2331         <rdar://problem/26761573>
2332
2333         Reviewed by Timothy Hatcher.
2334
2335         Make it possible to show/hide grid columns using the grid header
2336         context menu. This patch enables the new behavior for most of the
2337         timeline grids.
2338
2339         * UserInterface/Views/DataGrid.js:
2340         (WebInspector.DataGrid):
2341         (WebInspector.DataGrid.prototype.get identifier):
2342         (WebInspector.DataGrid.prototype.set identifier):
2343         An identifier for the grid instance, for managing per-grid settings.
2344         Setting the id causes settings to be created, and their values to be
2345         applied to the grid.
2346
2347         (WebInspector.DataGrid.prototype.get columnChooserEnabled):
2348         (WebInspector.DataGrid.prototype.set columnChooserEnabled):
2349         Enable showing/hiding columns via the grid header.
2350
2351         (WebInspector.DataGrid.prototype.insertColumn):
2352         (WebInspector.DataGrid.prototype.showColumn):
2353         Set column visibility and hidden column setting, then perform layout.
2354
2355         (WebInspector.DataGrid.prototype._collapseColumnGroupWithCell):
2356         (WebInspector.DataGrid.prototype._contextMenuInHeader):
2357         Create column chooser menu items if necessary.
2358
2359         (WebInspector.DataGrid.prototype._showColumn): Deleted.
2360         (WebInspector.DataGrid.prototype._hideColumn): Deleted.
2361         Replaced by `showColumn`.
2362
2363         * UserInterface/Views/LayoutTimelineView.js:
2364         (WebInspector.LayoutTimelineView):
2365         Always show "type" and "name" columns.
2366
2367         * UserInterface/Views/NetworkTimelineView.js:
2368         (WebInspector.NetworkTimelineView):
2369         * UserInterface/Views/RenderingFrameTimelineView.js:
2370         (WebInspector.RenderingFrameTimelineView):
2371         * UserInterface/Views/ScriptDetailsTimelineView.js:
2372         (WebInspector.ScriptDetailsTimelineView):
2373         Always show "name" column.
2374
2375         * UserInterface/Views/TimelineDataGrid.js:
2376         (WebInspector.TimelineDataGrid):
2377         Enable column chooser.
2378
2379 2016-06-10  Joseph Pecoraro  <pecoraro@apple.com>
2380
2381         Web Inspector: <template> content should not be hidden as Shadow Content
2382         https://bugs.webkit.org/show_bug.cgi?id=158654
2383
2384         Reviewed by Ryosuke Niwa.
2385
2386         * Localizations/en.lproj/localizedStrings.js:
2387         New "Template Content" string.
2388
2389         * UserInterface/Models/DOMNode.js:
2390         (WebInspector.DOMNode):
2391         Don't treat template content as shadow content.
2392
2393         * UserInterface/Views/DOMTreeElement.js:
2394         (WebInspector.DOMTreeElement.prototype._nodeTitleInfo):
2395         Custom string for template content fragment.
2396
2397 2016-06-10  Matt Baker  <mattbaker@apple.com>
2398
2399         Web Inspector: heap snapshot comparison view shows nothing if later snapshot is chosen first
2400         https://bugs.webkit.org/show_bug.cgi?id=158584
2401         <rdar://problem/26727849>
2402
2403         Reviewed by Timothy Hatcher.
2404
2405         ALways compare the the later snapshot to the earlier snapshot,
2406         regardless of selection order.
2407
2408         * UserInterface/Views/HeapAllocationsTimelineView.js:
2409         (WebInspector.HeapAllocationsTimelineView):
2410         (WebInspector.HeapAllocationsTimelineView.prototype._dataGridNodeSelected):
2411         Swap shapshots if the first has a greater identifier than the second.
2412         Drive-by cleanup: null out `_baselineDataGridNode` since it isn't used
2413         after the comparison completes.
2414
2415 2016-06-10  Matt Baker  <mattbaker@apple.com>
2416
2417         Web Inspector: rendering frames timeline "60fps" horizontal guide is mispositioned after switching timeline modes
2418         https://bugs.webkit.org/show_bug.cgi?id=158587
2419         <rdar://problem/26728174>
2420
2421         Reviewed by Timothy Hatcher.
2422
2423         When the view mode changes we iterate over all overview graphs, updating
2424         their visibility as needed. Graphs being shown perform layout, even though
2425         the overview's state is in transition: its offset height may still change.
2426
2427         A simple fix is to use TimelineOverviewGraph.height instead of the graph
2428         element's offset height when performing layout.
2429
2430         * UserInterface/Views/RenderingFrameTimelineOverviewGraph.js:
2431         (WebInspector.RenderingFrameTimelineOverviewGraph.prototype.layout):
2432
2433 2016-06-10  Matt Baker  <mattbaker@apple.com>
2434
2435         REGRESSION (r201538): Web Inspector: 1px gap above timeline progress view
2436         https://bugs.webkit.org/show_bug.cgi?id=158626
2437
2438         Reviewed by Joseph Pecoraro.
2439
2440         Adjust progress view top position to account for grid border changes.
2441
2442         * UserInterface/Views/TimelineRecordingContentView.css:
2443         (.content-view.timeline-recording > .content-browser .recording-progress):
2444
2445 2016-06-10  Matt Baker  <mattbaker@apple.com>
2446
2447         Web Inspector: REGRESSION (r201538): Web Inspector: Border under JS Call Trees content view is too thick
2448         https://bugs.webkit.org/show_bug.cgi?id=158624
2449         <rdar://problem/26743633>
2450
2451         Reviewed by Joseph Pecoraro.
2452
2453         Remove top border from <th> elements.
2454
2455         * UserInterface/Views/ProfileView.css:
2456         (.profile > .data-grid th): Deleted.
2457
2458 2016-06-09  Joseph Pecoraro  <pecoraro@apple.com>
2459
2460         REGRESSION: Web Inspector: IndexedDB does not show ObjectStore data
2461         https://bugs.webkit.org/show_bug.cgi?id=158592
2462         <rdar://problem/26730696>
2463
2464         Reviewed by Timothy Hatcher.
2465
2466         * UserInterface/Views/DataGrid.js:
2467         (WebInspector.DataGrid.prototype._noteRowRemoved):
2468         (WebInspector.DataGridNode.prototype._detach):
2469         When rows are removed in the non-Virtual DataGrids, we should
2470         actually remove the row.
2471
2472         * UserInterface/Views/IndexedDatabaseObjectStoreContentView.js:
2473         (WebInspector.IndexedDatabaseObjectStoreContentView):
2474         (WebInspector.IndexedDatabaseObjectStoreContentView.prototype._fetchMoreData.processEntries):
2475         (WebInspector.IndexedDatabaseObjectStoreContentView.prototype._fetchMoreData):
2476         Don't use the delete operator. Use a boolean.
2477
2478 2016-06-09  Nikita Vasilyev  <nvasilyev@apple.com>
2479
2480         Web Inspector: Support Command-P for quick open
2481         https://bugs.webkit.org/show_bug.cgi?id=158579
2482         <rdar://problem/26726751>
2483
2484         Reviewed by Timothy Hatcher.
2485
2486         * UserInterface/Base/Main.js:
2487         (WebInspector.contentLoaded):
2488
2489 2016-06-09  Nikita Vasilyev  <nvasilyev@apple.com>
2490
2491         REGRESSION (r194717): Web Inspector: Elements tab: an element loses focus when selected by Up/Down key
2492         https://bugs.webkit.org/show_bug.cgi?id=157768
2493         <rdar://problem/26311155>
2494
2495         Reviewed by Timothy Hatcher.
2496
2497         Remove _previousFocusedSection and _newInspectorRuleSelector since it was used only
2498         to focus on a newly created section (added by clicking on "+" button).
2499
2500         Introduce _inspectorSection and _isInspectorSectionPendingFocus.
2501
2502         * UserInterface/Views/CSSStyleDeclarationSection.js:
2503         (WebInspector.CSSStyleDeclarationSection.prototype.cssStyleDeclarationTextEditorBlurActiveEditor): Deleted.
2504         (WebInspector.CSSStyleDeclarationSection.prototype._handleSelectorPaste): Deleted.
2505         No longer needed, it was only used by _previousFocusedSection and _newInspectorRuleSelector.
2506
2507         * UserInterface/Views/CSSStyleDeclarationTextEditor.js:
2508         (WebInspector.CSSStyleDeclarationTextEditor.): Deleted.
2509         No londer needed, it was only used by _previousFocusedSection.
2510
2511         * UserInterface/Views/RulesStyleDetailsPanel.js:
2512         (WebInspector.RulesStyleDetailsPanel):
2513         (WebInspector.RulesStyleDetailsPanel.prototype.refresh.appendStyleSection):
2514         (WebInspector.RulesStyleDetailsPanel.prototype.newRuleButtonClicked):
2515         (WebInspector.RulesStyleDetailsPanel.prototype.nodeStylesRefreshed):
2516         (WebInspector.RulesStyleDetailsPanel.prototype.cssStyleDeclarationSectionEditorFocused): Deleted.
2517         (WebInspector.RulesStyleDetailsPanel.prototype.cssStyleDeclarationSectionBlurActiveEditor): Deleted.
2518         (WebInspector.RulesStyleDetailsPanel.prototype.cssStyleDeclarationSectionFocusNewInspectorRuleWithSelector): Deleted.
2519
2520 2016-06-08  Joseph Pecoraro  <pecoraro@apple.com>
2521
2522         REGRESSION: Web Inspector: Should be able to evaluate "{a:1, b:2}" in the console
2523         https://bugs.webkit.org/show_bug.cgi?id=158548
2524         <rdar://problem/26708513>
2525
2526         Reviewed by Timothy Hatcher.
2527
2528         * UserInterface/Controllers/RuntimeManager.js:
2529         (WebInspector.RuntimeManager.prototype.evaluateInInspectedWindow):
2530         Switch the many parameters to an options dictionary.
2531         Include a new option for sourceURL appender, so that
2532         Console evaluations can have its own append.
2533
2534         * UserInterface/Controllers/JavaScriptLogViewController.js:
2535         (WebInspector.JavaScriptLogViewController.prototype.consolePromptTextCommitted):
2536         Use the appendWebInspectorConsoleEvaluationSourceURL appender.
2537
2538         * UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
2539         (WebInspector.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.evaluated):
2540         * UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
2541         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateWatchExpressionsSection.):
2542         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateWatchExpressionsSection):
2543         Use the new options dictionary.
2544
2545 2016-06-08  Brian Burg  <bburg@apple.com>
2546
2547         Web Inspector: an error is encountered when trying to delete nodes that have children
2548         https://bugs.webkit.org/show_bug.cgi?id=158541
2549         <rdar://problem/26705901>
2550
2551         Reviewed by Timothy Hatcher.
2552
2553         * UserInterface/Views/DOMTreeElement.js:
2554         (WebInspector.DOMTreeElement.prototype.adjustCollapsedRange):
2555         Offset into the array variable instead of a variable holding its length.
2556
2557 2016-06-08  Brian Burg  <bburg@apple.com>
2558
2559         Web Inspector: DOMTreeOutline selection areas should be created and updated lazily
2560         https://bugs.webkit.org/show_bug.cgi?id=158513
2561         <rdar://problem/26689646>
2562
2563         Reviewed by Timothy Hatcher.
2564
2565         Selection areas for DOMTreeElements are used for several things: drag markers,
2566         element hover styles, element selection styles, and showing forced pseudo states
2567         for an element. Fortunately it's easy to tell when any of these things is necessary.
2568
2569         Change DOMTreeOutline and DOMTreeElement so they don't create selection areas
2570         unless they are needed for one of these tasks. This significantly reduces
2571         forced layouts that are required to update the selection area height in case the
2572         element has new attributes that cause the tag to become more or less wrapped.
2573
2574         * UserInterface/Views/DOMTreeElement.js:
2575         (WebInspector.DOMTreeElement.prototype.set hovered):
2576         Modernize this method a bit.
2577
2578         (WebInspector.DOMTreeElement.prototype.updateSelectionArea):
2579         If a selection area is not necessary, don't create one.
2580         If one exists and it's not needed, then remove it.
2581
2582         (WebInspector.DOMTreeElement.prototype.onattach):
2583         Remove redundant calls to updateSelection(). This is already called in
2584         updateTitle().
2585
2586         (WebInspector.DOMTreeElement.prototype.onselect):
2587         Ask the DOMTreeOutline to update the selection rather than forcing the
2588         element to do it. This is consistent with other updates to user selection.
2589
2590         (WebInspector.DOMTreeElement.prototype._insertInLastAttributePosition):
2591         (WebInspector.DOMTreeElement.prototype._startEditingAsHTML.dispose):
2592         (WebInspector.DOMTreeElement.prototype._startEditingAsHTML):
2593         Use renamed method.
2594
2595         (WebInspector.DOMTreeElement.prototype.updateTitle):
2596         Add a comment to explain why the selection area is nulled out here.
2597
2598         (WebInspector.DOMTreeElement.prototype.get pseudoClassesEnabled):
2599         (WebInspector.DOMTreeElement.prototype._nodePseudoClassesDidChange):
2600         Update the selection area in case one does not exist for this tree element.
2601         The indicator for forced pseudo classes is a pseudo element of the selection area.
2602
2603         (WebInspector.DOMTreeElement.prototype.updateSelection): Renamed.
2604         (WebInspector.DOMTreeElement.prototype.onexpand):
2605         (WebInspector.DOMTreeElement.prototype.oncollapse):
2606         Remove redundant calls to updateSelection(). This is already called in
2607         updateTitle().
2608
2609         * UserInterface/Views/DOMTreeOutline.css:
2610         (.tree-outline.dom):
2611         (.tree-outline.dom li.hovered:not(.selected) .selection-area):
2612         (.tree-outline.dom li .selection-area):
2613         (.tree-outline.dom li.selected .selection-area):
2614         (.tree-outline.dom li.elements-drag-over .selection-area):
2615         (.tree-outline.dom:focus li.selected .selection-area):
2616         (.tree-outline.dom li.pseudo-class-enabled > .selection-area::before):
2617         (.tree-outline.dom:focus li.selected.pseudo-class-enabled > .selection-area::before):
2618         (.tree-outline.dom li.hovered:not(.selected) .selection): Deleted.
2619         (.tree-outline.dom li .selection): Deleted.
2620         (.tree-outline.dom li.selected .selection): Deleted.
2621         (.tree-outline.dom li.elements-drag-over .selection): Deleted.
2622         (.tree-outline.dom:focus li.selected .selection): Deleted.
2623         (.tree-outline.dom li.pseudo-class-enabled > .selection::before): Deleted.
2624         (.tree-outline.dom:focus li.selected.pseudo-class-enabled > .selection::before): Deleted.
2625         Rename the selector to be less ambiguous.
2626
2627         * UserInterface/Views/DOMTreeOutline.js:
2628         (WebInspector.DOMTreeOutline.prototype.updateSelection): Simplify. The call
2629         to update the selection area will bail out if there is nothing to be done.
2630
2631         (WebInspector.DOMTreeOutline.prototype.findTreeElement):
2632         (WebInspector.DOMTreeOutline.prototype._onmousemove):
2633         (WebInspector.DOMTreeOutline.prototype._onmouseout):
2634         Clean up and use let and arrow functions.
2635
2636         (WebInspector.DOMTreeOutline.prototype._ondragover):
2637         (WebInspector.DOMTreeOutline.prototype._clearDragOverTreeElementMarker):
2638         Clear the dragging element before updating the selection area since it looks at
2639         the dragging element to determine whether anything needs to be done.
2640
2641         * UserInterface/Views/FormattedValue.css:
2642         (.formatted-node > .tree-outline.dom li.hovered:not(.selected) .selection-area):
2643         (.formatted-node > .tree-outline.dom li.hovered:not(.selected) .selection): Deleted.
2644         Rename the selector to be less ambiguous.
2645
2646 2016-06-08  Brian Burg  <bburg@apple.com>
2647
2648         Uncaught Exception in TimelineDataGrid._updatePopoverForSelectedNode()
2649         https://bugs.webkit.org/show_bug.cgi?id=158502
2650         <rdar://problem/26687038>
2651
2652         Reviewed by Joseph Pecoraro.
2653
2654         * UserInterface/Views/TimelineDataGrid.js:
2655         (WebInspector.TimelineDataGrid.prototype._updatePopoverForSelectedNode):
2656         It appears that this expression was moved around since it accesses
2657         targetFrame before it's initialized. Check rect.size.height directly.
2658
2659 2016-06-08  Brian Burg  <bburg@apple.com>
2660
2661         Web Inspector: reduce redundant attribute modification updates in DOMTreeUpdater and DOMTreeElement
2662         https://bugs.webkit.org/show_bug.cgi?id=158504
2663         <rdar://problem/25561452>
2664
2665         Reviewed by Timothy Hatcher.
2666
2667         When the frontend gets lots of DOM.attributeModified events, it forwards these on to
2668         DOMTreeUpdater, which pushes a record for every single modification. It then updates
2669         the DOM elements with the attibute changes on an animation frame. However, since it
2670         doesn't do any deduplication of the modification records, a lot of time is wasted
2671         on updating DOMTreeElements with intermediate (non-final) attribute values.
2672
2673         This patch rewrites DOMTreeUpdater to precisely track which nodes and attributes
2674         of each node need to be updated on the next animation frame. This is done using
2675         Sets and Maps that only hold onto the most recent attribute values rather than
2676         pushing a record object for every single mutation.
2677
2678         This improves the performance of the Elements tab on an SVG particle simulator
2679         dramatically so that the Inspector will not immediately hang. It still only achieves
2680         a few updates per second in this case, so there is still optimization to be done on
2681         the frontend and throttling to be done on the backend.
2682
2683         * UserInterface/Views/DOMTreeElement.js:
2684         (WebInspector.DOMTreeElement):
2685         (WebInspector.DOMTreeElement.prototype.attributeDidChange):
2686         (WebInspector.DOMTreeElement.prototype._buildAttributeDOM):
2687         (WebInspector.DOMTreeElement.prototype._markNodeChanged):
2688         (WebInspector.DOMTreeElement.prototype._nodeChangedAnimationEnd):
2689         (WebInspector.DOMTreeElement.prototype._fireDidChange):
2690         (WebInspector.DOMTreeElement.prototype.nodeStateChanged): Deleted.
2691         Simplify the list of modified attributes a little bit. This still uses a worklist
2692         approach, so it's possible that duplicate updates for the same attribute could accumulate
2693         if DOMTreeUpdater pushes updates faster than DOMTreeElement can render them.
2694
2695         * UserInterface/Views/DOMTreeUpdater.js:
2696         (WebInspector.DOMTreeUpdater):
2697         (WebInspector.DOMTreeUpdater.prototype._attributesUpdated):
2698         (WebInspector.DOMTreeUpdater.prototype._characterDataModified):
2699         (WebInspector.DOMTreeUpdater.prototype._nodeAttributeModified):
2700         (WebInspector.DOMTreeUpdater.prototype._nodeInserted):
2701         (WebInspector.DOMTreeUpdater.prototype._nodeRemoved):
2702         (WebInspector.DOMTreeUpdater.prototype._childNodeCountUpdated):
2703         (WebInspector.DOMTreeUpdater.prototype._updateModifiedNodes):
2704         (WebInspector.DOMTreeUpdater.prototype._reset):
2705         Rewrite this class to separately track insertions, deletions, and modifications. Use
2706         Sets and Maps so redundant entries are not kept around. Split the main work loop
2707         and use fewer enum-like properties to control how each DOM element change is handled.
2708
2709         Attempt to update all inserted children before modifying their attributes. This
2710         wasn't done previously, but enough duplicate attribute modifications occurred that
2711         usually some of them would be processed after being added to the tree. There is only
2712         one chance to do this now.
2713
2714 2016-06-08  Nikita Vasilyev  <nvasilyev@apple.com>
2715
2716         REGRESSION (r158219): Web Inspector: Border under the default Timeline content view is too thick
2717         https://bugs.webkit.org/show_bug.cgi?id=158533
2718
2719         Reviewed by Timothy Hatcher.
2720
2721         * UserInterface/Views/OverviewTimelineView.css:
2722         (.timeline-view.overview > .data-grid th): Deleted.
2723
2724 2016-06-08  Timothy Hatcher  <timothy@apple.com>
2725
2726         Web Inspector: Command-W should not close Web Inspector tabs; it should close the window
2727         https://bugs.webkit.org/show_bug.cgi?id=158538
2728         rdar://problem/26699215
2729
2730         Reviewed by Brian Burg.
2731
2732         * UserInterface/Views/TabBrowser.js:
2733         (WebInspector.TabBrowser): Change shortcut to Command-Shift-W.
2734
2735 2016-06-07  Brian Burg  <bburg@apple.com>
2736
2737         Web Inspector: reduce timer churn when processing many DOM.attributeModified messages
2738         https://bugs.webkit.org/show_bug.cgi?id=158491
2739         <rdar://problem/25561452>
2740
2741         Reviewed by Timothy Hatcher.
2742
2743         When the backend sends thousands of DOM.attributeModified events to the frontend, it
2744         slows to a crawl. This is partly because redundant messages are being sent, and
2745         because the frontend is taking too long to render attribute updates in the elements tab.
2746
2747         This patch is a first step to improve performance by reducing unnecessary work. It
2748         coalesces all attribute state updates to only happen once per animation frame. This
2749         reduces timer churn because we previously used a debouncing timer with interval of 0ms,
2750         and that had to be cleared and restarted on every call. This change also eliminates
2751         forced layouts when updating the selection highlights, since the DOM tree outline has
2752         been reflowed by the time we start updating selections in a requestAnimationFrame callback.
2753
2754         There is still a lot of optimization to be done here, but this reduces the problem
2755         considerably by keeping the event loop clear and making it obvious which selection
2756         update operations are still too expensive.
2757
2758         * UserInterface/Base/Utilities.js:
2759         Add a 'onNextFrame' proxy to Object. It works like debounce, except it coalesces calls
2760         up until the next animation frame rather than a fixed timeout. It also does not extend
2761         the timeout interval for each call.
2762
2763         * UserInterface/Views/DOMTreeUpdater.js:
2764         (WebInspector.DOMTreeUpdater.prototype._attributesUpdated):
2765         (WebInspector.DOMTreeUpdater.prototype._characterDataModified):
2766         (WebInspector.DOMTreeUpdater.prototype._nodeInserted):
2767         (WebInspector.DOMTreeUpdater.prototype._nodeRemoved):
2768         (WebInspector.DOMTreeUpdater.prototype._updateModifiedNodes):
2769         Update on the next frame rather than on a zero delay timeout.
2770
2771         * UserInterface/Views/TreeOutline.js:
2772         (WebInspector.TreeOutline.WebInspector.TreeElement.prototype.didChange):
2773         (WebInspector.TreeOutline.WebInspector.TreeElement.prototype._fireDidChange):
2774         Update on the next frame rather than on a zero delay timeout.
2775
2776 2016-06-07  Nikita Vasilyev  <nvasilyev@apple.com>
2777
2778         REGRESSION (r158219): Web Inspector: Border under Memory content view is too thick
2779         https://bugs.webkit.org/show_bug.cgi?id=158495
2780         <rdar://problem/26683428>
2781
2782         Reviewed by Timothy Hatcher.
2783
2784         * UserInterface/Views/MemoryTimelineView.css:
2785         (.timeline-view.memory): Deleted.
2786
2787 2016-06-07  Brian Burg  <bburg@apple.com>
2788
2789         Web Inspector: add a keyboard shortcut to open the new tab tab
2790         https://bugs.webkit.org/show_bug.cgi?id=158365
2791         <rdar://problem/26631897>
2792
2793         Unreviewed, fix a typo introduced in r201692.
2794         This caused the new tab button to stop working.
2795
2796         * UserInterface/Base/Main.js:
2797         (WebInspector._updateNewTabButtonState):
2798
2799 2016-06-05  Matt Baker  <mattbaker@apple.com>
2800
2801         REGRESSION (r201686): Web Inspector: Fix typo causing an internal error
2802         https://bugs.webkit.org/show_bug.cgi?id=158392
2803         <rdar://problem/26640467>
2804
2805         Reviewed by Joseph Pecoraro.
2806
2807         * UserInterface/Views/HeapAllocationsTimelineOverviewGraph.js:
2808         Fixed typo.
2809
2810 2016-06-04  Brian Burg  <bburg@apple.com>
2811
2812         Web Inspector: add a keyboard shortcut to open the new tab tab
2813         https://bugs.webkit.org/show_bug.cgi?id=158365
2814         <rdar://problem/26631897>
2815
2816         Reviewed by Timothy Hatcher.
2817
2818         Make Cmd-t show the new tab tab if it's not already open and
2819         there is at least one tab type that's not currently in the tab bar.
2820
2821         * UserInterface/Base/Main.js:
2822         (WebInspector.contentLoaded):
2823         (WebInspector._updateNewTabButtonState):
2824         (WebInspector.showNewTabTab):
2825         (WebInspector.isNewTabWithTypeAllowed):
2826         Clean up the code that decides whether we can show the new tab tab.
2827         It is now a special case inside WebInspector.isNewTabWithTypeAllowed.
2828
2829         * UserInterface/Views/NewTabContentView.js:
2830         (WebInspector.NewTabContentView.prototype._updateShownTabs):
2831         Use Array.from.
2832
2833 2016-06-04  Matt Baker  <mattbaker@apple.com>
2834
2835         Web Inspector: discontinuous recordings should have discontinuities in the timeline memory graph
2836         https://bugs.webkit.org/show_bug.cgi?id=158052
2837         <rdar://problem/26516695>
2838
2839         Reviewed by Joseph Pecoraro.
2840
2841         Add gaps to the overview and category line charts where discontinuities
2842         exist in the timeline recording.
2843
2844         * UserInterface/Models/Timeline.js:
2845         (WebInspector.Timeline.prototype.recordsInTimeRange):
2846         Replaces `_visibleRecords` methods found in various views.
2847
2848         * UserInterface/Models/TimelineRecording.js:
2849         (WebInspector.TimelineRecording.prototype.reset):
2850         (WebInspector.TimelineRecording.prototype.addDiscontinuity):
2851         (WebInspector.TimelineRecording.prototype.discontinuitiesInTimeRange):
2852         Allow discontinuities to be added to the recording, and have a means to
2853         look up gaps within a time range.
2854
2855         * UserInterface/Views/HeapAllocationsTimelineOverviewGraph.js:
2856         (WebInspector.HeapAllocationsTimelineOverviewGraph.prototype._visibleRecords): Deleted.
2857         Replaced by Timeline helper method.
2858
2859         * UserInterface/Views/MemoryTimelineOverviewGraph.js:
2860         (WebInspector.MemoryTimelineOverviewGraph.prototype.layout.insertDiscontinuity):
2861         (WebInspector.MemoryTimelineOverviewGraph.prototype.layout):
2862         Insert zero-points into the chart at discontinuity boundaries to create
2863         gaps. Data points for records immediately before or after a gap are extended
2864         to the edge of the discontinuity.
2865
2866         (WebInspector.MemoryTimelineOverviewGraph.prototype._visibleRecords): Deleted.
2867         Replaced by Timeline helper method.
2868
2869         * UserInterface/Views/MemoryTimelineView.js:
2870         (WebInspector.MemoryTimelineView.prototype.layout):
2871         Insert zero-points into each category chart at discontinuity boundaries
2872         to create gaps.
2873
2874         Insert zero-points into the chart to create gaps.
2875         (WebInspector.MemoryTimelineView.prototype._visibleRecords): Deleted.
2876         Replaced by Timeline helper method.
2877
2878         * UserInterface/Views/TimelineOverview.js:
2879         (WebInspector.TimelineOverview.prototype.discontinuitiesInTimeRange):
2880         Forward to the TimelineRecording, which isn't exposed to clients.
2881
2882         * UserInterface/Views/TimelineRecordingContentView.js:
2883         (WebInspector.TimelineRecordingContentView):
2884         (WebInspector.TimelineRecordingContentView.prototype._capturingStarted):
2885         (WebInspector.TimelineRecordingContentView.prototype._capturingStopped):
2886         (WebInspector.TimelineRecordingContentView.prototype._recordingReset):
2887         Track discontinuities (recording stop followed by a start) and add them
2888         to the current recording.
2889
2890 2016-06-03  Brian Burg  <bburg@apple.com>
2891
2892         Web Inspector: add a keyboard shortcut to close the current tab bar item
2893         https://bugs.webkit.org/show_bug.cgi?id=158363
2894         <rdar://problem/22677254>
2895
2896         Reviewed by Timothy Hatcher.
2897
2898         Make Cmd-w close the current tab. This matches Safari's keyboard shortcut.
2899
2900         * UserInterface/Views/TabBrowser.js:
2901         (WebInspector.TabBrowser):
2902         Don't do anything if the New Tab tab is the only tab bar item besides the
2903         pinned "new tab" button.
2904
2905 2016-06-03  Brian Burg  <bburg@apple.com>
2906
2907         Web Inspector: setter for debugging flag InspectorBackend.dumpInspectorTimeStats does not work
2908         https://bugs.webkit.org/show_bug.cgi?id=158366
2909
2910         Reviewed by Timothy Hatcher.
2911
2912         * UserInterface/Protocol/InspectorBackend.js:
2913         (InspectorBackendClass.prototype.set dumpInspectorTimeStats):
2914         Actually update the backing member when the setter is called.
2915
2916 2016-06-03  Nikita Vasilyev  <nvasilyev@apple.com>
2917
2918         Web Inspector: Remove unused WebInspector.CSSCompletions methods
2919         https://bugs.webkit.org/show_bug.cgi?id=158352
2920
2921         Reviewed by Joseph Pecoraro.
2922
2923         * UserInterface/Models/CSSCompletions.js:
2924         (WebInspector.CSSCompletions.prototype.firstStartsWith): Deleted.
2925         (WebInspector.CSSCompletions.prototype.isLonghandPropertyName): Deleted.
2926         (WebInspector.CSSCompletions.prototype.longhandsForShorthand): Deleted.
2927
2928 2016-06-03  Joseph Pecoraro  <pecoraro@apple.com>
2929
2930         Web Inspector: Update NativeFunctionParameters (FontFaceSet, HTMLSlotElement, EventTarget)
2931         https://bugs.webkit.org/show_bug.cgi?id=158333
2932
2933         Reviewed by Brian Burg.
2934
2935         * UserInterface/Models/NativeFunctionParameters.js:
2936         Replace FontLoader with FontFaceSet. Add HTMLSlotElement API.
2937         EventTarget is now actually in the prototype chain, so add it as
2938         a first class citizen and keep mixing it in for legacy backends.
2939
2940 2016-06-02  Joseph Pecoraro  <pecoraro@apple.com>
2941
2942         Web Inspector: Modernize Array.prototype.every/some callsites to arrow functions
2943         https://bugs.webkit.org/show_bug.cgi?id=158330
2944
2945         Reviewed by Brian Burg.
2946
2947         * UserInterface/Controllers/DOMTreeManager.js:
2948         (WebInspector.DOMTreeManager.prototype._updateContentFlowFromPayload):
2949         * UserInterface/Models/ProfileNode.js:
2950         (WebInspector.ProfileNode):
2951         * UserInterface/Models/ScopeChainNode.js:
2952         (WebInspector.ScopeChainNode):
2953         * UserInterface/Models/StackTrace.js:
2954         (WebInspector.StackTrace):
2955         * UserInterface/Models/StructureDescription.js:
2956         (WebInspector.StructureDescription):
2957         * UserInterface/Models/TypeDescription.js:
2958         (WebInspector.TypeDescription):
2959         * UserInterface/Protocol/InspectorBackend.js:
2960         (InspectorBackend.Command.prototype.supports):
2961         * UserInterface/Views/ContentViewContainer.js:
2962         (WebInspector.ContentViewContainer.prototype.showContentView):
2963         * UserInterface/Views/NavigationSidebarPanel.js:
2964         (WebInspector.NavigationSidebarPanel.prototype._checkElementsForPendingViewStateCookie.treeElementMatchesCookie):
2965         (WebInspector.NavigationSidebarPanel.prototype._checkElementsForPendingViewStateCookie):
2966         * UserInterface/Views/ScopeBar.js:
2967         (WebInspector.ScopeBar.prototype.get selectedItems):
2968         (WebInspector.ScopeBar.prototype.hasNonDefaultItemSelected):
2969         * UserInterface/Views/TabContentView.js:
2970         (WebInspector.TabContentView):
2971         (WebInspector.TabContentView.console.assert): Deleted.
2972
2973 2016-06-02  Joseph Pecoraro  <pecoraro@apple.com>
2974
2975         Web Inspector: Modernize some function expressions that bind(this) to arrow functions
2976         https://bugs.webkit.org/show_bug.cgi?id=158315
2977
2978         Reviewed by Brian Burg.
2979
2980         Convert a common "function(x) { ... }.bind(this)" pattern to use arrow
2981         functions "(x) => { ... }", which lexically binds `this`, slightly faster,
2982         and uses less memory.
2983
2984         * UserInterface/Base/Main.js:
2985         (WebInspector._updateNewTabButtonState):
2986         * UserInterface/Controllers/BreakpointPopoverController.js:
2987         (WebInspector.BreakpointPopoverController.prototype._createPopoverContent):
2988         * UserInterface/Controllers/TypeTokenAnnotator.js:
2989         (WebInspector.TypeTokenAnnotator.prototype.insertAnnotations):
2990         (WebInspector.TypeTokenAnnotator.prototype.insertAnnotations.): Deleted.
2991         * UserInterface/Models/RenderingFrameTimelineRecord.js:
2992         (WebInspector.RenderingFrameTimelineRecord.prototype._calculateDurationRemainder):
2993         (WebInspector.RenderingFrameTimelineRecord):
2994         * UserInterface/Models/Resource.js:
2995         (WebInspector.Resource.prototype.requestContent):
2996         * UserInterface/Models/Script.js:
2997         (WebInspector.Script.prototype.requestScriptSyntaxTree):
2998         (WebInspector.Script.prototype.requestScriptSyntaxTree.makeSyntaxTreeAndCallCallback): Deleted.
2999         * UserInterface/Models/SourceCodeLocation.js:
3000         (WebInspector.SourceCodeLocation.prototype.populateLiveDisplayLocationString):
3001         * UserInterface/Models/WrappedPromise.js:
3002         (WebInspector.WrappedPromise):
3003         * UserInterface/Views/BreakpointActionView.js:
3004         (WebInspector.BreakpointActionView.prototype._updateBody):
3005         * UserInterface/Views/BreakpointTreeElement.js:
3006         (WebInspector.BreakpointTreeElement.prototype._dataUpdated):
3007         * UserInterface/Views/CSSStyleDeclarationTextEditor.js:
3008         (WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkers.update):
3009         (WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkers):
3010         * UserInterface/Views/DefaultDashboardView.js:
3011         (WebInspector.DefaultDashboardView.prototype._appendElementForNamedItem.set item):
3012         (WebInspector.DefaultDashboardView.prototype._appendElementForNamedItem):
3013         * UserInterface/Views/ErrorObjectView.js:
3014         (WebInspector.ErrorObjectView.prototype.update):
3015         * UserInterface/Views/GeneralTreeElement.js:
3016         (WebInspector.GeneralTreeElement.prototype.onattach):
3017         (WebInspector.GeneralTreeElement.prototype.onattach.this._boundContextMenuEventHandler): Deleted.
3018         * UserInterface/Views/InlineSwatch.js:
3019         (WebInspector.InlineSwatch.prototype._getNextValidHEXFormat):
3020         (WebInspector.InlineSwatch):
3021         * UserInterface/Views/LayerTreeDetailsSidebarPanel.js:
3022         (WebInspector.LayerTreeDetailsSidebarPanel.prototype.refresh):
3023         (WebInspector.LayerTreeDetailsSidebarPanel.prototype._showPopoverForSelectedNode):
3024         (WebInspector.LayerTreeDetailsSidebarPanel.prototype._contentForPopover):
3025         * UserInterface/Views/LogContentView.js:
3026         (WebInspector.LogContentView.prototype._mouseup):
3027         * UserInterface/Views/NavigationSidebarPanel.js:
3028         (WebInspector.NavigationSidebarPanel.prototype._checkElementsForPendingViewStateCookie):
3029         * UserInterface/Views/ObjectTreeBaseTreeElement.js:
3030         (WebInspector.ObjectTreeBaseTreeElement.prototype.createGetterElement):
3031         (WebInspector.ObjectTreeBaseTreeElement.prototype.createGetterElement.): Deleted.
3032         * UserInterface/Views/ObjectTreePropertyTreeElement.js:
3033         (WebInspector.ObjectTreePropertyTreeElement.prototype._updateEntries):
3034         * UserInterface/Views/ObjectTreeView.js:
3035         (WebInspector.ObjectTreeView.prototype._updateEntries):
3036         * UserInterface/Views/ResourceDetailsSidebarPanel.js:
3037         (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshImageSizeSection):
3038         * UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
3039         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._addWatchExpressionButtonClicked):
3040         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._objectTreeElementAddContextMenuItems):
3041         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._addWatchExpressionButtonClicked.this._codeMirror.addKeyMap): Deleted.
3042         * UserInterface/Views/TabBar.js:
3043         * UserInterface/Views/VisualStylePropertyEditor.js:
3044         (WebInspector.VisualStylePropertyEditor.prototype._checkDependencies):
3045
3046 2016-05-31  Nikita Vasilyev  <nvasilyev@apple.com>
3047
3048         Web Inspector: Storage DataGrids have a half-pixel transparent/white border below the header
3049         https://bugs.webkit.org/show_bug.cgi?id=156699
3050         <rdar://problem/25778260>
3051
3052         Reviewed by Timothy Hatcher.
3053
3054         Increase the width of the border below the DataGrid's header to match the border in the left sidebar.
3055
3056         * UserInterface/Views/DataGrid.css:
3057         (.data-grid > .header-wrapper):
3058
3059 2016-05-31  Nikita Vasilyev  <nvasilyev@apple.com>
3060
3061         Web Inspector: Snapshot List scroll bar occludes border of containing view in top-right
3062         https://bugs.webkit.org/show_bug.cgi?id=158219
3063         <rdar://problem/26545018>
3064
3065         Reviewed by Timothy Hatcher.
3066
3067         * UserInterface/Views/TimelineDataGrid.css:
3068         (.data-grid.timeline th): Deleted.
3069         * UserInterface/Views/TimelineRecordingContentView.css:
3070         (.content-view.timeline-recording > .content-browser > .navigation-bar):
3071         Make the border line span across the whole navigation bar, not just its table cells.
3072
3073 2016-05-30  Brian Burg  <bburg@apple.com>
3074
3075         Web Inspector: Timelines: "-0.000ms" in Self Time
3076         https://bugs.webkit.org/show_bug.cgi?id=158162
3077         <rdar://problem/26523350>
3078
3079         Reviewed by Darin Adler.
3080
3081         Values such as -0.0000 and +0.00001 seem to indicate there is
3082         some floating point error accumulating in profile node data.
3083         Since the sampling profiler isn't accurate to that precision,
3084         let's clean up the data so near-zero numbers are simply zero.
3085
3086         * UserInterface/Models/ProfileNode.js:
3087         Round selfTime down to zero if it's less than the
3088         smallest value we would show in the user interface.
3089
3090 2016-05-30  Brian Burg  <bburg@apple.com>
3091
3092         Web Inspector: Uncaught exception page should pre-populate the bug's URL with the inspected page URL
3093         https://bugs.webkit.org/show_bug.cgi?id=158055
3094         <rdar://problem/26516693>
3095
3096         Reviewed by Saam Barati.
3097
3098         * UserInterface/Debug/UncaughtExceptionReporter.js:
3099         Include the encoded URL in the query string if it is not empty.
3100
3101 2016-05-30  Matt Baker  <mattbaker@apple.com>
3102
3103         Web Inspector: Right-clicking in Snapshot's DataGrid throws an exception
3104         https://bugs.webkit.org/show_bug.cgi?id=157934
3105         <rdar://problem/26380910>
3106
3107         Reviewed by Brian Burg.
3108
3109         Check that click event target is actually a cell, as it can be a row
3110         when focusing the table after dismissing a popup menu.
3111
3112         * UserInterface/Views/DataGrid.js:
3113         (WebInspector.DataGridNode.prototype.isEventWithinDisclosureTriangle):
3114
3115 2016-05-27  Joseph Pecoraro  <pecoraro@apple.com>
3116
3117         Web Inspector: Not all transitively dominated nodes display their retained size
3118         https://bugs.webkit.org/show_bug.cgi?id=158174
3119
3120         Reviewed by Timothy Hatcher.
3121
3122         * UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
3123         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._isDominatedByNonBaseParent):
3124         Use the parent reference changing in the loop instead of always using the same parent.
3125
3126 2016-05-27  Devin Rousso  <dcrousso+webkit@gmail.com>
3127
3128         Web Inspector: Add indicators to show nesting levels inside DOM Tree
3129         https://bugs.webkit.org/show_bug.cgi?id=157468
3130         <rdar://problem/26162640>
3131
3132         Reviewed by Timothy Hatcher.
3133
3134         Add CSS rules to give all expanded node children lists a small line on the
3135         left border indicating that all items under the line are descendants.
3136
3137         * UserInterface/Views/DOMTreeOutline.css:
3138         (.tree-outline.dom li .selection):
3139         (.tree-outline.dom li > span):
3140         (.tree-outline.dom ol):
3141         (.tree-outline.dom .tree-outline.dom li:matches(.hovered, .selected) + ol.children.expanded):
3142         (.tree-outline.dom li.selected + ol.children.expanded):
3143         (.tree-outline.dom li.parent::before):
3144
3145 2016-05-26  Matt Baker  <mattbaker@apple.com>
3146
3147         Uncaught Exception: TypeError: undefined is not an object (evaluating 'records[endIndex].endTime')
3148         https://bugs.webkit.org/show_bug.cgi?id=158057
3149
3150         Reviewed by Timothy Hatcher.
3151
3152         * UserInterface/Views/TimelineRecordingContentView.js:
3153         (WebInspector.TimelineRecordingContentView.prototype._updateTimelineViewTimes):
3154         When the entire recording is selected, rendering frames should use the
3155         record count as its end time instead of the recording's end time.
3156
3157 2016-05-25  Joseph Pecoraro  <pecoraro@apple.com>
3158
3159         Web Inspector: Uncaught Exception: TypeError: undefined is not an object (evaluating 'collectionData.affectedSnapshots')
3160         https://bugs.webkit.org/show_bug.cgi?id=158051
3161
3162         Reviewed by Brian Burg.
3163
3164         * UserInterface/Workers/HeapSnapshot/HeapSnapshot.js:
3165         (HeapSnapshot.prototype.updateDeadNodesAndGatherCollectionData):
3166         * UserInterface/Workers/HeapSnapshot/HeapSnapshotWorker.js:
3167         (HeapSnapshotWorker.prototype.createSnapshot):
3168         If by the time the timeout fires we had cleared our snapshot list, then
3169         updateDeadNodesAndGatherCollectionData could bail. Handle gracefully.
3170
3171 2016-05-23  Nikita Vasilyev  <nvasilyev@apple.com>
3172
3173         Web Inspector: Split console navigation bar doesn't wrap as expected
3174         https://bugs.webkit.org/show_bug.cgi?id=157950
3175         <rdar://problem/26395573>
3176
3177         Reviewed by Timothy Hatcher.
3178
3179         * UserInterface/Views/Main.css:
3180         (#split-content-browser > .navigation-bar .item):
3181         Fix the split console and don't touch any other navigation bars.
3182
3183 2016-05-22  Brady Eidson  <beidson@apple.com>
3184
3185         Move to C++14.
3186         https://bugs.webkit.org/show_bug.cgi?id=157948
3187
3188         Reviewed by Michael Catanzaro.
3189
3190         * Configurations/Base.xcconfig:
3191
3192 2016-05-21  Matt Baker  <mattbaker@apple.com>
3193
3194         Web Inspector: Creating the CSSStyleDetailsSidebarPanel takes about 50ms (20%) of main load
3195         https://bugs.webkit.org/show_bug.cgi?id=156707
3196         <rdar://problem/25780404>
3197
3198         Reviewed by Timothy Hatcher.
3199
3200         This patch adds new View concepts, `initialLayout` and `widthDidChange`,
3201         making it possible for hidden views to postpone the creation of their
3202         UI subtree until they are shown for the first time.
3203
3204         Sidebar panels get this performance improvement by virtue of SidebarPanel
3205         and StyleDetailsPanel, which trigger a layout when shown. This can be
3206         removed once <https://webkit.org/b/150741> is fixed, and this is done
3207         automatically by View.
3208
3209         * UserInterface/Views/CSSStyleDeclarationTextEditor.js:
3210         (WebInspector.CSSStyleDeclarationTextEditor):
3211         Should subclass View.
3212         (WebInspector.CSSStyleDeclarationTextEditor.prototype.layout):
3213         (WebInspector.CSSStyleDeclarationTextEditor.prototype.get element): Deleted.
3214         Handled in View base class.
3215         (WebInspector.CSSStyleDeclarationTextEditor.prototype.updateLayout): Deleted.
3216         Relocate to `layout` override, ignore unused parameter `force`.
3217
3218         * UserInterface/Views/CSSStyleDetailsSidebarPanel.js:
3219         (WebInspector.CSSStyleDetailsSidebarPanel):
3220         Create the minimum required initial state and UI elements. Relocate
3221         anything that can be lazy loaded to `initialLayout`.
3222
3223         (WebInspector.CSSStyleDetailsSidebarPanel.prototype.initialLayout):
3224         (WebInspector.CSSStyleDetailsSidebarPanel.prototype.sizeDidChange):
3225         (WebInspector.CSSStyleDetailsSidebarPanel.prototype.widthDidChange): Deleted.
3226
3227         * UserInterface/Views/ComputedStyleDetailsPanel.js:
3228         (WebInspector.ComputedStyleDetailsPanel):
3229         Relocate anything that can be lazy loaded to `initialLayout`.
3230         (WebInspector.ComputedStyleDetailsPanel.prototype.initialLayout):
3231         (WebInspector.ComputedStyleDetailsPanel.prototype.shown): Deleted.
3232         (WebInspector.ComputedStyleDetailsPanel.prototype.widthDidChange): Deleted.
3233         Handled in View base class.
3234
3235         * UserInterface/Views/DataGrid.js:
3236         (WebInspector.DataGrid.prototype.layout):
3237         Resize logic can be safely moved to `sizeDidChange`, since columns are
3238         always initialized when the width changes.
3239         (WebInspector.DataGrid.prototype.sizeDidChange):
3240         Reposition headers, scrollbars.
3241         (WebInspector.DataGrid.prototype._updateHeaderAndScrollbar):
3242         Broke out header repositioning, which needs to be called whenever
3243         column widths are initialized or the view size changes.
3244
3245         * UserInterface/Views/NavigationBar.js:
3246         (WebInspector.NavigationBar.prototype.layout):
3247
3248         * UserInterface/Views/RulesStyleDetailsPanel.js:
3249         (WebInspector.RulesStyleDetailsPanel.prototype.sizeDidChange):
3250         (WebInspector.RulesStyleDetailsPanel.prototype.widthDidChange): Deleted.
3251
3252         * UserInterface/Views/Sidebar.js:
3253         (WebInspector.Sidebar.prototype._recalculateWidth):
3254         Width changes need to be coordinated by the View base class, since the
3255         initial layout must have occurred before handling a width change.
3256         Force a layout with a resize layout reason.
3257
3258         * UserInterface/Views/SidebarPanel.js:
3259         (WebInspector.SidebarPanel.prototype.get displayName):
3260         Drive-by style fix: add getter so that CSSStyleDetailsSidebarPanel
3261         doesn't have to read the private property directly.
3262
3263         (WebInspector.SidebarPanel.prototype.shown):
3264         Force a layout whenever the panel is shown.
3265         (WebInspector.SidebarPanel.prototype.sizeDidChange):
3266         (WebInspector.SidebarPanel):
3267         (WebInspector.SidebarPanel.prototype.widthDidChange): Deleted.
3268
3269         * UserInterface/Views/StyleDetailsPanel.js:
3270         (WebInspector.StyleDetailsPanel.prototype.shown):
3271         Schedule a layout when shown. A forced layout isn't necessary.
3272         Unlike SidebarPanels, the initial state of style panels doesn't depend
3273         on its layout, and can be safely initialized by the next rAF.
3274
3275         (WebInspector.StyleDetailsPanel.prototype.hidden):
3276         Cancel a pending layout if the panel is hidden before the next AF.
3277         (WebInspector.StyleDetailsPanel.prototype.widthDidChange): Deleted.
3278         Not needed, defined in View base class.
3279
3280         * UserInterface/Views/TimelineOverview.js:
3281         (WebInspector.TimelineOverview.prototype.sizeDidChange):
3282         (WebInspector.TimelineOverview.prototype.layout):
3283         Moved resize logic to `sizeDidChange`.
3284
3285         * UserInterface/Views/TimelineRuler.js:
3286         (WebInspector.TimelineRuler.prototype.sizeDidChange):
3287         (WebInspector.TimelineRuler.prototype.layout):
3288         Moved resize logic to `sizeDidChange`.
3289
3290         * UserInterface/Views/View.js:
3291         (WebInspector.View):
3292         (WebInspector.View.prototype.updateLayout):
3293         (WebInspector.View.prototype.cancelLayout):
3294         Allow a pending layout to be canceled. Useful when a view with a
3295         pending layout is hidden before the layout occurs.
3296
3297         (WebInspector.View.prototype.get layoutReason):
3298         Protected getter for subclasses that need to check the layout reason
3299         outside `sizeDidChange`.
3300
3301         (WebInspector.View.prototype.initialLayout):
3302         Subclass hook to create UI subtree the first time a layout occurs.
3303         Called only once during the lifetime of the View.
3304
3305         (WebInspector.View.prototype.layout):
3306         Drive-by comment fix.
3307         (WebInspector.View.prototype.sizeDidChange):
3308         New layout cycle hook for subclasses.
3309         (WebInspector.View.prototype._layoutSubtree):
3310         Do an initial layout the first time layout is called.
3311         Call the `sizeDidChange` hook so that subclasses can update state
3312         which depends on size/position before doing layout.
3313
3314         * UserInterface/Views/VisualStyleDetailsPanel.js:
3315         (WebInspector.VisualStyleDetailsPanel):
3316         Create the minimum required initial state and UI elements. Relocate
3317         anything that can be lazy loaded to `initialLayout`.
3318
3319         (WebInspector.VisualStyleDetailsPanel.prototype.refresh):
3320         No changes, shifting line numbers confused the diff.
3321         (WebInspector.VisualStyleDetailsPanel.prototype.initialLayout):
3322         (WebInspector.VisualStyleDetailsPanel.prototype.sizeDidChange):
3323         (WebInspector.VisualStyleDetailsPanel.prototype.widthDidChange): Deleted.
3324
3325 2016-05-21  Matt Baker  <mattbaker@apple.com>
3326
3327         Assertion Failed: StyleDetailsPanel.markAsNeedsRefresh() called with null domNode
3328         https://bugs.webkit.org/show_bug.cgi?id=157955
3329         <rdar://problem/26398943>
3330
3331         Reviewed by Timothy Hatcher.
3332
3333         CSSStyleDetailsSidebarPanel `visible` is true while the panel is being