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