REGRESSION (r201686): Web Inspector: Fix typo causing an internal error
[WebKit-https.git] / Source / WebInspectorUI / ChangeLog
1 2016-06-05  Matt Baker  <mattbaker@apple.com>
2
3         REGRESSION (r201686): Web Inspector: Fix typo causing an internal error
4         https://bugs.webkit.org/show_bug.cgi?id=158392
5         <rdar://problem/26640467>
6
7         Reviewed by Joseph Pecoraro.
8
9         * UserInterface/Views/HeapAllocationsTimelineOverviewGraph.js:
10         Fixed typo.
11
12 2016-06-04  Brian Burg  <bburg@apple.com>
13
14         Web Inspector: add a keyboard shortcut to open the new tab tab
15         https://bugs.webkit.org/show_bug.cgi?id=158365
16         <rdar://problem/26631897>
17
18         Reviewed by Timothy Hatcher.
19
20         Make Cmd-t show the new tab tab if it's not already open and
21         there is at least one tab type that's not currently in the tab bar.
22
23         * UserInterface/Base/Main.js:
24         (WebInspector.contentLoaded):
25         (WebInspector._updateNewTabButtonState):
26         (WebInspector.showNewTabTab):
27         (WebInspector.isNewTabWithTypeAllowed):
28         Clean up the code that decides whether we can show the new tab tab.
29         It is now a special case inside WebInspector.isNewTabWithTypeAllowed.
30
31         * UserInterface/Views/NewTabContentView.js:
32         (WebInspector.NewTabContentView.prototype._updateShownTabs):
33         Use Array.from.
34
35 2016-06-04  Matt Baker  <mattbaker@apple.com>
36
37         Web Inspector: discontinuous recordings should have discontinuities in the timeline memory graph
38         https://bugs.webkit.org/show_bug.cgi?id=158052
39         <rdar://problem/26516695>
40
41         Reviewed by Joseph Pecoraro.
42
43         Add gaps to the overview and category line charts where discontinuities
44         exist in the timeline recording.
45
46         * UserInterface/Models/Timeline.js:
47         (WebInspector.Timeline.prototype.recordsInTimeRange):
48         Replaces `_visibleRecords` methods found in various views.
49
50         * UserInterface/Models/TimelineRecording.js:
51         (WebInspector.TimelineRecording.prototype.reset):
52         (WebInspector.TimelineRecording.prototype.addDiscontinuity):
53         (WebInspector.TimelineRecording.prototype.discontinuitiesInTimeRange):
54         Allow discontinuities to be added to the recording, and have a means to
55         look up gaps within a time range.
56
57         * UserInterface/Views/HeapAllocationsTimelineOverviewGraph.js:
58         (WebInspector.HeapAllocationsTimelineOverviewGraph.prototype._visibleRecords): Deleted.
59         Replaced by Timeline helper method.
60
61         * UserInterface/Views/MemoryTimelineOverviewGraph.js:
62         (WebInspector.MemoryTimelineOverviewGraph.prototype.layout.insertDiscontinuity):
63         (WebInspector.MemoryTimelineOverviewGraph.prototype.layout):
64         Insert zero-points into the chart at discontinuity boundaries to create
65         gaps. Data points for records immediately before or after a gap are extended
66         to the edge of the discontinuity.
67
68         (WebInspector.MemoryTimelineOverviewGraph.prototype._visibleRecords): Deleted.
69         Replaced by Timeline helper method.
70
71         * UserInterface/Views/MemoryTimelineView.js:
72         (WebInspector.MemoryTimelineView.prototype.layout):
73         Insert zero-points into each category chart at discontinuity boundaries
74         to create gaps.
75
76         Insert zero-points into the chart to create gaps.
77         (WebInspector.MemoryTimelineView.prototype._visibleRecords): Deleted.
78         Replaced by Timeline helper method.
79
80         * UserInterface/Views/TimelineOverview.js:
81         (WebInspector.TimelineOverview.prototype.discontinuitiesInTimeRange):
82         Forward to the TimelineRecording, which isn't exposed to clients.
83
84         * UserInterface/Views/TimelineRecordingContentView.js:
85         (WebInspector.TimelineRecordingContentView):
86         (WebInspector.TimelineRecordingContentView.prototype._capturingStarted):
87         (WebInspector.TimelineRecordingContentView.prototype._capturingStopped):
88         (WebInspector.TimelineRecordingContentView.prototype._recordingReset):
89         Track discontinuities (recording stop followed by a start) and add them
90         to the current recording.
91
92 2016-06-03  Brian Burg  <bburg@apple.com>
93
94         Web Inspector: add a keyboard shortcut to close the current tab bar item
95         https://bugs.webkit.org/show_bug.cgi?id=158363
96         <rdar://problem/22677254>
97
98         Reviewed by Timothy Hatcher.
99
100         Make Cmd-w close the current tab. This matches Safari's keyboard shortcut.
101
102         * UserInterface/Views/TabBrowser.js:
103         (WebInspector.TabBrowser):
104         Don't do anything if the New Tab tab is the only tab bar item besides the
105         pinned "new tab" button.
106
107 2016-06-03  Brian Burg  <bburg@apple.com>
108
109         Web Inspector: setter for debugging flag InspectorBackend.dumpInspectorTimeStats does not work
110         https://bugs.webkit.org/show_bug.cgi?id=158366
111
112         Reviewed by Timothy Hatcher.
113
114         * UserInterface/Protocol/InspectorBackend.js:
115         (InspectorBackendClass.prototype.set dumpInspectorTimeStats):
116         Actually update the backing member when the setter is called.
117
118 2016-06-03  Nikita Vasilyev  <nvasilyev@apple.com>
119
120         Web Inspector: Remove unused WebInspector.CSSCompletions methods
121         https://bugs.webkit.org/show_bug.cgi?id=158352
122
123         Reviewed by Joseph Pecoraro.
124
125         * UserInterface/Models/CSSCompletions.js:
126         (WebInspector.CSSCompletions.prototype.firstStartsWith): Deleted.
127         (WebInspector.CSSCompletions.prototype.isLonghandPropertyName): Deleted.
128         (WebInspector.CSSCompletions.prototype.longhandsForShorthand): Deleted.
129
130 2016-06-03  Joseph Pecoraro  <pecoraro@apple.com>
131
132         Web Inspector: Update NativeFunctionParameters (FontFaceSet, HTMLSlotElement, EventTarget)
133         https://bugs.webkit.org/show_bug.cgi?id=158333
134
135         Reviewed by Brian Burg.
136
137         * UserInterface/Models/NativeFunctionParameters.js:
138         Replace FontLoader with FontFaceSet. Add HTMLSlotElement API.
139         EventTarget is now actually in the prototype chain, so add it as
140         a first class citizen and keep mixing it in for legacy backends.
141
142 2016-06-02  Joseph Pecoraro  <pecoraro@apple.com>
143
144         Web Inspector: Modernize Array.prototype.every/some callsites to arrow functions
145         https://bugs.webkit.org/show_bug.cgi?id=158330
146
147         Reviewed by Brian Burg.
148
149         * UserInterface/Controllers/DOMTreeManager.js:
150         (WebInspector.DOMTreeManager.prototype._updateContentFlowFromPayload):
151         * UserInterface/Models/ProfileNode.js:
152         (WebInspector.ProfileNode):
153         * UserInterface/Models/ScopeChainNode.js:
154         (WebInspector.ScopeChainNode):
155         * UserInterface/Models/StackTrace.js:
156         (WebInspector.StackTrace):
157         * UserInterface/Models/StructureDescription.js:
158         (WebInspector.StructureDescription):
159         * UserInterface/Models/TypeDescription.js:
160         (WebInspector.TypeDescription):
161         * UserInterface/Protocol/InspectorBackend.js:
162         (InspectorBackend.Command.prototype.supports):
163         * UserInterface/Views/ContentViewContainer.js:
164         (WebInspector.ContentViewContainer.prototype.showContentView):
165         * UserInterface/Views/NavigationSidebarPanel.js:
166         (WebInspector.NavigationSidebarPanel.prototype._checkElementsForPendingViewStateCookie.treeElementMatchesCookie):
167         (WebInspector.NavigationSidebarPanel.prototype._checkElementsForPendingViewStateCookie):
168         * UserInterface/Views/ScopeBar.js:
169         (WebInspector.ScopeBar.prototype.get selectedItems):
170         (WebInspector.ScopeBar.prototype.hasNonDefaultItemSelected):
171         * UserInterface/Views/TabContentView.js:
172         (WebInspector.TabContentView):
173         (WebInspector.TabContentView.console.assert): Deleted.
174
175 2016-06-02  Joseph Pecoraro  <pecoraro@apple.com>
176
177         Web Inspector: Modernize some function expressions that bind(this) to arrow functions
178         https://bugs.webkit.org/show_bug.cgi?id=158315
179
180         Reviewed by Brian Burg.
181
182         Convert a common "function(x) { ... }.bind(this)" pattern to use arrow
183         functions "(x) => { ... }", which lexically binds `this`, slightly faster,
184         and uses less memory.
185
186         * UserInterface/Base/Main.js:
187         (WebInspector._updateNewTabButtonState):
188         * UserInterface/Controllers/BreakpointPopoverController.js:
189         (WebInspector.BreakpointPopoverController.prototype._createPopoverContent):
190         * UserInterface/Controllers/TypeTokenAnnotator.js:
191         (WebInspector.TypeTokenAnnotator.prototype.insertAnnotations):
192         (WebInspector.TypeTokenAnnotator.prototype.insertAnnotations.): Deleted.
193         * UserInterface/Models/RenderingFrameTimelineRecord.js:
194         (WebInspector.RenderingFrameTimelineRecord.prototype._calculateDurationRemainder):
195         (WebInspector.RenderingFrameTimelineRecord):
196         * UserInterface/Models/Resource.js:
197         (WebInspector.Resource.prototype.requestContent):
198         * UserInterface/Models/Script.js:
199         (WebInspector.Script.prototype.requestScriptSyntaxTree):
200         (WebInspector.Script.prototype.requestScriptSyntaxTree.makeSyntaxTreeAndCallCallback): Deleted.
201         * UserInterface/Models/SourceCodeLocation.js:
202         (WebInspector.SourceCodeLocation.prototype.populateLiveDisplayLocationString):
203         * UserInterface/Models/WrappedPromise.js:
204         (WebInspector.WrappedPromise):
205         * UserInterface/Views/BreakpointActionView.js:
206         (WebInspector.BreakpointActionView.prototype._updateBody):
207         * UserInterface/Views/BreakpointTreeElement.js:
208         (WebInspector.BreakpointTreeElement.prototype._dataUpdated):
209         * UserInterface/Views/CSSStyleDeclarationTextEditor.js:
210         (WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkers.update):
211         (WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkers):
212         * UserInterface/Views/DefaultDashboardView.js:
213         (WebInspector.DefaultDashboardView.prototype._appendElementForNamedItem.set item):
214         (WebInspector.DefaultDashboardView.prototype._appendElementForNamedItem):
215         * UserInterface/Views/ErrorObjectView.js:
216         (WebInspector.ErrorObjectView.prototype.update):
217         * UserInterface/Views/GeneralTreeElement.js:
218         (WebInspector.GeneralTreeElement.prototype.onattach):
219         (WebInspector.GeneralTreeElement.prototype.onattach.this._boundContextMenuEventHandler): Deleted.
220         * UserInterface/Views/InlineSwatch.js:
221         (WebInspector.InlineSwatch.prototype._getNextValidHEXFormat):
222         (WebInspector.InlineSwatch):
223         * UserInterface/Views/LayerTreeDetailsSidebarPanel.js:
224         (WebInspector.LayerTreeDetailsSidebarPanel.prototype.refresh):
225         (WebInspector.LayerTreeDetailsSidebarPanel.prototype._showPopoverForSelectedNode):
226         (WebInspector.LayerTreeDetailsSidebarPanel.prototype._contentForPopover):
227         * UserInterface/Views/LogContentView.js:
228         (WebInspector.LogContentView.prototype._mouseup):
229         * UserInterface/Views/NavigationSidebarPanel.js:
230         (WebInspector.NavigationSidebarPanel.prototype._checkElementsForPendingViewStateCookie):
231         * UserInterface/Views/ObjectTreeBaseTreeElement.js:
232         (WebInspector.ObjectTreeBaseTreeElement.prototype.createGetterElement):
233         (WebInspector.ObjectTreeBaseTreeElement.prototype.createGetterElement.): Deleted.
234         * UserInterface/Views/ObjectTreePropertyTreeElement.js:
235         (WebInspector.ObjectTreePropertyTreeElement.prototype._updateEntries):
236         * UserInterface/Views/ObjectTreeView.js:
237         (WebInspector.ObjectTreeView.prototype._updateEntries):
238         * UserInterface/Views/ResourceDetailsSidebarPanel.js:
239         (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshImageSizeSection):
240         * UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
241         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._addWatchExpressionButtonClicked):
242         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._objectTreeElementAddContextMenuItems):
243         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._addWatchExpressionButtonClicked.this._codeMirror.addKeyMap): Deleted.
244         * UserInterface/Views/TabBar.js:
245         * UserInterface/Views/VisualStylePropertyEditor.js:
246         (WebInspector.VisualStylePropertyEditor.prototype._checkDependencies):
247
248 2016-05-31  Nikita Vasilyev  <nvasilyev@apple.com>
249
250         Web Inspector: Storage DataGrids have a half-pixel transparent/white border below the header
251         https://bugs.webkit.org/show_bug.cgi?id=156699
252         <rdar://problem/25778260>
253
254         Reviewed by Timothy Hatcher.
255
256         Increase the width of the border below the DataGrid's header to match the border in the left sidebar.
257
258         * UserInterface/Views/DataGrid.css:
259         (.data-grid > .header-wrapper):
260
261 2016-05-31  Nikita Vasilyev  <nvasilyev@apple.com>
262
263         Web Inspector: Snapshot List scroll bar occludes border of containing view in top-right
264         https://bugs.webkit.org/show_bug.cgi?id=158219
265         <rdar://problem/26545018>
266
267         Reviewed by Timothy Hatcher.
268
269         * UserInterface/Views/TimelineDataGrid.css:
270         (.data-grid.timeline th): Deleted.
271         * UserInterface/Views/TimelineRecordingContentView.css:
272         (.content-view.timeline-recording > .content-browser > .navigation-bar):
273         Make the border line span across the whole navigation bar, not just its table cells.
274
275 2016-05-30  Brian Burg  <bburg@apple.com>
276
277         Web Inspector: Timelines: "-0.000ms" in Self Time
278         https://bugs.webkit.org/show_bug.cgi?id=158162
279         <rdar://problem/26523350>
280
281         Reviewed by Darin Adler.
282
283         Values such as -0.0000 and +0.00001 seem to indicate there is
284         some floating point error accumulating in profile node data.
285         Since the sampling profiler isn't accurate to that precision,
286         let's clean up the data so near-zero numbers are simply zero.
287
288         * UserInterface/Models/ProfileNode.js:
289         Round selfTime down to zero if it's less than the
290         smallest value we would show in the user interface.
291
292 2016-05-30  Brian Burg  <bburg@apple.com>
293
294         Web Inspector: Uncaught exception page should pre-populate the bug's URL with the inspected page URL
295         https://bugs.webkit.org/show_bug.cgi?id=158055
296         <rdar://problem/26516693>
297
298         Reviewed by Saam Barati.
299
300         * UserInterface/Debug/UncaughtExceptionReporter.js:
301         Include the encoded URL in the query string if it is not empty.
302
303 2016-05-30  Matt Baker  <mattbaker@apple.com>
304
305         Web Inspector: Right-clicking in Snapshot's DataGrid throws an exception
306         https://bugs.webkit.org/show_bug.cgi?id=157934
307         <rdar://problem/26380910>
308
309         Reviewed by Brian Burg.
310
311         Check that click event target is actually a cell, as it can be a row
312         when focusing the table after dismissing a popup menu.
313
314         * UserInterface/Views/DataGrid.js:
315         (WebInspector.DataGridNode.prototype.isEventWithinDisclosureTriangle):
316
317 2016-05-27  Joseph Pecoraro  <pecoraro@apple.com>
318
319         Web Inspector: Not all transitively dominated nodes display their retained size
320         https://bugs.webkit.org/show_bug.cgi?id=158174
321
322         Reviewed by Timothy Hatcher.
323
324         * UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
325         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._isDominatedByNonBaseParent):
326         Use the parent reference changing in the loop instead of always using the same parent.
327
328 2016-05-27  Devin Rousso  <dcrousso+webkit@gmail.com>
329
330         Web Inspector: Add indicators to show nesting levels inside DOM Tree
331         https://bugs.webkit.org/show_bug.cgi?id=157468
332         <rdar://problem/26162640>
333
334         Reviewed by Timothy Hatcher.
335
336         Add CSS rules to give all expanded node children lists a small line on the
337         left border indicating that all items under the line are descendants.
338
339         * UserInterface/Views/DOMTreeOutline.css:
340         (.tree-outline.dom li .selection):
341         (.tree-outline.dom li > span):
342         (.tree-outline.dom ol):
343         (.tree-outline.dom .tree-outline.dom li:matches(.hovered, .selected) + ol.children.expanded):
344         (.tree-outline.dom li.selected + ol.children.expanded):
345         (.tree-outline.dom li.parent::before):
346
347 2016-05-26  Matt Baker  <mattbaker@apple.com>
348
349         Uncaught Exception: TypeError: undefined is not an object (evaluating 'records[endIndex].endTime')
350         https://bugs.webkit.org/show_bug.cgi?id=158057
351
352         Reviewed by Timothy Hatcher.
353
354         * UserInterface/Views/TimelineRecordingContentView.js:
355         (WebInspector.TimelineRecordingContentView.prototype._updateTimelineViewTimes):
356         When the entire recording is selected, rendering frames should use the
357         record count as its end time instead of the recording's end time.
358
359 2016-05-25  Joseph Pecoraro  <pecoraro@apple.com>
360
361         Web Inspector: Uncaught Exception: TypeError: undefined is not an object (evaluating 'collectionData.affectedSnapshots')
362         https://bugs.webkit.org/show_bug.cgi?id=158051
363
364         Reviewed by Brian Burg.
365
366         * UserInterface/Workers/HeapSnapshot/HeapSnapshot.js:
367         (HeapSnapshot.prototype.updateDeadNodesAndGatherCollectionData):
368         * UserInterface/Workers/HeapSnapshot/HeapSnapshotWorker.js:
369         (HeapSnapshotWorker.prototype.createSnapshot):
370         If by the time the timeout fires we had cleared our snapshot list, then
371         updateDeadNodesAndGatherCollectionData could bail. Handle gracefully.
372
373 2016-05-23  Nikita Vasilyev  <nvasilyev@apple.com>
374
375         Web Inspector: Split console navigation bar doesn't wrap as expected
376         https://bugs.webkit.org/show_bug.cgi?id=157950
377         <rdar://problem/26395573>
378
379         Reviewed by Timothy Hatcher.
380
381         * UserInterface/Views/Main.css:
382         (#split-content-browser > .navigation-bar .item):
383         Fix the split console and don't touch any other navigation bars.
384
385 2016-05-22  Brady Eidson  <beidson@apple.com>
386
387         Move to C++14.
388         https://bugs.webkit.org/show_bug.cgi?id=157948
389
390         Reviewed by Michael Catanzaro.
391
392         * Configurations/Base.xcconfig:
393
394 2016-05-21  Matt Baker  <mattbaker@apple.com>
395
396         Web Inspector: Creating the CSSStyleDetailsSidebarPanel takes about 50ms (20%) of main load
397         https://bugs.webkit.org/show_bug.cgi?id=156707
398         <rdar://problem/25780404>
399
400         Reviewed by Timothy Hatcher.
401
402         This patch adds new View concepts, `initialLayout` and `widthDidChange`,
403         making it possible for hidden views to postpone the creation of their
404         UI subtree until they are shown for the first time.
405
406         Sidebar panels get this performance improvement by virtue of SidebarPanel
407         and StyleDetailsPanel, which trigger a layout when shown. This can be
408         removed once <https://webkit.org/b/150741> is fixed, and this is done
409         automatically by View.
410
411         * UserInterface/Views/CSSStyleDeclarationTextEditor.js:
412         (WebInspector.CSSStyleDeclarationTextEditor):
413         Should subclass View.
414         (WebInspector.CSSStyleDeclarationTextEditor.prototype.layout):
415         (WebInspector.CSSStyleDeclarationTextEditor.prototype.get element): Deleted.
416         Handled in View base class.
417         (WebInspector.CSSStyleDeclarationTextEditor.prototype.updateLayout): Deleted.
418         Relocate to `layout` override, ignore unused parameter `force`.
419
420         * UserInterface/Views/CSSStyleDetailsSidebarPanel.js:
421         (WebInspector.CSSStyleDetailsSidebarPanel):
422         Create the minimum required initial state and UI elements. Relocate
423         anything that can be lazy loaded to `initialLayout`.
424
425         (WebInspector.CSSStyleDetailsSidebarPanel.prototype.initialLayout):
426         (WebInspector.CSSStyleDetailsSidebarPanel.prototype.sizeDidChange):
427         (WebInspector.CSSStyleDetailsSidebarPanel.prototype.widthDidChange): Deleted.
428
429         * UserInterface/Views/ComputedStyleDetailsPanel.js:
430         (WebInspector.ComputedStyleDetailsPanel):
431         Relocate anything that can be lazy loaded to `initialLayout`.
432         (WebInspector.ComputedStyleDetailsPanel.prototype.initialLayout):
433         (WebInspector.ComputedStyleDetailsPanel.prototype.shown): Deleted.
434         (WebInspector.ComputedStyleDetailsPanel.prototype.widthDidChange): Deleted.
435         Handled in View base class.
436
437         * UserInterface/Views/DataGrid.js:
438         (WebInspector.DataGrid.prototype.layout):
439         Resize logic can be safely moved to `sizeDidChange`, since columns are
440         always initialized when the width changes.
441         (WebInspector.DataGrid.prototype.sizeDidChange):
442         Reposition headers, scrollbars.
443         (WebInspector.DataGrid.prototype._updateHeaderAndScrollbar):
444         Broke out header repositioning, which needs to be called whenever
445         column widths are initialized or the view size changes.
446
447         * UserInterface/Views/NavigationBar.js:
448         (WebInspector.NavigationBar.prototype.layout):
449
450         * UserInterface/Views/RulesStyleDetailsPanel.js:
451         (WebInspector.RulesStyleDetailsPanel.prototype.sizeDidChange):
452         (WebInspector.RulesStyleDetailsPanel.prototype.widthDidChange): Deleted.
453
454         * UserInterface/Views/Sidebar.js:
455         (WebInspector.Sidebar.prototype._recalculateWidth):
456         Width changes need to be coordinated by the View base class, since the
457         initial layout must have occurred before handling a width change.
458         Force a layout with a resize layout reason.
459
460         * UserInterface/Views/SidebarPanel.js:
461         (WebInspector.SidebarPanel.prototype.get displayName):
462         Drive-by style fix: add getter so that CSSStyleDetailsSidebarPanel
463         doesn't have to read the private property directly.
464
465         (WebInspector.SidebarPanel.prototype.shown):
466         Force a layout whenever the panel is shown.
467         (WebInspector.SidebarPanel.prototype.sizeDidChange):
468         (WebInspector.SidebarPanel):
469         (WebInspector.SidebarPanel.prototype.widthDidChange): Deleted.
470
471         * UserInterface/Views/StyleDetailsPanel.js:
472         (WebInspector.StyleDetailsPanel.prototype.shown):
473         Schedule a layout when shown. A forced layout isn't necessary.
474         Unlike SidebarPanels, the initial state of style panels doesn't depend
475         on its layout, and can be safely initialized by the next rAF.
476
477         (WebInspector.StyleDetailsPanel.prototype.hidden):
478         Cancel a pending layout if the panel is hidden before the next AF.
479         (WebInspector.StyleDetailsPanel.prototype.widthDidChange): Deleted.
480         Not needed, defined in View base class.
481
482         * UserInterface/Views/TimelineOverview.js:
483         (WebInspector.TimelineOverview.prototype.sizeDidChange):
484         (WebInspector.TimelineOverview.prototype.layout):
485         Moved resize logic to `sizeDidChange`.
486
487         * UserInterface/Views/TimelineRuler.js:
488         (WebInspector.TimelineRuler.prototype.sizeDidChange):
489         (WebInspector.TimelineRuler.prototype.layout):
490         Moved resize logic to `sizeDidChange`.
491
492         * UserInterface/Views/View.js:
493         (WebInspector.View):
494         (WebInspector.View.prototype.updateLayout):
495         (WebInspector.View.prototype.cancelLayout):
496         Allow a pending layout to be canceled. Useful when a view with a
497         pending layout is hidden before the layout occurs.
498
499         (WebInspector.View.prototype.get layoutReason):
500         Protected getter for subclasses that need to check the layout reason
501         outside `sizeDidChange`.
502
503         (WebInspector.View.prototype.initialLayout):
504         Subclass hook to create UI subtree the first time a layout occurs.
505         Called only once during the lifetime of the View.
506
507         (WebInspector.View.prototype.layout):
508         Drive-by comment fix.
509         (WebInspector.View.prototype.sizeDidChange):
510         New layout cycle hook for subclasses.
511         (WebInspector.View.prototype._layoutSubtree):
512         Do an initial layout the first time layout is called.
513         Call the `sizeDidChange` hook so that subclasses can update state
514         which depends on size/position before doing layout.
515
516         * UserInterface/Views/VisualStyleDetailsPanel.js:
517         (WebInspector.VisualStyleDetailsPanel):
518         Create the minimum required initial state and UI elements. Relocate
519         anything that can be lazy loaded to `initialLayout`.
520
521         (WebInspector.VisualStyleDetailsPanel.prototype.refresh):
522         No changes, shifting line numbers confused the diff.
523         (WebInspector.VisualStyleDetailsPanel.prototype.initialLayout):
524         (WebInspector.VisualStyleDetailsPanel.prototype.sizeDidChange):
525         (WebInspector.VisualStyleDetailsPanel.prototype.widthDidChange): Deleted.
526
527 2016-05-21  Matt Baker  <mattbaker@apple.com>
528
529         Assertion Failed: StyleDetailsPanel.markAsNeedsRefresh() called with null domNode
530         https://bugs.webkit.org/show_bug.cgi?id=157955
531         <rdar://problem/26398943>
532
533         Reviewed by Timothy Hatcher.
534
535         CSSStyleDetailsSidebarPanel `visible` is true while the panel is being
536         removed from the details sidebar, even after calling `hidden()`. This
537         causes it to refresh its current StyleDetailsPanel with a null DOM node.
538
539         Unfortunately, SidebarPanel.visible isn't toggled by calling shown/hidden.
540         Since SidebarPanel.visible is only true if the panel is selected, we should
541         deselect panels before removing them.
542
543         * UserInterface/Views/Sidebar.js:
544         (WebInspector.Sidebar.prototype.removeSidebarPanel):
545         Deselect the panel being removed before calling visibiltyDidChange.
546
547         * UserInterface/Views/SidebarPanel.js:
548         (WebInspector.SidebarPanel.prototype.toggle): Deleted.
549         (WebInspector.SidebarPanel.prototype.willRemove): Deleted.
550         Drive-by update to remove some unused methods.
551
552 2016-05-20  Joseph Pecoraro  <pecoraro@apple.com>
553
554         REGRESSION(r200740): Web Inspector: TimelineRecordBar class lists not properly cleared, bleeding colors when zooming in and out
555         https://bugs.webkit.org/show_bug.cgi?id=157959
556         <rdar://problem/26393067>
557
558         Reviewed by Brian Burg.
559
560         * UserInterface/Views/TimelineRecordBar.js:
561         (WebInspector.TimelineRecordBar.prototype.set records):
562         When records are cleared, clear all classes.
563
564 2016-05-20  Nikita Vasilyev  <nvasilyev@apple.com>
565
566         Web Inspector: Split Console is auto opening all the time when using Inspect Element context menu
567         https://bugs.webkit.org/show_bug.cgi?id=157910
568         <rdar://problem/26374066>
569
570         Reviewed by Timothy Hatcher.
571
572         Currently, "synthetic" property is only used to decide whether adding a console message should
573         open the console or not. Replace it with "shouldRevealConsole".
574
575         * UserInterface/Controllers/DOMTreeManager.js:
576         (WebInspector.DOMTreeManager.prototype.inspectNodeObject.nodeAvailable):
577         (WebInspector.DOMTreeManager.prototype.inspectNodeObject):
578         * UserInterface/Controllers/JavaScriptLogViewController.js:
579         (WebInspector.JavaScriptLogViewController.prototype.appendImmediateExecutionWithResult.saveResultCallback):
580         (WebInspector.JavaScriptLogViewController.prototype.appendImmediateExecutionWithResult):
581         (WebInspector.JavaScriptLogViewController.prototype.consolePromptTextCommitted.printResult):
582         (WebInspector.JavaScriptLogViewController.prototype.consolePromptTextCommitted):
583         (WebInspector.JavaScriptLogViewController.prototype._appendConsoleMessageView):
584         * UserInterface/Models/ConsoleCommandResultMessage.js:
585         (WebInspector.ConsoleCommandResultMessage):
586         (WebInspector.ConsoleCommandResultMessage.prototype.get shouldRevealConsole):
587         (WebInspector.ConsoleCommandResultMessage.prototype.get synthetic): Deleted.
588         * UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
589         (WebInspector.HeapSnapshotInstanceDataGridNode.logHeapSnapshotNode.node.shortestGCRootPath.):
590         (WebInspector.HeapSnapshotInstanceDataGridNode.logHeapSnapshotNode):
591
592 2016-05-19  Joseph Pecoraro  <pecoraro@apple.com>
593
594         Web Inspector: Can't resume Debugger after breaking on exception in Promise
595         https://bugs.webkit.org/show_bug.cgi?id=157240
596         <rdar://problem/26030890>
597
598         Reviewed by Timothy Hatcher.
599
600         If we pause but have no source code to show we paused in purely internal
601         code. In such cases we were attempting to resume without actually
602         telling the backend to resume, so the backend and frontend were out of
603         sync. The frontend thinking it is "paused" without an activeCallFrame
604         and the backend actually being paused.
605
606         This change more gracefully handles this situation. It actually resumes
607         both the frontend and the backend.
608
609         * UserInterface/Controllers/DebuggerManager.js:
610         (WebInspector.DebuggerManager.prototype.debuggerDidPause):
611         Resume the backend and the frontend.
612
613         (WebInspector.DebuggerManager.prototype._didResumeInternal):
614         Don't look at the active call frame, look at the paused state.
615         This may issue a Resumed event without actually triggering a
616         Paused event if this was the only pause, but that is harmless.
617
618 2016-05-19  Joseph Pecoraro  <pecoraro@apple.com>
619
620         Web Inspector: Main Resource with <scripts> not showing up in debugger sidebar after reload
621         https://bugs.webkit.org/show_bug.cgi?id=157939
622         <rdar://problem/26385691>
623
624         Reviewed by Timothy Hatcher.
625
626         The order of events on a reload are:
627
628             - MainResourceChanged, add main resource
629             - ScriptsCleared, remove all elements
630
631         This change makes it so ScriptsCleared add the main resource (and
632         potentially other resources). This also avoids the work in
633         MainResourceChanged on reloads / navigations that would be wasted if
634         ScriptsCleared were to just remove it. However, this is still needed
635         for initial load where ScriptsCleared does not happen.
636
637         * UserInterface/Views/DebuggerSidebarPanel.js:
638         (WebInspector.DebuggerSidebarPanel.prototype._mainResourceDidChange):
639         Only add the main resource tree here when we are first loading.
640
641         (WebInspector.DebuggerSidebarPanel.prototype._scriptsCleared):
642         Add the main resource tree after we remove all children in navigations.
643
644         * UserInterface/Views/NavigationSidebarPanel.js:
645         (WebInspector.NavigationSidebarPanel.prototype._contentTreeOutlineTreeSelectionDidChange):
646         This was not gracefully handling if there was no selected tree element.
647
648 2016-05-19  Joseph Pecoraro  <pecoraro@apple.com>
649
650         Web Inspector: Visual Style connectors are not always centered properly
651         https://bugs.webkit.org/show_bug.cgi?id=157932
652
653         Reviewed by Timothy Hatcher.
654
655         * UserInterface/Views/VisualStylePropertyEditorLink.css:
656         (.visual-style-property-editor-link):
657         Remove the 1px margin on @2x that would cause jitter at different
658         sidebar widths. It is however needed on @1x.
659
660         (.visual-style-property-editor-link:not(.link-all)):
661         Make the height 20 so these both move closer to the center of the
662         <select> elements they are next to. They are not perfectly centered
663         as that would require a half pixel.
664
665         (.visual-style-property-editor-link.link-vertical):
666         Move the top line up a pixel so it is "up 0.5" from center and
667         the bottom one is already "down 0.5" from the center.
668
669 2016-05-19  Nikita Vasilyev  <nvasilyev@apple.com>
670
671         REGRESSION (r189385): Web Inspector: CSS properties modified via JS don't update in the Styles sidebar
672         https://bugs.webkit.org/show_bug.cgi?id=157918
673
674         Reviewed by Timothy Hatcher.
675
676         * UserInterface/Controllers/DOMTreeManager.js:
677         (WebInspector.DOMTreeManager):
678         (WebInspector.DOMTreeManager.prototype._inlineStyleInvalidated):
679         (WebInspector.DOMTreeManager.prototype._loadNodeAttributes):
680         Set the initial value of _loadNodeAttributesTimeout to be 0,
681         as setTimeout always returns a positive integer.
682
683 2016-05-19  Joseph Pecoraro  <pecoraro@apple.com>
684
685         Web Inspector: Heap Snapshots taken before timeline view has a zero time do not get shown
686         https://bugs.webkit.org/show_bug.cgi?id=157923
687         <rdar://problem/26377366>
688
689         Reviewed by Timothy Hatcher.
690
691         * UserInterface/Views/HeapAllocationsTimelineDataGridNode.js:
692         (WebInspector.HeapAllocationsTimelineDataGridNode):
693         (WebInspector.HeapAllocationsTimelineDataGridNode.prototype.createCellContent):
694         (WebInspector.HeapAllocationsTimelineDataGridNode.prototype.updateTimestamp):
695         Show emDash for the timestamp if we don't yet have a zero time.
696         Update when we get a zero time.
697
698         * UserInterface/Views/HeapAllocationsTimelineView.js:
699         (WebInspector.HeapAllocationsTimelineView):
700         (WebInspector.HeapAllocationsTimelineView.prototype.layout):
701         (WebInspector.HeapAllocationsTimelineView.prototype.reset):
702         Save a list of nodes pre-zero time and update them when we get a zero time.
703
704 2016-05-19  Joseph Pecoraro  <pecoraro@apple.com>
705
706         Web Inspector: HeapSnapshot Instances view should remove dead objects
707         https://bugs.webkit.org/show_bug.cgi?id=157920
708         <rdar://problem/26375866>
709
710         Reviewed by Timothy Hatcher.
711
712         * UserInterface/Workers/HeapSnapshot/HeapSnapshotWorker.js:
713         (HeapSnapshotWorker):
714         (HeapSnapshotWorker.prototype.clearSnapshots):
715         (HeapSnapshotWorker.prototype.createSnapshot):
716         Preserve a list of snapshots for this page's session. When
717         new snapshots come in we can determine which nodes have died
718         and update previous snapshots. Emit a CollectionEvent
719         containing the nodes that were deleted and affected snapshots.
720
721         * UserInterface/Workers/HeapSnapshot/HeapSnapshot.js:
722         (HeapSnapshot):
723         Stash the largest node identifier.
724         Create a byte-per-node list to mark it as dead or alive.
725         All snapshots start with all live nodes.
726
727         (HeapSnapshot.prototype.updateDeadNodesAndGatherCollectionData):
728         (HeapSnapshot.prototype._markDeadNodes):
729         When we get a new snapshot we can mark dead nodes in previous
730         snapshots. Determine the nodeIdentifiers of dead nodes, and
731         mark them as dead if they existed in previous snapshots.
732
733         (HeapSnapshot.buildCategories):
734         (HeapSnapshot.prototype.updateCategories):
735         (HeapSnapshotDiff.prototype.updateCategories):
736         Include a "deadCount" in category data. And provide a method
737         to return an updated category list.
738
739         (HeapSnapshot.prototype.serializeNode):
740         Include a "dead" property on nodes when they are first fetched.
741
742         * UserInterface/Proxies/HeapSnapshotDiffProxy.js:
743         (WebInspector.HeapSnapshotDiffProxy.prototype.updateForCollectionEvent):
744         (WebInspector.HeapSnapshotDiffProxy.prototype.updateCategories):
745         * UserInterface/Proxies/HeapSnapshotNodeProxy.js:
746         (WebInspector.HeapSnapshotNodeProxy):
747         (WebInspector.HeapSnapshotNodeProxy.deserialize):
748         * UserInterface/Proxies/HeapSnapshotProxy.js:
749         (WebInspector.HeapSnapshotProxy.prototype.updateForCollectionEvent):
750         (WebInspector.HeapSnapshotProxy.prototype.updateCategories):
751         Update snapshot proxies from a collection event by updating properties
752         and dispatching an event from the model object.
753
754         * UserInterface/Proxies/HeapSnapshotWorkerProxy.js:
755         (WebInspector.HeapSnapshotWorkerProxy):
756         (WebInspector.HeapSnapshotWorkerProxy.prototype.clearSnapshots):
757         (WebInspector.HeapSnapshotWorkerProxy.prototype._mainResourceDidChange):
758         Clear the session snapshot list when the main resource changes.
759         However we can't yet clear the HeapSnapshot objects on the worker
760         because we may still have UI that interact with them.
761
762         * UserInterface/Views/HeapAllocationsTimelineView.js:
763         (WebInspector.HeapAllocationsTimelineView):
764         (WebInspector.HeapAllocationsTimelineView.prototype.closed):
765         Register and unregister for HeapSnapshot collection events.
766
767         (WebInspector.HeapAllocationsTimelineView.prototype._heapSnapshotCollectionEvent.updateHeapSnapshotForEvent):
768         (WebInspector.HeapAllocationsTimelineView.prototype._heapSnapshotCollectionEvent):
769         Update all the snapshots we know about when a collection event happens.
770
771         * UserInterface/Views/HeapSnapshotClassDataGridNode.js:
772         (WebInspector.HeapSnapshotClassDataGridNode.prototype.removeCollectedNodes):
773         (WebInspector.HeapSnapshotClassDataGridNode.prototype.updateCount):
774         (WebInspector.HeapSnapshotClassDataGridNode.prototype._populate):
775         (WebInspector.HeapSnapshotClassDataGridNode.prototype._fetchBatch):
776         * UserInterface/Views/HeapSnapshotContentView.js:
777         (WebInspector.HeapSnapshotContentView.prototype._heapSnapshotDataGridTreeDidPopulate):
778         (WebInspector.HeapSnapshotContentView):
779         * UserInterface/Views/HeapSnapshotDataGridTree.js:
780         (WebInspector.HeapSnapshotDataGridTree):
781         (WebInspector.HeapSnapshotDataGridTree.prototype.removeChild):
782         (WebInspector.HeapSnapshotDataGridTree.prototype.removeCollectedNodes):
783         (WebInspector.HeapSnapshotDataGridTree.prototype._heapSnapshotCollectedNodes):
784         (WebInspector.HeapSnapshotInstancesDataGridTree.prototype.populateTopLevel):
785         (WebInspector.HeapSnapshotInstancesDataGridTree.prototype.removeCollectedNodes):
786         (WebInspector.HeapSnapshotInstancesDataGridTree):
787         Update the Instances DataGridTree UI when a collection event happens.
788         Remove any top level InstanceDataGridNodes that may be showing for collected nodes.
789         Update the category counts on the ClassDataGridNodes.
790         Update FetchMoreDataGridNodes to have updated counts (and replace removed nodes).
791
792 2016-05-19  Timothy Hatcher  <timothy@apple.com>
793
794         Web Inspector: REGRESSION: Search magnifying glass shifted in Search tab input field
795         https://bugs.webkit.org/show_bug.cgi?id=157913
796         rdar://problem/26374424
797
798         Reviewed by Joseph Pecoraro.
799
800         * UserInterface/Views/SearchSidebarPanel.css:
801         (.sidebar > .panel.navigation.search > .search-bar > input[type="search"]): Removed padding-left.
802         (.sidebar > .panel.navigation.search > .search-bar > input[type="search"]::-webkit-search-results-button):
803         Added. Add margin-right here instead.
804
805 2016-05-19  Timothy Hatcher  <timothy@apple.com>
806
807         Web Inspector: Timelines "Edit" button should be right-aligned
808         https://bugs.webkit.org/show_bug.cgi?id=157909
809         rdar://problem/26373969
810
811         Reviewed by Joseph Pecoraro.
812
813         * UserInterface/Views/ButtonNavigationItem.css:
814         (.navigation-bar .item.button.text-only): Deleted height: auto. Now inherited.
815         * UserInterface/Views/NavigationBar.css:
816         (.navigation-bar .item): Change height to auto to support any NavigationBar height.
817         This is needed since the Timelines tab has a shorter NavigationBar height, and
818         flexible items were overflowing.
819         * UserInterface/Views/TextNavigationItem.css:
820         (.navigation-bar .item.text): Deleted height: auto. Now inherited.
821         * UserInterface/Views/TimelineOverview.js:
822         (WebInspector.TimelineOverview): Add a FlexibleSpaceNavigationItem before the Edit button.
823
824 2016-05-19  Brian Burg  <bburg@apple.com>
825
826         Web Inspector: timelines should not update via requestAnimationFrame unless Web Inspector is visible
827         https://bugs.webkit.org/show_bug.cgi?id=157897
828         <rdar://problem/26330802>
829
830         Reviewed by Timothy Hatcher.
831
832         The timelines overview tries to animate using requestAnimationFrame, even if the
833         inspector frontend is not really visible. When it does this, requestAnimationFrame
834         simply stalls out until the inspector becomes visible. If a recording is started
835         while the inspector is not visible, then when it is shown again, the timeline will
836         start to animate from 0s instead of the current time. This happens because the
837         requestAnimationFrame was requested when the current time actually was 0, and it
838         finally executes some time later, when the current time is no longer accurate.
839         Since the timelines animate by calculating time elapsed since the previous frame
840         rather than using event timestamps, there is no way for the timelines to skip forward
841         in their animations in scenarios where the current time becomes arbitrarily skewed.
842
843         To fix this, consider the visibility state of the frontend as reported by the UIProcess.
844         Fire a global notification when visibility state changes, and start or stop updating
845         the current time as the frontend becomes visible or not shown.
846
847         This does not affect most other uses of requestAnimationFrame, which are used as
848         timers to call updateLayout at an appropriate time. The timelines case is different
849         because the current time is fixed prior to requesting an animation frame, and
850         later animation frames are only triggered by earlier requests, so there's nothing to
851         coalesce.
852
853         * UserInterface/Base/Main.js:
854         (WebInspector.loaded): Initialize WebInspector.visible.
855
856         * UserInterface/Base/Object.js: Add new event.
857
858         * UserInterface/Protocol/InspectorFrontendAPI.js:
859         (InspectorFrontendAPI.setIsVisible): Added.
860
861         * UserInterface/Test/Test.js:
862         (WebInspector.updateVisibilityState): Add a stub.
863
864         * UserInterface/Views/TimelineRecordingContentView.js:
865         (WebInspector.TimelineRecordingContentView):
866         (WebInspector.TimelineRecordingContentView.prototype._inspectorVisibilityStateChanged):
867         If visibility state changes while capturing, then start or stop updating the
868         current time as appropriate. Otherwise, refresh the timelines with updated
869         times so that they know about the recording's updated start/current/end time.
870
871         (WebInspector.TimelineRecordingContentView.prototype._startUpdatingCurrentTime):
872         Bail out if the Web Inspector frontend is not visible to the user and won't be
873         able to service requestAnimationFrames immediately.
874
875 2016-05-18  Timothy Hatcher  <timothy@apple.com>
876
877         Web Inspector: Classes toggle wraps in some localizations
878         https://bugs.webkit.org/show_bug.cgi?id=157878
879         rdar://problem/26108859
880
881         Reviewed by Brian Burg.
882
883         * UserInterface/Views/CSSStyleDetailsSidebarPanel.css:
884         (.sidebar > .panel.details.css-style > .content ~ .options-container > .toggle-class-toggle):
885         Add white-space: nowrap.
886
887 2016-05-18  Matt Baker  <mattbaker@apple.com>
888
889         Web Inspector: unable to switch between navigation tree outlines using up/down arrow keys
890         https://bugs.webkit.org/show_bug.cgi?id=157713
891         <rdar://problem/26287086>
892
893         Reviewed by Timothy Hatcher.
894
895         * UserInterface/Views/NavigationSidebarPanel.js:
896         (WebInspector.NavigationSidebarPanel.prototype.createContentTreeOutline):
897         Listen for TreeOutline focus changes, and associate trees and their DOM
898         elements for quick lookup when handling focus events.
899
900         (WebInspector.NavigationSidebarPanel.prototype._contentTreeOutlineDidFocus):
901         (WebInspector.NavigationSidebarPanel.prototype._contentTreeOutlineTreeSelectionDidChange):
902         When selecting a tree element causes an element in a different tree outline
903         to be deselected, remember the old selection so that it can be restored
904         the next time the tree outline get the focus.
905
906 2016-05-18  Matt Baker  <mattbaker@apple.com>
907
908         Web Inspector: Checkbox disappears when unchecking CSS property with value containing a semicolon
909         https://bugs.webkit.org/show_bug.cgi?id=157862
910         <rdar://problem/16214480>
911
912         Reviewed by Timothy Hatcher.
913
914         * UserInterface/Views/CSSStyleDeclarationTextEditor.js:
915         (WebInspector.CSSStyleDeclarationTextEditor.prototype._createCommentedCheckboxMarker):
916         Modify regex to match CSS properties with url() and quoted values,
917         which can contain semicolons.
918
919 2016-05-18  Nikita Vasilyev  <nvasilyev@apple.com>
920
921         Web Inspector: ugly gaps in Call Trees data grid when expanding more than one level
922         https://bugs.webkit.org/show_bug.cgi?id=157829
923         <rdar://problem/26339922>
924
925         Reviewed by Timothy Hatcher.
926
927         Make a more specific CSS selector to avoid style conflicts.
928
929         * UserInterface/Views/DataGrid.css:
930         (.data-grid:not(.variable-height-rows) > .data-container > table.data > tbody > tr > td > div): Deleted.
931         (.data-grid:not(.variable-height-rows) > .data-container > table.data > tbody > tr > td > .cell-content):
932         * UserInterface/Views/DataGrid.js:
933         (WebInspector.DataGridNode.prototype.createCell):
934
935 2016-05-18  Brian Burg  <bburg@apple.com>
936
937         Web Inspector: InspectorFrontendAPI.setTimelineProfilingEnabled should not implicitly show Timelines tab
938         https://bugs.webkit.org/show_bug.cgi?id=157846
939
940         Reviewed by Timothy Hatcher.
941
942         Currently, if the Web Inspector opens for an in-progress or finished automation session,
943         it will always show the Timelines tab, disregarding any previous user view state. This
944         is annoying and is a bad user experience when trying to debug the same test repeatedly.
945
946         * UserInterface/Protocol/InspectorFrontendAPI.js:
947         (InspectorFrontendAPI.setTimelineProfilingEnabled): Don't implicitly show Timelines tab.
948         (InspectorFrontendAPI.showTimelines): Added. This is called explicitly when desired.
949
950 2016-05-18  Brian Burg  <bburg@apple.com>
951
952         Web Inspector: DebuggerSidebarPanel doesn't need to help manage temporarily disabling breakpoints while capturing
953         https://bugs.webkit.org/show_bug.cgi?id=157854
954
955         Reviewed by Timothy Hatcher.
956
957         Duplicate the event listeners in DebuggerManager and move non-view-related
958         state updates out of DebuggerSidebarPanel's listeners into DebuggerManager's listeners.
959         This allows a test to exercise the temporary-disablement code paths during capturing.
960
961         * UserInterface/Controllers/DebuggerManager.js:
962         (WebInspector.DebuggerManager.prototype.get breakpointsDisabledTemporarily):
963         Use this to make the code a bit more readable.
964
965         (WebInspector.DebuggerManager.prototype._startDisablingBreakpointsTemporarily):
966         (WebInspector.DebuggerManager.prototype._stopDisablingBreakpointsTemporarily):
967         (WebInspector.DebuggerManager.prototype.startDisablingBreakpointsTemporarily): Deleted.
968         (WebInspector.DebuggerManager.prototype.stopDisablingBreakpointsTemporarily): Deleted.
969         Make this private since it's not used by other classes anymore.
970
971         (WebInspector.DebuggerManager.prototype._timelineCapturingWillStart): Added.
972         (WebInspector.DebuggerManager.prototype._timelineCapturingStopped): Added.
973
974         * UserInterface/Views/DebuggerSidebarPanel.js:
975         (WebInspector.DebuggerSidebarPanel.prototype._timelineRecordingWillStart): Deleted.
976         (WebInspector.DebuggerSidebarPanel.prototype._timelineRecordingStopped): Deleted.
977         (WebInspector.DebuggerSidebarPanel.prototype._timelineCapturingWillStart): Added.
978         (WebInspector.DebuggerSidebarPanel.prototype._timelineCapturingStopped): Added.
979         Make the listener names consistent with TimelineManager: timelineCapturing{WillStart,Stopped}.
980
981 2016-05-18  Joseph Pecoraro  <pecoraro@apple.com>
982
983         Web Inspector: Improve console.takeHeapSnapshot documentation in console
984         https://bugs.webkit.org/show_bug.cgi?id=157853
985
986         Reviewed by Timothy Hatcher.
987
988         * UserInterface/Models/NativeFunctionParameters.js:
989         Mention optional label argument.
990
991 2016-05-18  Brian Burg  <bburg@apple.com>
992
993         Web Inspector: race between frontend and backend both starting timeline recordings causes console assert
994         https://bugs.webkit.org/show_bug.cgi?id=157850
995         <rdar://problem/26349229>
996
997         Reviewed by Joseph Pecoraro.
998
999         If TimelineManager has created a fresh recording and the Timeline.autoCaptureStarted
1000         event comes before Timeline.recordingStarted, then the manager will try to start the
1001         same recording twice. In this scenario, the manager should just wait until the
1002         Timeline.recordingStarted event comes, since it causes TimelineMangare to set up
1003         the isCapturing flag and other state.
1004
1005         * UserInterface/Controllers/TimelineManager.js:
1006         (WebInspector.TimelineManager):
1007         (WebInspector.TimelineManager.prototype.startCapturing):
1008         (WebInspector.TimelineManager.prototype.capturingStarted):
1009         (WebInspector.TimelineManager.prototype.autoCaptureStarted):
1010         Add a new flag, this._waitingForCapturingStartedEvent. If true, don't start the
1011         recording in response to this event.
1012
1013 2016-05-18  Matt Baker  <mattbaker@apple.com>
1014
1015         Web Inspector: REGRESSION(r197488): Incorrect start time in Rendering Frames timeline grid
1016         https://bugs.webkit.org/show_bug.cgi?id=157840
1017         <rdar://problem/26344937>
1018
1019         Reviewed by Brian Burg.
1020
1021         * UserInterface/Views/TimelineRecordingContentView.js:
1022         (WebInspector.TimelineRecordingContentView.prototype._updateTimes):
1023         The Rendering Frames timeline view needs a valid zero time.
1024         (WebInspector.TimelineRecordingContentView.prototype._timeRangeSelectionChanged):
1025         Adjust ruler selection path component values by the zero time unless
1026         the current view is the Rendering Frames timeline view.
1027
1028 2016-05-17  Matt Baker  <mattbaker@apple.com>
1029
1030         Web Inspector: NavigationSidebarPanel should coordinate item selection between its tree outlines
1031         https://bugs.webkit.org/show_bug.cgi?id=157813
1032         <rdar://problem/26331779>
1033
1034         Reviewed by Timothy Hatcher.
1035
1036         * UserInterface/Views/DebuggerSidebarPanel.js:
1037         (WebInspector.DebuggerSidebarPanel.prototype._treeSelectionDidChange):
1038         Deselecting elements in other tree outlines is now done in the base class.
1039
1040         * UserInterface/Views/NavigationSidebarPanel.js:
1041         (WebInspector.NavigationSidebarPanel.prototype.createContentTreeOutline):
1042         Listen for selection changed events on all content tree outlines.
1043         (WebInspector.NavigationSidebarPanel.prototype.treeElementAddedOrChanged):
1044         Moved stub from the public section to the protected section.
1045         (WebInspector.NavigationSidebarPanel.prototype._contentTreeOutlineTreeSelectionDidChange):
1046         Deselect tree elements in any content tree outline that is not the
1047         parent of the selected element.
1048
1049         (WebInspector.NavigationSidebarPanel.prototype._treeSelectionDidChange): Deleted.
1050         Rename _contentTreeOutlineTreeSelectionDidChange, to prevent being
1051         shadowed by subclasses with _treeSelectionDidChange event handlers.
1052
1053 2016-05-17  Matt Baker  <mattbaker@apple.com>
1054
1055         Web Inspector: Remove TimelineSidebarPanel.js as it's no longer referenced anywhere
1056         https://bugs.webkit.org/show_bug.cgi?id=157819
1057
1058         Reviewed by Timothy Hatcher.
1059
1060         * UserInterface/Views/TimelineSidebarPanel.js: Removed.
1061         Removed unused file.
1062
1063 2016-05-17  Brian Burg  <bburg@apple.com>
1064
1065         Web Inspector: inspector tests should redirect and log console.trace() calls in test output
1066         https://bugs.webkit.org/show_bug.cgi?id=157802
1067         <rdar://problem/26325671>
1068
1069         Reviewed by Timothy Hatcher.
1070
1071         * UserInterface/Test/FrontendTestHarness.js:
1072         (FrontendTestHarness.prototype.redirectConsoleToTestOutput.createProxyConsoleHandler):
1073         Remove bind() that is now unnecessary. Also redirect console.warn.
1074
1075         (FrontendTestHarness.prototype.redirectConsoleToTestOutput):
1076         For console.trace(), throw and catch a dummy Error to get a stack trace.
1077         Do some post processing on it to remove useless frames and sanitize file paths.
1078
1079 2016-05-17  Brian Burg  <bburg@apple.com>
1080
1081         Web Inspector: Filtering huge data grids should yield occasionally so the UI remains responsive
1082         https://bugs.webkit.org/show_bug.cgi?id=157702
1083         <rdar://problem/26282898>
1084
1085         Based on a patch by Matt Baker <mattbaker@apple.com> on 2016-05-16
1086         Reviewed by Timothy Hatcher.
1087
1088         This patch adds a new class, YieldableTask, for processing large
1089         data sets without starving the runloop. A yieldable task takes a delegate,
1090         an iterator that produces the items to be processed by the delegate, and
1091         the "work interval" time slice and "idle interval" to wait between time slices.
1092         It works by using `yield` to suspend processing when the current time
1093         slice is exceeded, and setting a timeout to wait out the idle interval.
1094
1095         The iterator is responsible for deciding a good traversal order for items,
1096         and the delegate is responsible for processing each item in turn. Tasks
1097         cannot be reused once cancelled or processing completes.
1098
1099         Change DataGrid to use a yieldable task for filtering data grid nodes.
1100         When the filtering criteria changes, cancel the task and run a new task.
1101
1102         * UserInterface/Base/YieldableTask.js: Added.
1103         (WebInspector.YieldableTask.prototype.get processing):
1104         (WebInspector.YieldableTask.prototype.get cancelled):
1105         (WebInspector.YieldableTask.prototype.get idleInterval):
1106         (WebInspector.YieldableTask.prototype.get workInterval):
1107         Add getters.
1108
1109         (WebInspector.YieldableTask.prototype.start.createIteratorForProcessingItems):
1110         (WebInspector.YieldableTask.prototype.start):
1111         Set up an iterator that cranks through items to be processed until the
1112         time slice is exceeded. Check to see if the task is cancelled before and
1113         after calling out to the delegate to perform processing on the item.
1114
1115         (WebInspector.YieldableTask.prototype.cancel):
1116         Set the cancel flag. Tell the delegate the task is finished soon.
1117
1118         (WebInspector.YieldableTask.prototype._processPendingItems):
1119         Request the next item from the cranking iterator so it tries to process
1120         more items. If it yields but still has more items to process, set a timeout
1121         and continue processing more items after the idle interval.
1122
1123         (WebInspector.YieldableTask.prototype._willYield): Notify the delegate.
1124         (WebInspector.YieldableTask.prototype._didFinish): Clear state and notify.
1125         (WebInspector.YieldableTask):
1126
1127         * UserInterface/Main.html:
1128         * UserInterface/Test.html: Add new file.
1129
1130         * UserInterface/Views/DataGrid.js:
1131         (WebInspector.DataGrid):
1132         (WebInspector.DataGrid.prototype.filterDidChange):
1133         Cancel the currently running filter task, if any exists.
1134
1135         (WebInspector.DataGrid.prototype._updateFilter.createIteratorForNodesToBeFiltered):
1136         (WebInspector.DataGrid.prototype._updateFilter):
1137         Set up and start a new filtering task when the filter updates.
1138
1139         (WebInspector.DataGrid.prototype.yieldableTaskWillProcessItem):
1140         (WebInspector.DataGrid.prototype.yieldableTaskDidYield):
1141         (WebInspector.DataGrid.prototype.yieldableTaskDidFinish):
1142         Batch up notifications about filtered nodes changing since this can
1143         cause a lot of unnecessary work by event listeners.
1144
1145 2016-05-17  Brian Burg  <bburg@apple.com>
1146
1147         Web Inspector: breakpoints in sourceURL named scripts are not persisted
1148         https://bugs.webkit.org/show_bug.cgi?id=157714
1149         <rdar://problem/26287099>
1150
1151         Reviewed by Joseph Pecoraro.
1152
1153         The Inspector frontend doesn't try to persist a breakpoint that
1154         lacks a URL, even if the breakpoint has a sourceURL. Similarly, for
1155         breakpoints without a URL, the frontend asks the backend to create
1156         the breakpoint for a specific script identifier rather than a
1157         URL-based breakpoint. This prevents breakpoints in injected scripts
1158         from being resolved if the page is reloaded.
1159
1160         The Inspector backend knows how to resolve URL-based breakpoints
1161         by matching against the script's URL or sourceURL, so we just need
1162         to teach the frontend when either is appropriate to use.
1163
1164         This patch adds SourceCode.contentIdentifier, which is roughly
1165         `url || sourceURL` for content that is not emphemeral, such as
1166         console evaluations. Change breakpoint and debugger code to use
1167         `contentIdentifier` rather than `url`, and pass contentIdentifier
1168         to the backend when setting a breakpoint by URL.
1169
1170         * UserInterface/Controllers/DebuggerManager.js:
1171         (WebInspector.DebuggerManager.prototype.breakpointsForSourceCode):
1172         (WebInspector.DebuggerManager.prototype.scriptsForURL):
1173         (WebInspector.DebuggerManager.prototype.get searchableScripts):
1174         (WebInspector.DebuggerManager.prototype.removeBreakpoint):
1175         (WebInspector.DebuggerManager.prototype.reset):
1176         (WebInspector.DebuggerManager.prototype.scriptDidParse):
1177         (WebInspector.DebuggerManager.prototype._setBreakpoint):
1178         (WebInspector.DebuggerManager.prototype._saveBreakpoints):
1179         (WebInspector.DebuggerManager.prototype._associateBreakpointsWithSourceCode):
1180
1181         * UserInterface/Models/Breakpoint.js:
1182         (WebInspector.Breakpoint):
1183         (WebInspector.Breakpoint.prototype.get contentIdentifier):
1184         (WebInspector.Breakpoint.prototype.get info):
1185         (WebInspector.Breakpoint.prototype.saveIdentityToCookie):
1186         (WebInspector.Breakpoint.prototype.get url): Deleted.
1187         Replace uses of Breakpoint.prototype.get url with
1188         contentIdentifier inside the class and at all callsites.
1189
1190         * UserInterface/Models/Script.js:
1191         (WebInspector.Script.prototype.get contentIdentifier):
1192         Added. Use the URL, or the sourceURL unless the script is
1193         ephemeral and only run once, like as a console evaluation.
1194
1195         * UserInterface/Models/SourceCode.js:
1196         (WebInspector.SourceCode.prototype.get url): Added.
1197         All subclasses already override this getter. Add it here so that
1198         the default implementation of contentIdentifier can use it.
1199
1200         (WebInspector.SourceCode.prototype.get contentIdentifier): Added.
1201
1202         * UserInterface/Views/BreakpointTreeElement.js:
1203         (WebInspector.BreakpointTreeElement.prototype.get filterableData):
1204         * UserInterface/Views/ProbeSetDetailsSection.js:
1205         (WebInspector.ProbeSetDetailsSection.prototype._updateLinkElement):
1206         * UserInterface/Views/SourceCodeTextEditor.js:
1207         (WebInspector.SourceCodeTextEditor.prototype._matchesBreakpoint):
1208         * UserInterface/Views/TextResourceContentView.js:
1209         (WebInspector.TextResourceContentView.prototype.get supplementalRepresentedObjects):
1210
1211 2016-05-16  Joseph Pecoraro  <pecoraro@apple.com>
1212
1213         Uncaught Exception: TypeError: null is not an object (evaluating 'event.data.pathComponent.domTreeElement')
1214         https://bugs.webkit.org/show_bug.cgi?id=157759
1215         <rdar://problem/26309427>
1216
1217         Reviewed by Timothy Hatcher.
1218
1219         * UserInterface/Views/DOMTreeContentView.js:
1220         (WebInspector.DOMTreeContentView.prototype._pathComponentSelected):
1221         Handle possible null path components.
1222
1223         * UserInterface/Views/HierarchicalPathComponent.js:
1224         (WebInspector.HierarchicalPathComponent.prototype.get selectedPathComponent):
1225         When there is a list of just one that is triggered, the Clicked
1226         event should produce that one, to be consistent with clicking
1227         on a list of multiple elements and selecting the same value.
1228
1229 2016-05-16  Saam barati  <sbarati@apple.com>
1230
1231         Hook up ShadowChicken to the debugger to show tail deleted frames
1232         https://bugs.webkit.org/show_bug.cgi?id=156685
1233         <rdar://problem/25770521>
1234
1235         Reviewed by Filip Pizlo and Mark Lam and Joseph Pecoraro.
1236
1237         This patch makes the WebInspector display tail deleted frames.
1238         We show tail deleted frames with a gray [f] instead of a green
1239         [f]. We also put text in the tooltip to indicate that the frame
1240         is tail deleted. Other than that, tail deleted frames behave like
1241         normal frames. You can evaluate in them, inspect their scope, etc.
1242
1243         * Localizations/en.lproj/localizedStrings.js:
1244         * UserInterface/Images/TailDeletedFunction.svg: Added.
1245         * UserInterface/Images/gtk/TailDeletedFunction.svg: Added.
1246         * UserInterface/Models/CallFrame.js:
1247         * UserInterface/Views/CallFrameIcons.css:
1248         * UserInterface/Views/CallFrameTreeElement.js:
1249         * UserInterface/Views/CallFrameView.js:
1250
1251 2016-05-16  Nikita Vasilyev  <nvasilyev@apple.com>
1252
1253         Web Inspector: Contents of Duration column are covered by always on (legacy) scroll bars
1254         https://bugs.webkit.org/show_bug.cgi?id=157590
1255
1256         Reviewed by Timothy Hatcher.
1257
1258         Set the right padding of the DataGrid header to match the scrollbar width.
1259
1260         * UserInterface/Views/DataGrid.css:
1261         (.data-grid .data-container):
1262         (.data-grid.inline .data-container):
1263         Don't show scrollbars for inline data grids.
1264
1265         (.data-grid > .header-wrapper):
1266         (.data-grid.no-header > .header-wrapper > table.header):
1267         (.data-grid.no-header > table.header): Deleted.
1268         (.data-grid th): Deleted.
1269         * UserInterface/Views/DataGrid.js:
1270         (WebInspector.DataGrid):
1271         We can't add padding-rigth to a table. Wrap the table in div.header-wrapper.
1272
1273         (WebInspector.DataGrid.prototype._updateScrollbarPadding):
1274         (WebInspector.DataGrid.prototype.layout):
1275
1276 2016-05-16  Nikita Vasilyev  <nvasilyev@apple.com>
1277
1278         Web Inspector: Background stripes don't span the width of Network sidebar
1279         https://bugs.webkit.org/show_bug.cgi?id=157744
1280
1281         Reviewed by Timothy Hatcher.
1282
1283         * UserInterface/Views/NetworkSidebarPanel.css:
1284         (.sidebar > .panel.navigation.network.network-grid-content-view-showing > .content):
1285
1286 2016-05-16  Antoine Quint  <graouts@apple.com>
1287
1288         Web Inspector: Computed style shows both prefixed and unprefixed variants of properties
1289         https://bugs.webkit.org/show_bug.cgi?id=157674
1290         <rdar://problem/24339756>
1291
1292         Reviewed by Timothy Hatcher.
1293
1294         We make the CSSProperty `implicit` property read-write, and in the case where a computed style
1295         has a property marked as explicit, we also check that it's found in matching rules to consider
1296         it non-implicit. This correctly filters out variants of properties set explicitly.
1297
1298         * UserInterface/Models/CSSProperty.js:
1299         (WebInspector.CSSProperty.prototype.set implicit):
1300         * UserInterface/Models/DOMNodeStyles.js:
1301         (WebInspector.DOMNodeStyles.prototype.refresh.fetchedComputedStyle):
1302         (WebInspector.DOMNodeStyles.prototype.refresh):
1303         (WebInspector.DOMNodeStyles.prototype._isPropertyFoundInMatchingRules):
1304         (WebInspector.DOMNodeStyles):
1305
1306 2016-05-14  Timothy Hatcher  <timothy@apple.com>
1307
1308         Web Inspector: DataGrid _updateVisibleRows dominates profiles of timeline recordings when data grid (Overview or TimelineDataGrids) is showing
1309         https://bugs.webkit.org/show_bug.cgi?id=157664
1310         rdar://problem/26262219
1311
1312         Reviewed by Joseph Pecoraro.
1313
1314         * UserInterface/Views/DataGrid.js:
1315         (WebInspector.DataGrid): Added new members.
1316         (WebInspector.DataGrid.prototype.layout): Reset _cachedScrollTop and _cachedScrollHeight on resize.
1317         (WebInspector.DataGrid.prototype._noteScrollPositionChanged): Added.
1318         (WebInspector.DataGrid.prototype._updateVisibleRows): Cache sizes and positions when possible.
1319         (WebInspector.DataGridNode.prototype.set hidden): Added call to _noteRowsChanged.
1320         (WebInspector.DataGridNode.prototype.collapse): Call _noteRowsChanged instead of needsLayout.
1321         (WebInspector.DataGridNode.prototype.expand): Call _noteRowsChanged instead of needsLayout.
1322         (WebInspector.DataGrid.prototype._updateFilter): Removed direct call to _updateVisibleRows, this is
1323         better handled by DataGridNode's hidden setter.
1324
1325 2016-05-14  Timothy Hatcher  <timothy@apple.com>
1326
1327         Web Inspector: Many DataGrid instances do not save/restore their scroll position
1328         https://bugs.webkit.org/show_bug.cgi?id=157709
1329         rdar://problem/26286090
1330
1331         Reviewed by Brian Burg.
1332
1333         * UserInterface/Models/BackForwardEntry.js:
1334         (WebInspector.BackForwardEntry.prototype.makeCopy): Added.
1335         * UserInterface/Views/ContentViewContainer.js:
1336         (WebInspector.ContentViewContainer.prototype.showContentView): Copy the last entry for the view.
1337         * UserInterface/Views/DOMStorageContentView.js:
1338         (WebInspector.DOMStorageContentView.prototype.get scrollableElements): Added.
1339         * UserInterface/Views/HeapSnapshotContentView.js:
1340         (WebInspector.HeapSnapshotContentView.prototype.get scrollableElements): Added.
1341         * UserInterface/Views/IndexedDatabaseObjectStoreContentView.js:
1342         (WebInspector.IndexedDatabaseObjectStoreContentView.prototype.get scrollableElements): Added.
1343         * UserInterface/Views/MemoryTimelineView.js:
1344         (WebInspector.MemoryTimelineView.prototype.get scrollableElements): Added.
1345         * UserInterface/Views/ProfileView.js:
1346         (WebInspector.ProfileView.prototype.get scrollableElements): Added.
1347         (WebInspector.ProfileView.prototype._repopulateDataGridFromTree): Removed unused skipRefresh argument.
1348         * UserInterface/Views/ScriptClusterTimelineView.js:
1349         (WebInspector.ScriptClusterTimelineView.prototype.get scrollableElements): Added.
1350         * UserInterface/Views/ScriptProfileTimelineView.js:
1351         (WebInspector.ScriptProfileTimelineView.prototype.get scrollableElements): Added.
1352         * UserInterface/Views/TimelineView.js:
1353         (WebInspector.TimelineView.prototype.get scrollableElements): Added.
1354
1355 2016-05-14  Nikita Vasilyev  <nvasilyev@apple.com>
1356
1357         Web Inspector: Empty line shows arrow when hovering over Animation Frame Requested in timeline recording
1358         https://bugs.webkit.org/show_bug.cgi?id=157707
1359
1360         Reviewed by Timothy Hatcher.
1361
1362         * UserInterface/Views/DataGrid.css:
1363         (.data-grid:not(.variable-height-rows) > .data-container > table.data > tbody > tr > td > div):
1364
1365 2016-05-13  Simon Fraser  <simon.fraser@apple.com>
1366
1367         Unprefix -webkit-cross-fade()
1368         https://bugs.webkit.org/show_bug.cgi?id=157632
1369
1370         Reviewed by Darin Adler.
1371
1372         * UserInterface/Models/CSSKeywordCompletions.js:
1373
1374 2016-05-13  Matt Baker  <mattbaker@apple.com>
1375
1376         Web Inspector: Typing "layout" in filter for Layout and Rendering Timeline matches everything
1377         https://bugs.webkit.org/show_bug.cgi?id=157684
1378         <rdar://problem/26276588>
1379
1380         Reviewed by Joseph Pecoraro.
1381
1382         Hidden columns should not participate in built-in grid filtering
1383         using DataGrid.filterText. Hidden columns can still be custom filtered,
1384         which is how TimelineDataGrid filters scopebar columns.
1385
1386         * UserInterface/Views/DataGrid.js:
1387         (WebInspector.DataGridNode.prototype.get filterableData):
1388         Skip hidden columns.
1389
1390 2016-05-13  Matt Baker  <mattbaker@apple.com>
1391
1392         Web Inspector: Script ProfileViews should be searchable
1393         https://bugs.webkit.org/show_bug.cgi?id=157581
1394         <rdar://problem/26228530>
1395
1396         Reviewed by Joseph Pecoraro.
1397
1398         * UserInterface/Views/DataGrid.js:
1399         (WebInspector.DataGrid.prototype.get filterText):
1400         Make filterText readable.
1401
1402         * UserInterface/Views/ProfileDataGridNode.js:
1403         (WebInspector.ProfileDataGridNode.prototype.get callingContextTreeNode):
1404         (WebInspector.ProfileDataGridNode.prototype.filterableDataForColumn):
1405         Add filterable data for the "function" column.
1406         (WebInspector.ProfileDataGridNode.prototype._updateChildrenForModifiers):
1407         (WebInspector.ProfileDataGridNode.prototype.get node): Deleted.
1408         Renamed callingContextTreeNode to be less ambiguous.
1409
1410         * UserInterface/Views/ProfileDataGridTree.js:
1411         (WebInspector.ProfileDataGridTree.prototype._updateCurrentFocusDetails):
1412
1413         * UserInterface/Views/ProfileView.js:
1414         (WebInspector.ProfileView.prototype.get dataGrid):
1415         Expose data grid for use in parent view.
1416
1417         * UserInterface/Views/ScriptClusterTimelineView.js:
1418         (WebInspector.ScriptClusterTimelineView.prototype.selectRecord):
1419         Drive-by fix: forward property to current child TimelineView.
1420
1421         * UserInterface/Views/ScriptProfileTimelineView.js:
1422         (WebInspector.ScriptProfileTimelineView):
1423         (WebInspector.ScriptProfileTimelineView.prototype._scopeBarSelectionDidChange):
1424         (WebInspector.ScriptProfileTimelineView.prototype._showProfileViewForOrientation):
1425         Helper function to switch profile views. Persist filter text when
1426         switching to the new profile view.
1427
1428         (WebInspector.ScriptProfileTimelineView.prototype.get showsFilterBar): Deleted.
1429         Remove FIXME and show filter bar.
1430
1431         * UserInterface/Views/TimelineView.js:
1432         (WebInspector.TimelineView.prototype.setupDataGrid):
1433         Support switching to a new data grid.
1434         (WebInspector.TimelineView.prototype.dataGridMatchNodeAgainstCustomFilters):
1435         Hooking up filtering causes data grid nodes to be filtered based on the
1436         ruler selection. Although ScriptProfileTimelineView performs its own
1437         time-based filtering, this is necessary to prevent an assert.
1438
1439         (WebInspector.TimelineView.prototype._timelineDataGridSelectedNodeChanged):
1440         (WebInspector.TimelineView.prototype._timelineDataGridNodeWasFiltered):
1441         Converted arrow functions to member functions to allow unregistering
1442         event listeners on outgoing data grid when swapping grids.
1443
1444 2016-05-12  Matt Baker  <mattbaker@apple.com>
1445
1446         Web Inspector: Remove "Extra Scripts" folder from Resources sidebar if all children removed
1447         https://bugs.webkit.org/show_bug.cgi?id=157656
1448
1449         Reviewed by Timothy Hatcher.
1450
1451         * UserInterface/Views/ResourceSidebarPanel.js:
1452         (WebInspector.ResourceSidebarPanel.prototype._scriptWasRemoved):
1453         Remove parent folder after last script tree element removed.
1454
1455 2016-05-12  Matt Baker  <mattbaker@apple.com>
1456
1457         Web Inspector: Can't filter Rendering Frames by duration
1458         https://bugs.webkit.org/show_bug.cgi?id=157654
1459
1460         Reviewed by Timothy Hatcher.
1461
1462         * UserInterface/Views/RenderingFrameTimelineView.js:
1463         (WebInspector.RenderingFrameTimelineView.prototype._scopeBarSelectionDidChange):
1464         Call filterDidChange on the grid, not the base class.
1465         TimelineView.filterDidChange exists to let TimelineViews perform
1466         additional work when the grid filter changes (see LayoutTimelineView).
1467         (WebInspector.RenderingFrameTimelineView):
1468
1469 2016-05-12  Joseph Pecoraro  <pecoraro@apple.com>
1470
1471         Web Inspector: Deleting nodes in DOM Tree sometimes changes selection to parent instead of sibling
1472         https://bugs.webkit.org/show_bug.cgi?id=157649
1473
1474         Reviewed by Timothy Hatcher.
1475
1476         * UserInterface/Views/DOMTreeElement.js:
1477         (WebInspector.DOMTreeElement.prototype._updateChildren): Deleted.
1478         When pressing delete, we remove the node via DOM.removeNode()
1479         and remove the DOMTreeElement when we receive a successful response.
1480         However, the backend could send a DOM.childNodeRemoved event before
1481         the response from DOM.removeNode, and the frontend would have a race
1482         between DOMTreeUpdater's timeout and the removeNode callback.
1483
1484         In DOMTreeUpdater's path, DOMTreeElement updateChildren would notice
1485         a removed node and set the selection to the parent node.
1486
1487         In the DOM.removeNode path, TreeOutline would update the selection
1488         based on availability of a previousSibling/nextSibling/parent.
1489
1490         Remove the custom code in DOMTreeElement updateChildren, so that it
1491         can just do the normal TreeOutline behavior via removeChildAtIndex.
1492
1493 2016-05-12  Joseph Pecoraro  <pecoraro@apple.com>
1494
1495         REGRESSION: Web Inspector: Fails to load sourceMappingURL with relative URL
1496         https://bugs.webkit.org/show_bug.cgi?id=157650
1497         <rdar://problem/26133763>
1498
1499         Reviewed by Timothy Hatcher.
1500
1501         * UserInterface/Controllers/SourceMapManager.js:
1502         Wrong order of arguments. The intent was to pass the incoming
1503         baseURL as the partialURL, because if it was not absolute by
1504         that point we could make it relative to the main resource.
1505         However we accidentally put the main resource as the partial
1506         portion, which would just always return the main resource url.
1507         Swap the order, so that if the incoming base is absolute
1508         (such as a resource.url) that will be used, but if the
1509         incoming base is relative (e.g. an incomplete sourceURL) we
1510         can make it absolute with the main resource.
1511
1512 2016-05-12  Matt Baker  <mattbaker@apple.com>
1513
1514         Web Inspector: Uncaught exception when removing selected Timeline instrument
1515         https://bugs.webkit.org/show_bug.cgi?id=157639
1516         <rdar://problem/26252938>
1517
1518         Reviewed by Timothy Hatcher.
1519
1520         * UserInterface/Views/TimelineOverview.js:
1521         (WebInspector.TimelineOverview.prototype._instrumentRemoved):
1522         Remove timeline tree element before modifying state. Removing the tree
1523         element triggers a SelectionDidChange event, which can have side effects.
1524
1525 2016-05-12  Joseph Pecoraro  <pecoraro@apple.com>
1526
1527         Web Inspector: Timeline Reset button only resets the one active Script TimelineView
1528         https://bugs.webkit.org/show_bug.cgi?id=157638
1529
1530         Reviewed by Timothy Hatcher.
1531
1532         * UserInterface/Views/ScriptClusterTimelineView.js:
1533         (WebInspector.ScriptClusterTimelineView.prototype.reset):
1534         Reset should reset all the views.
1535
1536         (WebInspector.ScriptClusterTimelineView.prototype.get navigationSidebarTreeOutline): Deleted.
1537         * UserInterface/Views/NetworkGridContentView.js:
1538         (WebInspector.NetworkGridContentView.prototype.get navigationSidebarTreeOutline): Deleted.
1539         * UserInterface/Views/TimelineView.js:
1540         (WebInspector.TimelineView.prototype.get navigationSidebarTreeOutlineScopeBar): Deleted.
1541         Remove dead code. Nobody calls these getters.
1542
1543 2016-05-12  Joseph Pecoraro  <pecoraro@apple.com>
1544
1545         Web Inspector: Layout timeline popovers are inconsistently shown
1546         https://bugs.webkit.org/show_bug.cgi?id=157640
1547         <rdar://problem/26253394>
1548
1549         Reviewed by Timothy Hatcher.
1550
1551         * UserInterface/Views/TimelineDataGrid.js:
1552         (WebInspector.TimelineDataGrid.prototype._showPopoverForSelectedNodeSoon):
1553         Fix the bug by clearing _showPopoverTimeout when we show the popover.
1554
1555         (WebInspector.TimelineDataGrid.prototype._hidePopover):
1556         Modernize the code to use arrow functions and avoid binds.
1557
1558         (WebInspector.TimelineDataGrid.prototype._updatePopoverForSelectedNode):
1559         Updating with presentNewContentWithFrame animates the popover to the correct
1560         position instead of jumping and ending up at the wrong location.
1561
1562 2016-05-12  Joseph Pecoraro  <pecoraro@apple.com>
1563
1564         Web Inspector: Remove forced layouts caused by DOMTreeElement during Timeline recording
1565         https://bugs.webkit.org/show_bug.cgi?id=157641
1566
1567         Reviewed by Timothy Hatcher.
1568
1569         * UserInterface/Views/DOMTreeElement.js:
1570         (WebInspector.DOMTreeElement.prototype.updateSelection): Deleted.
1571         This triggers forced layout and I could never actually get it to trigger anyways.
1572         Its history is from the original import, so I don't know why it was added to begin with.
1573         Just remove it.
1574
1575 2016-05-12  Commit Queue  <commit-queue@webkit.org>
1576
1577         Unreviewed, rolling out r200718.
1578         https://bugs.webkit.org/show_bug.cgi?id=157637
1579
1580         Data grid column dividers are misaligned (Requested by NVI on
1581         #webkit).
1582
1583         Reverted changeset:
1584
1585         "Web Inspector: Contents of Duration column are covered by
1586         always on (legacy) scroll bars"
1587         https://bugs.webkit.org/show_bug.cgi?id=157590
1588         http://trac.webkit.org/changeset/200718
1589
1590 2016-05-12  Matt Baker  <mattbaker@apple.com>
1591
1592         Web Inspector: 11% of time in TimelineRecording spent updating DataGrid that is not visible
1593         https://bugs.webkit.org/show_bug.cgi?id=157612
1594         <rdar://problem/26239051>
1595
1596         Reviewed by Timothy Hatcher.
1597
1598         During recording, a timeline view is constantly having its cached time
1599         values updated. These updates should only trigger forced layouts if the
1600         view supports live data.
1601
1602         * UserInterface/Views/TimelineView.js:
1603         (WebInspector.TimelineView.prototype.set zeroTime):
1604         Drive-by fix, add call to _filterTimesDidChange.
1605         (WebInspector.TimelineView.prototype.set startTime):
1606         (WebInspector.TimelineView.prototype.set endTime):
1607         (WebInspector.TimelineView.prototype.set currentTime):
1608         Don't update layout directly.
1609         (WebInspector.TimelineView.prototype._timesDidChange):
1610         Force a layout if the view supports live data. When not recording,
1611         a layout is always performed.
1612         (WebInspector.TimelineView):
1613         (WebInspector.TimelineView.prototype._filterTimesDidChange.delayedWork): Deleted.
1614         Changed to an arrow function.
1615         (WebInspector.TimelineView.prototype._filterTimesDidChange): Deleted.
1616         Renamed _timesDidChange, since the method now does more than throttle
1617         a filterDidChange call.
1618
1619 2016-05-12  Fujii Hironori  <Hironori.Fujii@sony.com>
1620
1621         Web Inspector: Windows Perl fails to run copy-user-interface-resources.pl
1622         https://bugs.webkit.org/show_bug.cgi?id=157620
1623         <rdar://problem/26241548>
1624
1625         Reviewed by Timothy Hatcher.
1626
1627         There are two problems on Windows platform. 'cat' command is
1628         missing and can not execute shebang.
1629
1630         * Scripts/copy-user-interface-resources.pl: Invoke Perl scripts
1631         with explicitly specifying Perl command instead of relying on
1632         shebang.  Add a new subroutine 'appendFile' to concatenate files
1633         instread of 'cat' command.
1634
1635 2016-05-12  Joseph Pecoraro  <pecoraro@apple.com>
1636
1637         Web Inspector: 3.8% of timeline recording spent in NavigationSidebarPanel _updateContentOverflowShadowVisibility for background tab
1638         https://bugs.webkit.org/show_bug.cgi?id=157616
1639
1640         Reviewed by Timothy Hatcher.
1641
1642         * UserInterface/Views/NavigationSidebarPanel.js:
1643         (WebInspector.NavigationSidebarPanel.prototype._updateContentOverflowShadowVisibility):
1644         (WebInspector.NavigationSidebarPanel.prototype._treeElementAddedOrChanged):
1645         Don't update or schedule and update if we aren't visible.
1646         When we are shown we will force an update.
1647
1648 2016-05-12  Joseph Pecoraro  <pecoraro@apple.com>
1649
1650         Web Inspector: Reduce rAF churn in DefaultDashboardView on pages with lots of resources
1651         https://bugs.webkit.org/show_bug.cgi?id=157618
1652
1653         Reviewed by Timothy Hatcher.
1654
1655         * UserInterface/Views/DefaultDashboardView.js:
1656         (WebInspector.DefaultDashboardView):
1657         (WebInspector.DefaultDashboardView.prototype._updateDisplaySoon):
1658         (WebInspector.DefaultDashboardView.prototype._updateDisplay):
1659         Previously we were scheduling multiple rAFs that would all fire with
1660         the same data, each time a resource was added. Coalesce into one.
1661
1662 2016-05-12  Matt Baker  <mattbaker@apple.com>
1663
1664         Web Inspector: Improve snapshot selection in heap allocations overview graph
1665         https://bugs.webkit.org/show_bug.cgi?id=157588
1666         <rdar://problem/26231245>
1667
1668         Reviewed by Joseph Pecoraro.
1669
1670         Heap snapshot icon selection now uses the built-in record selection
1671         behavior provided by TimelineOverview/TimelineOverviewGraph. The marker
1672         representing the selected heap snapshot now has a "selected" style, and
1673         clicking an icon when the HeapAllocationsTimeline is not selected causes
1674         the timeline to become selected.
1675
1676         * UserInterface/Images/HeapSnapshotSelected.svg: Added.
1677         New art for selected snapshot icon.
1678
1679         * UserInterface/Views/HeapAllocationsTimelineOverviewGraph.css:
1680         (.timeline-overview-graph.heap-allocations > img.snapshot.selected):
1681         (.timeline-overview-graph.heap-allocations:not(.selected) > img.snapshot.selected):
1682         Selected icon styles for selected/unselected overview graph.
1683
1684         * UserInterface/Views/HeapAllocationsTimelineOverviewGraph.js:
1685         (WebInspector.HeapAllocationsTimelineOverviewGraph):
1686         Track selected image element.
1687
1688         (WebInspector.HeapAllocationsTimelineOverviewGraph.prototype.layout):
1689         Associate image elements with their snapshot record, and reuse image
1690         elements between layouts. Image element click handler can just set the
1691         selectedRecord in the TimelineOverviewGraph base class.
1692
1693         (WebInspector.HeapAllocationsTimelineOverviewGraph.prototype.updateSelectedRecord):
1694         (WebInspector.HeapAllocationsTimelineOverviewGraph.prototype._updateSnapshotMarkers):
1695         Refresh snapshot icon styles when selected record changes.
1696
1697         * UserInterface/Views/HeapAllocationsTimelineView.js:
1698         (WebInspector.HeapAllocationsTimelineView.prototype.selectRecord):
1699         Show snapshot list if no record selected.
1700         (WebInspector.HeapAllocationsTimelineView.prototype.userSelectedRecordFromOverview): Deleted.
1701         No longer needed.
1702
1703         * UserInterface/Views/RenderingFrameTimelineOverviewGraph.js:
1704         (WebInspector.RenderingFrameTimelineOverviewGraph.prototype._updateFrameMarker):
1705         No need to call dispatchSelectedRecordChangedEvent manually anymore,
1706         method has been removed from base class.
1707
1708         * UserInterface/Views/TimelineOverviewGraph.js:
1709         (WebInspector.TimelineOverviewGraph.prototype._needsSelectedRecordLayout):
1710         (WebInspector.TimelineOverviewGraph):
1711         (WebInspector.TimelineOverviewGraph.prototype.dispatchSelectedRecordChangedEvent): Deleted.
1712         No longer needed. Event dispatched automatically by the rAF callback.
1713
1714         * UserInterface/Views/TimelineRecordingContentView.js:
1715         (WebInspector.TimelineRecordingContentView.prototype._recordSelected):
1716         Allow switching to another timeline, if the selected record does not
1717         belong to the current timeline.
1718
1719 2016-05-12  Joseph Pecoraro  <pecoraro@apple.com>
1720
1721         Web Inspector: 3.5% of time in toFixed in TimelineRecordBar updating element positions
1722         https://bugs.webkit.org/show_bug.cgi?id=157608
1723
1724         Reviewed by Timothy Hatcher.
1725
1726         Avoid using toFixed to do an approximation comparison of two floating point numbers.
1727         Instead keep in Numbers by just doing the approximation with Math.round(num * 100).
1728         Since toFixed was doing stringification it was very expensive.
1729
1730         * UserInterface/Views/TimelineRecordBar.js:
1731         (WebInspector.TimelineRecordBar.prototype._updateElementPosition):
1732         (WebInspector.TimelineRecordBar):
1733         * UserInterface/Views/TimelineRecordFrame.js:
1734         (WebInspector.TimelineRecordFrame.prototype._updateElementPosition):
1735         (WebInspector.TimelineRecordFrame):
1736         * UserInterface/Views/TimelineRuler.js:
1737         (WebInspector.TimelineRuler.prototype._updatePositionOfElement):
1738
1739 2016-05-11  Joseph Pecoraro  <pecoraro@apple.com>
1740
1741         Web Inspector: 4% of time in TimelineOverviewGraph adding/removing classList styles on TimelineRecordBar
1742         https://bugs.webkit.org/show_bug.cgi?id=157607
1743
1744         Reviewed by Brian Burg.
1745
1746         This gets us down to about 0.5% of time.
1747
1748         * UserInterface/Views/TimelineRecordBar.js:
1749         (WebInspector.TimelineRecordBar.prototype.set records):
1750         Only modify the classLists when the record changes.
1751
1752         (WebInspector.TimelineRecordBar.prototype.refresh):
1753         Set unfinished once for either the uses active or not uses active cases.
1754
1755 2016-05-11  Joseph Pecoraro  <pecoraro@apple.com>
1756
1757         Web Inspector: Unexpected unread notification icon next to Log after clearing via clear()
1758         https://bugs.webkit.org/show_bug.cgi?id=157598
1759
1760         Reviewed by Timothy Hatcher.
1761
1762         We always show ConsoleCommand and ConsoleCommandResult messages no matter
1763         what the filter is. So it doesn't make sense to mark the "log" filter
1764         as having an unread notification for a ConsoleCommandResult when we can
1765         see the result.
1766
1767         * UserInterface/Views/LogContentView.js:
1768         (WebInspector.LogContentView.prototype.didAppendConsoleMessageView):
1769         (WebInspector.LogContentView.prototype._markScopeBarItemUnread):
1770
1771 2016-05-11  Joseph Pecoraro  <pecoraro@apple.com>
1772
1773         Web Inspector: Console unread indicators should be cleared however the console clears
1774         https://bugs.webkit.org/show_bug.cgi?id=157594
1775
1776         Reviewed by Timothy Hatcher.
1777
1778         * UserInterface/Views/LogContentView.js:
1779         (WebInspector.LogContentView.prototype._logCleared):
1780         (WebInspector.LogContentView.prototype._clearLog):
1781         Move code that clears unread indicators from clearLog to logCleared
1782         to handle all possible clear cases.
1783
1784 2016-05-11  Nikita Vasilyev  <nvasilyev@apple.com>
1785
1786         Web Inspector: Contents of Duration column are covered by always on (legacy) scroll bars
1787         https://bugs.webkit.org/show_bug.cgi?id=157590
1788
1789         Reviewed by Timothy Hatcher.
1790
1791         * UserInterface/Views/DataGrid.css:
1792         (.data-grid .data-container):
1793         Always show vertical scrollbars.
1794
1795         (.data-grid > .header-wrapper):
1796         (.data-grid > .header-wrapper::-webkit-scrollbar):
1797         Show invisible scrollbar for DataGrid's header to align the header table with the content.
1798
1799         (.data-grid.no-header > .header-wrapper > table.header):
1800         (.data-grid.no-header > table.header): Deleted.
1801         (.data-grid th): Deleted.
1802         * UserInterface/Views/DataGrid.js:
1803         (WebInspector.DataGrid):
1804         `overflow-y: scroll` doesn't work on a table element. Wrap table in a div.
1805
1806 2016-05-11  Matt Baker  <mattbaker@apple.com>
1807
1808         Web Inspector: Make it possible to do special styling on selected TimelineOverviewGraphs
1809         https://bugs.webkit.org/show_bug.cgi?id=157593
1810         <rdar://problem/26232886>
1811
1812         Reviewed by Timothy Hatcher.
1813
1814         * UserInterface/Views/TimelineOverview.js:
1815         (WebInspector.TimelineOverview.prototype._timelinesTreeSelectionDidChange.updateGraphSelectedState):
1816         (WebInspector.TimelineOverview.prototype._timelinesTreeSelectionDidChange):
1817         Select the new overview graph and deselect the old one.
1818
1819         * UserInterface/Views/TimelineOverviewGraph.js:
1820         (WebInspector.TimelineOverviewGraph):
1821         (WebInspector.TimelineOverviewGraph.prototype.get selected):
1822         (WebInspector.TimelineOverviewGraph.prototype.set selected):
1823         New property, toggles "selected" class on the graph element.
1824
1825 2016-05-11  Nikita Vasilyev  <nvasilyev@apple.com>
1826
1827         Web Inspector: "Selected Element" is hard to read when searching for "Element"
1828         https://bugs.webkit.org/show_bug.cgi?id=157542
1829         <rdar://problem/26207464>
1830
1831         Reviewed by Timothy Hatcher.
1832
1833         Change the style of highlighted text to match Xcode.
1834
1835         * UserInterface/Views/LogContentView.css:
1836         (.search-in-progress .console-item:not(.filtered-out-by-search).special-user-log .console-message-text .highlighted):
1837         * UserInterface/Views/OpenResourceDialog.css:
1838         (.open-resource-dialog > .tree-outline .item.selected .highlighted):
1839         * UserInterface/Views/Variables.css:
1840         (:root):
1841
1842 2016-05-11  Joseph Pecoraro  <pecoraro@apple.com>
1843
1844         Web Inspector: Hide filter bar in TimelineViews where it is not needed or not yet working
1845         https://bugs.webkit.org/show_bug.cgi?id=157583
1846
1847         Reviewed by Timothy Hatcher.
1848
1849         * UserInterface/Views/HeapAllocationsTimelineView.js:
1850         (WebInspector.HeapAllocationsTimelineView.prototype.get showsFilterBar):
1851         (WebInspector.HeapAllocationsTimelineView.prototype.layout):
1852         (WebInspector.HeapAllocationsTimelineView.prototype.updateFilter):
1853         Filter bar not yet hooked up for HeapSnapshot views.
1854         Make filtering work for the main timeline grid.
1855         It doesn't use the normal TimelineView filter based on selected range.
1856         This is intentional because it may be the case that a snapshot happens
1857         outside the selected time range (via the navigation bar button) and
1858         we want to show it. Otherwise a user might be confused why it is not
1859         showing up in the list.
1860
1861         * UserInterface/Views/MemoryTimelineView.js:
1862         (WebInspector.MemoryTimelineView.prototype.get showsFilterBar):
1863         Filter bar not needed in the Memory timeline view.
1864
1865         * UserInterface/Views/ScriptClusterTimelineView.js:
1866         (WebInspector.ScriptClusterTimelineView.prototype.get showsFilterBar):
1867         Filter bar works for the Events timeline view.
1868
1869         * UserInterface/Views/ScriptProfileTimelineView.js:
1870         (WebInspector.ScriptProfileTimelineView.prototype.get showsFilterBar):
1871         Filter bar not yet hooked up for Profile views.
1872
1873         * UserInterface/Views/TimelineRecordingContentView.js:
1874         (WebInspector.TimelineRecordingContentView.prototype._currentContentViewDidChange):
1875         (WebInspector.TimelineRecordingContentView.prototype._contentViewSelectionPathComponentDidChange):
1876         (WebInspector.TimelineRecordingContentView.prototype._updateFilterBar):
1877         Update the filter bar when the selection path components change, since
1878         that triggers when arbitrarily deep sub-content-views change.
1879
1880         * UserInterface/Views/TimelineView.js:
1881         (WebInspector.TimelineView.prototype.get showsFilterBar):
1882         Default is yes.
1883
1884 2016-05-10  Joseph Pecoraro  <pecoraro@apple.com>
1885
1886         Web Inspector: Avoid unnecessary timeout identifier churn in TimelineManager
1887         https://bugs.webkit.org/show_bug.cgi?id=157535
1888
1889         Reviewed by Timothy Hatcher.
1890
1891         * UserInterface/Controllers/TimelineManager.js:
1892         (WebInspector.TimelineManager):
1893         (WebInspector.TimelineManager.prototype.capturingStarted):
1894         (WebInspector.TimelineManager.prototype._resetAutoRecordingDeadTimeTimeout):
1895         Don't re-tickle if we tickled in the last 10ms.
1896
1897 2016-05-10  Matt Baker  <mattbaker@apple.com>
1898
1899         Web Inspector: Can't select record bar in Frames timeline
1900         https://bugs.webkit.org/show_bug.cgi?id=156963
1901         <rdar://problem/25898256>
1902
1903         Reviewed by Timothy Hatcher.
1904
1905         Sync record selection between the Rendering Frames grid and overview graph.
1906
1907         * UserInterface/Views/DataGrid.js:
1908         (WebInspector.DataGridNode.prototype.hasAncestor):
1909         Add helper function needed by TimelineView.
1910
1911         * UserInterface/Views/RenderingFrameTimelineOverviewGraph.js:
1912         (WebInspector.RenderingFrameTimelineOverviewGraph.prototype._mouseClicked):
1913         Don't deselect the selected record when clicked. Initially this seemed
1914         like a good idea but it complicates the UI for no added value.
1915
1916         * UserInterface/Views/TimelineRecordingContentView.js:
1917         (WebInspector.TimelineRecordingContentView.prototype._contentViewSelectionPathComponentDidChange):
1918         Get path components from the current TimelineView instead of the
1919         TimelineRecordingContentView, now that the selected record appears
1920         in the bottom ContentBrowser's navigation bar.
1921
1922 2016-05-10  Joseph Pecoraro  <pecoraro@apple.com>
1923
1924         Web Inspector: Backend should initiate timeline recordings on page navigations to ensure nothing is missed
1925         https://bugs.webkit.org/show_bug.cgi?id=157504
1926         <rdar://problem/26188642>
1927
1928         Reviewed by Brian Burg.
1929
1930         * UserInterface/Controllers/TimelineManager.js:
1931         (WebInspector.TimelineManager):
1932         (WebInspector.TimelineManager.prototype.set autoCaptureOnPageLoad):
1933         (WebInspector.TimelineManager.prototype.set enabledTimelineTypes):
1934         (WebInspector.TimelineManager.prototype._updateAutoCaptureInstruments):
1935         For backends that support it, enable/disable auto capture and the instruments to use.
1936
1937         (WebInspector.TimelineManager.prototype.autoCaptureStarted):
1938         New event, stop and start a new recording. Set a flag that we should
1939         detect the auto capturing resource so we know when the stop the
1940         auto capture.
1941
1942         (WebInspector.TimelineManager.prototype._loadNewRecording):
1943         (WebInspector.TimelineManager.prototype._addRecord):
1944         (WebInspector.TimelineManager.prototype._startAutoCapturing): Renamed.
1945         (WebInspector.TimelineManager.prototype._attemptAutoCapturingForFrame):
1946         (WebInspector.TimelineManager.prototype._legacyAttemptStartAutoCapturingForFrame):
1947         (WebInspector.TimelineManager.prototype._stopAutoRecordingSoon):
1948         (WebInspector.TimelineManager.prototype._resetAutoRecordingMaxTimeTimeout):
1949         (WebInspector.TimelineManager.prototype._resetAutoRecordingDeadTimeTimeout):
1950         (WebInspector.TimelineManager.prototype._mainResourceDidChange):
1951         (WebInspector.TimelineManager.prototype._mergeScriptProfileRecords):
1952         Factor out the new path, old path, and shared code for auto capturing.
1953         Renamed _startAutoCapturing to _attemptAutoCapturingForFrame which
1954         better matches what it tries to do.
1955
1956         * UserInterface/Protocol/TimelineObserver.js:
1957         (WebInspector.TimelineObserver.prototype.autoCaptureStarted):
1958         Inform TimelineManager.
1959
1960 2016-05-10  Matt Baker  <mattbaker@apple.com>
1961
1962         Web Inspector: Debugger sidebar should refresh when Debug UI enabled/disabled
1963         https://bugs.webkit.org/show_bug.cgi?id=157540
1964         <rdar://problem/26207064>
1965
1966         Reviewed by Timothy Hatcher.
1967
1968         * UserInterface/Views/DebuggerSidebarPanel.js:
1969         (WebInspector.DebuggerSidebarPanel.prototype._scriptRemoved.removeScript):
1970         (WebInspector.DebuggerSidebarPanel.prototype._scriptRemoved):
1971         Remove element from both tree outlines, if it exists.
1972
1973 2016-05-10  Matt Baker  <mattbaker@apple.com>
1974
1975         Web Inspector: TimelineOverview assertion failed: Missing overview graph for timeline type undefined
1976         https://bugs.webkit.org/show_bug.cgi?id=157533
1977         <rdar://problem/26204033>
1978
1979         Reviewed by Timothy Hatcher.
1980
1981         * UserInterface/Views/TimelineRecordingContentView.js:
1982         (WebInspector.TimelineRecordingContentView.prototype._recordWasFiltered):
1983         The OverviewTimelineView's represented object is the entire recording,
1984         and TimelineOverview.recordWasFiltered expects a timeline. Return early
1985         since no graph in the overview needs updating.
1986
1987 2016-05-10  Matt Baker  <mattbaker@apple.com>
1988
1989         Web Inspector: Call Trees and Memory view blank
1990         https://bugs.webkit.org/show_bug.cgi?id=157486
1991         <rdar://problem/26178404>
1992
1993         Reviewed by Timothy Hatcher.
1994
1995         * UserInterface/Views/TimelineRecordingContentView.js:
1996         (WebInspector.TimelineRecordingContentView.prototype._currentContentViewDidChange):
1997         (WebInspector.TimelineRecordingContentView.prototype._updateTimes):
1998         Setting current time now handled by _updateTimelineViewTimes.
1999         (WebInspector.TimelineRecordingContentView.prototype._capturingStopped):
2000         Update times for the current TimelineView when the recording ends.
2001         This ensures that views that don't call TimelineView.setupDataGrid are
2002         able to update state that depends on the ruler selection.
2003
2004         (WebInspector.TimelineRecordingContentView.prototype._timeRangeSelectionChanged):
2005         (WebInspector.TimelineRecordingContentView.prototype._updateTimelineViewTimes):
2006         Renamed from _updateTimelineViewSelection. Sets start, end, and current times.
2007
2008 2016-05-10  Devin Rousso  <dcrousso+webkit@gmail.com>
2009
2010         Web Inspector: Cleanup super getter/setter now that underlying issue is fixed
2011         https://bugs.webkit.org/show_bug.cgi?id=157488
2012         <rdar://problem/26179120>
2013
2014         Reviewed by Brian Burg.
2015
2016         Addressed FIXMEs for bug 147064:
2017         <https://webkit.org/b/147064> Getter and setter on super are called with wrong "this" object
2018
2019         * UserInterface/Views/VisualStyleKeywordPicker.js:
2020         (WebInspector.VisualStyleKeywordPicker.prototype.get value):
2021         (WebInspector.VisualStyleKeywordPicker.prototype.set value):
2022         (WebInspector.VisualStyleKeywordPicker.prototype.get synthesizedValue):
2023         (WebInspector.VisualStyleKeywordPicker.prototype._getValue): Deleted.
2024         (WebInspector.VisualStyleKeywordPicker.prototype._setValue): Deleted.
2025         (WebInspector.VisualStyleKeywordPicker.prototype._generateSynthesizedValue): Deleted.
2026
2027         * UserInterface/Views/VisualStyleNumberInputBox.js:
2028         (WebInspector.VisualStyleNumberInputBox.prototype.set specialPropertyPlaceholderElementText):
2029
2030         * UserInterface/Views/VisualStyleTimingEditor.js:
2031         (WebInspector.VisualStyleTimingEditor.prototype.get value):
2032         (WebInspector.VisualStyleTimingEditor.prototype.set value):
2033         (WebInspector.VisualStyleTimingEditor.prototype.get synthesizedValue):
2034         (WebInspector.VisualStyleTimingEditor.prototype._getValue): Deleted.
2035         (WebInspector.VisualStyleTimingEditor.prototype._setValue): Deleted.
2036         (WebInspector.VisualStyleTimingEditor.prototype._generateSynthesizedValue): Deleted.
2037
2038 2016-05-09  Matt Baker  <mattbaker@apple.com>
2039
2040         Web Inspector: Filtering by Errors/Warnings should not filter Breakpoints list
2041         https://bugs.webkit.org/show_bug.cgi?id=157481
2042         <rdar://problem/26177346>
2043
2044         Reviewed by Timothy Hatcher.
2045
2046         * Localizations/en.lproj/localizedStrings.js:
2047         New UI strings.
2048
2049         * UserInterface/Views/DebuggerSidebarPanel.js:
2050         (WebInspector.DebuggerSidebarPanel.showResourcesWithIssuesOnlyFilterFunction):
2051         Only filter tree elements belonging to the scripts tree outline.
2052         (WebInspector.DebuggerSidebarPanel):
2053         Drive-by cleanup of Issues filter button tooltips.
2054
2055 2016-05-09  Nikita Vasilyev  <nvasilyev@apple.com>
2056
2057         REGRESSION: Web Inspector: DOM path bar blinks when modifying inline styles
2058         https://bugs.webkit.org/show_bug.cgi?id=149258
2059         <rdar://problem/22737843>
2060
2061         Reviewed by Timothy Hatcher.
2062
2063         * UserInterface/Base/Utilities.js:
2064         (Array.shallowEqual):
2065         * UserInterface/Views/ContentBrowser.js:
2066         (WebInspector.ContentBrowser.prototype._updateContentViewNavigationItems):
2067         (WebInspector.ContentBrowser.prototype._removeAllNavigationItems):
2068         Don't re-render the navigation bar when all new navigation items match the previous ones.
2069
2070         * UserInterface/Views/HierarchicalPathNavigationItem.js:
2071         (WebInspector.HierarchicalPathNavigationItem.set components.let.componentsEqual):
2072         (WebInspector.HierarchicalPathNavigationItem.prototype.set components):
2073         Don't re-render HierarchicalPathComponent when all new path components match the previous ones.
2074
2075 2016-05-09  Matt Baker  <mattbaker@apple.com>
2076
2077         Web Inspector: Remove Global Breakpoints folder
2078         https://bugs.webkit.org/show_bug.cgi?id=157478
2079         <rdar://problem/26176524>
2080
2081         Reviewed by Timothy Hatcher.
2082
2083         * Localizations/en.lproj/localizedStrings.js:
2084         Remove UI string.
2085
2086         * UserInterface/Views/DebuggerSidebarPanel.js:
2087         (WebInspector.DebuggerSidebarPanel):
2088         (WebInspector.DebuggerSidebarPanel.prototype._breakpointTreeOutlineContextMenuTreeElement):
2089         (WebInspector.DebuggerSidebarPanel.prototype._treeSelectionDidChange):
2090         Remove references to folder tree element.
2091
2092         (WebInspector.DebuggerSidebarPanel.prototype._compareTopLevelTreeElements.isSpecialBreakpoint):
2093         (WebInspector.DebuggerSidebarPanel.prototype._compareTopLevelTreeElements):
2094         Top level comparison should check for "special" breakpoints.
2095
2096 2016-05-09  Matt Baker  <mattbaker@apple.com>
2097
2098         Web Inspector: Heap Snapshot Timeline view can be live
2099         https://bugs.webkit.org/show_bug.cgi?id=157487
2100         <rdar://problem/26178439>
2101
2102         Reviewed by Joseph Pecoraro.
2103
2104         * UserInterface/Views/HeapAllocationsTimelineView.js:
2105         (WebInspector.HeapAllocationsTimelineView.prototype.get showsLiveRecordingData): Deleted.
2106         Don't override, should return true.
2107
2108 2016-05-09  Manuel Rego Casasnovas  <rego@igalia.com>
2109
2110         [css-grid] Update Grid Layout properties in CSSKeywordCompletions.js
2111         https://bugs.webkit.org/show_bug.cgi?id=157166
2112
2113         Reviewed by Timothy Hatcher.
2114
2115         The CSS Grid Layout properties have been changing on the spec,
2116         however they haven't been updated in CSSKeywordCompletions for a long time.
2117         Update them using the last spec draft:
2118         https://drafts.csswg.org/css-grid/#property-index
2119
2120         * UserInterface/Models/CSSKeywordCompletions.js:
2121
2122 2016-05-09  Matt Baker  <mattbaker@apple.com>
2123
2124         Web Inspector: Cleanup issue tree elements in the Debugger sidebar
2125         https://bugs.webkit.org/show_bug.cgi?id=157469
2126         <rdar://problem/26162999>
2127
2128         Reviewed by Timothy Hatcher.
2129
2130         * UserInterface/Views/DebuggerSidebarPanel.js:
2131         (WebInspector.DebuggerSidebarPanel):
2132         (WebInspector.DebuggerSidebarPanel.prototype._addIssue):
2133         Don't add duplicate issue tree elements.
2134         (WebInspector.DebuggerSidebarPanel.prototype._handleIssuesCleared):
2135         Remove issues from the correct tree outline.
2136
2137         * UserInterface/Views/IssueTreeElement.css:
2138         (.issue .icon):
2139         (.issue.warning .icon):
2140         (.issue.error .icon):
2141         Match dashboard icons.
2142
2143 2016-05-09  Matt Baker  <mattbaker@apple.com>
2144
2145         Web Inspector: Show in progress message in Timeline views that do not show data until the recording finishes
2146         https://bugs.webkit.org/show_bug.cgi?id=156761
2147         <rdar://problem/25970771>
2148
2149         Reviewed by Timothy Hatcher.
2150
2151         * Localizations/en.lproj/localizedStrings.js:
2152         New UI strings.
2153
2154         * UserInterface/Main.html:
2155         New view class.
2156
2157         * UserInterface/Views/HeapAllocationsTimelineView.js:
2158         (WebInspector.HeapAllocationsTimelineView.prototype.get showsLiveRecordingData):
2159         * UserInterface/Views/RenderingFrameTimelineView.js:
2160         (WebInspector.RenderingFrameTimelineView.prototype.get showsLiveRecordingData):
2161         * UserInterface/Views/ScriptDetailsTimelineView.js:
2162         (WebInspector.ScriptDetailsTimelineView.prototype.get showsLiveRecordingData):
2163         * UserInterface/Views/ScriptProfileTimelineView.js:
2164         (WebInspector.ScriptProfileTimelineView.prototype.get showsLiveRecordingData):
2165         Don't show live recording data.
2166
2167         * UserInterface/Views/ScriptClusterTimelineView.js:
2168         (WebInspector.ScriptClusterTimelineView.prototype.get showsLiveRecordingData):
2169         Forward property to current child TimelineView.
2170
2171         * UserInterface/Views/TimelineRecordingContentView.css:
2172         (.content-view.timeline-recording > .content-browser .recording-progress):
2173         (.content-view.timeline-recording > .content-browser .recording-progress > .status):
2174         (.content-view.timeline-recording > .content-browser .recording-progress > .status > .indeterminate-progress-spinner):
2175         New progress view styles.
2176
2177         * UserInterface/Views/TimelineRecordingContentView.js:
2178         (WebInspector.TimelineRecordingContentView):
2179         (WebInspector.TimelineRecordingContentView.prototype._currentContentViewDidChange):
2180         (WebInspector.TimelineRecordingContentView.prototype._capturingStarted):
2181         (WebInspector.TimelineRecordingContentView.prototype._capturingStopped):
2182         Refresh progress view visibility.
2183
2184         (WebInspector.TimelineRecordingContentView.prototype._updateProgressView):
2185         Show the progress view if we're currently capturing, and showing a view
2186         that doesn't support showing live data.
2187
2188         * UserInterface/Views/TimelineRecordingProgressView.js:
2189         (WebInspector.TimelineRecordingProgressView):
2190         (WebInspector.TimelineRecordingProgressView.prototype.get visible):
2191         (WebInspector.TimelineRecordingProgressView.prototype.set visible):
2192         Show a status message, indeterminate progress spinner, and Stop Recording
2193         button while timeline data is being recorded.
2194
2195         * UserInterface/Views/TimelineView.js:
2196         (WebInspector.TimelineView.prototype.get showsLiveRecordingData):
2197         Implemented by TimelineViews that don't support showing data while recording.
2198
2199         * UserInterface/Views/Variables.css:
2200         (:root):
2201         Add --panel-background-color-light for the progress view.
2202
2203 2016-05-08  Matt Baker  <mattbaker@apple.com>
2204
2205         Web Inspector: Add Breakpoints and Scripts folders to Debugger sidebar
2206         https://bugs.webkit.org/show_bug.cgi?id=151119
2207         <rdar://problem/23488916>
2208
2209         Reviewed by Timothy Hatcher.
2210
2211         Add a collapsible Sources section to the Debugger beneath the existing
2212         Breakpoints section.
2213
2214         * UserInterface/Views/DebuggerSidebarPanel.css:
2215         Remove unused CSS class names.
2216
2217         (.sidebar > .panel.navigation.debugger .details-section.scripts:not(.collapsed)):
2218         Hide scripts section bottom border when expanded. As the last
2219         section, a border only adds visual clutter.
2220
2221         (.sidebar > .panel.navigation.debugger .details-section.scripts): Deleted.
2222         (.sidebar > .panel.navigation.debugger.paused .details-section.scripts): Deleted.
2223         (.sidebar > .panel.navigation.debugger .details-section.scripts .header): Deleted.
2224         (.sidebar > .panel.navigation.debugger.paused .details-section.scripts .header): Deleted.
2225         (.sidebar > .panel.navigation.debugger .details-section.scripts.collapsed > .content): Deleted.
2226         (.sidebar > .panel.navigation.debugger.paused .details-section.scripts.collapsed > .content): Deleted.
2227         No longer needed.
2228
2229         * UserInterface/Views/DebuggerSidebarPanel.js:
2230         (WebInspector.DebuggerSidebarPanel):
2231         Create separate "Breakpoints" and "Sources" sections, and make filter
2232         placeholder text generic. Remove unused class from breakpoints tree.
2233
2234         (WebInspector.DebuggerSidebarPanel.prototype.treeElementForRepresentedObject):
2235         Check both breakpoint and scripts tree outlines.
2236
2237         (WebInspector.DebuggerSidebarPanel.prototype._addBreakpoint):
2238         (WebInspector.DebuggerSidebarPanel.prototype._addTreeElementForSourceCodeToTreeOutline):
2239         Make helper function generic.
2240
2241         (WebInspector.DebuggerSidebarPanel.prototype._addResource):
2242         (WebInspector.DebuggerSidebarPanel.prototype._mainResourceDidChange):
2243         (WebInspector.DebuggerSidebarPanel.prototype._addScript):
2244         Add resources to the scripts tree.
2245
2246         (WebInspector.DebuggerSidebarPanel.prototype._scriptsCleared):
2247         Clear the scripts tree.
2248
2249         (WebInspector.DebuggerSidebarPanel.prototype._removeDebuggerTreeElement):
2250         Remove script element when last breakpoint is removed.
2251
2252         (WebInspector.DebuggerSidebarPanel.prototype._addIssue):
2253         (WebInspector.DebuggerSidebarPanel.prototype._addTreeElementForSourceCodeToContentTreeOutline): Deleted.
2254         Renamed _addTreeElementForSourceCodeToTreeOutline.
2255
2256 2016-05-08  Matt Baker  <mattbaker@apple.com>
2257
2258         Web Inspector: SourceCodeTextEditor issue widgets/line styles should reset when log is cleared
2259         https://bugs.webkit.org/show_bug.cgi?id=157460
2260         <rdar://problem/26159633>
2261
2262         Reviewed by Timothy Hatcher.
2263
2264         * UserInterface/Views/SourceCodeTextEditor.js:
2265         (WebInspector.SourceCodeTextEditor):
2266         (WebInspector.SourceCodeTextEditor.prototype._logCleared):
2267         Clear issue widgets and CodeMirror line class names when log cleared.
2268
2269 2016-05-06  Joseph Pecoraro  <pecoraro@apple.com>
2270
2271         Web Inspector: Inspect Element and Element Selection searching should work with Shadow DOM Nodes
2272         https://bugs.webkit.org/show_bug.cgi?id=157446
2273         <rdar://problem/24688447>
2274
2275         Reviewed by Ryosuke Niwa.
2276
2277         * UserInterface/Models/DOMNode.js:
2278         (WebInspector.DOMNode):
2279         Shadow DOM nodes did not have a parent, and so when attempting
2280         to create DOM Tree elements up the chain, we were failing at
2281         shadow boundaries. Create the parent relationship, the parent
2282         already treats it as a child.
2283
2284         * UserInterface/Views/DOMTreeOutline.js:
2285         (WebInspector.DOMTreeOutline.prototype._revealAndSelectNode):
2286         Whenever we try to reveal and select an element in a shadow tree
2287         but the setting to show shadow DOM is disabled, walk up until
2288         we are out of the shadow tree.
2289
2290 2016-05-06  Nikita Vasilyev  <nvasilyev@apple.com>
2291
2292         Web Inspector: Unexpected white border at the bottom of Debugger filter bar
2293         https://bugs.webkit.org/show_bug.cgi?id=157430
2294         <rdar://problem/26146602>
2295
2296         Reviewed by Timothy Hatcher.
2297
2298         Remove the semi-transparent white borders.
2299
2300         * UserInterface/Views/NavigationBar.css:
2301         (.navigation-bar): Deleted.
2302         * UserInterface/Views/SearchSidebarPanel.css:
2303         (.sidebar > .panel.navigation.search > .search-bar): Deleted.
2304
2305 2016-05-06  Joseph Pecoraro  <pecoraro@apple.com>
2306
2307         Web Inspector: Remove HeapSnapshot Summary View
2308         https://bugs.webkit.org/show_bug.cgi?id=157385
2309
2310         Reviewed by Timothy Hatcher.
2311
2312         * Localizations/en.lproj/localizedStrings.js:
2313         * UserInterface/Main.html:
2314         * UserInterface/Views/HeapSnapshotClusterContentView.js:
2315         (WebInspector.HeapSnapshotClusterContentView):
2316         (WebInspector.HeapSnapshotClusterContentView.prototype.get summaryContentView): Deleted.
2317         (WebInspector.HeapSnapshotClusterContentView.prototype.showSummary): Deleted.
2318         (WebInspector.HeapSnapshotClusterContentView.prototype._pathComponentForContentView):
2319         (WebInspector.HeapSnapshotClusterContentView.prototype._identifierForContentView):
2320         (WebInspector.HeapSnapshotClusterContentView.prototype._showContentViewForIdentifier):
2321         * UserInterface/Views/HeapSnapshotSummaryContentView.css: Removed.
2322         * UserInterface/Views/HeapSnapshotSummaryContentView.js: Removed.
2323         * UserInterface/Views/Variables.css:
2324         (:root):
2325
2326 2016-05-06  Manuel Rego Casasnovas  <rego@igalia.com>
2327
2328         [css-grid] Unprefix CSS Grid Layout properties
2329         https://bugs.webkit.org/show_bug.cgi?id=157137
2330
2331         Reviewed by Simon Fraser.
2332
2333         Remove "-webkit" prefix from all the grid layout properties,
2334         including the display value.
2335         Update the source code to remove the prefix where it was used too.
2336
2337         * UserInterface/Models/CSSKeywordCompletions.js:
2338
2339 2016-05-05  Joseph Pecoraro  <pecoraro@apple.com>
2340
2341         REGRESSION(r200474): Exception in autocompletion - `getCompletions` not found
2342         https://bugs.webkit.org/show_bug.cgi?id=157408
2343
2344         Reviewed by Timothy Hatcher.
2345
2346         * UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
2347         (WebInspector.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.evaluated):
2348         This function was renamed, but this instance was missed.
2349
2350 2016-05-05  Joseph Pecoraro  <pecoraro@apple.com>
2351
2352         Web Inspector: Provide go-to links next to Functions in GC Root Path popover
2353         https://bugs.webkit.org/show_bug.cgi?id=157381
2354         <rdar://problem/26122531>
2355
2356         Reviewed by Timothy Hatcher.
2357
2358         * UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
2359         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._mouseoverHandler.appendPathRow):
2360         For functions, create a go-to-link. Insert a placeholder to replace
2361         so that the popover sizes itself with a potential go-to arrow, as
2362         it won't resize when the go-to arrows get inserted.
2363
2364         * UserInterface/Views/HeapSnapshotInstancesContentView.css:
2365         (.heap-snapshot-instance-popover-content .node .go-to-link):
2366         Move down 1px to align better with the text.
2367
2368 2016-05-05  Joseph Pecoraro  <pecoraro@apple.com>
2369
2370         Web Inspector: HeapSnapshot should exploratory Object Graph view
2371         https://bugs.webkit.org/show_bug.cgi?id=157371
2372         <rdar://problem/26107304>
2373
2374         Reviewed by Timothy Hatcher.
2375
2376         HeapSnapshots now have two ContentViews for viewing the graph.
2377
2378         HeapSnapshotInstancesContentView:
2379           - top level are Class Categories nodes
2380           - categories expand to Instances
2381           - instances expand to show what they retain
2382           - retained sizes only shown for dominated nodes of the instance
2383
2384         HeapSnapshotObjectGraphContentView:
2385           - top level are GlobalObject or Window nodes
2386           - expand to show what they retain
2387           - retained sizes are shown for all nodes, everything is shown
2388
2389         This also provides a custom preview for Window instances. Instead of
2390         showing an ObjectPreview, it just shows the `window.location.href`
2391         for that instance, which is useful when there are multiple Window
2392         instances for different frames.
2393
2394         * Localizations/en.lproj/localizedStrings.js:
2395         * UserInterface/Main.html:
2396         New "Object Graph" string and new files.
2397
2398         * UserInterface/Images/HeapSnapshotObjectGraph.svg: Added.
2399         * UserInterface/Images/gtk/HeapSnapshotObjectGraph.svg: Added.
2400         * UserInterface/Views/PathComponentIcons.css:
2401         (.heap-snapshot-object-graph-icon .icon):
2402         Copy the red [{}] icon from Style Rules.
2403
2404         * UserInterface/Views/HeapSnapshotClusterContentView.js:
2405         (WebInspector.HeapSnapshotClusterContentView):
2406         (WebInspector.HeapSnapshotClusterContentView.prototype.get objectGraphContentView):
2407         (WebInspector.HeapSnapshotClusterContentView.prototype.showObjectGraph):
2408         (WebInspector.HeapSnapshotClusterContentView.prototype._supportsObjectGraph):
2409         (WebInspector.HeapSnapshotClusterContentView.prototype._pathComponentForContentView):
2410         (WebInspector.HeapSnapshotClusterContentView.prototype._identifierForContentView):
2411         (WebInspector.HeapSnapshotClusterContentView.prototype._showContentViewForIdentifier):
2412         Include an "Object Graph" content view. This is unavailable in Diff views
2413         but is available for individual HeapSnapshots.
2414
2415         * UserInterface/Views/HeapSnapshotContentView.js: Renamed from Source/WebInspectorUI/UserInterface/Views/HeapSnapshotInstancesContentView.js.
2416         (WebInspector.HeapSnapshotContentView):
2417         (WebInspector.HeapSnapshotContentView.prototype.shown):
2418         (WebInspector.HeapSnapshotContentView.prototype.hidden):
2419         (WebInspector.HeapSnapshotContentView.prototype._sortDataGrid):
2420         (WebInspector.HeapSnapshotContentView.prototype._heapSnapshotDataGridTreeDidPopulate):
2421         (WebInspector.HeapSnapshotInstancesContentView):
2422         (WebInspector.HeapSnapshotObjectGraphContentView):
2423         Share and generalize a HeapSnapshot ContentView. The only differences are
2424         the DataGrid columns, DataGridTree class, and identifier prefix for settings.
2425
2426         * UserInterface/Views/HeapSnapshotDataGridTree.js: Renamed from Source/WebInspectorUI/UserInterface/Views/HeapSnapshotInstancesDataGridTree.js.
2427         (WebInspector.HeapSnapshotDataGridTree):
2428         (WebInspector.HeapSnapshotDataGridTree.buildSortComparator):
2429         (WebInspector.HeapSnapshotDataGridTree.prototype.get heapSnapshot):
2430         (WebInspector.HeapSnapshotDataGridTree.prototype.get visible):
2431         (WebInspector.HeapSnapshotDataGridTree.prototype.get popover):
2432         (WebInspector.HeapSnapshotDataGridTree.prototype.get popoverNode):
2433         (WebInspector.HeapSnapshotDataGridTree.prototype.set popoverNode):
2434         (WebInspector.HeapSnapshotDataGridTree.prototype.get children):
2435         (WebInspector.HeapSnapshotDataGridTree.prototype.appendChild):
2436         (WebInspector.HeapSnapshotDataGridTree.prototype.insertChild):
2437         (WebInspector.HeapSnapshotDataGridTree.prototype.removeChildren):
2438         (WebInspector.HeapSnapshotDataGridTree.prototype.set sortComparator):
2439         (WebInspector.HeapSnapshotDataGridTree.prototype.sort):
2440         (WebInspector.HeapSnapshotDataGridTree.prototype.shown):
2441         (WebInspector.HeapSnapshotDataGridTree.prototype.hidden):
2442         (WebInspector.HeapSnapshotDataGridTree.prototype.willDismissPopover):
2443         (WebInspector.HeapSnapshotDataGridTree.prototype.get alwaysShowRetainedSize):
2444         (WebInspector.HeapSnapshotDataGridTree.prototype.populateTopLevel):
2445         (WebInspector.HeapSnapshotDataGridTree.prototype.didPopulate):
2446         (WebInspector.HeapSnapshotInstancesDataGridTree.prototype.get alwaysShowRetainedSize):
2447         (WebInspector.HeapSnapshotInstancesDataGridTree.prototype.populateTopLevel):
2448         (WebInspector.HeapSnapshotInstancesDataGridTree):
2449         (WebInspector.HeapSnapshotObjectGraphDataGridTree.prototype.get alwaysShowRetainedSize):
2450         (WebInspector.HeapSnapshotObjectGraphDataGridTree.prototype.populateTopLevel):
2451         (WebInspector.HeapSnapshotObjectGraphDataGridTree):
2452
2453         * UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
2454         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype.createCellContent):
2455         Start using different previews based on instance type.
2456
2457         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._populateError):
2458         Common preview error logic. Also, don't output "Internal object" next to things
2459         like Structure, InferredType, etc. Just don't output anything. Eventually, if
2460         we provide preview data, something will show, but for now nothing is fine.
2461
2462         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._populateWindowPreview.inspectedPage_window_getLocationHref):
2463         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._populateWindowPreview):
2464         Custom preview logic for Window's gets `window.location.href` on the instance if it is alive.
2465
2466         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._populatePreview):
2467         Normal preview logic.
2468
2469         * UserInterface/Views/HeapSnapshotInstancesContentView.css:
2470         (.heap-snapshot > .data-grid tr:not(.selected) td .preview-error): Deleted.
2471         The red text for errors was standing out too much. Make it the default black.
2472
2473         * UserInterface/Views/HeapAllocationsTimelineView.js:
2474         (WebInspector.HeapAllocationsTimelineView.prototype.showHeapSnapshotTimelineRecord):
2475         Better variable name.
2476
2477         * UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
2478         (WebInspector.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.inspectedPage_evalResult_getArrayCompletions):
2479         (WebInspector.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.inspectedPage_evalResult_getCompletions):
2480         (WebInspector.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.getArrayCompletions): Deleted.
2481         (WebInspector.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.getCompletions): Deleted.
2482         (WebInspector.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.evaluated):
2483         Try to be clearer about functions that run on the inspected page
2484         by using the pattern with inspectedPage_<thisObject>_functionName.
2485
2486 2016-05-05  Nikita Vasilyev  <nvasilyev@apple.com>
2487
2488         Web Inspector: Console is unresponsive for >10 seconds when it tries to render 10,000 messages
2489         https://bugs.webkit.org/show_bug.cgi?id=157368
2490         <rdar://problem/26103657>
2491
2492         Reviewed by Timothy Hatcher.
2493
2494         Render only up to 100 messages per animation frame to keep the Inspector's UI responsive.
2495
2496         * UserInterface/Controllers/JavaScriptLogViewController.js:
2497         (WebInspector.JavaScriptLogViewController.prototype.renderPendingMessages):
2498
2499 2016-05-05  Joseph Pecoraro  <pecoraro@apple.com>
2500
2501         Crash if you type "debugger" in the console and continue
2502         https://bugs.webkit.org/show_bug.cgi?id=156924
2503         <rdar://problem/25884189>
2504
2505         Reviewed by Mark Lam.
2506
2507         * UserInterface/Test/InspectorProtocol.js:
2508         (InspectorProtocol.sendCommand):
2509         Simplify sending a command with no parameters.
2510
2511 2016-05-04  Nikita Vasilyev  <nvasilyev@apple.com>
2512
2513         REGRESSION (r200401): Web Inspector: TypeError: undefined is not an object (evaluating 'messageElement.classList')
2514         https://bugs.webkit.org/show_bug.cgi?id=157356
2515         <rdar://problem/26097424>
2516
2517         Reviewed by Timothy Hatcher.
2518
2519         * UserInterface/Views/LogContentView.js:
2520         (WebInspector.LogContentView.prototype._reappendProvisionalMessages):
2521         Don't filter messages since we already do that in didAppendConsoleMessageView.
2522
2523 2016-05-04  Joseph Pecoraro  <pecoraro@apple.com>
2524
2525         Web Inspector: GC Root Path sometimes does not go up to Window
2526         https://bugs.webkit.org/show_bug.cgi?id=156768
2527         <rdar://problem/25816131>
2528
2529         Reviewed by Geoffrey Garen.
2530
2531         * UserInterface/Proxies/HeapSnapshotNodeProxy.js:
2532         (WebInspector.HeapSnapshotNodeProxy.prototype.retainers):
2533         Include paths for debugging.
2534
2535         * UserInterface/Workers/HeapSnapshot/HeapSnapshot.js:
2536         (HeapSnapshot.prototype.shortestGCRootPath):
2537         (HeapSnapshot.prototype._isNodeGlobalObject):
2538         Prefer the shortest GC Root Path that contains a known
2539         global object, otherwise fallback to the shortest.
2540
2541         (HeapSnapshot.prototype.retainers):
2542         Include paths for debugging.
2543
2544 2016-05-03  Nikita Vasilyev  <nvasilyev@apple.com>
2545
2546         Web Inspector: Adding a new console message shouldn't modify DOM when the console log is hidden
2547         https://bugs.webkit.org/show_bug.cgi?id=155629
2548         <rdar://problem/25235470>
2549
2550         Reviewed by Timothy Hatcher.
2551
2552         Instead of rendering console messages right away, store them (in _pendingMessages)
2553         and render only when the console tab or the split console is visible.
2554         Also, batch rendering operations using requestAnimationFrame.
2555
2556         * UserInterface/Controllers/JavaScriptLogViewController.js:
2557         (WebInspector.JavaScriptLogViewController):
2558         Store console message views in _pendingMessages.
2559
2560         (WebInspector.JavaScriptLogViewController.prototype._appendConsoleMessageView):
2561         (WebInspector.JavaScriptLogViewController.prototype.renderPendingMessages):
2562         Use requestAnimationFrame batching. Run isScrolledToBottom() at most only once
2563         per batch.
2564
2565         (WebInspector.JavaScriptLogViewController.prototype.renderPendingMessagesSoon):
2566         (WebInspector.JavaScriptLogViewController.prototype._didRenderConsoleMessageView):
2567         There is no need to run scrollToBottom again.
2568
2569         * UserInterface/Views/ConsoleCommandView.js:
2570         (WebInspector.ConsoleCommandView):
2571         Move all DOM operations to a new render method.
2572
2573         (WebInspector.ConsoleCommandView.prototype.render):
2574         * UserInterface/Views/ConsoleMessageView.js:
2575         (WebInspector.ConsoleMessageView):
2576         (WebInspector.ConsoleMessageView.prototype.render):
2577         (WebInspector.ConsoleMessageView.prototype.set repeatCount):
2578         (WebInspector.ConsoleMessageView.prototype._renderRepeatCount):
2579         * UserInterface/Views/LogContentView.js:
2580         (WebInspector.LogContentView.prototype.shown):
2581         When the console tab or the split console is opened render all pending messages.
2582
2583         (WebInspector.LogContentView.prototype.didAppendConsoleMessageView):
2584         Don't call needsLayout on every added console message. Call it only once per
2585         requestAnimationFrame. Also, no need to scrollToBottom once again.
2586
2587         (WebInspector.LogContentView.prototype._messageAdded):
2588         (WebInspector.LogContentView.prototype._previousMessageRepeatCountUpdated):
2589         (WebInspector.LogContentView.prototype._scopeFromMessageLevel): Deleted.
2590         (WebInspector.LogContentView.prototype._markScopeBarItemUnread): Added.
2591         Rename _pulseScopeBarItemBorder. In the very first version the border was pulsing,
2592         but now we use small colored circles instead.
2593
2594 2016-05-03  Joseph Pecoraro  <pecoraro@apple.com>
2595
2596         Web Inspector: Give console.time/timeEnd a default label and warnings
2597         https://bugs.webkit.org/show_bug.cgi?id=157325
2598         <rdar://problem/26073290>
2599
2600         Reviewed by Timothy Hatcher.
2601
2602         * UserInterface/Models/NativeFunctionParameters.js:
2603         Update the convenience signature.
2604
2605 2016-05-03  Joseph Pecoraro  <pecoraro@apple.com>
2606
2607         Web Inspector: Update window.console function API description strings in Console
2608         https://bugs.webkit.org/show_bug.cgi?id=157298
2609
2610         Reviewed by Timothy Hatcher.
2611
2612         * UserInterface/Models/NativeFunctionParameters.js:
2613         * UserInterface/Views/ObjectTreePropertyTreeElement.js:
2614         (WebInspector.ObjectTreePropertyTreeElement.prototype._functionParameterString):
2615         The Console object changed how it works. Work with the new
2616         structure, and the older structure for legacy backends.
2617
2618 2016-05-03  Joseph Pecoraro  <pecoraro@apple.com>
2619
2620         Web Inspector: Allow format specifiers in console.assert and console.trace
2621         https://bugs.webkit.org/show_bug.cgi?id=157295
2622         <rdar://problem/26056039>
2623
2624         Reviewed by Timothy Hatcher.
2625
2626         * UserInterface/Views/ConsoleMessageView.js:
2627         (WebInspector.ConsoleMessageView.prototype._appendMessageTextAndArguments):
2628         Treat the first argument as a format specifier.
2629
2630 2016-05-02  Commit Queue  <commit-queue@webkit.org>
2631
2632         Unreviewed, rolling out r200337.
2633         https://bugs.webkit.org/show_bug.cgi?id=157294
2634
2635         Console hangs when evaluating expresisons (Requested by
2636         JoePeck on #webkit).
2637
2638         Reverted changeset:
2639
2640         "Web Inspector: Adding a new console message shouldn't modify
2641         DOM when the console log is hidden"
2642         https://bugs.webkit.org/show_bug.cgi?id=155629
2643         http://trac.webkit.org/changeset/200337
2644
2645 2016-05-02  Joseph Pecoraro  <pecoraro@apple.com>
2646
2647         Web Inspector: Unexpected "Script Element #" resources in Debugger Sidebar
2648         https://bugs.webkit.org/show_bug.cgi?id=157280
2649
2650         Reviewed by Timothy Hatcher.
2651
2652         * UserInterface/Views/DebuggerSidebarPanel.js:
2653         (WebInspector.DebuggerSidebarPanel.prototype._addScript):
2654         Don't include Script Element resources in the debugger sidebar by default.
2655
2656 2016-05-02  Joseph Pecoraro  <pecoraro@apple.com>
2657
2658         Web Inspector: Prefer "Console Evaluation" to "Eval Code" if we know it was a console evaluation
2659         https://bugs.webkit.org/show_bug.cgi?id=157278
2660
2661         Reviewed by Timothy Hatcher.
2662
2663         * Localizations/en.lproj/localizedStrings.js:
2664         "Console Evaluation" string.
2665
2666         * UserInterface/Controllers/DebuggerManager.js:
2667         (WebInspector.DebuggerManager.prototype._sourceCodeLocationFromPayload): Deleted.
2668         Delete an assert that would throw when the location is noSourceID:-1:-1.
2669
2670         * UserInterface/Models/CallFrame.js:
2671         (WebInspector.CallFrame.fromDebuggerPayload):
2672         (WebInspector.CallFrame.fromPayload):
2673         (WebInspector.CallFrame):
2674         When this is in a Console Evalution provide better values.
2675
2676         * UserInterface/Models/GarbageCollection.js:
2677         (WebInspector.GarbageCollection):
2678         Drive-by address a common assertions seen while paused.
2679
2680 2016-05-02  Nikita Vasilyev  <nvasilyev@apple.com>
2681
2682         Web Inspector: Adding a new console message shouldn't modify DOM when the console log is hidden
2683         https://bugs.webkit.org/show_bug.cgi?id=155629
2684         <rdar://problem/25235470>
2685
2686         Reviewed by Timothy Hatcher.
2687
2688         Instead of rendering console messages right away, store them (in _pendingMessages)
2689         and render only when the console tab or the split console is visible.
2690         Also, batch rendering operations using requestAnimationFrame.
2691
2692         * UserInterface/Controllers/JavaScriptLogViewController.js:
2693         (WebInspector.JavaScriptLogViewController):
2694         Store console message views in _pendingMessages.
2695
2696         (WebInspector.JavaScriptLogViewController.prototype._appendConsoleMessageView):
2697         (WebInspector.JavaScriptLogViewController.prototype.renderPendingMessages):
2698         Use requestAnimationFrame batching. Run isScrolledToBottom() at most only once
2699         per batch.
2700
2701         (WebInspector.JavaScriptLogViewController.prototype.renderPendingMessagesSoon):
2702         (WebInspector.JavaScriptLogViewController.prototype._didRenderConsoleMessageView):
2703         There is no need to run scrollToBottom again.
2704
2705         * UserInterface/Views/ConsoleCommandView.js:
2706         (WebInspector.ConsoleCommandView):
2707         Move all DOM operations to a new render method.
2708
2709         (WebInspector.ConsoleCommandView.prototype.render):
2710         * UserInterface/Views/ConsoleMessageView.js:
2711         (WebInspector.ConsoleMessageView):
2712         (WebInspector.ConsoleMessageView.prototype.render):
2713         (WebInspector.ConsoleMessageView.prototype.set repeatCount):
2714         (WebInspector.ConsoleMessageView.prototype._renderRepeatCount):
2715         * UserInterface/Views/LogContentView.js:
2716         (WebInspector.LogContentView.prototype.shown):
2717         When the console tab or the split console is opened render all pending messages.
2718
2719         (WebInspector.LogContentView.prototype.didAppendConsoleMessageView):
2720         No need to scrollToBottom once again.
2721
2722         (WebInspector.LogContentView.prototype._messageAdded):
2723         (WebInspector.LogContentView.prototype._previousMessageRepeatCountUpdated):
2724         (WebInspector.LogContentView.prototype._scopeFromMessageLevel): Deleted.
2725         (WebInspector.LogContentView.prototype._markScopeBarItemUnread): Added.
2726         Rename _pulseScopeBarItemBorder. In the very first version the border was pulsing,
2727         but now we use small colored circles instead.
2728
2729 2016-05-02  Joseph Pecoraro  <pecoraro@apple.com>
2730
2731         Uncaught Exception: TypeError: null is not an object (evaluating 'sourceCodeLocation.formattedLineNumber')
2732         https://bugs.webkit.org/show_bug.cgi?id=157239
2733         <rdar://problem/26030791>
2734
2735         Reviewed by Timothy Hatcher.
2736
2737         * UserInterface/Controllers/IssueManager.js:
2738         (WebInspector.IssueManager.issueMatchSourceCode):
2739         Require a sourceCodeLocation for Script errors.
2740
2741         * UserInterface/Views/SourceCodeTextEditor.js:
2742         (WebInspector.SourceCodeTextEditor.prototype._addIssue):
2743         Be safe against a missing sourceCodeLocation.
2744
2745         * UserInterface/Views/SourceCodeTextEditor.css:
2746         (.source-code.text-editor > .CodeMirror .issue-widget.inline > .arrow):
2747         (@media (-webkit-min-device-pixel-ratio: 2)):
2748         Adjust the style, on non-Retina the inline message arrow would sometimes
2749         be detached from the warning message.
2750
2751 2016-05-02  Timothy Hatcher  <timothy@apple.com>
2752
2753         Web Inspector: Zooming of docked Web Inspector affects the webpage, but reset to 0 does not
2754         https://bugs.webkit.org/show_bug.cgi?id=157234
2755         rdar://problem/26027177
2756
2757         Always prevent default for the zoom keyboard shortcuts to avoid passing the event back to
2758         Safari to handle and add explicit beeps when max/min is hit.
2759
2760         Reviewed by Brian Burg.
2761
2762         * UserInterface/Base/Main.js:
2763         (WebInspector.contentLoaded): Removed setting implicitlyPreventsDefault on zoom keyboard shortcuts.
2764         (WebInspector._increaseZoom): Add explicit beep and remove preventDefault call.
2765         (WebInspector._decreaseZoom): Ditto.
2766
2767 2016-05-01  Dan Bernstein  <mitz@apple.com>
2768
2769         WebInspectorUI.framework/Versions/A/Resources/Images/Legacy is empty
2770         https://bugs.webkit.org/show_bug.cgi?id=157248
2771
2772         Reviewed by Timothy Hatcher.
2773
2774         * UserInterface/Images/Legacy: Removed.
2775
2776 2016-04-29  Joseph Pecoraro  <pecoraro@apple.com>
2777
2778         Web Inspector: Issues inspecting the inspector, pausing on breakpoints causes content to not load
2779         https://bugs.webkit.org/show_bug.cgi?id=157198
2780         <rdar://problem/26011049>
2781
2782         Reviewed by Timothy Hatcher.
2783
2784         * UserInterface/Protocol/InspectorBackend.js:
2785         (InspectorBackendClass.prototype._sendCommandToBackendWithCallback):
2786         (InspectorBackendClass.prototype._sendCommandToBackendExpectingPromise):
2787         While auditing, use simpler check.
2788
2789         * UserInterface/Proxies/FormatterWorkerProxy.js:
2790         (WebInspector.FormatterWorkerProxy.canFormat): Deleted.
2791         While auditing, remove dead code.
2792
2793 2016-04-29  Timothy Hatcher  <timothy@apple.com>
2794
2795         Web Inspector: Scrolling in Timelines causes flashing of the DataGrid
2796         https://bugs.webkit.org/show_bug.cgi?id=157212
2797         rdar://problem/25994717
2798
2799         Listen for mousewheel events too so we can update the visible rows sooner.
2800
2801         Reviewed by Joseph Pecoraro.
2802
2803         * UserInterface/Views/DataGrid.js:
2804         (WebInspector.DataGrid): Call _updateScrollListeners.
2805         (WebInspector.DataGrid.prototype.set inline): Use _updateScrollListeners.
2806         (WebInspector.DataGrid.prototype.set variableHeightRows): Use _updateScrollListeners.
2807         (WebInspector.DataGrid.prototype._updateScrollListeners): Added. Listen for mousewheel too.
2808
2809 2016-04-29  Joseph Pecoraro  <pecoraro@apple.com>
2810
2811         Web Inspector: Jump to Line in auto formatted JavaScript does not work the first time
2812         https://bugs.webkit.org/show_bug.cgi?id=157194
2813         <rdar://problem/26008471>
2814
2815         Reviewed by Timothy Hatcher.
2816
2817         When doing asynchronous formatting we set the content of the editor
2818         twice. First to prime the editors back/foward list with the original
2819         content, and then again after we get the formatted content from the
2820         Worker, and then display the content.
2821
2822         The TextEditor attempts to reveal a position when the initial string
2823         has been set. Back when autoformatting was synchronous this was fine.
2824         Asynchronously however, this ends up happening between the original
2825         and formatted value. Also, the TextEditor has no idea that the
2826         SourceCodeTextEditor is going to format / defer displaying the
2827         contents. Add a "defer" property to the TextEditor that the
2828         SourceCodeTextEditor can use in this circumstance.
2829
2830         * UserInterface/Views/SourceCodeTextEditor.js:
2831         (WebInspector.SourceCodeTextEditor.prototype._populateWithContent):
2832         Avoid revealing a position when setting the original content. We will
2833         be formatting and we will want to reveal the position afterwards.
2834
2835         * UserInterface/Views/TextEditor.js:
2836         (WebInspector.TextEditor):
2837         (WebInspector.TextEditor.prototype.set deferReveal):
2838         Provide another reason to defer revealing.
2839
2840 2016-04-28  Joseph Pecoraro  <pecoraro@apple.com>
2841
2842         Web Inspector: FormatterWorker fails to find "External/Esprima.js" in Production builds
2843         https://bugs.webkit.org/show_bug.cgi?id=157162
2844         <rdar://problem/25996556>
2845
2846         Reviewed by Timothy Hatcher.
2847
2848         Workers have relative include paths. FormatterWorker has an includes
2849         that looks like:
2850
2851             importScripts(...[
2852                 "../../External/Esprima/esprima.js",
2853                 ...
2854             ]);
2855
2856         In optimized builds (Production) the esprima resources are combined
2857         and moved out of an External directory to "Esprima.js". We need to
2858         update the path of this include in optimized builds.
2859
2860         This adds a script to do some basic rewrites of paths. It will also
2861         produce a build error if there are any other External paths that
2862         may have been unhandled.
2863
2864         * Scripts/copy-user-interface-resources.pl:
2865         Run a new script to fix up the Worker imports for new pathes.
2866
2867         * Scripts/fix-worker-imports-for-optimized-builds.pl: Added.
2868         (fixWorkerImportsInFile):
2869         (fixWorkerImportsInDirectory):
2870         Replace "/External/Esprima/esprima.js" with "/Esprima.js" in imports.
2871         Fatal error for any unhandled "/External" lines that were not replaced.
2872
2873 2016-04-27  Joseph Pecoraro  <pecoraro@apple.com>
2874
2875         Web Inspector: Missing CSS autocompletion suggestions for -webkit-user-select
2876         https://bugs.webkit.org/show_bug.cgi?id=157104
2877
2878         Reviewed by Timothy Hatcher.
2879
2880         * UserInterface/Models/CSSKeywordCompletions.js:
2881
2882 2016-04-26  Joseph Pecoraro  <pecoraro@apple.com>
2883
2884         Web Inspector: Clarify Heap Snapshot instance Retained Size by hiding retained size of non-dominated children
2885         https://bugs.webkit.org/show_bug.cgi?id=157018
2886
2887         Reviewed by Timothy Hatcher.
2888
2889         * UserInterface/Proxies/HeapSnapshotNodeProxy.js:
2890         (WebInspector.HeapSnapshotNodeProxy):
2891         (WebInspector.HeapSnapshotNodeProxy.deserialize):
2892         * UserInterface/Workers/HeapSnapshot/HeapSnapshot.js:
2893         (HeapSnapshot.prototype.serializeNode):
2894         Include dominatorNodeIdentifier in the default proxy properties.
2895
2896         * UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
2897         (WebInspector.HeapSnapshotInstanceDataGridNode):
2898         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype.get node):
2899         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype.createCellContent):
2900         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._isDominatedByBase):
2901         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._isDominatedByNonBaseParent):
2902         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._populate):
2903         * UserInterface/Views/HeapSnapshotInstancesContentView.css:
2904         (.heap-snapshot > .data-grid td .sub-retained):
2905         Save the base HeapSnapshotInstanceDataGridNode so that it can be referenced by
2906         children. When expanding an instance, hide the retained size for children
2907         that are not dominated by the base object. Show the retained size for children
2908         for children that are dominated. If dominated directly, show the size in the
2909         normal black. If dominated transitively, show the size in a dimmed gray.
2910
2911 2016-04-25  Matt Baker  <mattbaker@apple.com>
2912
2913         Web Inspector: hook up grid row filtering in the new Timelines UI
2914         https://bugs.webkit.org/show_bug.cgi?id=154924
2915         <rdar://problem/24934607>
2916
2917         Reviewed by Timothy Hatcher.
2918
2919         Re-implement timeline data grid filtering that previously existed in the
2920         navigation sidebar. This patch adds support for filter text, scope bars,
2921         and filtering based on ruler selection.
2922
2923         Multi-column filter support is now part of DataGrid. The grid checks compares
2924         filter text against cell data of type string. DataGridNode subclasses may
2925         provide custom string data for columns that format complex objects (such
2926         as SourceCodeLocations). Cells containing data of type number are not
2927         considered for filtering at this time.
2928
2929         * UserInterface/Views/DataGrid.js:
2930         (WebInspector.DataGrid):
2931         (WebInspector.DataGrid.prototype.set filterText):
2932         (WebInspector.DataGrid.prototype.get filterDelegate):
2933         (WebInspector.DataGrid.prototype.set filterDelegate):
2934         (WebInspector.DataGrid.prototype.filterDidChange):
2935         Called internally by the grid whenever the filter text or delegate changes.
2936         Also called by clients that implement a filter delegate, to inform the
2937         grid that a custom filter has changed.
2938
2939         (WebInspector.DataGrid.prototype.hasCustomFilters):
2940         (WebInspector.DataGrid.prototype.matchNodeAgainstCustomFilters):
2941         Calls the filter delegate, if it exists, and provides a hook for
2942         subclasses to provide custom filtering.
2943
2944         (WebInspector.DataGrid.prototype._applyFiltersToNode.matchTextFilter):
2945         (WebInspector.DataGrid.prototype._applyFiltersToNode.makeVisible):
2946         (WebInspector.DataGrid.prototype._applyFiltersToNode):
2947         Filters data grid nodes and fires filter events as needed.
2948         (WebInspector.DataGrid.prototype._hasFilterDelegate):
2949         Helper function.
2950         (WebInspector.DataGrid.prototype._updateVisibleRows):
2951         Exclude hidden nodes from revealed rows.
2952         (WebInspector.DataGrid.prototype._updateFilter):
2953         Filtering entry point, called on an animation frame. Updates visible
2954         rows if any node was filtered/unfiltered.
2955
2956         (WebInspector.DataGridNode):
2957         (WebInspector.DataGridNode.prototype.get filterableData):
2958         Gets an array of filterable strings for the node.
2959         (WebInspector.DataGridNode.prototype.refresh):
2960         Resets cached filterable strings.
2961         (WebInspector.DataGridNode.prototype.filterableDataForColumn):
2962         Can be overridden by subclasses to provide filterable text for complex
2963         cell data, like as objects formatted as document fragments.
2964
2965         * UserInterface/Views/LayoutTimelineDataGridNode.js:
2966         (WebInspector.LayoutTimelineDataGridNode.prototype.get data):
2967
2968         * UserInterface/Views/LayoutTimelineView.js:
2969         (WebInspector.LayoutTimelineView):
2970         Register grid and remove logic that has been moved to the base class.
2971         (WebInspector.LayoutTimelineView.prototype.filterDidChange):
2972         Update highlight after grid filter change.
2973         (WebInspector.LayoutTimelineView.prototype._dataGridSelectedNodeChanged):
2974         Update highlight when selection changes.
2975         (WebInspector.LayoutTimelineView.prototype.matchTreeElementAgainstCustomFilters): Deleted.
2976         (WebInspector.LayoutTimelineView.prototype.treeElementDeselected): Deleted.
2977         (WebInspector.LayoutTimelineView.prototype._dataGridFiltersDidChange): Deleted.
2978         (WebInspector.LayoutTimelineView.prototype._dataGridNodeSelected): Deleted.
2979         No longer needed.
2980
2981         * UserInterface/Views/NetworkTimelineView.js:
2982         (WebInspector.NetworkTimelineView):
2983         Register grid and remove logic that has been moved to the base class.
2984         (WebInspector.NetworkTimelineView.prototype.matchTreeElementAgainstCustomFilters): Deleted.
2985         (WebInspector.NetworkTimelineView.prototype._dataGridFiltersDidChange): Deleted.
2986         (WebInspector.NetworkTimelineView.prototype._dataGridNodeSelected): Deleted.
2987         No longer needed.
2988
2989         * UserInterface/Views/OverviewTimelineView.js:
2990         (WebInspector.OverviewTimelineView):
2991         Register grid and remove logic that has been moved to the base class.
2992         (WebInspector.OverviewTimelineView.prototype._dataGridNodeSelected): Deleted.
2993         No longer needed.
2994
2995         * UserInterface/Views/RenderingFrameTimelineView.js:
2996         (WebInspector.RenderingFrameTimelineView):
2997         Register grid and remove logic that has been moved to the base class.
2998         (WebInspector.RenderingFrameTimelineView.prototype.get filterStartTime):
2999         (WebInspector.RenderingFrameTimelineView.prototype.get filterEndTime):
3000         Convert selection indices into filter start and end times.
3001         (WebInspector.RenderingFrameTimelineView.prototype.matchDataGridNodeAgainstCustomFilters):
3002         Perform custom filtering on rendering frame duration.
3003         (WebInspector.RenderingFrameTimelineView.prototype._scopeBarSelectionDidChange):
3004         Inform grid of custom filter change.
3005         (WebInspector.RenderingFrameTimelineView.prototype.matchTreeElementAgainstCustomFilters): Deleted.
3006         (WebInspector.RenderingFrameTimelineView.prototype._dataGridNodeSelected): Deleted.
3007         No longer needed.
3008
3009         * UserInterface/Views/ResourceTimelineDataGridNode.js:
3010         (WebInspector.ResourceTimelineDataGridNode.prototype.filterableDataForColumn):
3011         Use URL string for filtering "name" column.
3012
3013         * UserInterface/Views/ScriptClusterTimelineView.js:
3014         (WebInspector.ScriptClusterTimelineView.prototype.updateFilter):
3015         Forwarding for TimelineView API.
3016         (WebInspector.ScriptClusterTimelineView.prototype.matchDataGridNodeAgainstCustomFilters):
3017         (WebInspector.ScriptClusterTimelineView.prototype.matchTreeElementAgainstCustomFilters): Deleted.
3018         Renamed to matchDataGridNodeAgainstCustomFilters.
3019         (WebInspector.ScriptClusterTimelineView.prototype._scriptClusterViewCurrentContentViewDidChange): Deleted.
3020         Removed FIXME comment. Updating TimelineView times is sufficient to trigger filtering.
3021
3022         * UserInterface/Views/ScriptDetailsTimelineView.js:
3023         (WebInspector.ScriptDetailsTimelineView):
3024         Register grid and remove logic that has been moved to the base class.
3025         (WebInspector.ScriptDetailsTimelineView.prototype._dataGridFiltersDidChange): Deleted.
3026         (WebInspector.ScriptDetailsTimelineView.prototype._dataGridNodeSelected): Deleted.
3027         No longer needed.
3028
3029         * UserInterface/Views/ScriptTimelineDataGridNode.js:
3030         (WebInspector.ScriptTimelineDataGridNode.prototype.filterableDataForColumn):
3031         Use main title and subtitle strings for filtering "name" column.
3032         (WebInspector.ScriptTimelineDataGridNode.prototype._createNameCellDocumentFragment):
3033         (WebInspector.ScriptTimelineDataGridNode.prototype._subtitle):
3034         Break out for use in filterableDataForColumn.
3035
3036         * UserInterface/Views/TimelineDataGrid.js:
3037         (WebInspector.TimelineDataGrid):
3038         Cleanup variable names.
3039         (WebInspector.TimelineDataGrid.prototype.hasCustomFilters):
3040         Always true because filtering on ruler selection always occurs.
3041         (WebInspector.TimelineDataGrid.prototype.matchNodeAgainstCustomFilters):
3042         Match nodes against scope bar filters.
3043         (WebInspector.TimelineDataGrid.prototype._scopeBarSelectedItemsDidChange):
3044         Inform grid of custom filter change.
3045         (WebInspector.TimelineDataGrid.prototype.treeElementMatchesActiveScopeFilters): Deleted.
3046         Re-implemented as _nodeMatchesActiveScopeFilters.
3047         (WebInspector.TimelineDataGrid.prototype._updateScopeBarForcedVisibility): Deleted.
3048         Old UI. No longer needed.
3049
3050         * UserInterface/Views/TimelineDataGridNode.js:
3051         (WebInspector.TimelineDataGridNode.prototype.filterableDataForColumn):
3052         Filter strings for SourceCodeLocation and CallFrame objects.
3053
3054         * UserInterface/Views/TimelineRecordingContentView.js:
3055         (WebInspector.TimelineRecordingContentView):
3056         Listen for FilterBar changes and TimelineView record filtering.
3057         (WebInspector.TimelineRecordingContentView.prototype._filterDidChange):
3058         Update grid filters when filter bar changes.
3059         (WebInspector.TimelineRecordingContentView.prototype._recordWasFiltered):
3060         Update overview when records are filtered/unfiltered.
3061         (WebInspector.TimelineRecordingContentView.prototype.filterDidChange): Deleted.
3062         (WebInspector.TimelineRecordingContentView.prototype.recordWasFiltered): Deleted.
3063         (WebInspector.TimelineRecordingContentView.prototype.matchTreeElementAgainstCustomFilters.checkTimeBounds): Deleted.
3064         (WebInspector.TimelineRecordingContentView.prototype.matchTreeElementAgainstCustomFilters): Deleted.
3065         Re-implemented in DataGrid.
3066         (WebInspector.TimelineRecordingContentView.prototype._updateTimes): Deleted.
3067         FIXME comment removed. Filtering occurs when TimelineView times are updated.
3068         (WebInspector.TimelineRecordingContentView.prototype._timeRangeSelectionChanged): Deleted.
3069
3070         * UserInterface/Views/TimelineView.js:
3071         (WebInspector.TimelineView):
3072         (WebInspector.TimelineView.prototype.get navigationItems):
3073         Used by TimelineRecordingContentView to add scope bar items to the
3074         lower content browser's navigation bar.
3075
3076         (WebInspector.TimelineView.prototype.set startTime):
3077         (WebInspector.TimelineView.prototype.set endTime):
3078         (WebInspector.TimelineView.prototype.set currentTime):
3079         Update grid filter when recording times change.
3080         (WebInspector.TimelineView.prototype.get filterStartTime):
3081         (WebInspector.TimelineView.prototype.get filterEndTime):
3082         Let subclasses (RenderingFrameTimelineView) provide filter start/end times.
3083         (WebInspector.TimelineView.prototype.setupDataGrid):
3084         Register the grid used by the TimelineView subclass, allowing the base
3085         class to hook into common event listeners and provide boilerplate functionality.
3086
3087         (WebInspector.TimelineView.prototype.updateFilter):
3088         For data grid views, updates grid filters and sets new filter text.
3089         (WebInspector.TimelineView.prototype.matchDataGridNodeAgainstCustomFilters):
3090         (WebInspector.TimelineView.prototype.dataGridMatchNodeAgainstCustomFilters.checkTimeBounds):
3091         (WebInspector.TimelineView.prototype.dataGridMatchNodeAgainstCustomFilters):
3092         DataGrid filter delegate. Lets subclasses apply custom filters first,
3093         then filters based on ruler selection if needed.
3094
3095         (WebInspector.TimelineView.prototype.filterDidChange):
3096         Hook for subclasses to respond to filter changes.
3097         (WebInspector.TimelineView.prototype._filterTimesDidChange.delayedWork):
3098         (WebInspector.TimelineView.prototype._filterTimesDidChange):
3099         Helper function for coalescing ruler selection updates into a single
3100         filter update.
3101
3102         (WebInspector.TimelineView.prototype.matchTreeElementAgainstCustomFilters): Deleted.
3103         (WebInspector.TimelineView.prototype.filterUpdated): Deleted.
3104         No longer needed.
3105
3106 2016-04-25  Joseph Pecoraro  <pecoraro@apple.com>
3107
3108         Web Inspector: React.js JSXTransformer produces bogus error locations
3109         https://bugs.webkit.org/show_bug.cgi?id=150010
3110         <rdar://problem/23062233>
3111
3112         Reviewed by Timothy Hatcher.
3113
3114         Show dynamically added <script> elements added to a frame as resources.
3115         For cases where the scripts had source map resources or error messages
3116         we have a root from which to associate them to.
3117
3118         * Localizations/en.lproj/localizedStrings.js:
3119         "Script Element %d" tree element title.
3120
3121         * UserInterface/Models/Frame.js:
3122         (WebInspector.Frame.prototype.commitProvisionalLoad):
3123         (WebInspector.Frame.prototype.get extraScripts):
3124         (WebInspector.Frame.prototype.addExtraScript):
3125         Have a frame keep a list of its extra scripts.
3126
3127         * UserInterface/Models/Script.js:
3128         (WebInspector.Script):
3129         (WebInspector.Script.prototype.get displayName):
3130         (WebInspector.Script.prototype.get dynamicallyAddedScriptElement):
3131         Identify dynamically added script elements and associate them
3132         with the frame, instead of the frame's main resource.
3133
3134         * UserInterface/Views/FrameTreeElement.js:
3135         (WebInspector.FrameTreeElement.prototype.onpopulate):
3136         (WebInspector.FrameTreeElement.prototype._extraScriptAdded):
3137         Show named / source mapped dynamic script elements under a frame.
3138
3139         * UserInterface/Views/ResourceSidebarPanel.js:
3140         (WebInspector.ResourceSidebarPanel.prototype._scriptWasAdded):
3141         Dynamically added script element Scripts will be added by the frame that
3142         owns them.
3143
3144         * UserInterface/Views/ScriptTreeElement.js:
3145         (WebInspector.ScriptTreeElement):
3146         Don't include a subtitle for dynamicallyAddedScriptElement, details match
3147         the frame that owns them.
3148
3149 2016-04-25  Joseph Pecoraro  <pecoraro@apple.com>
3150
3151         Web Inspector: Line error widget showed in the wrong resource
3152         https://bugs.webkit.org/show_bug.cgi?id=150009
3153         <rdar://problem/23062199>
3154
3155         Reviewed by Timothy Hatcher.
3156
3157         This addresses a few long standing issues:
3158
3159             - IssueMessage and ConsoleMessage should not fight eachother
3160             - Displayed issue messages now correctly have format string formatting, e.g. console.error("Foo %s", str)
3161             - IssueMessage wraps a ConsoleMessage, so we don't duplicate everything
3162             - Gives ConsoleMessage a sourceCodeLocation (lazy)
3163                 - Since a sourceCodeLocation can have the exact SourceCode, if it was a Script
3164                   without a Resource, we can only show the error in the Script's editor.            
3165
3166         * UserInterface/Models/CallFrame.js:
3167         (WebInspector.CallFrame.fromPayload):
3168         Prefer the script identifier lookup first. And from the Script go
3169         to a resource if possible. This allows us to distinguish a location
3170         that should be in a Script that doesn't have a Resource when there
3171         exists a Resource with the same URL. This will soon be the case
3172         for dyanamic <script> elements append to a document.
3173
3174         * UserInterface/Controllers/IssueManager.js:
3175         (WebInspector.IssueManager.issueMatchSourceCode):
3176         Consolidate all the different checks to this one function.
3177
3178         (WebInspector.IssueManager.prototype.issueWasAdded):
3179         Create IssueMessages with ConsoleMessages.
3180
3181         (WebInspector.IssueManager.prototype.issuesForSourceCode):
3182         Simplify now that we have the better check.
3183
3184         * UserInterface/Controllers/LogManager.js:
3185         (WebInspector.LogManager.prototype.messageWasAdded):
3186         Once a ConsoleMessage has been created (and modified `parameters` for us)
3187         create the IssueMessage if it was an issue.
3188
3189         * UserInterface/Models/ConsoleMessage.js:
3190         (WebInspector.ConsoleMessage.prototype.get sourceCodeLocation):
3191         Lazily create a source code from the best possible location. This can
3192         be the top call frame or the url/line/column combination.
3193
3194         * UserInterface/Models/IssueMessage.js:
3195         (WebInspector.IssueMessage):
3196         Creation and most properties just call through to a ConsoleMessage.
3197         The `type` and `text` are Issue specific. Anything that uses location
3198         data should use the sourceCodeLocation.
3199         
3200         (WebInspector.IssueMessage.prototype.saveIdentityToCookie):
3201         Fix implementation that didn't account for a null sourceCodeLocation.
3202
3203         (WebInspector.IssueMessage.prototype._formatTextIfNecessary):
3204         Basic text format message formatting.
3205
3206         * UserInterface/Protocol/ConsoleObserver.js:
3207         (WebInspector.ConsoleObserver.prototype.messageAdded):
3208         No longer call IssueMessage from the observer. Let LogManager trigger issues.
3209
3210         * UserInterface/Views/ContentView.js:
3211         (WebInspector.ContentView.createFromRepresentedObject):
3212         (WebInspector.ContentView.resolvedRepresentedObjectForRepresentedObject):
3213         (WebInspector.ContentView.isViewable):
3214         An IssueMessage represented object for an IssueMessageTreeElement should be
3215         restorable by just going to the sourceCodeLocation it references. This is
3216         identical to a Breakpoint.
3217
3218         * UserInterface/Views/IssueTreeElement.js:
3219         (WebInspector.IssueTreeElement.prototype._updateTitles):
3220         (WebInspector.IssueTreeElement):
3221         * UserInterface/Views/ResourceContentView.js:
3222         (WebInspector.ResourceContentView.prototype._issueWasAdded):
3223         * UserInterface/Views/SourceCodeTextEditor.js:
3224         (WebInspector.SourceCodeTextEditor.prototype._issueWasAdded):
3225         (WebInspector.SourceCodeTextEditor.prototype._addIssue):
3226         (WebInspector.SourceCodeTextEditor.prototype._reinsertAllIssues):
3227         (WebInspector.SourceCodeTextEditor.prototype._matchesIssue): Deleted.
3228         Update to use Issue's sourceCodeLocation or IssueManager's new APIs.
3229
3230 2016-04-24  Matt Baker  <mattbaker@apple.com>
3231
3232         Web Inspector: Can't sort by name/source code location columns in Timeline data grids
3233         https://bugs.webkit.org/show_bug.cgi?id=156965
3234         <rdar://problem/25898716>
3235
3236         Reviewed by Timothy Hatcher.
3237
3238         Add support for sorting SourceCodeLocation objects to TimelineDataGrid,
3239         and include a grid delegate so that views can extend sorting logic for
3240         other document fragment columns.
3241
3242         * UserInterface/Views/NetworkTimelineView.js:
3243         (WebInspector.NetworkTimelineView):
3244         (WebInspector.NetworkTimelineView.prototype.dataGridSortComparator):
3245         Sort "name" column by display name first, then resource URL.
3246
3247         * UserInterface/Views/ScriptDetailsTimelineView.js:
3248         (WebInspector.ScriptDetailsTimelineView):
3249         (WebInspector.ScriptDetailsTimelineView.prototype.dataGridSortComparator):
3250         Sort "name" column by display name first, then subtitle.
3251
3252         * UserInterface/Views/ScriptTimelineDataGridNode.js:
3253         (WebInspector.ScriptTimelineDataGridNode.prototype.get subtitle):
3254         Make subtitle accessible externally for sorting.
3255         (WebInspector.ScriptTimelineDataGridNode.prototype._createNameCellDocumentFragment):
3256         (WebInspector.ScriptTimelineDataGridNode):
3257
3258         * UserInterface/Views/TimelineDataGrid.js:
3259         (WebInspector.TimelineDataGrid):
3260         (WebInspector.TimelineDataGrid.prototype.get sortDelegate):
3261         (WebInspector.TimelineDataGrid.prototype.set sortDelegate):
3262         Fire a SortChanged event if the delegate changed and the grid is sorted.
3263         (WebInspector.TimelineDataGrid.prototype._sort):
3264         If a sort delegate exists, and it returns a numeric value, skip the
3265         default compare.
3266
3267         (WebInspector.TimelineDataGrid.prototype._sortComparator):
3268         Add support for sorting SourceCodeLocation columns.
3269
3270 2016-04-24  Matt Baker  <mattbaker@apple.com>
3271
3272         Web Inspector: Error when selecting a bar in the Frames timeline
3273         https://bugs.webkit.org/show_bug.cgi?id=156960
3274         <rdar://problem/25897955>
3275
3276         Reviewed by Timothy Hatcher.
3277
3278         Fixes timeline grid node selection when record selected in the overview.
3279         Adds general purpose `findNode` method to DataGrid.
3280
3281         * UserInterface/Views/DataGrid.js:
3282         (WebInspector.DataGrid.prototype.findNode):
3283         Basic find function for locating a grid node in linear time.
3284
3285         * UserInterface/Views/TimelineRecordingContentView.js:
3286         (WebInspector.TimelineRecordingContentView.prototype._recordSelected):
3287         Remove tree outline references, call generic select method.
3288
3289         * UserInterface/Views/TimelineView.js:
3290         (WebInspector.TimelineView.prototype.selectRecord):
3291         If a data grid was set, deselect current selection and select the node
3292         associated with the timeline record.
3293
3294 2016-04-24  Matt Baker  <mattbaker@apple.com>
3295
3296         Web Inspector: Events in JavaScript & Events timeline have no profile children
3297         https://bugs.webkit.org/show_bug.cgi?id=156627
3298         <rdar://problem/25749740>
3299
3300         Reviewed by Timothy Hatcher.
3301
3302         ProfileNodeDataGridNode should handle `populate` events when expanded.
3303         This was previously done by ProfileNodeTreeElement, which is no longer
3304         used in the Timelines tab.
3305
3306         * UserInterface/Views/ProfileDataGridNode.js:
3307         (WebInspector.ProfileDataGridNode.prototype._updateChildrenForModifiers):
3308         (WebInspector.ProfileDataGridNode.prototype._populate):
3309         (WebInspector.ProfileDataGridNode):
3310         DataGridNode sets `shouldRefreshChildren` to false after populating
3311         child nodes. No need to track with a separate flag.
3312
3313         * UserInterface/Views/ProfileNodeDataGridNode.js:
3314         (WebInspector.ProfileNodeDataGridNode):
3315         (WebInspector.ProfileNodeDataGridNode.prototype._populate):
3316
3317 2016-04-22  Matt Baker  <mattbaker@apple.com>
3318
3319         Web Inspector: HeapAllocationsTimeline grid should use built-in grid column icons
3320         https://bugs.webkit.org/show_bug.cgi?id=156934
3321
3322         Reviewed by Timothy Hatcher.
3323
3324         * UserInterface/Views/H