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