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