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