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