display:inline on the tbody is causing the width of the iframe to be shrunk to the...
[WebKit-https.git] / Source / WebInspectorUI / ChangeLog
1 2016-04-16  Matt Baker  <mattbaker@apple.com>
2
3         display:inline on the tbody is causing the width of the iframe to be shrunk to the minimum size of its text.
4         https://bugs.webkit.org/show_bug.cgi?id=15666
5
6         Reviewed by Timothy Hatcher.
7
8         Fix a regression caused by the recent Timelines UI redesign, and
9         reorder TimelineDataGrid's constructor arguments now that most
10         timeline views no longer have an associated tree outline.
11
12         * UserInterface/Views/HeapAllocationsTimelineView.js:
13         (WebInspector.HeapAllocationsTimelineView):
14         * UserInterface/Views/LayoutTimelineView.js:
15         (WebInspector.LayoutTimelineView):
16         * UserInterface/Views/NetworkGridContentView.js:
17         (WebInspector.NetworkGridContentView):
18         * UserInterface/Views/NetworkTimelineView.js:
19         (WebInspector.NetworkTimelineView):
20         * UserInterface/Views/RenderingFrameTimelineView.js:
21         (WebInspector.RenderingFrameTimelineView):
22         * UserInterface/Views/ScriptDetailsTimelineView.js:
23         (WebInspector.ScriptDetailsTimelineView):
24         Reorder constructor parameters and omit optional treeOutline and
25         synchronizerDelegate arguments when they aren't needed.
26
27         * UserInterface/Views/TimelineDataGrid.js:
28         (WebInspector.TimelineDataGrid):
29         Reorder constructor arguments so that treeOutline can be optional.
30         (WebInspector.TimelineDataGrid.prototype._refreshDirtyDataGridNodes):
31         Nodes should be refreshed and re-inserted in the data grid without
32         requiring a grid synchronizer. If a synchronizer exists, re-insert
33         the tree element for the node. Since the syncronizer is disabled the
34         order of grid/tree operations doesn't matter.
35
36 2016-04-15  Joseph Pecoraro  <pecoraro@apple.com>
37
38         Web Inspector: sourceMappingURL not used when sourceURL is set
39         https://bugs.webkit.org/show_bug.cgi?id=156021
40         <rdar://problem/25438417>
41
42         Reviewed by Timothy Hatcher.
43
44         Previously Debugger.sourceParsed only providing the sourceURL, and
45         wiping out the resourceURL, meant that a Script from a Resource that
46         set a sourceURL directive would fail to be associated with its Resource.
47
48         This would result in duplicated tree elements in the Resources Sidebar,
49         one for the Resource, and one for the Script. With the Script getting
50         ultimately getting the SourceMap resources. However, since the frontend
51         prefers Resources over Scripts when possible, an error that generated
52         from the script would point to a location in the Resource, not following
53         source maps.
54
55         By always providing the resource URL in Debugger.sourceParsed, a Script
56         can better be associated with its Resource. The result is now a single
57         shared tree element in the Resources Sidebar, and the Resource getting
58         the SourceMap resources. Now the script error goes through the Resource
59         to its SourceMap resources as we would expect.
60
61         * UserInterface/Protocol/DebuggerObserver.js:
62         (WebInspector.DebuggerObserver):
63         (WebInspector.DebuggerObserver.prototype.scriptParsed):
64         We now have to handle two different signatures of scriptParsed. One
65         for legacy, and one for non-legacy. Cache that value early on, since
66         scriptParsed happens a lot.
67
68         * UserInterface/Protocol/InspectorBackend.js:
69         (InspectorBackend.Agent.prototype.hasEventParameter):
70         Runtime check a protocol event to see if it has a parameter. This
71         is used to check if Debugger.sourceParsed is legacy or not based
72         on if it has the legacy "hasSourceURL" parameter.
73
74         * UserInterface/Models/Script.js:
75         (WebInspector.Script):
76         (WebInspector.Script.prototype.get sourceURL):
77         Treat sourceURL and url separately.
78
79         (WebInspector.Script.prototype.get displayName):
80         Handle both the url and sourceURL in displayName.
81
82         * UserInterface/Controllers/DebuggerManager.js:
83         (WebInspector.DebuggerManager.prototype.get knownNonResourceScripts):
84         (WebInspector.DebuggerManager.prototype.debuggerDidPause):
85         (WebInspector.DebuggerManager.prototype.scriptDidParse):
86         * UserInterface/Protocol/RemoteObject.js:
87         (WebInspector.RemoteObject.prototype.findFunctionSourceCodeLocation):
88         Update code that checks the sourceURL to explicitly use sourceURL.
89
90         * UserInterface/Controllers/SourceMapManager.js:
91         (WebInspector.SourceMapManager.prototype.downloadSourceMap):
92         For legacy backends, or in case we get a resource that has an incomplete
93         baseURL, attempt to get an absolute URL based on the main resource.
94
95         * UserInterface/Views/DebuggerSidebarPanel.js:
96         (WebInspector.DebuggerSidebarPanel.prototype._addScript):
97         * UserInterface/Views/ResourceSidebarPanel.js:
98         (WebInspector.ResourceSidebarPanel.prototype._scriptWasAdded):
99         Ignore scripts without a url or sourceURL.
100
101 2016-04-14  Joseph Pecoraro  <pecoraro@apple.com>
102
103         Web Inspector: Cleanup inspector/debugger tests
104         https://bugs.webkit.org/show_bug.cgi?id=156619
105
106         Reviewed by Brian Burg.
107
108         * UserInterface/Base/Main.js:
109         (WebInspector.loaded):
110         * UserInterface/Controllers/DebuggerManager.js:
111         Remove agent checks for agents that are always available.
112
113 2016-04-14  Joseph Pecoraro  <pecoraro@apple.com>
114
115         Web Inspector: Add a JavaScript Formatting test for template strings
116         https://bugs.webkit.org/show_bug.cgi?id=156600
117
118         Reviewed by Brian Burg.
119
120         * Tools/Formatting/index.html:
121
122 2016-04-14  Carlos Garcia Campos  <cgarcia@igalia.com>
123
124         REGRESSION: Web Inspector: Remote inspector doesn't work
125         https://bugs.webkit.org/show_bug.cgi?id=156543
126
127         Reviewed by Timothy Hatcher.
128
129         WebSocket connection is blocked by CSP, but needed by the remote web inspector to work, so allow connect to ws
130         URLs from the web inspector. Also add stubs for zoomFactor and setZoomFactor to InspectorFrontendHostStub,
131         required after r199396.
132
133         * UserInterface/Base/InspectorFrontendHostStub.js:
134         (window.InspectorFrontendHost.WebInspector.InspectorFrontendHostStub.prototype.setZoomFactor):
135         (window.InspectorFrontendHost.WebInspector.InspectorFrontendHostStub.prototype.zoomFactor):
136         * UserInterface/Main.html:
137
138 2016-04-12  Brian Burg  <bburg@apple.com>
139
140         Web Inspector: save inspector's zoom factor as a persistent setting across sessions
141         https://bugs.webkit.org/show_bug.cgi?id=156522
142         <rdar://problem/25635774>
143
144         Reviewed by Timothy Hatcher.
145
146         * UserInterface/Base/Main.js:
147         (WebInspector.loaded):
148         Initialize the setting and immediately set the zoom before the frontend page loads.
149
150         (WebInspector._increaseZoom):
151         (WebInspector._decreaseZoom):
152         (WebInspector._resetZoom):
153         Use the internal get/set method which updates the WebInspector.Setting.
154
155         (WebInspector._setZoomFactor):
156         Added. Round-trip through the frontend host method in case it further clamps the value.
157
158         (WebInspector._zoomFactor):
159         Added. Just return the setting, since there's no other way for zoom to have changed.
160
161 2016-04-12  Joseph Pecoraro  <pecoraro@apple.com>
162
163         Web Inspector: Show the normal Native icon for all Internal objects in Heap Snapshots
164         https://bugs.webkit.org/show_bug.cgi?id=156513
165
166         Reviewed by Timothy Hatcher.
167
168         * UserInterface/Views/HeapSnapshotClusterContentView.js:
169         (WebInspector.HeapSnapshotClusterContentView.iconStyleClassNameForClassName):
170         Show the native icon for internal objects.
171
172 2016-04-12  Joseph Pecoraro  <pecoraro@apple.com>
173
174         Web Inspector: Keyboard shortcut for "Inspect Element" only works when Web Inspector is open.
175         https://bugs.webkit.org/show_bug.cgi?id=111193
176         <rdar://problem/13325889>
177
178         Reviewed by Timothy Hatcher.
179
180         * UserInterface/Controllers/DOMTreeManager.js:
181         (WebInspector.DOMTreeManager.prototype.set inspectModeEnabled):
182         (WebInspector.DOMTreeManager.set inspectModeEnabled.callback):
183         * UserInterface/Protocol/InspectorFrontendAPI.js:
184         (InspectorFrontendAPI.setElementSelectionEnabled):
185         Frontend API to enable element selection.
186
187 2016-04-12  Joseph Pecoraro  <pecoraro@apple.com>
188
189         Web Inspector: Should be able to expand Objects in Heap Allocations View to see exactly what it retains
190         https://bugs.webkit.org/show_bug.cgi?id=156419
191         <rdar://problem/25633863>
192
193         Reviewed by Timothy Hatcher.
194
195         * Localizations/en.lproj/localizedStrings.js:
196         * UserInterface/Main.html:
197         Remove strings, and fix sort.
198
199         * UserInterface/Models/HeapSnapshotRootPath.js:
200         (WebInspector.HeapSnapshotRootPath.pathComponentForIndividualEdge):
201         (WebInspector.HeapSnapshotRootPath.canPropertyNameBeDotAccess):
202         (WebInspector.HeapSnapshotRootPath.prototype.appendPropertyName):
203         (WebInspector.HeapSnapshotRootPath.prototype._canPropertyNameBeDotAccess):
204         Provide a helper to get an path component string for an individual edge.
205
206         * UserInterface/Models/PropertyPreview.js:
207         (WebInspector.PropertyPreview):
208         Fix an assert that may have errantly fired for an empty string name.
209
210         * UserInterface/Proxies/HeapSnapshotNodeProxy.js:
211         (WebInspector.HeapSnapshotNodeProxy):
212         (WebInspector.HeapSnapshotNodeProxy.deserialize):
213         Include "hasChildren" property in the original proxy message.
214
215         (WebInspector.HeapSnapshotNodeProxy.prototype.retainedNodes):
216         The method now also returns a list of edges for each of the retained nodes.
217
218         * UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
219         (WebInspector.HeapSnapshotInstanceDataGridNode):
220         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype.createCellContent):
221         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype.sort):
222         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._populate):
223         An instance DataGrid node can now show children. It can expand to show
224         its retained node graph.
225
226         * UserInterface/Workers/HeapSnapshot/HeapSnapshot.js:
227         (HeapSnapshot.instancesWithClassName):
228         (HeapSnapshot.prototype.dominatedNodes):
229         (HeapSnapshot.prototype.retainers):
230         (HeapSnapshot.prototype.serializeNode):
231         Remove unnecessary calls to bind in favor of using the `thisObject` argument.
232
233         (HeapSnapshot.prototype.retainedNodes):
234         Return a parallel list of edges for each of the nodes.
235
236         * UserInterface/Views/HeapSnapshotClassDataGridNode.js:
237         (WebInspector.HeapSnapshotClassDataGridNode.prototype.createCellContent):
238         (WebInspector.HeapSnapshotClassDataGridNode.prototype._populate):
239         * UserInterface/Views/HeapSnapshotClusterContentView.js:
240         (WebInspector.HeapSnapshotClusterContentView.prototype.get summaryContentView):
241         (WebInspector.HeapSnapshotClusterContentView.prototype.get instancesContentView):
242         (WebInspector.HeapSnapshotClusterContentView.prototype.shown):
243         (WebInspector.HeapSnapshotClusterContentView):
244         (WebInspector.HeapSnapshotClusterContentView.prototype.get navigationItems): Deleted.
245         (WebInspector.HeapSnapshotClusterContentView.prototype._contentViewExtraArguments): Deleted.
246         (WebInspector.HeapSnapshotClusterContentView.prototype._toggleShowInternalObjectsSetting): Deleted.
247         (WebInspector.HeapSnapshotClusterContentView.prototype._updateViewsForShowInternalObjectsSettingValue): Deleted.
248         (WebInspector.HeapSnapshotClusterContentView.prototype._updateShowInternalObjectsButtonNavigationItem): Deleted.
249         * UserInterface/Views/HeapSnapshotInstancesContentView.js:
250         (WebInspector.HeapSnapshotInstancesContentView):
251         (WebInspector.HeapSnapshotInstancesContentView.prototype.get showInternalObjects): Deleted.
252         (WebInspector.HeapSnapshotInstancesContentView.prototype.set showInternalObjects): Deleted.
253         * UserInterface/Views/HeapSnapshotInstancesDataGridTree.js:
254         (WebInspector.HeapSnapshotInstancesDataGridTree.prototype._populateTopLevel):
255         (WebInspector.HeapSnapshotInstancesDataGridTree):
256         (WebInspector.HeapSnapshotInstancesDataGridTree.prototype.get includeInternalObjects): Deleted.
257         (WebInspector.HeapSnapshotInstancesDataGridTree.prototype.set includeInternalObjects): Deleted.
258         * UserInterface/Views/HeapSnapshotSummaryContentView.js:
259         Remove the show/hide internal objects button. In the Instances view we will
260         only show non-Internal objects at the top level, and show internal objects
261         when those instances are expanded.
262
263 2016-04-12  Matt Baker  <mattbaker@apple.com>
264
265         Web Inspector: clearing the console should exit all console groups
266         https://bugs.webkit.org/show_bug.cgi?id=156496
267         <rdar://problem/25676416>
268
269         Reviewed by Timothy Hatcher.
270
271         * UserInterface/Views/LogContentView.js:
272         (WebInspector.LogContentView.prototype._logCleared):
273         Reset nesting level to zero.
274
275 2016-04-11  Joseph Pecoraro  <pecoraro@apple.com>
276
277         Web Inspector: Tab Bar items get unreadable at narrow window widths, should collapse earlier
278         https://bugs.webkit.org/show_bug.cgi?id=156477
279
280         Reviewed by Timothy Hatcher.
281
282         * UserInterface/Views/TabBar.js:
283         (WebInspector.TabBar.prototype.layout):
284         Hide-titles sooner since a width of 60 results in only a few characters
285         and looks poor.
286
287 2016-04-11  Joseph Pecoraro  <pecoraro@apple.com>
288
289         Web Inspector: Unstyled nodes in ObjectTree previews look poor
290         https://bugs.webkit.org/show_bug.cgi?id=156475
291         <rdar://problem/25667351>
292
293         Reviewed by Timothy Hatcher.
294
295         * UserInterface/Views/ObjectPreviewView.js:
296         (WebInspector.ObjectPreviewView.prototype._appendPreview):
297         Treat nodes as simple values.
298
299         (WebInspector.ObjectPreviewView.prototype._initTitleElement):
300         (WebInspector.ObjectPreviewView.prototype._appendValuePreview):
301         Format nodes nicely, and treat them as lossy since they have properties.
302
303 2016-04-11  Joseph Pecoraro  <pecoraro@apple.com>
304
305         Web Inspector: HeapSnapshot instance property path popover should include a descriptive header
306         https://bugs.webkit.org/show_bug.cgi?id=156431
307         <rdar://problem/25633594>
308
309         Reviewed by Timothy Hatcher.
310
311         * Localizations/en.lproj/localizedStrings.js:
312         * UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
313         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._mouseoverHandler.appendTitle):
314         Title for the popover. Because localization may change the location of the @1234
315         in the string, localize first with a placeholder, and then replace the placeholder
316         with the @1234 link.
317
318         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._mouseoverHandler.appendPath):
319         Give the table a container for extra padding.
320
321         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._mouseoverHandler.appendPathRow):
322         Do not include the space before @1234 as part of the clickable link.
323
324         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._mouseoverHandler):
325         Include a title when the popover shows a root path.
326
327         * UserInterface/Views/HeapSnapshotInstancesContentView.css:
328         (.heap-snapshot-instance-popover-content > .title):
329         (.heap-snapshot-instance-popover-content):
330         (.heap-snapshot-instance-popover-content > .table-container):
331         (.heap-snapshot-instance-popover-content table):
332         Provide styles for the title. Let the title extend across the entire
333         popover horizontally, but pad the table so that it appears more
334         centered under the title. Because the table has border collapse we have
335         to wrap it in a container to give it back the padding we want.
336
337 2016-04-08  Joseph Pecoraro  <pecoraro@apple.com>
338
339         Web Inspector: XHRs and Web Worker scripts are not searchable
340         https://bugs.webkit.org/show_bug.cgi?id=154214
341         <rdar://problem/24643587>
342
343         Reviewed by Timothy Hatcher.
344
345         * UserInterface/Views/SearchSidebarPanel.js:
346         (WebInspector.SearchSidebarPanel.prototype.performSearch.resourceCallback):
347         (WebInspector.SearchSidebarPanel.prototype.performSearch.resourcesCallback):
348         Carry forward the requestId property if it is available.
349
350 2016-04-08  Joseph Pecoraro  <pecoraro@apple.com>
351
352         Web Inspector: Allocation snapshot hover persists after switching tabs
353         https://bugs.webkit.org/show_bug.cgi?id=156430
354         <rdar://problem/25633800>
355
356         Reviewed by Timothy Hatcher.
357
358         * UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
359         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._mouseoverHandler):
360         Don't show the popover if the tree is no longer visible.
361
362         * UserInterface/Views/HeapSnapshotInstancesContentView.js:
363         (WebInspector.HeapSnapshotInstancesContentView.prototype.shown):
364         * UserInterface/Views/HeapSnapshotInstancesDataGridTree.js:
365         (WebInspector.HeapSnapshotInstancesDataGridTree):
366         (WebInspector.HeapSnapshotInstancesDataGridTree.prototype.get visible):
367         (WebInspector.HeapSnapshotInstancesDataGridTree.prototype.shown):
368         (WebInspector.HeapSnapshotInstancesDataGridTree.prototype.hidden):
369         Give the tree a visible state and have its containing ContentView
370         update it with normal ContentView shown/hidden.
371
372         * UserInterface/Views/Popover.js:
373         We are presenting while we were dismissing, so completely clear the
374         dismissing state.
375
376 2016-04-08  Joseph Pecoraro  <pecoraro@apple.com>
377
378         JSContext Inspector: Fix asserts and uncaught exception showing Timeline Tab
379         https://bugs.webkit.org/show_bug.cgi?id=156411
380
381         Reviewed by Timothy Hatcher.
382
383         * UserInterface/Views/OverviewTimelineView.js:
384         (WebInspector.OverviewTimelineView):
385         (WebInspector.OverviewTimelineView.prototype.closed):
386         Gracefully handle if we do not have a Network Timeline.
387
388         * UserInterface/Views/TimelineTabContentView.js:
389         (WebInspector.TimelineTabContentView.prototype._changeViewMode):
390         This function is always called by the constructor, so the assert
391         is not useful since it can be called when FPS is not supported.
392
393 2016-04-08  Matt Baker  <mattbaker@apple.com>
394
395         Web Inspector: Attempting to dismiss a popover that is already being dismissed causes an error
396         https://bugs.webkit.org/show_bug.cgi?id=156385
397         <rdar://problem/25617962>
398
399         Reviewed by Timothy Hatcher.
400
401         The Popover element is removed from the DOM once it's fade-out transition
402         completes. Since Popover.dismiss proceeds as long as it's element has a
403         parent, successive calls to dismiss can run before the popover is removed.
404
405         Rather than rely on the presence of the popover in the DOM, set a "dismissing"
406         flag the first time dismiss is called, before the fade-out animation begins.
407
408         * UserInterface/Controllers/BreakpointPopoverController.js:
409         (WebInspector.BreakpointPopoverController.prototype._conditionCodeMirrorEscapeOrEnterKey):
410         Check for null popover.
411
412         * UserInterface/Views/Popover.js:
413         (WebInspector.Popover):
414         (WebInspector.Popover.prototype.dismiss):
415         Do nothing if already dismissing.
416
417         (WebInspector.Popover.prototype.handleEvent):
418         Reset dismissing flag after style transition completes.
419
420 2016-04-08  Matt Baker  <mattbaker@apple.com>
421
422         Web Inspector: Quick Open fails to match pattern "bB" in file "abBc"
423         https://bugs.webkit.org/show_bug.cgi?id=156398
424
425         Reviewed by Timothy Hatcher.
426
427         Correct an off-by-one error in the backtrack routine that set the dead
428         branch index to the character just before the match that was popped.
429         The dead branch index should equal the index of the popped match.
430
431         * UserInterface/Controllers/ResourceQueryController.js:
432         (WebInspector.ResourceQueryController.prototype._findQueryMatches.backtrack):
433         (WebInspector.ResourceQueryController.prototype._findQueryMatches):
434
435 2016-04-07  Matt Baker  <mattbaker@apple.com>
436
437         Web Inspector: OpenResourceDialog should keep its resources list up-to-date
438         https://bugs.webkit.org/show_bug.cgi?id=155321
439         <rdar://problem/25093890>
440
441         Reviewed by Timothy Hatcher.
442
443         The Quick Open dialog should listen for resource change events, refreshing
444         the resource list and current query results as needed.
445
446         * UserInterface/Views/OpenResourceDialog.js:
447         (WebInspector.OpenResourceDialog):
448         (WebInspector.OpenResourceDialog.prototype.didDismissDialog):
449         Unregister resource event handlers.
450
451         (WebInspector.OpenResourceDialog.prototype.didPresentDialog):
452         Register resource event handlers and add main frame resources.
453
454         (WebInspector.OpenResourceDialog.prototype._addResource):
455         Add resource to the query controller, if valid. Optionally suppress
456         the potentially expensive filter update, which is useful when adding
457         multiple resources at once.
458
459         (WebInspector.OpenResourceDialog.prototype._addResourcesForFrame):
460         Add the entire frame resource tree and update dialog filter.
461
462         (WebInspector.OpenResourceDialog.prototype._mainResourceDidChange):
463         (WebInspector.OpenResourceDialog.prototype._resourceWasAdded):
464
465 2016-04-07  Joseph Pecoraro  <pecoraro@apple.com>
466
467         Web Inspector: ProfileView source links are off by 1 line, worse in pretty printed code
468         https://bugs.webkit.org/show_bug.cgi?id=156371
469
470         Reviewed by Timothy Hatcher.
471
472         * UserInterface/Views/ProfileDataGridNode.js:
473         (WebInspector.ProfileDataGridNode.prototype._displayContent):
474         Switch the 1-based locations in the CCT data structure to 0-based for SourceCodeLocation.
475
476 2016-04-07  Joseph Pecoraro  <pecoraro@apple.com>
477
478         Web Inspector: Uncaught Exception: No resource with given URL found
479         https://bugs.webkit.org/show_bug.cgi?id=156259
480         <rdar://problem/25564749>
481
482         Reviewed by Timothy Hatcher.
483
484         * UserInterface/Views/SourceCodeTextEditor.js:
485         (WebInspector.SourceCodeTextEditor):
486         SourceCode.prototype.requestContent will reject if it cannot load
487         content for the given resource. In that case, we already have an
488         earlier catch handler that displays an error message in the
489         ContentView, so we shouldn't show an Uncaught Exception page.
490         Really, we should not reject the original promise here, and
491         instead resolve it with an object describing the error, but
492         short term we should remove the uncaught exception handler for
493         this case.
494
495 2016-04-07  Joseph Pecoraro  <pecoraro@apple.com>
496
497         Web Inspector: Take snapshot navigation button should match navigation button styles
498         https://bugs.webkit.org/show_bug.cgi?id=156355
499         <rdar://problem/25325172>
500
501         Reviewed by Timothy Hatcher.
502
503         * UserInterface/Images/Camera.svg: Added.
504         * UserInterface/Views/HeapAllocationsTimelineView.js:
505         (WebInspector.HeapAllocationsTimelineView):
506         Use the new image for the navigation bar button.
507
508 2016-04-07  Joseph Pecoraro  <pecoraro@apple.com>
509
510         Web Inspector: Inspector hangs when trying to view a large XHR resource
511         https://bugs.webkit.org/show_bug.cgi?id=144107
512         <rdar://problem/20669463>
513
514         Reviewed by Timothy Hatcher.
515
516         Previously auto formatting (initial pretty print of source code) in TextEditor
517         was done synchronously in this order:
518         
519           (1) revealing the Editor as soon as we have content
520           (2) set the CodeMirror value
521           (3) pretty print with the CodeMirror editor
522           (4) set the CodeMirror value
523               => Layout
524           
525         At the end, CodeMirror would layout once with the new content. This approach
526         performs very poorly when step (3) is an asynchronous action, because it would
527         mean CodeMirror would layout for both (2) and at the end (4) and the layout
528         itself can be very costly if the content is minified and so has very long
529         lines at the top of the file that need to be syntax highlighted and visible
530         since we do not wrap.
531
532         This patch changes the order of operations to benefit asynchronous formatting.
533         When SourceCodeTextEditor determines that it can autoformat it:
534
535           (1) set the CodeMirror value
536           (2) pretty print to source text
537           (3) reveal the Editor when pretty printing is done
538           (4) set the CodeMirror value
539               => Layout
540
541         This maintains the fact that to undo pretty printing we can just "undo" the
542         editor to get the original text. This also means we only do a single
543         CodeMirror layout, with the pretty printed and therefore more manageable
544         source text for highlighting. It also means we continue to show a loading
545         indicator in the editor while we are pretty printing. If this is truely
546         done asynchronously, which is the case for JavaScript with FormatterWorker,
547         then the loading indicator will animate smoothly.
548
549         This sequence also works with the traditional synchronous formatters,
550         which we still have for CSS.
551
552         * UserInterface/Views/ContentView.js:
553         (WebInspector.ContentView.contentViewForRepresentedObject):
554         * UserInterface/Views/NavigationSidebarPanel.js:
555         (WebInspector.NavigationSidebarPanel.prototype.showDefaultContentViewForTreeElement):
556         (WebInspector.NavigationSidebarPanel.prototype._checkElementsForPendingViewStateCookie):
557         BreakpointTreeElements can now be restored and reselected when its
558         source code is null. Avoid deleting the pending cookie data if a
559         ContentView was not shown for the resource. When the Breakpoint
560         and SourceCode get hooked up, this code will run again and work.
561
562         * UserInterface/Views/ScriptContentView.js:
563         (WebInspector.ScriptContentView.prototype._togglePrettyPrint):
564         * UserInterface/Views/TextResourceContentView.js:
565         (WebInspector.TextResourceContentView.prototype._togglePrettyPrint):
566         * UserInterface/Views/TextContentView.js:
567         (WebInspector.TextContentView.prototype._togglePrettyPrint):
568         New API for toggling formatting, now that it is an async operation.
569
570         * UserInterface/Views/SourceCodeTextEditor.js:
571         (WebInspector.SourceCodeTextEditor):
572         (WebInspector.SourceCodeTextEditor.prototype.toggleTypeAnnotations):
573         (WebInspector.SourceCodeTextEditor.prototype.prettyPrint):
574         (WebInspector.SourceCodeTextEditor.prototype._populateWithContent):
575         (WebInspector.SourceCodeTextEditor.prototype._proceedPopulateWithContent):
576         (WebInspector.SourceCodeTextEditor.prototype._prepareEditorForInitialContent):
577         (WebInspector.SourceCodeTextEditor.prototype._populateWithInlineScriptContent.scriptContentAvailable):
578         (WebInspector.SourceCodeTextEditor.prototype._populateWithInlineScriptContent):
579         (WebInspector.SourceCodeTextEditor.prototype._populateWithScriptContent):
580         (WebInspector.SourceCodeTextEditor.prototype.textEditorUpdatedFormatting):
581         (WebInspector.SourceCodeTextEditor.prototype._contentWillPopulate): Deleted.
582         Move auto formatting logic into SourceCodeTextEditor, because it
583         determines if content should be auto formatted, and it loads the
584         initial content so it can determine when to show the editor for
585         the first time.
586
587         When we get the initial content and determine we have to autoformat,
588         setup the TextEditor, but don't proceed with WillPopulate/DidPopulate
589         until after we have formatted text.
590
591         * UserInterface/Views/TextEditor.js:
592         (WebInspector.TextEditor):
593         (WebInspector.TextEditor.set string.update):
594         (WebInspector.TextEditor.prototype.set string):
595         (WebInspector.TextEditor.prototype.updateFormattedState):
596         (WebInspector.TextEditor.prototype.hasFormatter):
597         (WebInspector.TextEditor.prototype._format):
598         (WebInspector.TextEditor.prototype.prettyPrint):
599         (WebInspector.TextEditor.prototype._canUseFormatterWorker):
600         (WebInspector.TextEditor.prototype._startWorkerPrettyPrint):
601         (WebInspector.TextEditor.prototype._startCodeMirrorPrettyPrint):
602         (WebInspector.TextEditor.prototype._finishPrettyPrint):
603         (WebInspector.TextEditor.prototype._undoFormatting):
604         (WebInspector.TextEditor.prototype._updateAfterFormatting):
605         Break up the synchronous pretty printing code into multiple steps.
606         One path can be asynchronous formatting via FormatterWorker, another
607         path may be synchronous formatting using the CodeMirror formatters.
608
609         (WebInspector.TextEditor.prototype.set formatted): Deleted.
610         Remove the synchronous `set formatted` setter. Replace with
611         updateFormattedState().
612
613         (WebInspector.TextEditor.prototype.set autoFormat): Deleted.
614         Remove the TextEditor's autoformat. Since formatting can be async, having
615         the TextEditor showing and asynchronously format its initial contents is
616         a recipe for poor performance causing multiple layouts of different content.
617         Instead, autoformatting is handled by SourceCodeTextEditor, and TextEditor
618         can then be shown when it has the right data.
619
620 2016-04-07  Joseph Pecoraro  <pecoraro@apple.com>
621
622         Web Inspector: Improve JavaScript pretty printing
623         https://bugs.webkit.org/show_bug.cgi?id=156178
624         <rdar://problem/25535719>
625
626         Reviewed by Timothy Hatcher.
627
628         Add a new EsprimaFormatter which pretty prints JavaScript source text
629         using the Esprima AST and Tokens. Currently we use CodeMirror's
630         tokenizer for pretty printing. By moving to Esprima for pretty
631         printing we get a few advantages: (1) can be used within a Worker
632         as there are no dependencies on DOM objects, (2) a full featured AST
633         gives more context to handling individual tokens. One disadvantage
634         is that Esprima requires valid input, so scripts with syntax errors
635         will not work.
636
637         EsprimaFormatter works by:
638         - Getting the Esprima AST and token stream.
639         - Walk all AST nodes:
640           - when entering an AST node, handle any tokens before the start of this node
641           - when leaving an AST node, handle any tokens that were inside the node
642         - Whenever we handle a new node or token check if we should preserve any
643           newlines or comments that do not show up in the AST or token stream.
644
645         This allows us to handle any token based on its context. Currently the
646         formatter prefers to operate on tokens based on their context. So the
647         formatter has a case for each AST node type and handles the tokens
648         within that AST node. A small exception is made to special case the
649         handling of semicolons.
650
651         * Scripts/copy-user-interface-resources-dryrun.rb:
652         Add a generic check for -h, -help, --help to print usage.
653
654         * Tools/Formatting/EsprimaFormatterDebug.js: Added.
655         (EsprimaFormatterDebug):
656         (EsprimaFormatterDebug.prototype.get debugText):
657         (EsprimaFormatterDebug.prototype._pad):
658         (EsprimaFormatterDebug.prototype._debugHeader):
659         (EsprimaFormatterDebug.prototype._debugFooter):
660         (EsprimaFormatterDebug.prototype._debug):
661         (EsprimaFormatterDebug.prototype._debugComments):
662         (EsprimaFormatterDebug.prototype._debugAfterProgramNode):
663         (EsprimaFormatterDebug.prototype._before):
664         (EsprimaFormatterDebug.prototype._after):
665         * Tools/Formatting/codemirror-additions.css: Copied from Source/WebInspectorUI/Tools/PrettyPrinting/codemirror-additions.css.
666         * Tools/Formatting/index.html: Added.
667         * Tools/PrettyPrinting/codemirror-additions.css:
668         (pre): Deleted.
669         (a.download): Deleted.
670         * Tools/PrettyPrinting/index.html:
671         * Tools/PrettyPrinting/populate/jquery.min.js: Removed.
672         Add a Formatter tool that is similiar to the PrettyPrinting tool but
673         outputs debug information for Esprima tokens. This is useful for
674         iterating on tests, performance measurements, and general debugging
675         of token stream for any input.
676
677         * UserInterface/Controllers/FormatterSourceMap.js:
678         (WebInspector.FormatterSourceMap.fromSourceMapData):
679         (WebInspector.FormatterSourceMap.fromBuilder): Deleted.
680         Switch to constructing with a common data objects, instead of a Builder.
681
682         * UserInterface/Main.html:
683         * UserInterface/Test.html:
684         New files and moved files.
685
686         * UserInterface/Proxies/FormatterWorkerProxy.js: Added.
687         (WebInspector.FormatterWorkerProxy):
688         (WebInspector.FormatterWorkerProxy.singleton):
689         (WebInspector.FormatterWorkerProxy.canFormat):
690         (WebInspector.FormatterWorkerProxy.prototype.formatJavaScript):
691         (WebInspector.FormatterWorkerProxy.prototype.performAction):
692         (WebInspector.FormatterWorkerProxy.prototype._postMessage):
693         (WebInspector.FormatterWorkerProxy.prototype._handleMessage):
694         Main world object which provides a static formatJavaScript action.
695
696         * UserInterface/Views/CSSStyleDeclarationTextEditor.js:
697         (WebInspector.CSSStyleDeclarationTextEditor.prototype._formattedContentFromEditor):
698         * UserInterface/Views/TextEditor.js:
699         (WebInspector.TextEditor.prototype.prettyPrint.prettyPrintAndUpdateEditor):
700         (WebInspector.TextEditor.prototype.prettyPrint):
701         * UserInterface/Workers/Formatter/FormatterContentBuilder.js: Renamed from Source/WebInspectorUI/UserInterface/Controllers/FormatterContentBuilder.js.
702         (FormatterContentBuilder):
703         Simplify construction of a Builder. The constructor objects were always
704         the same and often unnecessary. Also move out of the WebInspector
705         namespace signifying it can be used within a Worker.
706
707         (FormatterContentBuilder.prototype.get originalContent): Deleted.
708         (FormatterContentBuilder.prototype.get formattedContent): Deleted.
709         (FormatterContentBuilder.prototype.get sourceMapData): Added.
710         Simplify getting all the data needed for SourceMaps.
711
712         (FormatterContentBuilder.prototype.setOriginalLineEndings):
713         A client may wish to pre-fill line endings instead of filling
714         while building.
715
716         (FormatterContentBuilder.prototype.appendNewline):
717         Auto-clear trailing whitespace on the previous line.
718
719         * UserInterface/Workers/Formatter/ESTreeWalker.js: Added.
720         (ESTreeWalker):
721         (ESTreeWalker.prototype.walk):
722         (ESTreeWalker.prototype._walk):
723         (ESTreeWalker.prototype._walkArray):
724         (ESTreeWalker.prototype._walkChildren):
725         Walk AST nodes in an ESTree format. Due to the spec's incompleteness
726         this is essentially Esprima's ESTree.
727
728         * UserInterface/Workers/Formatter/EsprimaFormatter.js: Added.
729         (EsprimaFormatter):
730         (EsprimaFormatter.isWhitespace):
731         (EsprimaFormatter.prototype.get formattedText):
732         (EsprimaFormatter.prototype.get sourceMapData):
733         (EsprimaFormatter.prototype._insertNewlinesBeforeToken):
734         (EsprimaFormatter.prototype._insertComment):
735         (EsprimaFormatter.prototype._insertSameLineTrailingComments):
736         (EsprimaFormatter.prototype._insertCommentsAndNewlines):
737         (EsprimaFormatter.prototype._before):
738         (EsprimaFormatter.prototype._after):
739         (EsprimaFormatter.prototype._isInForHeader):
740         (EsprimaFormatter.prototype._isRangeWhitespace):
741         (EsprimaFormatter.prototype._handleTokenAtNode):
742         (EsprimaFormatter.prototype._exitNode):
743         (EsprimaFormatter.prototype._afterProgram):
744         Pretty print source text.
745
746         * UserInterface/Workers/Formatter/FormatterUtilities.js: Added.
747         (Array.prototype.lastValue):
748         (String.prototype.lineEndings):
749         (isECMAScriptWhitespace):
750         (isECMAScriptLineTerminator):
751         Helpers used by the classes in the Worker code.
752         
753         * UserInterface/Workers/Formatter/FormatterWorker.js: Added.
754         (FormatterWorker):
755         (FormatterWorker.prototype.formatJavaScript):
756         (FormatterWorker.prototype._handleMessage):
757         Handle the formatJavaScript action.
758
759 2016-04-06  Matt Baker  <mattbaker@apple.com>
760
761         Web Inspector: Improve filtering in OpenResourceDialog
762         https://bugs.webkit.org/show_bug.cgi?id=155324
763         <rdar://problem/25094504>
764
765         Reviewed by Joseph Pecoraro and Timothy Hatcher.
766
767         * UserInterface/Base/Utilities.js:
768         (value):
769         Added String methods isLowerCase, isUpperCase, removeWhitespace.
770
771         * UserInterface/Controllers/ResourceQueryController.js: Added.
772         (WebInspector.ResourceQueryController):
773         (WebInspector.ResourceQueryController.prototype.addResource):
774         (WebInspector.ResourceQueryController.prototype.removeResource):
775         Add and remove the resources to be queried.
776
777         (WebInspector.ResourceQueryController.prototype.reset):
778         Reset controller state. Current just clears resources.
779
780         (WebInspector.ResourceQueryController.prototype.executeQuery):
781         Executes a query against the list of resources and returns a list of
782         QueryResult objects, with at most one result per resource, ordered by
783         descending rank.
784
785         The query string is stripped of whitespace characters and lowercased
786         before use. Prior to running the query, resources undergo a one-time
787         pre-processing step to locate special characters.
788
789         (WebInspector.ResourceQueryController.prototype._findQueryMatches.pushMatch):
790         (WebInspector.ResourceQueryController.prototype._findQueryMatches.matchNextSpecialCharacter):
791         (WebInspector.ResourceQueryController.prototype._findQueryMatches.backtrack):
792         (WebInspector.ResourceQueryController.prototype._findQueryMatches):
793         Returns a list of query matches for a single resource, along with metadata
794         which is used to rank the matches. The algorithm attempts to match the
795         entire query, first comparing each query character against "special" characters
796         in the resource (commonly used filename separators, the first character,
797         and camel-case word boundaries).
798
799         If there are remaining query characters after exhausting special characters,
800         regular characters are matched starting from the last matched special
801         character. Failing that, the algorithm attempts to find a match by backtracking.
802         To backtrack, the last match is discarded and the query position decremented.
803         If a special match is now the last match, matching starts again from the
804         next character in the filename after the match. If a normal match is now
805         the last match, keep discarding until a special match is found or no matches
806         remain. The query fails if no matches remain. For example, consider:
807
808            Query: "abcd"
809            Filename: "AxBcdCx"
810
811         The capital A, B, and C are all special characters, and are successfully
812         matched with the first three query characters. Having exhausted the special
813         characters the "d" at the end of the query is compared with the "x" at
814         the end of the filename, and fails to match. Backtracking then kicks in.
815         The last match, "C", is discarded and the search position in the query
816         decremented. The search resumes after the next to last match, "B", and now
817         matches the non-special characters "cd", yielding the following: "A Bcd  ".
818
819         (WebInspector.ResourceQueryController.prototype._findSpecialCharacterIndices):
820         Pre-processing step for resources. Locates the positions of special
821         characters in the resource filename. Special characters are defined as:
822
823            1. The first character
824            2. Common filename separators, and the character immediately following.
825            3. A capital letter that follows a lowercase character.
826
827         * UserInterface/Models/ResourceQueryMatch.js: Added.
828         Helper class used internally by the controller and QueryResult classes.
829         (WebInspector.ResourceQueryMatch):
830         (WebInspector.ResourceQueryMatch.prototype.get type):
831         (WebInspector.ResourceQueryMatch.prototype.get index):
832         (WebInspector.ResourceQueryMatch.prototype.get queryIndex):
833
834         * UserInterface/Models/ResourceQueryResult.js: Added.
835         Holds a resource that matched the executed query.
836         (WebInspector.ResourceQueryResult):
837         (WebInspector.ResourceQueryResult.prototype.get resource):
838         (WebInspector.ResourceQueryResult.prototype.get rank):
839         Ranking relative to other results returned by the query. Used by
840         the ResourceQueryController to sort results.
841
842         (WebInspector.ResourceQueryResult.prototype.get matchingTextRanges):
843         Get TextRanges for matching substrings in the resource display name.
844
845         (WebInspector.ResourceQueryResult.prototype._calculateRank):
846         Calculate the rank of the result. Matches are scored based on the type
847         of match (Special vs. Normal), the location of the match within the filename
848         (matches closer to the beginning are scored higher), and whether the match
849         is adjacent to the previous match.
850
851         Values assigned to each ranking criteria are somewhat arbitrary, and may
852         be fine-tuned over time to produce better results.
853
854         (WebInspector.ResourceQueryResult.prototype._createMatchingTextRanges):
855         (WebInspector.ResourceQueryResult.prototype.__test_createMatchesMask):
856         Test API for visualizing matches. For a result returned from the query
857         "abce", run against a filename "abcde", the mask is "a c e".
858
859         * UserInterface/Main.html:
860         * UserInterface/Test.html:
861         New files.
862
863         * UserInterface/Views/Dialog.js:
864         (WebInspector.Dialog.prototype.dismiss):
865         (WebInspector.Dialog.prototype.didDismissDialog):
866         Add hook for subclasses to perform actions after on dialog dismissal.
867
868         * UserInterface/Views/OpenResourceDialog.js:
869         (WebInspector.OpenResourceDialog):
870         (WebInspector.OpenResourceDialog.prototype._populateResourceTreeOutline.createHighlightedTitleFragment):
871         (WebInspector.OpenResourceDialog.prototype._populateResourceTreeOutline):
872         Add tree elements for each QueryResult returned by the last query, creating
873         titles with contiguous matching query characters wrapped in highlight spans.
874
875         (WebInspector.OpenResourceDialog.prototype.didDismissDialog):
876         Clear resources from the ResourceQueryController.
877         (WebInspector.OpenResourceDialog.prototype.didPresentDialog):
878         Add resources to the ResourceQueryController.
879         (WebInspector.OpenResourceDialog.prototype._updateFilter):
880         Execute the filter text as a resource query.
881
882         * UserInterface/Views/TreeOutline.css:
883         (.tree-outline.large .item .titles): Deleted.
884         Line height too small, hid the bottom border of highlighted matches in
885         tree element title spans. Removing the style had no negative visual impact
886         on the Quick Open or Timelines tree outlines (the only "large" trees).
887
888 2016-04-05  Joseph Pecoraro  <pecoraro@apple.com>
889
890         Web Inspector: Do not create CodeMirror color/gradient markers in JavaScript resources
891         https://bugs.webkit.org/show_bug.cgi?id=156278
892         <rdar://problem/25570404>
893
894         Reviewed by Timothy Hatcher.
895
896         * UserInterface/Views/SourceCodeTextEditor.js:
897         (WebInspector.SourceCodeTextEditor.prototype._hasStyleSheetContents):
898         (WebInspector.SourceCodeTextEditor.prototype._updateEditableMarkers):
899         Only spend the time to create style markers for style sheet contents.
900
901 2016-04-05  Timothy Hatcher  <timothy@apple.com>
902
903         Web Inspector: Make the Timelines sidebar wider
904
905         https://bugs.webkit.org/show_bug.cgi?id=156257
906         rdar://problem/25564218
907
908         Reviewed by Joseph Pecoraro.
909
910         * UserInterface/Views/TimelineOverview.css:
911         (.timeline-overview): Added. Set define --timeline-sidebar-width.
912         (.timeline-overview > .navigation-bar.timelines): Use --timeline-sidebar-width.
913         (.timeline-overview > .tree-outline.timelines): Ditto.
914         (.timeline-overview > .scroll-container): Ditto.
915         (.timeline-overview > .timeline-ruler): Ditto.
916         (.timeline-overview > .graphs-container): Ditto.
917
918 2016-04-05  Timothy Hatcher  <timothy@apple.com>
919
920         Web Inspector: Command-Option-R opens Inspector details sidebar or Responsive Design Mode, should only do one
921
922         https://bugs.webkit.org/show_bug.cgi?id=156258
923         rdar://problem/25483871
924
925         Reviewed by Joseph Pecoraro.
926
927         * UserInterface/Base/Main.js:
928         (WebInspector.contentLoaded): Change shortcuts to Command-Option-0 and Command-Shift-0.
929
930 2016-04-05  Matt Baker  <mattbaker@apple.com>
931
932         Web Inspector: Should not allow selecting no Timelines when editing in Timeline tab
933         https://bugs.webkit.org/show_bug.cgi?id=156223
934         <rdar://problem/25552221>
935
936         Reviewed by Joseph Pecoraro.
937
938         * UserInterface/Views/TimelineOverview.js:
939         (WebInspector.TimelineOverview):
940         (WebInspector.TimelineOverview.prototype._startEditingInstruments):
941         Register EnabledDidChange event handler for all tree elements.
942
943         (WebInspector.TimelineOverview.prototype._stopEditingInstruments):
944         Unregister event handler for enabled tree elements. The rest are removed
945         from the tree outline once editing has completed.
946
947         (WebInspector.TimelineOverview.prototype._timelineTreeElementEnabledDidChange):
948         Enable "Done" button if at least one timeline is enabled.
949
950         * UserInterface/Views/TimelineTreeElement.js:
951         Dispatch a new event, EnabledDidChange, when the checkbox state changes.
952
953         (WebInspector.TimelineTreeElement.prototype._showCheckbox):
954         (WebInspector.TimelineTreeElement.prototype._clickHandler):
955         (WebInspector.TimelineTreeElement.prototype._dispatchEnabledDidChangeEvent):
956         (WebInspector.TimelineTreeElement):
957
958 2016-04-04  Joseph Pecoraro  <pecoraro@apple.com>
959
960         Uncaught Exception: Error: Can't make a ContentView for an unknown representedObject (ApplicationCacheManifest)
961         https://bugs.webkit.org/show_bug.cgi?id=156139
962         <rdar://problem/25511926>
963
964         Reviewed by Timothy Hatcher.
965
966         * UserInterface/Views/ContentView.js:
967         (WebInspector.ContentView.createFromRepresentedObject):
968         Improve the error message to get the name of the represented object.
969
970         * UserInterface/Views/NavigationSidebarPanel.js:
971         (WebInspector.NavigationSidebarPanel.prototype._isTreeElementWithoutRepresentedObject):
972         Treat ApplicationCacheManifestTreeElement like other Host elements. Nothing to save/show.
973
974         * UserInterface/Views/ApplicationCacheManifestTreeElement.js:
975         (WebInspector.ApplicationCacheManifestTreeElement):
976         * UserInterface/Views/DatabaseHostTreeElement.js:
977         (WebInspector.DatabaseHostTreeElement):
978         * UserInterface/Views/IndexedDatabaseHostTreeElement.js:
979         (WebInspector.IndexedDatabaseHostTreeElement):
980         Auto-expand these folders, as they are not useful when collapsed.
981
982 2016-04-04  Joseph Pecoraro  <pecoraro@apple.com>
983
984         Web Inspector: Uncaught exception in CSS with string "constructor" (WebInspector.Color.fromString())
985         https://bugs.webkit.org/show_bug.cgi?id=156183
986         <rdar://problem/25539279>
987
988         Reviewed by Brian Burg.
989
990         * UserInterface/Models/Color.js:
991         (WebInspector.Color.fromString):
992         Fix the uncaught exception issue. Only look at own properties of
993         our keyword map to avoid values like "toString" and "constructor".
994
995         * UserInterface/Debug/UncaughtExceptionReporter.js:
996         (handleError):
997         (handleUncaughtException):
998         (handleUncaughtExceptionRecord):
999         Generalize uncaught exception handler error sheet to get
1000         exception records from both uncaught exceptions (window.onerror)
1001         and general Runtime Error objects (TypeError, etc).
1002
1003         * UserInterface/Base/Utilities.js:
1004         (window.promiseLogError.window.promiseLogError):
1005         Add a fallback log exception helper.
1006
1007         * UserInterface/Controllers/AnalyzerManager.js:
1008         (WebInspector.AnalyzerManager.prototype.getAnalyzerMessagesForSourceCode):
1009         * UserInterface/Views/SourceCodeTextEditor.js:
1010         (WebInspector.SourceCodeTextEditor):
1011         Add catch handlers to Promises to log exceptions.
1012
1013 2016-04-01  Joseph Pecoraro  <pecoraro@apple.com>
1014
1015         Unreviewed follow-up to r198968. Remove debug statements.
1016
1017         * Scripts/remove-console-asserts.pl:
1018         (removeConsoleAssertsInFile):
1019
1020 2016-04-01  Joseph Pecoraro  <pecoraro@apple.com>
1021
1022         Web Inspector: Remove console.asserts from Worker code in optimized builds
1023         https://bugs.webkit.org/show_bug.cgi?id=156124
1024         <rdar://problem/25505031>
1025
1026         Reviewed by Timothy Hatcher.
1027
1028         * Scripts/copy-user-interface-resources.pl:
1029         Remove console asserts on the Worker results directory.
1030
1031         * Scripts/remove-console-asserts.pl:
1032         (removeConsoleAssertsInFile):
1033         (removeConsoleAssertsInDirectory):
1034         Refactor into functions for a file and a file for
1035         recursing through directories.
1036
1037 2016-03-31  Joseph Pecoraro  <pecoraro@apple.com>
1038
1039         Web Inspector: ScriptSyntaxTree doesn't handle RestElement AST nodes
1040         https://bugs.webkit.org/show_bug.cgi?id=156085
1041
1042         Reviewed by Saam Barati.
1043
1044         * UserInterface/Models/ScriptSyntaxTree.js:
1045         (WebInspector.ScriptSyntaxTree.prototype._gatherIdentifiersInDeclaration.gatherIdentifiers):
1046         (WebInspector.ScriptSyntaxTree.prototype._gatherIdentifiersInDeclaration):
1047         When searching for identifiers in Function parameters, pass
1048         through the RestElement to its argument.
1049
1050         (WebInspector.ScriptSyntaxTree.prototype._recurse):
1051         (WebInspector.ScriptSyntaxTree.prototype._createInternalSyntaxTree):
1052         Create a ScriptSyntaxTree RestElement node.
1053         Also, every case in recurse visits the current
1054         node, so simplify the code!
1055
1056 2016-03-30  Joseph Pecoraro  <pecoraro@apple.com>
1057
1058         Remove unused ScriptProfiler.Samples.totalTime
1059         https://bugs.webkit.org/show_bug.cgi?id=156002
1060
1061         Reviewed by Saam Barati.
1062
1063         * UserInterface/Controllers/TimelineManager.js:
1064         (WebInspector.TimelineManager.prototype.scriptProfilerTrackingCompleted):
1065         * UserInterface/Models/CallingContextTree.js:
1066         (WebInspector.CallingContextTree.prototype.get totalExecutionTime): Deleted.
1067         (WebInspector.CallingContextTree.prototype.reset): Deleted.
1068         (WebInspector.CallingContextTree.prototype.increaseExecutionTime): Deleted.
1069         Remove unused totalExecutionTime.
1070
1071 2016-03-30  Joseph Pecoraro  <pecoraro@apple.com>
1072
1073         Web Inspector: Calculate more accurate time per-sample instead of assuming 1ms
1074         https://bugs.webkit.org/show_bug.cgi?id=155961
1075         <rdar://problem/25404505>
1076
1077         Reviewed by Geoffrey Garen.
1078
1079         Give each sample a duration based on the best time bounds we have available.
1080         Script Profiler Events give us time bounds for (nearly) all script evaluations.
1081         The only evaluations that are missed are Inspector scripts.
1082
1083         The duration per-sample is computed per-event:
1084
1085             durationPerSample = (event.endTime - event.startTime) / numSamplesInTimeRange.
1086
1087         If a 10ms Script Event contains 5 samples, they would each get a 2ms duration.
1088         If a 0.5ms Script Event contains 1 sample, it would get a 0.5ms duration.
1089
1090         We were seeing an average of 1.6-1.8ms per sample for events that had more
1091         than 3 samples.
1092
1093         * UserInterface/Controllers/TimelineManager.js:
1094         (WebInspector.TimelineManager.prototype.scriptProfilerTrackingCompleted):
1095         Associate a time duration per sample. For each Script Event we compute
1096         an average time for all the samples in the event and assign it to the sample.
1097
1098         * UserInterface/Models/CallingContextTree.js:
1099         (WebInspector.CallingContextTree.prototype.totalDurationInTimeRange):
1100         (WebInspector.CallingContextTree.prototype.numberOfSamplesInTimeRange): Deleted.
1101         Accumulate the duration by checking each sample. Number of samples
1102         is now meaningless.
1103         
1104         (WebInspector.CallingContextTree.prototype.updateTreeWithStackTrace):
1105         (WebInspector.CCTNode):
1106         (WebInspector.CCTNode.prototype.addTimestampAndExpressionLocation):
1107         Give CCTNodes a list of durations and leafDurations that parallels
1108         the timestamps and leafTimestamps lists of individual samples.
1109
1110         (WebInspector.CCTNode.prototype.filteredTimestampsAndDuration):
1111         (WebInspector.CCTNode.prototype.filteredLeafTimestampsAndDuration):
1112         (WebInspector.CCTNode.prototype.filteredTimestamps): Deleted.
1113         (WebInspector.CCTNode.prototype.numberOfLeafTimestamps): Deleted.
1114         Whenever we get a list of timestamps, also compute the duration
1115         of those timestamps at the same time.
1116
1117         * UserInterface/Views/ProfileDataGridNode.js:
1118         (WebInspector.ProfileDataGridNode):
1119         (WebInspector.ProfileDataGridNode.prototype._updateChildrenForModifiers):
1120         (WebInspector.ProfileDataGridNode.prototype._recalculateData):
1121         * UserInterface/Views/ProfileDataGridTree.js:
1122         (WebInspector.ProfileDataGridTree):
1123         (WebInspector.ProfileDataGridTree.prototype.get totalSampleTime):
1124         (WebInspector.ProfileDataGridTree.prototype._updateCurrentFocusDetails):
1125         (WebInspector.ProfileDataGridTree.prototype.get sampleInterval): Deleted.
1126         (WebInspector.ProfileDataGridTree.prototype.get numberOfSamples): Deleted.
1127         Instead of computing total time from (samples * sampleInterval),
1128         accumulate it by adding up the duration of each individual sample.
1129         Update the Profile Data Grid nodes to use the new calculations.
1130
1131 2016-03-29  Dana Burkart and Matthew Hanson  <dburkart@apple.com>
1132
1133         Web Inspector: JS PrettyPrinting in do/while loops, "while" should be on the same line as "}" if there was a closing brace
1134         https://bugs.webkit.org/show_bug.cgi?id=117616
1135         <rdar://problem/15796884>
1136
1137         Reviewed by Joseph Pecoraro.
1138
1139         This patch fixes the formatting of do / while loops in the WebInspector CodeFormatter.
1140
1141         Before:
1142             do {
1143               "x"
1144             }
1145             while (0);
1146
1147         After:
1148             do {
1149               "x"
1150             } while (0);
1151
1152         * UserInterface/Views/CodeMirrorFormatters.js:
1153         (shouldHaveSpaceBeforeToken):
1154         If we encounter a while token and the last token was a closing brace, we *should* add a space if that closing
1155         brace was closing a do block.
1156
1157         (removeLastNewline):
1158         If we encounter a while token and the last token was a closing brace, we *should not* add a newline if that closing
1159         brace closes a do block.
1160
1161         (modifyStateForTokenPre):
1162         We should keep track of the last token that we encountered before entering into a block. We do this by setting
1163         a lastContentBeforeBlock property on openBraceStartMarker / state objects.
1164
1165         In addition, this fixes a bug where we do not pop a state object off of openBraceStartMarkers if our indentCount
1166         is 0. Without doing this, we cannot reliably determine whether or not our while token needs to be inline or not.
1167
1168 2016-03-29  Joseph Pecoraro  <pecoraro@apple.com>
1169
1170         Web Inspector: REGRESSION: ⌘E and ⌘G text searching does not work
1171         https://bugs.webkit.org/show_bug.cgi?id=155981
1172         <rdar://problem/25418983>
1173
1174         Reviewed by Timothy Hatcher.
1175
1176         Disable the unused find banner in the RecordingContentView's
1177         ContentBrowser. This is a workaround for the background tab
1178         thinking it is visible, but still useful since the find
1179         banner wouldn't be used in the TimelineContentView anyways so
1180         can avoid being created.
1181
1182         * UserInterface/Views/ContentBrowser.js:
1183         (WebInspector.ContentBrowser):
1184         Add a construction option to not create a FindBanner.
1185         
1186         (WebInspector.ContentBrowser.prototype.handleFindEvent):
1187         (WebInspector.ContentBrowser.prototype.shown):
1188         (WebInspector.ContentBrowser.prototype.hidden):
1189         (WebInspector.ContentBrowser.prototype._contentViewNumberOfSearchResultsDidChange):
1190         (WebInspector.ContentBrowser.prototype._updateFindBanner):
1191         Handle when we don't have a find banner.
1192
1193         * UserInterface/Views/TimelineRecordingContentView.js:
1194         (WebInspector.TimelineRecordingContentView):
1195         Do not create a FindBanner in the RecordingContentView.
1196
1197         * UserInterface/Base/Main.js:
1198         (WebInspector.contentLoaded):
1199         This global content browser can also avoid creating a FindBanner.
1200
1201 2016-03-29  Joseph Pecoraro  <pecoraro@apple.com>
1202
1203         Web Inspector: We should have a way to capture heap snapshots programatically.
1204         https://bugs.webkit.org/show_bug.cgi?id=154407
1205         <rdar://problem/24726292>
1206
1207         Reviewed by Timothy Hatcher.
1208
1209         * Localizations/en.lproj/localizedStrings.js:
1210         * UserInterface/Protocol/ConsoleObserver.js:
1211         (WebInspector.ConsoleObserver.prototype.heapSnapshot):
1212         (WebInspector.ConsoleObserver):
1213         Create a HeapSnapshot with an optional title and add to the timeline.
1214
1215         (WebInspector.HeapAllocationsTimelineDataGridNode):
1216         * UserInterface/Views/TimelineTabContentView.js:
1217         (WebInspector.TimelineTabContentView.displayNameForRecord):
1218         Share code for snapshot display names which may now include a title.
1219
1220         * UserInterface/Proxies/HeapSnapshotProxy.js:
1221         (WebInspector.HeapSnapshotProxy):
1222         (WebInspector.HeapSnapshotProxy.deserialize):
1223         (WebInspector.HeapSnapshotProxy.prototype.get title):
1224         * UserInterface/Views/HeapAllocationsTimelineDataGridNode.js:
1225         * UserInterface/Workers/HeapSnapshot/HeapSnapshot.js:
1226         (HeapSnapshot):
1227         (HeapSnapshot.prototype.serialize):
1228         * UserInterface/Workers/HeapSnapshot/HeapSnapshotWorker.js:
1229         (HeapSnapshotWorker.prototype.createSnapshot):
1230         Include an optional title in a HeapSnapshot.
1231
1232 2016-03-28  Joseph Pecoraro  <pecoraro@apple.com>
1233
1234         Web Inspector: Ensure maximum accuracy while profiling
1235         https://bugs.webkit.org/show_bug.cgi?id=155809
1236         <rdar://problem/25325035>
1237
1238         Reviewed by Timothy Hatcher.
1239
1240         * Localizations/en.lproj/localizedStrings.js:
1241         New strings.
1242
1243         * UserInterface/Controllers/DebuggerManager.js:
1244         (WebInspector.DebuggerManager):
1245         When starting the inspector, if it was previously closed while
1246         breakpoints were temporarily disabled, restore the correct
1247         breakpoints enabled state.
1248
1249         (WebInspector.DebuggerManager.prototype.set breakpointsEnabled):
1250         Warn if we ever try to enable breakpoints during timeline recordings.
1251
1252         (WebInspector.DebuggerManager.prototype.get breakpointsDisabledTemporarily):
1253         (WebInspector.DebuggerManager.prototype.startDisablingBreakpointsTemporarily):
1254         (WebInspector.DebuggerManager.prototype.stopDisablingBreakpointsTemporarily):
1255         Method to start/stop temporarily disabling breakpoints.
1256
1257         (WebInspector.DebuggerManager.prototype._breakpointDisabledStateDidChange):
1258         (WebInspector.DebuggerManager.prototype._setBreakpoint):
1259         When temporarily disabling breakpoints avoid the convenience behavior of
1260         enabling all breakpoints when enabling or setting a single breakpoint.
1261
1262         * UserInterface/Controllers/TimelineManager.js:
1263         (WebInspector.TimelineManager.prototype.startCapturing):
1264         Emit a will start capturing event to do work before enabling instruments.
1265
1266         * UserInterface/Views/DebuggerSidebarPanel.css:
1267         (.sidebar > .panel.navigation.debugger .timeline-recording-warning):
1268         (.sidebar > .panel.navigation.debugger .timeline-recording-warning > a):
1269         Styles for a warning section in the Debugger Sidebar when the Debugger
1270         is temporarily disabled due to a Timeline recording.
1271
1272         * UserInterface/Views/DebuggerSidebarPanel.js:
1273         (WebInspector.DebuggerSidebarPanel.prototype._timelineRecordingWillStart):
1274         (WebInspector.DebuggerSidebarPanel.prototype._timelineRecordingStopped):
1275         Modify the Debugger state and UI before and after a Timeline recording.
1276
1277 2016-03-28  Nikita Vasilyev  <nvasilyev@apple.com>
1278
1279         Web Inspector: Use font-variant-numeric: tabular-nums instead of -apple-system-monospaced-numbers
1280         https://bugs.webkit.org/show_bug.cgi?id=155826
1281         <rdar://problem/25330631>
1282
1283         Reviewed by Myles C. Maxfield.
1284
1285         * UserInterface/Views/CodeMirrorOverrides.css:
1286         (.CodeMirror .CodeMirror-linenumber):
1287         * UserInterface/Views/DataGrid.css:
1288         (.data-grid td):
1289         * UserInterface/Views/DefaultDashboardView.css:
1290         (.toolbar .dashboard.default > .item):
1291         * UserInterface/Views/ObjectTreeArrayIndexTreeElement.css:
1292         (.object-tree-array-index .index-name):
1293
1294 2016-03-28  Nikita Vasilyev  <nvasilyev@apple.com>
1295
1296         Web Inspector: Add font-variant-numeric to CSS autocompletions
1297         https://bugs.webkit.org/show_bug.cgi?id=155941
1298         <rdar://problem/25381735>
1299
1300         Reviewed by Timothy Hatcher.
1301
1302         Also, remove -apple-system-monospaced-numbers.
1303         `font-variant-numeric: tabular-nuns` should be used instead.
1304
1305         * UserInterface/Models/CSSKeywordCompletions.js:
1306
1307 2016-03-28  Matt Baker  <mattbaker@apple.com>
1308
1309         REGRESSION (r195303): Web Inspector: Wrong indentation in the type coverage profiler popovers
1310         https://bugs.webkit.org/show_bug.cgi?id=155930
1311         <rdar://problem/25377042>
1312
1313         Reviewed by Timothy Hatcher.
1314
1315         Increased specificity of TypeTreeView CSS selectors, and added new
1316         overrides for rules made global by r195303, which don't apply to the
1317         TypeTreeView's or its tree elements.
1318
1319         * UserInterface/Views/TypeTreeElement.css:
1320         (.item.type-tree-element):
1321         (.item.type-tree-element > .titles):
1322         (.item.type-tree-element > .disclosure-button):
1323         (.item.type-tree-element.parent > .disclosure-button):
1324         (.item.type-tree-element.parent.expanded > .disclosure-button):
1325         (.item.type-tree-element > .icon):
1326         (.item.type-tree-element.prototype):
1327         (.item.type-tree-element.prototype:focus):
1328         (.item.type-tree-element.prototype + ol):
1329         (.type-tree-element): Deleted.
1330         (.type-tree-element > .titles): Deleted.
1331         (.type-tree-element > .disclosure-button): Deleted.
1332         (.type-tree-element.parent > .disclosure-button): Deleted.
1333         (.type-tree-element.parent.expanded > .disclosure-button): Deleted.
1334         (.type-tree-element > .icon): Deleted.
1335         (.type-tree-element.prototype): Deleted.
1336         (.type-tree-element.prototype:focus): Deleted.
1337         (.type-tree-element.prototype + ol): Deleted.
1338
1339         * UserInterface/Views/TypeTreeView.css:
1340         (.tree-outline.type li):
1341
1342         * UserInterface/Views/TypeTreeView.js:
1343         (WebInspector.TypeTreeView):
1344         Use custom indentation.
1345
1346 2016-03-28  Nikita Vasilyev  <nvasilyev@apple.com>
1347
1348         Web Inspector: Large repaints while typing in the console tab
1349         https://bugs.webkit.org/show_bug.cgi?id=155627
1350         <rdar://problem/25234875>
1351
1352         Reviewed by Timothy Hatcher.
1353
1354         Specify the height of flexbox elements to reduce repaint areas.
1355
1356         * UserInterface/Views/Main.css:
1357         (#navigation-sidebar):
1358         (#content): z-index doesn't affect repaint areas once the height is set.
1359         (#details-sidebar):
1360
1361 2016-03-25  Joseph Pecoraro  <pecoraro@apple.com>
1362
1363         Web Inspector: Sometimes clearing focused nodes in ProfileView leaves a dangling call stack that can never be removed
1364         https://bugs.webkit.org/show_bug.cgi?id=155915
1365
1366         Reviewed by Timothy Hatcher.
1367
1368         * UserInterface/Views/ProfileDataGridTree.js:
1369         (WebInspector.ProfileDataGridTree.prototype.addFocusNode):
1370         (WebInspector.ProfileDataGridTree.prototype.rollbackFocusNode):
1371         (WebInspector.ProfileDataGridTree.prototype.clearFocusNodes):
1372         (WebInspector.ProfileDataGridTree.prototype._focusChanged):
1373         (WebInspector.ProfileDataGridTree.prototype._saveFocusedNodeOriginalParent):
1374         (WebInspector.ProfileDataGridTree.prototype._restoreFocusedNodeToOriginalParent):
1375         Be a little more explicit about saving and resotring nodes.
1376         When restoring, work around a DataGrid issue by temporarily
1377         collapsing and expanding the part of the node we are being
1378         reattached to. This is a cheap workaround for an otherwise
1379         complex DataGrid / DataGridTree issue.
1380
1381 2016-03-25  Matt Baker  <mattbaker@apple.com>
1382
1383         Web Inspector: Clicking a result in Quick Open dialog dismisses the dialog, does nothing
1384         https://bugs.webkit.org/show_bug.cgi?id=155892
1385         <rdar://problem/25361220>
1386
1387         Reviewed by Timothy Hatcher.
1388
1389         * UserInterface/Views/OpenResourceDialog.js:
1390         (WebInspector.OpenResourceDialog):
1391         Allow repeat selection so clicking a selected element makes a selection
1392         and dismisses the dialog.
1393
1394         (WebInspector.OpenResourceDialog.prototype._populateResourceTreeOutline):
1395         Suppress select and deselect. Only user clicks should cause a selection event.
1396
1397         (WebInspector.OpenResourceDialog.prototype._handleBlurEvent):
1398         Prevent the dialog from being dismissed before tree item selection occurs.
1399
1400         (WebInspector.OpenResourceDialog.prototype._treeSelectionDidChange):
1401         Set the represented object (dialog result) and dismiss.
1402
1403 2016-03-25  Commit Queue  <commit-queue@webkit.org>
1404
1405         Unreviewed, rolling out r198619.
1406         https://bugs.webkit.org/show_bug.cgi?id=155902
1407
1408         Switching to Console tab sometimes results in blank tab.
1409         (Requested by JoePeck on #webkit).
1410
1411         Reverted changeset:
1412
1413         "Web Inspector: Large repaints while typing in the console
1414         tab"
1415         https://bugs.webkit.org/show_bug.cgi?id=155627
1416         http://trac.webkit.org/changeset/198619
1417
1418 2016-03-25  Matt Baker  <mattbaker@apple.com>
1419
1420         Web Inspector: Scrolling/selection is broken in Quick Open dialog resource tree
1421         https://bugs.webkit.org/show_bug.cgi?id=155877
1422         <rdar://problem/25356149>
1423
1424         Reviewed by Timothy Hatcher.
1425
1426         Dialog and tree outline now use "display: flex", causing the height of the
1427         tree outline to be based on the height of the dialog. Overflow scrolling
1428         in the tree outline now has the expected behavior.
1429
1430         * UserInterface/Views/OpenResourceDialog.css:
1431         (.open-resource-dialog):
1432         (.open-resource-dialog > .tree-outline):
1433
1434 2016-03-24  Joseph Pecoraro  <pecoraro@apple.com>
1435
1436         Web Inspector: Reduce forced layouts
1437         https://bugs.webkit.org/show_bug.cgi?id=155852
1438         <rdar://problem/25345197>
1439
1440         Reviewed by Timothy Hatcher.
1441
1442         * UserInterface/Views/DataGrid.js:
1443         (WebInspector.DataGrid.prototype.layout):
1444         (WebInspector.DataGrid.prototype._positionResizerElements):
1445         (WebInspector.DataGrid.prototype._positionHeaderViews):
1446         In loops, force layout once, calculate values, then set styles.
1447
1448         * UserInterface/Views/RadioButtonNavigationItem.js:
1449         (WebInspector.RadioButtonNavigationItem):
1450         (WebInspector.RadioButtonNavigationItem.prototype.updateLayout):
1451         Force layout once to calculate the min-width, then never again.
1452
1453 2016-03-24  Joseph Pecoraro  <pecoraro@apple.com>
1454
1455         Web Inspector: Open Resource Dialog should not system beep when using Enter to select an item
1456         https://bugs.webkit.org/show_bug.cgi?id=155853
1457
1458         Reviewed by Timothy Hatcher.
1459
1460         * UserInterface/Views/OpenResourceDialog.js:
1461         (WebInspector.OpenResourceDialog.prototype._handleKeydownEvent):
1462         Prevent default when handling Enter with a selected result.
1463
1464 2016-03-24  Joseph Pecoraro  <pecoraro@apple.com>
1465
1466         Web Inspector: Miscellaneous performance fixes in Timeline recording
1467         https://bugs.webkit.org/show_bug.cgi?id=155832
1468
1469         Reviewed by Timothy Hatcher.
1470
1471         * UserInterface/Models/CallingContextTree.js:
1472         (WebInspector.CCTNode.prototype.hasChildren):
1473         No need to allocate an array with all of the properties, we can just
1474         check if there is at least one property using a short circuit for..in.
1475         Performance was always faster for empty, small, and large objects
1476         in micro benchmarks.
1477
1478         * UserInterface/Views/DataGrid.js:
1479         (WebInspector.DataGrid.prototype.layout):
1480         Avoid causing DOM layout when positioning resizers. They only need
1481         a layout if we are resizing the DataGrid, or the initial layout.
1482
1483         * UserInterface/Views/NavigationBar.js:
1484         (WebInspector.NavigationBar):
1485         (WebInspector.NavigationBar.prototype.needsLayout):
1486         (WebInspector.NavigationBar.prototype.layout):
1487         Avoid causing DOM layout every View layout. In fact, only do a
1488         DOM layout when someone has triggered a needsLayout on this
1489         navigation bar. A basic dirty layout (triggered by a parent)
1490         should not have caused us to resize.
1491
1492         * UserInterface/Views/HeapAllocationsTimelineOverviewGraph.js:
1493         * UserInterface/Views/LayoutTimelineOverviewGraph.js:
1494         (WebInspector.LayoutTimelineOverviewGraph.prototype.layout):
1495         * UserInterface/Views/MemoryTimelineOverviewGraph.js:
1496         (WebInspector.MemoryTimelineOverviewGraph.prototype.reset):
1497         (WebInspector.MemoryTimelineOverviewGraph.prototype._updateLegend):
1498         * UserInterface/Views/NetworkTimelineOverviewGraph.js:
1499         * UserInterface/Views/RenderingFrameTimelineOverviewGraph.js:
1500         (WebInspector.RenderingFrameTimelineOverviewGraph.prototype.layout):
1501         * UserInterface/Views/ScriptTimelineOverviewGraph.js:
1502         Avoid doing any work in non-visible graphs. This was very common
1503         because the RenderingFrameTimelineOverviewGraph is never visible
1504         when the other timeline graphs are, but was performing lots of work.
1505
1506         * UserInterface/Views/MemoryCategoryView.js:
1507         (WebInspector.MemoryCategoryView.prototype.clear):
1508         (WebInspector.MemoryCategoryView.prototype._updateDetails):
1509         (WebInspector.MemoryCategoryView):
1510         * UserInterface/Views/MemoryTimelineView.js:
1511         (WebInspector.MemoryTimelineView.prototype.reset):
1512         (WebInspector.MemoryTimelineView.prototype._updateUsageLegend):
1513         (WebInspector.MemoryTimelineView.prototype._updateMaxComparisonLegend):
1514         Cache values to avoid textContent calls even if the content did not change.
1515         This reduces unnecessary work when the values wouldn't change.
1516
1517         * UserInterface/Views/TimelineRecordBar.js:
1518         (WebInspector.TimelineRecordBar.createCombinedBars):
1519         (WebInspector.TimelineRecordBar.prototype.set records):
1520         Revert to fast loop and as this code path is very hot and for..of iteration
1521         was showing up in profiles. Remove assert which seems rather pointless but
1522         showed up in profiles.
1523
1524 2016-03-24  Nikita Vasilyev  <nvasilyev@apple.com>
1525
1526         Web Inspector: Large repaints while typing in the console tab
1527         https://bugs.webkit.org/show_bug.cgi?id=155627
1528         <rdar://problem/25234875>
1529
1530         Reviewed by Timothy Hatcher.
1531
1532         Use a `position: absolute` workaround to reduce large repaint areas caused by flexbox.
1533
1534         * UserInterface/Views/LogContentView.css:
1535         (body.selected-tab-console #content):
1536         This selector must only affect the console tab as it breaks sidebars in other tabs.
1537
1538         * UserInterface/Base/Main.js:
1539         (WebInspector.contentLoaded):
1540         (WebInspector._tabBarItemSelected):
1541         * UserInterface/Views/TabBar.js:
1542         (WebInspector.TabBar.prototype.set selectedTabBarItem):
1543         Add "selected-tab-console" class to <body> when the console tab is selected.
1544
1545 2016-03-23  Joseph Pecoraro  <pecoraro@apple.com>
1546
1547         Web Inspector: Timeline range selection changes with ProfileView should not cause navigation bar items to flicker
1548         https://bugs.webkit.org/show_bug.cgi?id=155834
1549
1550         Reviewed by Timothy Hatcher.
1551
1552         * UserInterface/Views/ProfileView.js:
1553         (WebInspector.ProfileView.prototype._recreate):
1554         The only reason our selection path components would change is if we
1555         had focus nodes before and do not anymore.
1556
1557 2016-03-23  Joseph Pecoraro  <pecoraro@apple.com>
1558
1559         Web Inspector: Allow clicking the Timeline in Editing Mode to toggle the checkbox
1560         https://bugs.webkit.org/show_bug.cgi?id=155815
1561
1562         Reviewed by Timothy Hatcher.
1563
1564         * UserInterface/Views/TimelineOverview.js:
1565         (WebInspector.TimelineOverview.prototype._startEditingInstruments):
1566         Remove unused variable.
1567         
1568         * UserInterface/Views/TimelineTreeElement.js:
1569         (WebInspector.TimelineTreeElement.prototype.onattach):
1570         (WebInspector.TimelineTreeElement.prototype._clickHandler):
1571         Make clicking on the tree element toggle the checkbox.
1572
1573 2016-03-23  Joseph Pecoraro  <pecoraro@apple.com>
1574
1575         Web Inspector: Timeline Tab sometimes restores as blank
1576         https://bugs.webkit.org/show_bug.cgi?id=155811
1577
1578         Reviewed by Timothy Hatcher.
1579
1580         * UserInterface/Views/TimelineTabContentView.js:
1581         (WebInspector.TimelineTabContentView.prototype.restoreFromCookie):
1582         When early bailing in restore, if there is no content view to restore,
1583         then at least fallback to showing the Overview.
1584
1585 2016-03-23  Joseph Pecoraro  <pecoraro@apple.com>
1586
1587         Web Inspector: REGRESSION: Timeline Reset does not clear datagrids
1588         https://bugs.webkit.org/show_bug.cgi?id=155804
1589
1590         Reviewed by Timothy Hatcher.
1591
1592         * UserInterface/Views/HeapAllocationsTimelineView.js:
1593         (WebInspector.HeapAllocationsTimelineView.prototype.shown):
1594         (WebInspector.HeapAllocationsTimelineView.prototype.hidden):
1595         (WebInspector.HeapAllocationsTimelineView.prototype.closed):
1596         (WebInspector.HeapAllocationsTimelineView.prototype.reset):
1597         Although we don't use the popover features of TimelineDataGrid,
1598         be a good citizen and call methods on the datagrid.
1599
1600         * UserInterface/Views/OverviewTimelineView.js:
1601         (WebInspector.OverviewTimelineView.prototype.reset):
1602         Clear the datagrid on reset.
1603
1604         * UserInterface/Views/TimelineDataGrid.js:
1605         (WebInspector.TimelineDataGrid.prototype.reset):
1606         Clear the datagrid on reset.
1607
1608 2016-03-23  Joseph Pecoraro  <pecoraro@apple.com>
1609
1610         Web Inspector: Uncaught exceptions closing Timeline tab
1611         https://bugs.webkit.org/show_bug.cgi?id=155805
1612
1613         Reviewed by Timothy Hatcher.
1614
1615         * UserInterface/Views/ScriptClusterTimelineView.js:
1616         (WebInspector.ScriptClusterTimelineView.prototype._scriptClusterViewCurrentContentViewDidChange):
1617         Gracefully handle if there is no content view.
1618
1619         * UserInterface/Views/TimelineRecordingContentView.js:
1620         (WebInspector.TimelineRecordingContentView.prototype.closed): Deleted.
1621         Fix typo.
1622
1623 2016-03-23  Matt Baker  <mattbaker@apple.com>
1624
1625         Web Inspector: Quick Open dialog has fuzzy icons at 1x
1626         https://bugs.webkit.org/show_bug.cgi?id=155557
1627         <rdar://problem/25200217>
1628
1629         Reviewed by Timothy Hatcher.
1630
1631         New resource icons (documents and clippings) for large  tree items,
1632         for use in the Quick Open dialog's tree outline.
1633
1634         * UserInterface/Images/ClippingCSSLarge.png: Added.
1635         * UserInterface/Images/ClippingCSSLarge@2x.png: Added.
1636         * UserInterface/Images/ClippingGenericLarge.png: Added.
1637         * UserInterface/Images/ClippingGenericLarge@2x.png: Added.
1638         * UserInterface/Images/ClippingJSLarge.png: Added.
1639         * UserInterface/Images/ClippingJSLarge@2x.png: Added.
1640         * UserInterface/Images/DocumentCSSLarge.png: Added.
1641         * UserInterface/Images/DocumentCSSLarge@2x.png: Added.
1642         * UserInterface/Images/DocumentFontLarge.png: Added.
1643         * UserInterface/Images/DocumentFontLarge@2x.png: Added.
1644         * UserInterface/Images/DocumentGenericLarge.png: Added.
1645         * UserInterface/Images/DocumentGenericLarge@2x.png: Added.
1646         * UserInterface/Images/DocumentImageLarge.png: Added.
1647         * UserInterface/Images/DocumentImageLarge@2x.png: Added.
1648         * UserInterface/Images/DocumentJSLarge.png: Added.
1649         * UserInterface/Images/DocumentJSLarge@2x.png: Added.
1650         * UserInterface/Images/DocumentMarkupLarge.png: Added.
1651         * UserInterface/Images/DocumentMarkupLarge@2x.png: Added.
1652         32px icons at 1x and 2x.
1653
1654         * UserInterface/Views/ResourceIcons.css:
1655         (.large .resource-icon .icon):
1656         (.large .resource-icon.resource-type-document .icon):
1657         (.large .resource-icon.resource-type-image .icon):
1658         (.large .resource-icon.resource-type-font .icon):
1659         (.large .resource-icon.resource-type-stylesheet .icon):
1660         (.large .resource-icon.resource-type-script .icon):
1661         (.large .anonymous-script-icon .icon):
1662         (.large .source-map-resource.resource-icon .icon):
1663         (.large .source-map-resource.resource-icon.resource-type-stylesheet .icon):
1664         (.large .source-map-resource.resource-icon.resource-type-script .icon):
1665         Large icon styles.
1666
1667 2016-03-22  Timothy Hatcher  <timothy@apple.com>
1668
1669         Web Inspector: String double quoting in the console and elsewhere needs to escape backslash too
1670
1671         https://bugs.webkit.org/show_bug.cgi?id=155752
1672         rdar://problem/25293141
1673
1674         Reviewed by Joseph Pecoraro.
1675
1676         * UserInterface/Base/Utilities.js:
1677         (doubleQuotedString): Escape backslashes too.
1678         * UserInterface/Views/FormattedValue.js:
1679         (WebInspector.FormattedValue.createLinkifiedElementString): Ditto.
1680
1681 2016-03-22  Joseph Pecoraro  <pecoraro@apple.com>
1682
1683         Web Inspector: REGRESSION: Switching Timelines via Path Component does not work
1684         https://bugs.webkit.org/show_bug.cgi?id=155767
1685         <rdar://problem/25298945>
1686
1687         Reviewed by Timothy Hatcher.
1688
1689         * UserInterface/Views/TimelineRecordingContentView.js:
1690         (WebInspector.TimelineRecordingContentView.prototype._timelinePathComponentSelected):
1691         (WebInspector.TimelineRecordingContentView.prototype._instrumentAdded):
1692
1693 2016-03-22  Timothy Hatcher  <timothy@apple.com>
1694
1695         Web Inspector: Consider Automation script names as internal and hide them
1696
1697         https://bugs.webkit.org/show_bug.cgi?id=155753
1698         rdar://problem/25293310
1699
1700         Reviewed by Joseph Pecoraro.
1701
1702         * UserInterface/Base/Utilities.js:
1703         (isWebKitInternalScript): Renamed from isWebInspectorDebugScript.
1704         Check for "__Web" prefix and "__" suffix.
1705
1706         * UserInterface/Controllers/DebuggerManager.js:
1707         (WebInspector.DebuggerManager):
1708         (WebInspector.DebuggerManager.prototype.get knownNonResourceScripts):
1709         (WebInspector.DebuggerManager.prototype.reset):
1710         (WebInspector.DebuggerManager.prototype.debuggerDidPause):
1711         (WebInspector.DebuggerManager.prototype.scriptDidParse):
1712         (WebInspector.DebuggerManager.prototype._debugUIEnabledDidChange):
1713         Renamed _inspectorDebugScripts to _internalWebKitScripts. And renamed
1714         isWebInspectorDebugScript to isWebKitInternalScript.
1715
1716         * UserInterface/Protocol/RemoteObject.js:
1717         (WebInspector.RemoteObject.prototype.findFunctionSourceCodeLocation):
1718         Renamed isWebInspectorDebugScript to isWebKitInternalScript.
1719
1720 2016-03-22  Joseph Pecoraro  <pecoraro@apple.com>
1721
1722         Web Inspector: REGRESSION: Shift + Click on record button should create a new recording
1723         https://bugs.webkit.org/show_bug.cgi?id=155763
1724
1725         Reviewed by Timothy Hatcher.
1726
1727         * UserInterface/Views/TimelineTabContentView.js:
1728         (WebInspector.TimelineTabContentView.prototype._recordButtonClicked):
1729         Use the shiftKey from the DOM Event.
1730
1731 2016-03-22  Joseph Pecoraro  <pecoraro@apple.com>
1732
1733         Web Inspector: Switching Away and Back to Timelines Tab may select a different Timeline
1734         https://bugs.webkit.org/show_bug.cgi?id=155742
1735         <rdar://problem/25284330>
1736
1737         Reviewed by Timothy Hatcher.
1738
1739         When switching to the Timeline tab, or switching recordings within the
1740         the Timeline tab, the TimelineTabContentView does work to correctly
1741         save/restore its view state.
1742
1743         When switching to the Timeline tab, the TimelineTabContentView correctly
1744         restores the state of the tab, but when showing the RecordingContentView
1745         the RecordingContentView restores its state from a stale cookie.
1746
1747         Since TimelineTabContentView already seems to handle correctly restoring
1748         RecordingContentViews on its own. Removing the RecordingContentView's
1749         implementation of save/restore made everything work as expected.
1750
1751         * UserInterface/Views/TimelineRecordingContentView.js:
1752         (WebInspector.TimelineRecordingContentView.prototype.saveToCookie): Deleted.
1753         (WebInspector.TimelineRecordingContentView.prototype.restoreFromCookie): Deleted.
1754
1755 2016-03-22  Matt Baker  <mattbaker@apple.com>
1756
1757         Web Inspector: remove the remaining TimelineSidebarPanel references
1758         https://bugs.webkit.org/show_bug.cgi?id=155765
1759         <rdar://problem/25296980>
1760
1761         Reviewed by Timothy Hatcher.
1762
1763         Remove dead code from TimelineView and TimelineTabContentView.
1764
1765         * UserInterface/Views/OverviewTimelineView.js:
1766         (WebInspector.OverviewTimelineView.prototype.canShowContentViewForTreeElement): Deleted.
1767         (WebInspector.OverviewTimelineView.prototype.showContentViewForTreeElement): Deleted.
1768
1769         * UserInterface/Views/RenderingFrameTimelineView.js:
1770         (WebInspector.RenderingFrameTimelineView.prototype.canShowContentViewForTreeElement): Deleted.
1771         (WebInspector.RenderingFrameTimelineView.prototype.showContentViewForTreeElement): Deleted.
1772
1773         * UserInterface/Views/ScriptDetailsTimelineView.js:
1774         (WebInspector.ScriptDetailsTimelineView.prototype.canShowContentViewForTreeElement): Deleted.
1775         (WebInspector.ScriptDetailsTimelineView.prototype.showContentViewForTreeElement): Deleted.
1776
1777         * UserInterface/Views/TimelineTabContentView.js:
1778         (WebInspector.TimelineTabContentView):
1779
1780         * UserInterface/Views/TimelineView.js:
1781         (WebInspector.TimelineView.prototype.canShowContentViewForTreeElement): Deleted.
1782         (WebInspector.TimelineView.prototype.showContentViewForTreeElement): Deleted.
1783
1784 2016-03-22  Matt Baker  <mattbaker@apple.com>
1785
1786         Web Inspector: Timelines UI redesign: Provide a way to configure which instruments to use
1787         https://bugs.webkit.org/show_bug.cgi?id=153672
1788         <rdar://problem/24417575>
1789
1790         Reviewed by Timothy Hatcher.
1791
1792         Adds UI for configuring a timeline recording's instrument list. TimelineManager
1793         maintains the list of supported timeline types, and tracks the subset
1794         of user-configured timelines which are used to create the instrument list
1795         that is passed to new recordings.
1796
1797         * Localizations/en.lproj/localizedStrings.js:
1798         New strings for "Edit" Timelines button.
1799
1800         * UserInterface/Controllers/TimelineManager.js:
1801         (WebInspector.TimelineManager):
1802         Added setting for user-configured (enabled) timeline types.
1803         Initialized to the default timeline types.
1804
1805         (WebInspector.TimelineManager.defaultTimelineTypes):
1806         (WebInspector.TimelineManager.availableTimelineTypes):
1807         Get the list of all supported timeline types, which is a superset
1808         of the list of default timeline types.
1809
1810         (WebInspector.TimelineManager.prototype.get enabledTimelineTypes):
1811         (WebInspector.TimelineManager.prototype.set enabledTimelineTypes):
1812         List of user-configured timeline types, backed by a Setting.
1813         (WebInspector.TimelineManager.prototype._loadNewRecording):
1814         Create new recordings with the current user-configured instrument list.
1815         (WebInspector.TimelineManager.defaultInstruments): Deleted.
1816         Renamed defaultTimelineTypes.
1817
1818         * UserInterface/Main.html:
1819         New class, TimelineTreeElement.
1820
1821         * UserInterface/Models/Instrument.js:
1822         (WebInspector.Instrument.createForTimelineType):
1823         Factory method for creating Instruments.
1824
1825         * UserInterface/Models/TimelineRecording.js:
1826         (WebInspector.TimelineRecording):
1827         Replace fixed instrument list with TimelineManager's list.
1828         (WebInspector.TimelineRecording.prototype.instrumentForTimeline):
1829         Get the instrument in the recording for a given timeline.
1830         (WebInspector.TimelineRecording.prototype.addInstrument):
1831         (WebInspector.TimelineRecording.prototype.removeInstrument):
1832         Drive-by syntax error fixes: Array.prototype.contains doesn't exist.
1833
1834         * UserInterface/Views/TimelineOverview.css:
1835         (.timeline-overview > .navigation-bar.timelines):
1836         (.navigation-bar.timelines .item.button.toggle-edit-instruments:not(.disabled):matches(:focus, .activate.activated, .radio.selected)):
1837         (.navigation-bar.timelines .item.button.toggle-edit-instruments:not(.disabled):active:matches(:focus, .activate.activated, .radio.selected)):
1838         (.navigation-bar.timelines .item.button.toggle-edit-instruments.disabled):
1839         (.navigation-bar.timelines .toggle-edit-instruments:not(.disabled):active):
1840         (.timeline-overview > .tree-outline.timelines):
1841         (.timeline-overview.edit-instruments > .tree-outline.timelines):
1842         (.timeline-overview.edit-instruments > .tree-outline.timelines .item.selected):
1843         (.timeline-overview > .tree-outline.timelines input[type=checkbox].status-button):
1844         (.timeline-overview.frames > :matches(.tree-outline.timelines, .navigation-bar.timelines)):
1845         (.timeline-overview > .tree-outline.timelines::before): Deleted.
1846         (.timeline-overview.frames > .tree-outline.timelines): Deleted.
1847         Styles for the "Edit" navigation bar above the timelines tree outline,
1848         and tree element styles for showing checkboxes and hiding the current
1849         selection while in edit mode.
1850
1851         * UserInterface/Views/TimelineOverview.js:
1852         (WebInspector.TimelineOverview):
1853         Create "Edit" button and navigation bar and add event handlers for
1854         capturing events, so that timeline editing can be closed and
1855         disabled when capturing begins.
1856
1857         (WebInspector.TimelineOverview.prototype.set selectedTimeline):
1858         Prevent timeline selection while in edit mode.
1859         (WebInspector.TimelineOverview.prototype.get editingInstruments):
1860         (WebInspector.TimelineOverview.prototype.set viewMode):
1861         Prevent view mode change while in edit mode.
1862
1863         (WebInspector.TimelineOverview.prototype._instrumentAdded):
1864         Create a TimelineTreeElement, and insert into the tree outline and graph
1865         container in sorted order instead of appending timeline elements.
1866
1867         (WebInspector.TimelineOverview.prototype._toggleEditingInstruments):
1868         Handler for Edit button click event.
1869         (WebInspector.TimelineOverview.prototype._editingInstrumentsDidChange):
1870         Update UI in response to editing mode change: toggle CSS, enable/disable
1871         the timeline ruler and wheel/gesture events, and update Edit button appearance.
1872
1873         (WebInspector.TimelineOverview.prototype._updateEditInstrumentsButton):
1874         Update label text and button state.
1875         (WebInspector.TimelineOverview.prototype._updateWheelAndGestureHandlers):
1876         Add/remove event handlers based on editing state.
1877
1878         (WebInspector.TimelineOverview.prototype._startEditingInstruments):
1879         Enable edit mode UI. Placeholder elements are added for timelines that
1880         aren't included in the recording, and all tree elements have checkboxes
1881         for toggling their associated timelines.
1882
1883         (WebInspector.TimelineOverview.prototype._stopEditingInstruments):
1884         Disable edit mode UI. Unchecked instruments are first removed from the
1885         recording, then placeholder tree elements are removed, and their instruments
1886         added, as needed. TimelineManager's list of user-configured timeline types
1887         is then updated.
1888
1889         (WebInspector.TimelineOverview.prototype._capturingStarted):
1890         (WebInspector.TimelineOverview.prototype._capturingStopped):
1891         Enable/disable the Edit button. Quit editing mode when capturing starts.
1892         (WebInspector.TimelineOverview.prototype._compareTimelineTreeElements):
1893         Special sorting for the timelines tree outline. The sort order is:
1894             1. Instruments that are in the recording, except Rendering Frames.
1895             2. Instruments that aren't in the recording (placeholders).
1896             3. Rendering Frames.
1897
1898         Timelines in groups 1 & 2 are sorted based on the order of the list returned
1899         by TimelineManager.availableTimelineTypes(). The Rendering Frames tree
1900         element must be last, since it's always hidden and would otherwise interfere
1901         with the alternating tree element CSS styles.
1902
1903         * UserInterface/Views/TimelineRecordingContentView.css:
1904         (.content-view.timeline-recording.edit-instruments > .timeline-overview):
1905         (.content-view.timeline-recording.edit-instruments > .content-browser):
1906         Hide lower content browser and extend timelines tree height in edit mode.
1907
1908         * UserInterface/Views/TimelineRecordingContentView.js:
1909         (WebInspector.TimelineRecordingContentView):
1910         Listen for edit mode changes on TimelineOverview.
1911         (WebInspector.TimelineRecordingContentView.prototype.contentBrowserTreeElementForRepresentedObject):
1912         (WebInspector.TimelineRecordingContentView.prototype._updateTimelineOverviewHeight):
1913         When in edit mode, remove inline style rule for TimelineOverview height.
1914         (WebInspector.TimelineRecordingContentView.prototype._instrumentAdded):
1915         (WebInspector.TimelineRecordingContentView.prototype._editingInstrumentsDidChange):
1916         Update CSS and TimelineOverview height when edit mode changes.
1917         (WebInspector.TimelineRecordingContentView.prototype.get timelineOverviewHeight): Deleted.
1918         No longer used.
1919
1920         * UserInterface/Views/TimelineTabContentView.js:
1921         (WebInspector.TimelineTabContentView.displayNameForTimelineType):
1922         (WebInspector.TimelineTabContentView.iconClassNameForTimelineType):
1923         (WebInspector.TimelineTabContentView.genericClassNameForTimelineType):
1924         (WebInspector.TimelineTabContentView.displayNameForTimeline): Deleted.
1925         (WebInspector.TimelineTabContentView.iconClassNameForTimeline): Deleted.
1926         (WebInspector.TimelineTabContentView.genericClassNameForTimeline): Deleted.
1927         Helper functions now take a timeline type instead of a timeline object.
1928
1929         * UserInterface/Views/TimelineTreeElement.js: Added.
1930         New tree element class to encapsulate behavior specific to the timelines
1931         tree outline, such as status element changes and disabling selection
1932         when editing.
1933
1934         (WebInspector.TimelineTreeElement):
1935         (WebInspector.TimelineTreeElement.prototype.get placeholder):
1936         (WebInspector.TimelineTreeElement.prototype.get editing):
1937         (WebInspector.TimelineTreeElement.prototype.set editing):
1938         (WebInspector.TimelineTreeElement.prototype._showCloseButton):
1939         (WebInspector.TimelineTreeElement.prototype._showCheckbox):
1940         (WebInspector.TimelineTreeElement.prototype._updateStatusButton):
1941
1942 2016-03-21  Matt Baker  <mattbaker@apple.com>
1943
1944         Web Inspector: New icon for Heap Allocations timeline
1945         https://bugs.webkit.org/show_bug.cgi?id=155731
1946         <rdar://problem/25275494>
1947
1948         Reviewed by Joseph Pecoraro and Timothy Hatcher.
1949
1950         * UserInterface/Images/HeapAllocationsInstrument.svg: Added.
1951         New artwork from Jon Davis.
1952
1953         * UserInterface/Views/TimelineIcons.css:
1954         (.heap-allocations-icon .icon):
1955         (body:not(.mac-platform, .windows-platform) .memory-icon .icon):
1956         (body:not(.mac-platform, .windows-platform) .heap-allocations-icon .icon):
1957         New icon styles/fallbacks for GTK.
1958
1959         * UserInterface/Views/TimelineTabContentView.js:
1960         (WebInspector.TimelineTabContentView.iconClassNameForTimeline):
1961         Add new icon class to UI helper method.
1962
1963 2016-03-20  Dan Bernstein  <mitz@apple.com>
1964
1965         [Mac] Determine TARGET_MAC_OS_X_VERSION_MAJOR from MACOSX_DEPLOYMENT_TARGET rather than from MAC_OS_X_VERSION_MAJOR
1966         https://bugs.webkit.org/show_bug.cgi?id=155707
1967         <rdar://problem/24980691>
1968
1969         Reviewed by Darin Adler.
1970
1971         * Configurations/Base.xcconfig: Set TARGET_MAC_OS_X_VERSION_MAJOR based on the last
1972           component of MACOSX_DEPLOYMENT_TARGET.
1973         * Configurations/DebugRelease.xcconfig: For engineering builds, preserve the behavior of
1974           TARGET_MAC_OS_X_VERSION_MAJOR being the host’s OS version.
1975
1976 2016-03-20  Dan Bernstein  <mitz@apple.com>
1977
1978         Update build settings
1979
1980         Rubber-stamped by Andy Estes.
1981
1982         * Configurations/DebugRelease.xcconfig:
1983         * Configurations/Version.xcconfig:
1984
1985 2016-03-18  Joseph Pecoraro  <pecoraro@apple.com>
1986
1987         Web Inspector: Bullet misaligned when expanding console log message
1988         https://bugs.webkit.org/show_bug.cgi?id=155669
1989         <rdar://problem/25250721>
1990
1991         Reviewed by Timothy Hatcher.
1992
1993         * UserInterface/Views/ObjectTreeView.css:
1994         (.object-tree):
1995         (.object-tree .object-tree): Deleted.
1996         Make object tree's inline-block again.
1997
1998         * UserInterface/Views/ConsoleMessageView.css:
1999         (.console-top-level-message .object-tree):
2000         (.console-top-level-message .object-tree .object-tree):
2001         Since the Console is the only place that requires a non-inline-block
2002         object-tree, and only at the top level, have the console override
2003         the styles of object trees as it needs.
2004
2005 2016-03-18  Joseph Pecoraro  <pecoraro@apple.com>
2006
2007         Uncaught Exception: TypeError: undefined is not an object (evaluating 'this._treeOutlineDataGridSynchronizer.treeElementForDataGridNode')
2008         https://bugs.webkit.org/show_bug.cgi?id=155671
2009         <rdar://problem/25249401>
2010
2011         Reviewed by Timothy Hatcher.
2012
2013         * UserInterface/Views/TimelineDataGrid.js:
2014         (WebInspector.TimelineDataGrid.prototype._sort):
2015
2016 2016-03-18  Joseph Pecoraro  <pecoraro@apple.com>
2017
2018         Web Inspector: Fix ObjectTree Map styling, key/value look cramped
2019         https://bugs.webkit.org/show_bug.cgi?id=155668
2020
2021         Reviewed by Timothy Hatcher.
2022
2023         * UserInterface/Views/ObjectTreeArrayIndexTreeElement.css:
2024         (.tree-outline .item.object-tree-array-index):
2025         * UserInterface/Views/ObjectTreeMapEntryTreeElement.css:
2026         (.tree-outline .item.object-tree-map-entry):
2027         When creating generic tree outline styles generic object tree
2028         styles were getting overriden by generic tree outline styles
2029         with higher specificity.
2030
2031 2016-03-18  Joseph Pecoraro  <pecoraro@apple.com>
2032
2033         Web Inspector: Timeline reset issues after Navigation Sidebar removal
2034         https://bugs.webkit.org/show_bug.cgi?id=155658
2035         <rdar://problem/25245292>
2036
2037         Reviewed by Timothy Hatcher.
2038
2039         * UserInterface/Views/CircleChart.js:
2040         (WebInspector.CircleChart.prototype.set values):
2041         If the segments have never been set the values list will be empty.
2042         Allow clearing to set empty values again.
2043
2044         * UserInterface/Views/ScriptClusterTimelineView.js:
2045         (WebInspector.ScriptClusterTimelineView.prototype._scriptClusterViewCurrentContentViewDidChange):
2046         (WebInspector.ScriptClusterTimelineView):
2047         Timeline sidebar no longer exists. Replace with the common
2048         FIXME added to the other TimelineViews.
2049
2050         * UserInterface/Views/TimelineView.js:
2051         (WebInspector.TimelineView.prototype.reset):
2052         Timeline sidebar and content tree outline no longer exist.
2053         Replace with the common comment indicating this method
2054         is intended for subclasses.
2055
2056 2016-03-17  Carlos Garcia Campos  <cgarcia@igalia.com>
2057
2058         REGRESSION (r197724): [GTK] Web Inspector: Images being blocked by CSP 2.0
2059         https://bugs.webkit.org/show_bug.cgi?id=155432
2060
2061         Reviewed by Daniel Bates.
2062
2063         Allow Web Inspector to load resource: image resources.
2064
2065         * UserInterface/Main.html:
2066
2067 2016-03-17  Joseph Pecoraro  <pecoraro@apple.com>
2068
2069         Web Inspector: Prefer retained size to the shallow size in Heap Snapshot data grids
2070         https://bugs.webkit.org/show_bug.cgi?id=155597
2071         <rdar://problem/25225087>
2072
2073         Reviewed by Timothy Hatcher.
2074
2075         * Localizations/en.lproj/localizedStrings.js:
2076         New datagrid column and tooltip strings.
2077
2078         * UserInterface/Views/DataGrid.js:
2079         (WebInspector.DataGrid.prototype.insertColumn):
2080         Allow a column definition to provide a tooltip for the header cell.
2081
2082         * UserInterface/Views/HeapSnapshotClassDataGridNode.js:
2083         (WebInspector.HeapSnapshotClassDataGridNode.prototype.createCellContent):
2084         Include retained size column data.
2085
2086         (WebInspector.HeapSnapshotClassDataGridNode.prototype._populate):
2087         Fix non-batched populate to sort instances on first population.
2088
2089         * UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
2090         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype.createCellContent):
2091         Include retained size column data.
2092
2093         * UserInterface/Views/HeapSnapshotInstancesContentView.js:
2094         (WebInspector.HeapSnapshotInstancesContentView):
2095         Include a retained size column. Update initial sort and column widths.
2096
2097         * UserInterface/Views/HeapSnapshotInstancesDataGridTree.js:
2098         (WebInspector.HeapSnapshotInstancesDataGridTree.buildSortComparator):
2099         Include a numeric sort comparator for the new retained size column.
2100
2101         (WebInspector.HeapSnapshotInstancesDataGridTree.prototype._populateTopLevel):
2102         Include retained size, and lazily calculate percentage later.
2103
2104 2016-03-17  Joseph Pecoraro  <pecoraro@apple.com>
2105
2106         Web Inspector: HeapSnapshots are slow and use too much memory
2107         https://bugs.webkit.org/show_bug.cgi?id=155571
2108
2109         Reviewed by Timothy Hatcher.
2110
2111         This is the first inclusion of Workers into Web Inspector. In this case
2112         the Main side merely needs to make requests of the Worker and get back
2113         objects that it can interact with more.
2114         
2115         New file heirarchies:
2116
2117             UserInterface/Proxies
2118                 - new Proxy classes in the Main page.
2119                 - treat like Model classes, but not quite model.
2120
2121             UserInterface/Workers/HeapSnapshotWorker
2122                 - new Worker classes for Workers. No WebInspector namespace.
2123                 - no minification of these resources, they are simply copied.
2124
2125         Remote procedure call interface between the Main/Worker page happens
2126         through the WorkerProxy and Worker classes. There are simple ways
2127         to perform factory style methods and call methods on objects, and
2128         get the result in a callback. Similiar to frontend <-> backend agent
2129         communication:
2130
2131             HeapSnapshotWorkerProxy: (Main world)
2132                 - creates the worker
2133                 - performAction("actionName", arguments, callback)
2134                 - callMethod(objectId, "methodName", arguments, callback)
2135                 - handle message => dispatch event or invoke callback
2136
2137             HeapSnapshotWorker: (Worker world)
2138                 - sendEvent("eventName", eventData)
2139                 - handle message => dispatch action or method on object
2140         
2141         Proxy object methods are boilerplate calls to performAction/callMethod
2142         with deserialization of responses. The rest of the frontend can just
2143         treat Proxy objects as Model objects with some data and async methods.
2144
2145         Because the Node/Edge data is so small, objects are cheaply created
2146         when needed and not cached. This means that there may be duplicate
2147         HeapSnapshotNode's for the same node. For example if different Views
2148         both request instancesWithClassName("Foo"). This is fine, as none
2149         of our Views really care about object uniqueness, they are only
2150         interested in the data or querying for more data.
2151
2152         * Scripts/combine-resources.pl:
2153         * Scripts/copy-user-interface-resources.pl:
2154         Copy the Workers directory to the resources directory.
2155         Its code is only meant to be loaded by Workers, so it
2156         shouldn't be included in the Main page.
2157
2158         * UserInterface/Main.html:
2159         * UserInterface/Test.html:
2160         * UserInterface/Models/HeapSnapshot.js: Removed.
2161         * UserInterface/Models/HeapSnapshotDiff.js: Removed.
2162         * UserInterface/Models/HeapSnapshotEdge.js: Removed.
2163         * UserInterface/Models/HeapSnapshotNode.js: Removed.
2164         Replace the old simple Model classes with Proxy classes that interact
2165         with the Worker.
2166
2167         * UserInterface/Models/HeapAllocationsInstrument.js:
2168         (WebInspector.HeapAllocationsInstrument.prototype._takeHeapSnapshot):
2169         (WebInspector.HeapAllocationsInstrument):
2170         * UserInterface/Models/HeapAllocationsTimelineRecord.js:
2171         (WebInspector.HeapAllocationsTimelineRecord):
2172         * UserInterface/Models/HeapSnapshotRootPath.js:
2173         (WebInspector.HeapSnapshotRootPath):
2174         (WebInspector.HeapSnapshotRootPath.prototype.appendEdge):
2175         * UserInterface/Protocol/HeapObserver.js:
2176         (WebInspector.HeapObserver.prototype.trackingStart):
2177         (WebInspector.HeapObserver.prototype.trackingComplete):
2178         * UserInterface/Views/ContentView.js:
2179         (WebInspector.ContentView.createFromRepresentedObject):
2180         (WebInspector.ContentView.isViewable):
2181         * UserInterface/Views/HeapAllocationsTimelineView.js:
2182         (WebInspector.HeapAllocationsTimelineView.prototype.showHeapSnapshotDiff):
2183         (WebInspector.HeapAllocationsTimelineView.prototype._takeHeapSnapshotClicked):
2184         (WebInspector.HeapAllocationsTimelineView.prototype._dataGridNodeSelected):
2185         (WebInspector.HeapAllocationsTimelineView):
2186         * UserInterface/Views/HeapSnapshotClassDataGridNode.js:
2187         (WebInspector.HeapSnapshotClassDataGridNode.prototype._populate):
2188         * UserInterface/Views/HeapSnapshotClusterContentView.js:
2189         * UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
2190         (WebInspector.HeapSnapshotInstanceDataGridNode):
2191         (WebInspector.HeapSnapshotInstanceDataGridNode.logHeapSnapshotNode.node.shortestGCRootPath.):
2192         (WebInspector.HeapSnapshotInstanceDataGridNode.logHeapSnapshotNode):
2193         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._mouseoverHandler.appendPath):
2194         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._mouseoverHandler.stringifyEdge):
2195         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._mouseoverHandler):
2196         * UserInterface/Views/HeapSnapshotInstancesContentView.js:
2197         (WebInspector.HeapSnapshotInstancesContentView):
2198         * UserInterface/Views/HeapSnapshotInstancesDataGridTree.js:
2199         (WebInspector.HeapSnapshotInstancesDataGridTree):
2200         * UserInterface/Views/HeapSnapshotSummaryContentView.js:
2201         (WebInspector.HeapSnapshotSummaryContentView):
2202         Update existing code to expect the new Proxy objects or create
2203         the new HeapSnapshot using workers.
2204
2205         * UserInterface/Proxies/HeapSnapshotDiffProxy.js: Added.
2206         (WebInspector.HeapSnapshotDiffProxy):
2207         (WebInspector.HeapSnapshotDiffProxy.deserialize):
2208         (WebInspector.HeapSnapshotDiffProxy.prototype.get snapshot1):
2209         (WebInspector.HeapSnapshotDiffProxy.prototype.get snapshot2):
2210         (WebInspector.HeapSnapshotDiffProxy.prototype.get totalSize):
2211         (WebInspector.HeapSnapshotDiffProxy.prototype.get totalObjectCount):
2212         (WebInspector.HeapSnapshotDiffProxy.prototype.get categories):
2213         (WebInspector.HeapSnapshotDiffProxy.prototype.allocationBucketCounts):
2214         (WebInspector.HeapSnapshotDiffProxy.prototype.instancesWithClassName):
2215         (WebInspector.HeapSnapshotDiffProxy.prototype.nodeWithIdentifier):
2216         A HeapSnapshotDiffProxy looks like a HeapSnapshotProxy and responds to
2217         the same methods, but has the extra snapshot1/2 pointers.
2218
2219         * UserInterface/Proxies/HeapSnapshotEdgeProxy.js:
2220         (WebInspector.HeapSnapshotEdgeProxy):
2221         (WebInspector.HeapSnapshotEdgeProxy.deserialize):
2222         Edge data. No methods are proxied at this point.
2223
2224         * UserInterface/Proxies/HeapSnapshotNodeProxy.js: Added.
2225         (WebInspector.HeapSnapshotNodeProxy):
2226         (WebInspector.HeapSnapshotNodeProxy.deserialize):
2227         (WebInspector.HeapSnapshotNodeProxy.prototype.shortestGCRootPath):
2228         (WebInspector.HeapSnapshotNodeProxy.prototype.dominatedNodes):
2229         (WebInspector.HeapSnapshotNodeProxy.prototype.retainedNodes):
2230         (WebInspector.HeapSnapshotNodeProxy.prototype.retainers):
2231         Node data and methods to query for node relationships.
2232
2233         * UserInterface/Proxies/HeapSnapshotProxy.js: Added.
2234         (WebInspector.HeapSnapshotProxy):
2235         (WebInspector.HeapSnapshotProxy.deserialize):
2236         (WebInspector.HeapSnapshotProxy.prototype.get proxyObjectId):
2237         (WebInspector.HeapSnapshotProxy.prototype.get identifier):
2238         (WebInspector.HeapSnapshotProxy.prototype.get totalSize):
2239         (WebInspector.HeapSnapshotProxy.prototype.get totalObjectCount):
2240         (WebInspector.HeapSnapshotProxy.prototype.get categories):
2241         (WebInspector.HeapSnapshotProxy.prototype.allocationBucketCounts):
2242         (WebInspector.HeapSnapshotProxy.prototype.instancesWithClassName):
2243         (WebInspector.HeapSnapshotProxy.prototype.nodeWithIdentifier):
2244         Snapshot data and methods to query for nodes.
2245
2246         * UserInterface/Proxies/HeapSnapshotWorkerProxy.js: Added.
2247         (WebInspector.HeapSnapshotWorkerProxy):
2248         (WebInspector.HeapSnapshotWorkerProxy.singleton):
2249         (WebInspector.HeapSnapshotWorkerProxy.prototype.createSnapshot):
2250         (WebInspector.HeapSnapshotWorkerProxy.prototype.createSnapshotDiff):
2251         (WebInspector.HeapSnapshotWorkerProxy.prototype.performAction):
2252         (WebInspector.HeapSnapshotWorkerProxy.prototype.callMethod):
2253         (WebInspector.HeapSnapshotWorkerProxy.prototype._postMessage):
2254         (WebInspector.HeapSnapshotWorkerProxy.prototype._handleMessage):
2255         Singleton factory for the worker and proxied communication with the worker.
2256         Provide means for invoking "factory actions" and "object methods".
2257
2258         * UserInterface/Workers/HeapSnapshot/HeapSnapshotWorker.js: Added.
2259         (HeapSnapshotWorker):
2260         (HeapSnapshotWorker.prototype.createSnapshot):
2261         (HeapSnapshotWorker.prototype.createSnapshotDiff):
2262         (HeapSnapshotWorker.prototype.sendEvent):
2263         (HeapSnapshotWorker.prototype._handleMessage):
2264         Main worker code. Handle dispatching actions and methods.
2265
2266         * UserInterface/Workers/HeapSnapshot/HeapSnapshot.js: Added.
2267         (HeapSnapshot):
2268         (HeapSnapshot.buildCategories):
2269         (HeapSnapshot.allocationBucketCounts):
2270         (HeapSnapshot.instancesWithClassName):
2271         (HeapSnapshot.prototype.allocationBucketCounts):
2272         (HeapSnapshot.prototype.instancesWithClassName):
2273         (HeapSnapshot.prototype.nodeWithIdentifier):
2274         (HeapSnapshot.prototype.shortestGCRootPath):
2275         (HeapSnapshot.prototype.dominatedNodes):
2276         (HeapSnapshot.prototype.retainedNodes):
2277         (HeapSnapshot.prototype.retainers):
2278         (HeapSnapshot.prototype.serialize):
2279         (HeapSnapshot.prototype.serializeNode):
2280         (HeapSnapshot.prototype.serializeEdge):
2281         (HeapSnapshot.prototype._buildOutgoingEdges):
2282         (HeapSnapshot.prototype._buildIncomingEdges):
2283         (HeapSnapshot.prototype._buildPostOrderIndexes):
2284         (HeapSnapshot.prototype._buildDominatorIndexes):
2285         (HeapSnapshot.prototype._buildRetainedSizes):
2286         (HeapSnapshot.prototype._gcRootPathes.visitNode):
2287         (HeapSnapshot.prototype._gcRootPathes):
2288         (HeapSnapshotDiff):
2289         (HeapSnapshotDiff.prototype.allocationBucketCounts):
2290         (HeapSnapshotDiff.prototype.instancesWithClassName):
2291         (HeapSnapshotDiff.prototype.nodeWithIdentifier):
2292         (HeapSnapshotDiff.prototype.shortestGCRootPath):
2293         (HeapSnapshotDiff.prototype.dominatedNodes):
2294         (HeapSnapshotDiff.prototype.retainedNodes):
2295         (HeapSnapshotDiff.prototype.retainers):
2296         (HeapSnapshotDiff.prototype.serialize):
2297         New HeapSnapshot data processing implementation. Instead of creating
2298         a new object per Node or per Edge create data arrays containing data
2299         per-Node. Operate on these lists of data instead of creating many objects.
2300
2301 2016-03-17  Nikita Vasilyev  <nvasilyev@apple.com>
2302
2303         Web Inspector: Large repaints when typing any character in console
2304         https://bugs.webkit.org/show_bug.cgi?id=155387
2305         <rdar://problem/25125720>
2306
2307         Reviewed by Timothy Hatcher.
2308
2309         * UserInterface/Views/Main.css:
2310         (#content):
2311
2312 2016-03-16  Matt Baker  <mattbaker@apple.com>
2313
2314         Uncaught Exception: SyntaxError: Invalid regular expression: \ at end of pattern
2315         https://bugs.webkit.org/show_bug.cgi?id=155556
2316         <rdar://problem/25200058>
2317
2318         Reviewed by Timothy Hatcher.
2319
2320         Use simpleGlobStringToRegExp, which returns a valid regular expression
2321         for strings with trailing backslashes, and also provides globbing.
2322         String.escapeForRegExp returns a JS string ending in "\\", which isn't
2323         a valid regular expression.
2324
2325         * UserInterface/Views/OpenResourceDialog.js:
2326         (WebInspector.OpenResourceDialog):
2327         (WebInspector.OpenResourceDialog.prototype._handleMousedownEvent):
2328         Fixed typo.
2329
2330         (WebInspector.OpenResourceDialog.prototype._updateFilter):
2331         Switch to simpleGlobStringToRegExp.
2332
2333 2016-03-14  Joseph Pecoraro  <pecoraro@apple.com>
2334
2335         Web Inspector: Show path from root to instances in the Heap Snapshot content view
2336         https://bugs.webkit.org/show_bug.cgi?id=155478
2337         <rdar://problem/25157408>
2338
2339         Reviewed by Timothy Hatcher.
2340
2341         * Localizations/en.lproj/localizedStrings.js:
2342         * UserInterface/Main.html:
2343         New strings and resources.
2344
2345         * UserInterface/Models/HeapSnapshotNode.js:
2346         (WebInspector.HeapSnapshotNode.prototype.get shortestGCRootPath):
2347         (WebInspector.HeapSnapshotNode.prototype._gcRootPaths.visitNode):
2348         (WebInspector.HeapSnapshotNode.prototype._gcRootPaths):
2349         Helper to get the shortest path from a GC root to the node.
2350
2351         * UserInterface/Models/HeapSnapshotRootPath.js: Added.
2352         (WebInspector.HeapSnapshotRootPath):
2353         (WebInspector.HeapSnapshotRootPath.emptyPath):
2354         (WebInspector.HeapSnapshotRootPath.prototype.get node):
2355         (WebInspector.HeapSnapshotRootPath.prototype.get parent):
2356         (WebInspector.HeapSnapshotRootPath.prototype.get pathComponent):
2357         (WebInspector.HeapSnapshotRootPath.prototype.get rootNode):
2358         (WebInspector.HeapSnapshotRootPath.prototype.get fullPath):
2359         (WebInspector.HeapSnapshotRootPath.prototype.isRoot):
2360         (WebInspector.HeapSnapshotRootPath.prototype.isEmpty):
2361         (WebInspector.HeapSnapshotRootPath.prototype.isGlobalScope):
2362         (WebInspector.HeapSnapshotRootPath.prototype.isPathComponentImpossible):
2363         (WebInspector.HeapSnapshotRootPath.prototype.isFullPathImpossible):
2364         (WebInspector.HeapSnapshotRootPath.prototype.appendInternal):
2365         (WebInspector.HeapSnapshotRootPath.prototype.appendArrayIndex):
2366         (WebInspector.HeapSnapshotRootPath.prototype.appendPropertyName):
2367         (WebInspector.HeapSnapshotRootPath.prototype.appendVariableName):
2368         (WebInspector.HeapSnapshotRootPath.prototype.appendGlobalScopeName):
2369         (WebInspector.HeapSnapshotRootPath.prototype.appendEdge):
2370         (WebInspector.HeapSnapshotRootPath.prototype._canPropertyNameBeDotAccess):
2371         Helper class, like PropertyPath, for building a string path to
2372         a HeapSnapshotNode. Typically the path is built up with
2373         HeapSnapshotEdges and so you can build a string such as:
2374         `window.foo[0]["prop erty"]._foo`.
2375
2376         * UserInterface/Views/HeapAllocationsTimelineView.js:
2377         (WebInspector.HeapAllocationsTimelineView.prototype.showHeapSnapshotList):
2378         (WebInspector.HeapAllocationsTimelineView.prototype.showHeapSnapshotTimelineRecord):
2379         (WebInspector.HeapAllocationsTimelineView.prototype.showHeapSnapshotDiff):
2380         (WebInspector.HeapAllocationsTimelineView.prototype.shown):
2381         (WebInspector.HeapAllocationsTimelineView.prototype.hidden):
2382         (WebInspector.HeapAllocationsTimelineView.prototype.closed):
2383         Propogate shown/hidden to the contentViewContainer.
2384         Cleanup the contentViewContainer when closing.
2385
2386         * UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
2387         (WebInspector.HeapSnapshotInstanceDataGridNode.logHeapSnapshotNode):
2388         Helper for logging a HeapSnapshotNode value to the console. If the
2389         path is possible from the root, just output the path in the console
2390         otherwise use a synthetic "Heap Snapshot Object (@1234)" like string.
2391         For strings, just get the preview as we won't get a real RemoteObject.
2392
2393         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype.createCellContent):
2394         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._mouseoverHandler.appendPath):
2395         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._mouseoverHandler.appendPathRow):
2396         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._mouseoverHandler.sanitizeClassName):
2397         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._mouseoverHandler.stringifyEdge):
2398         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._mouseoverHandler):
2399         Give the @1234 id element a mouseover handler to display a popover
2400         with the path from a root. Stop the path at "Window" if possible
2401         to avoid displaying internals like "JSDOMWindowShell".
2402
2403         * UserInterface/Views/HeapSnapshotInstancesContentView.css:
2404         (.heap-snapshot .object-id):
2405         (.heap-snapshot .object-id:hover):
2406         (.heap-snapshot > .data-grid tr:not(.selected) td .object-id): Deleted.
2407         (.heap-snapshot .icon):
2408         (.heap-snapshot-instance-popover-content):
2409         (.heap-snapshot-instance-popover-content table):
2410         (.heap-snapshot-instance-popover-content tr):
2411         (.heap-snapshot-instance-popover-content td):
2412         (.heap-snapshot-instance-popover-content td.edge-name):
2413         (.heap-snapshot-instance-popover-content td.object-data):
2414         (.heap-snapshot-instance-popover-content .node):
2415         (.heap-snapshot-instance-popover-content .node *):
2416         Styles for contents of the popover.
2417
2418         * UserInterface/Views/HeapSnapshotInstancesContentView.js:
2419         (WebInspector.HeapSnapshotInstancesContentView.prototype.hidden):
2420         * UserInterface/Views/HeapSnapshotInstancesDataGridTree.js:
2421         (WebInspector.HeapSnapshotInstancesDataGridTree):
2422         (WebInspector.HeapSnapshotInstancesDataGridTree.prototype.get popover):
2423         (WebInspector.HeapSnapshotInstancesDataGridTree.prototype.get popoverNode):
2424         (WebInspector.HeapSnapshotInstancesDataGridTree.prototype.set popoverNode):
2425         (WebInspector.HeapSnapshotInstancesDataGridTree.prototype.hidden):
2426         (WebInspector.HeapSnapshotInstancesDataGridTree.prototype.willDismissPopover):
2427         Have a single popover for the entire tree. Cache and clear
2428         contents of the popover when appropriate.
2429
2430 2016-03-14  Daniel Bates  <dabates@apple.com>
2431
2432         Web Inspector: Display Content Security Policy hash in details sidebar for script and style elements
2433         https://bugs.webkit.org/show_bug.cgi?id=155466
2434         <rdar://problem/25152480>
2435
2436         Reviewed by Joseph Pecoraro and Timothy Hatcher.
2437
2438         * Localizations/en.lproj/localizedStrings.js: Add English localized string for the CSP hash UI label.
2439         * UserInterface/Models/DOMNode.js:
2440         (WebInspector.DOMNode): Initialize the instance variable this._contentSecurityPolicyHash
2441         with the value passed from the Inspector back end.
2442         (WebInspector.DOMNode.prototype.contentSecurityPolicyHash): Returns the CSP hash for this node.
2443         * UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
2444         (WebInspector.DOMNodeDetailsSidebarPanel): Append a row to the end of section Identity to display
2445         the CSP hash (if applicable).
2446         (WebInspector.DOMNodeDetailsSidebarPanel.prototype.refresh): Query the underlying WebInspector.DOMNode
2447         for the CSP hash of the selected node.
2448
2449 2016-03-14  Joseph Pecoraro  <pecoraro@apple.com>
2450
2451         Web Inspector: REGRESSION(r197974): HeapAllocationsTimelineView broken, doesn't handle Timeline Sidebar Navigation removal
2452         https://bugs.webkit.org/show_bug.cgi?id=155458
2453         <rdar://problem/25150803>
2454
2455         Reviewed by Timothy Hatcher.
2456
2457         * UserInterface/Views/HeapAllocationsTimelineView.js:
2458         (WebInspector.HeapAllocationsTimelineView):
2459         (WebInspector.HeapAllocationsTimelineView.prototype.showHeapSnapshotTimelineRecord):
2460         (WebInspector.HeapAllocationsTimelineView.prototype.get selectionPathComponents):
2461         (WebInspector.HeapAllocationsTimelineView.prototype.layout):
2462         (WebInspector.HeapAllocationsTimelineView.prototype._compareHeapSnapshotsClicked):
2463         (WebInspector.HeapAllocationsTimelineView.prototype._dataGridNodeSelected):
2464         (WebInspector.HeapAllocationsTimelineView.prototype.get navigationSidebarTreeOutlineLabel): Deleted.
2465         Update the TimelineView now that there is no sidebar.
2466         Remove any TreeOutline logic and replace with DataGrid logic.
2467
2468 2016-03-14  Joseph Pecoraro  <pecoraro@apple.com>
2469
2470         Web Inspector: REGRESSION(r198026): Can't click on Snapshot in Timeline Overview
2471         https://bugs.webkit.org/show_bug.cgi?id=155457
2472         <rdar://problem/25150706>
2473
2474         Reviewed by Timothy Hatcher.
2475
2476         * UserInterface/Views/TimelineRuler.js:
2477         (WebInspector.TimelineRuler.prototype._handleClick):
2478         The conditional was accidentally inverted in r198026.
2479
2480 2016-03-14  Timothy Hatcher  <timothy@apple.com>
2481
2482         Web Inspector: cssmin.py does not handle calc(var(--toolbar-height) + var(--tab-bar-height))
2483
2484         https://bugs.webkit.org/show_bug.cgi?id=155464
2485         rdar://problem/25152196
2486
2487         Reviewed by Joseph Pecoraro.
2488
2489         * Scripts/cssmin.py:
2490         (cssminify): Check for var when stripping spaces around + and -.
2491
2492         * UserInterface/Views/TimelineOverview.js:
2493         (WebInspector.TimelineOverview.prototype._viewModeDidChange):
2494         Drive-by fix to add a missing semi-colon found by the copy-user-interface-resources-dryrun.rb script.
2495
2496 2016-03-14  Joseph Pecoraro  <pecoraro@apple.com>
2497
2498         Reduce generated JSON HeapSnapshot size
2499         https://bugs.webkit.org/show_bug.cgi?id=155460
2500
2501         Reviewed by Geoffrey Garen.
2502
2503         * UserInterface/Models/HeapSnapshot.js:
2504         (WebInspector.HeapSnapshot.fromPayload):
2505         Update for the slightly modified format.
2506
2507 2016-03-14  Commit Queue  <commit-queue@webkit.org>
2508
2509         Unreviewed, rolling out r198095.
2510         https://bugs.webkit.org/show_bug.cgi?id=155467
2511
2512         Made text look poor (Requested by JoePeck on #webkit).
2513
2514         Reverted changeset:
2515
2516         "Web Inspector: Large repaints when typing any character in
2517         console"
2518         https://bugs.webkit.org/show_bug.cgi?id=155387
2519         http://trac.webkit.org/changeset/198095
2520
2521 2016-03-14  Nikita Vasilyev  <nvasilyev@apple.com>
2522
2523         Web Inspector: Reduce unnecessary dashboard repaints
2524         https://bugs.webkit.org/show_bug.cgi?id=155425
2525         <rdar://problem/25138247>
2526
2527         Reviewed by Timothy Hatcher.
2528
2529         * UserInterface/Views/DefaultDashboardView.js:
2530         (WebInspector.DefaultDashboardView.prototype._appendElementForNamedItem.):
2531         newText is a number for console message counters.
2532
2533 2016-03-13  Nikita Vasilyev  <nvasilyev@apple.com>
2534
2535         Web Inspector: Large repaints when typing any character in console
2536         https://bugs.webkit.org/show_bug.cgi?id=155387
2537         <rdar://problem/25125720>
2538
2539         Reviewed by Timothy Hatcher.
2540
2541         * UserInterface/Views/Main.css:
2542         (#content):
2543
2544 2016-03-13  Devin Rousso  <dcrousso+webkit@gmail.com>
2545
2546         Web Inspector: Memory timeline pie charts are misaligned when there is no recording
2547         https://bugs.webkit.org/show_bug.cgi?id=155421
2548
2549         Reviewed by Timothy Hatcher.
2550
2551         * UserInterface/Views/MemoryTimelineView.css:
2552         (.timeline-view.memory > .content > .overview):
2553         Removed top padding to match bottom padding.
2554
2555         (.timeline-view.memory .legend > .row):
2556         (.timeline-view.memory .legend):
2557         Moved specified width to prevent unrecorded timelines from having graphs
2558         that are offset horizontally.
2559
2560 2016-03-13  Devin Rousso  <dcrousso+webkit@gmail.com>
2561
2562         Web Inspector: REGRESSION: Styles sidebar inline swatches are oddly shaped
2563         https://bugs.webkit.org/show_bug.cgi?id=155410
2564
2565         Reviewed by Timothy Hatcher.
2566
2567         * UserInterface/Views/InlineSwatch.css:
2568         (.inline-swatch):
2569         (.inline-swatch > span):
2570         Added more consistent border-radius with UserInterface/Images/CubicBezier.svg.
2571
2572         * UserInterface/Views/VisualStyleColorPicker.css:
2573         (.visual-style-property-container.input-color-picker > .visual-style-property-value-container > .inline-swatch.color):
2574         Made border-radius consistent with the adjacent input field.
2575
2576 2016-03-12  Nikita Vasilyev  <nvasilyev@apple.com>
2577
2578         Web Inspector: Convert toolbar and tab bar to position absolute to reduce repaint areas
2579         https://bugs.webkit.org/show_bug.cgi?id=155386
2580
2581         Reviewed by Timothy Hatcher.
2582
2583         Using CSS flexbox causes unnecessary large repaints.
2584         Convert top level elements (.toolbar, .tab-bar, #main)
2585         from flexbox to "position: absolute".
2586
2587         * UserInterface/Views/Main.css:
2588         (#main):
2589         * UserInterface/Views/TabBar.css:
2590         (.tab-bar):
2591         * UserInterface/Views/Toolbar.css:
2592         (.toolbar):
2593         (body.mac-platform:not(.docked, .mavericks) .toolbar):
2594         (body.mac-platform:not(.docked, .mavericks)):
2595         (body.window-inactive:not(.mavericks) .toolbar): Deleted.
2596         * UserInterface/Views/Variables.css:
2597         (:root):
2598
2599 2016-03-11  Matt Baker  <mattbaker@apple.com>
2600
2601         Web Inspector: Wrong TimelineOverview height after switching from Events to Frames
2602         https://bugs.webkit.org/show_bug.cgi?id=155366
2603         <rdar://problem/25111028>
2604
2605         Reviewed by Timothy Hatcher.
2606
2607         * UserInterface/Views/TimelineRecordingContentView.js:
2608         (WebInspector.TimelineRecordingContentView.prototype._currentContentViewDidChange):
2609         Update the overview height after setting a new view mode.
2610
2611 2016-03-11  Matt Baker  <mattbaker@apple.com>
2612
2613         Web Inspector: Make it possible to disable TimelineRuler UI
2614         https://bugs.webkit.org/show_bug.cgi?id=155348
2615         <rdar://problem/25103505>
2616
2617         Reviewed by Timothy Hatcher.
2618
2619         Adds an "enabled" property to TimelineRuler, allowing the selection UI
2620         to be disabled without removing the current selection.
2621
2622         * UserInterface/Views/TimelineRuler.css:
2623         (.timeline-ruler.allows-time-range-selection:not(.disabled)):
2624         (.timeline-ruler > .selection-drag):
2625         (.timeline-ruler:not(.disabled) > .selection-drag):
2626         (.timeline-ruler:not(.disabled) > .selection-drag:active):
2627         (.timeline-ruler.disabled > .selection-handle):
2628         (.timeline-ruler.allows-time-range-selection): Deleted.
2629         (.timeline-ruler > .selection-drag:active): Deleted.
2630         Updated ruler styles for "disabled" state: pointer events are disabled,
2631         selection handles hidden, and the default cursor is shown.
2632
2633         * UserInterface/Views/TimelineRuler.js:
2634         (WebInspector.TimelineRuler):
2635         (WebInspector.TimelineRuler.prototype.get enabled):
2636         (WebInspector.TimelineRuler.prototype.set enabled):
2637         New property.
2638         (WebInspector.TimelineRuler.prototype._handleClick):
2639         Corrected code which always reset the pointer events to "all", instead
2640         of setting it back to the original value.
2641
2642 2016-03-10  Daniel Strokis  <dstrokis@icloud.com>
2643
2644         Web Inspector: color swatch and border are misaligned in Visual Styles sidebar
2645         https://bugs.webkit.org/show_bug.cgi?id=154471
2646
2647         Reviewed by Timothy Hatcher.
2648
2649         Color swatches in the Visual Styles sidebar now have only their left corners rounded (thanks to Matt Baker for the idea).
2650
2651         * UserInterface/Views/InlineSwatch.css:
2652         (.inline-swatch > span):
2653         (.inline-swatch): Deleted.
2654         * UserInterface/Views/VisualStyleColorPicker.css:
2655         (.visual-style-property-container.input-color-picker > .visual-style-property-value-container > .inline-swatch.color):
2656
2657 2016-03-10  Matt Baker  <mattbaker@apple.com>
2658
2659         Web Inspector: Timelines UI redesign: remove navigation sidebar
2660         https://bugs.webkit.org/show_bug.cgi?id=153036
2661         <rdar://problem/24195627>
2662
2663         Reviewed by Timothy Hatcher.
2664
2665         Removed TimelineView methods used by the sidebar to setup the content tree
2666         outline and handle tree element events, which are no longer used. Tree elements
2667         are no longer created by TimelineViews as records are processed.
2668
2669         * UserInterface/Main.html:
2670         Removed files.
2671
2672         * UserInterface/Views/LayoutTimelineView.js:
2673         (WebInspector.LayoutTimelineView):
2674         Removed tree outline event listeners and data grid parameter.
2675         (WebInspector.LayoutTimelineView.prototype._processPendingRecords):
2676         (WebInspector.LayoutTimelineView.prototype._dataGridFiltersDidChange):
2677         (WebInspector.LayoutTimelineView.prototype._hoveredOrSelectedRecord):
2678         Get record from data grid node instead of tree element.
2679         (WebInspector.LayoutTimelineView.prototype.get navigationSidebarTreeOutlineLabel): Deleted.
2680         (WebInspector.LayoutTimelineView.prototype._mouseOverTreeOutline): Deleted.
2681         (WebInspector.LayoutTimelineView.prototype._mouseLeaveTreeOutline): Deleted.
2682         No longer needed, highlighting performed by data grid event handlers.
2683
2684         * UserInterface/Views/MemoryTimelineView.js:
2685         (WebInspector.MemoryTimelineView.prototype.get navigationSidebarTreeOutlineLabel): Deleted.
2686         No longer needed.
2687
2688         * UserInterface/Views/NavigationSidebarPanel.js:
2689         (WebInspector.NavigationSidebarPanel.prototype._updateFilter): Deleted.
2690         Removed hack which was specific to TimelineSidebarPanel.
2691
2692         * UserInterface/Views/NetworkTimelineView.js:
2693         (WebInspector.NetworkTimelineView):
2694         Removed sidebar styles and tree outline data grid parameter.
2695         (WebInspector.NetworkTimelineView.prototype._processPendingRecords):
2696         (WebInspector.NetworkTimelineView.prototype._dataGridFiltersDidChange):
2697         (WebInspector.NetworkTimelineView.prototype.get navigationSidebarTreeOutlineLabel): Deleted.
2698         (WebInspector.NetworkTimelineView.prototype.treeElementSelected): Deleted.
2699         No longer needed.
2700
2701         * UserInterface/Views/OverviewTimelineView.js:
2702         (WebInspector.OverviewTimelineView):
2703         (WebInspector.OverviewTimelineView.prototype.get selectionPathComponents):
2704         (WebInspector.OverviewTimelineView.prototype.dataGridNodePathComponentSelected):
2705         Create path components from the grid selection. This should have been
2706         included in https://webkit.org/b/154954.
2707
2708         (WebInspector.OverviewTimelineView.prototype._compareDataGridNodesByStartTime.getStartTime):
2709         (WebInspector.OverviewTimelineView.prototype._compareDataGridNodesByStartTime):
2710         (WebInspector.OverviewTimelineView.prototype._insertDataGridNode):
2711         (WebInspector.OverviewTimelineView.prototype._addResourceToDataGridIfNeeded):
2712         (WebInspector.OverviewTimelineView.prototype._addSourceCodeTimeline):
2713         Refactored to accept grid nodes instead of tree elements.
2714
2715         (WebInspector.OverviewTimelineView.prototype._processPendingRepresentedObjects):
2716         (WebInspector.OverviewTimelineView.prototype.get navigationSidebarTreeOutlineLabel): Deleted.
2717         (WebInspector.OverviewTimelineView.prototype.shown):
2718         (WebInspector.OverviewTimelineView.prototype.treeElementPathComponentSelected): Deleted.
2719         (WebInspector.OverviewTimelineView.prototype._compareTreeElementsByDetails): Deleted.
2720         Not used anywhere.
2721
2722         (WebInspector.OverviewTimelineView.prototype._compareTreeElementsByStartTime.getStartTime): Deleted.
2723         (WebInspector.OverviewTimelineView.prototype._compareTreeElementsByStartTime): Deleted.
2724         (WebInspector.OverviewTimelineView.prototype._insertTreeElement): Deleted.
2725         (WebInspector.OverviewTimelineView.prototype._addResourceToTreeIfNeeded): Deleted.
2726         Reimplemented as _compareDataGridNodesByStartTime, _insertDataGridNode and _addResourceToDataGridIfNeeded.
2727
2728         * UserInterface/Views/RenderingFrameTimelineView.js:
2729         (WebInspector.RenderingFrameTimelineView):
2730         Removed sidebar styles and tree outline data grid parameter.
2731
2732         (WebInspector.RenderingFrameTimelineView.prototype.get selectionPathComponents):
2733         (WebInspector.RenderingFrameTimelineView.prototype.dataGridNodePathComponentSelected):
2734         Create path components from the grid selection. This should have been
2735         included in https://webkit.org/b/154954.
2736
2737         (WebInspector.RenderingFrameTimelineView.prototype._processPendingRecords):
2738         (WebInspector.RenderingFrameTimelineView.prototype._scopeBarSelectionDidChange):
2739         (WebInspector.RenderingFrameTimelineView.prototype.get navigationSidebarTreeOutlineLabel): Deleted.
2740         (WebInspector.RenderingFrameTimelineView.prototype.treeElementDeselected): Deleted.
2741         (WebInspector.RenderingFrameTimelineView.prototype.treeElementSelected): Deleted.
2742         (WebInspector.RenderingFrameTimelineView.prototype.treeElementPathComponentSelected): Deleted.
2743
2744         * UserInterface/Views/ScriptClusterTimelineView.js:
2745         (WebInspector.ScriptClusterTimelineView):
2746         Don't hold reference to extraArguments, just pass to subviews.
2747
2748         * UserInterface/Views/ScriptDetailsTimelineView.js:
2749         (WebInspector.ScriptDetailsTimelineView):
2750         Removed sidebar styles and tree outline data grid parameter.
2751         (WebInspector.ScriptDetailsTimelineView.prototype._processPendingRecords):
2752         (WebInspector.ScriptDetailsTimelineView.prototype._dataGridFiltersDidChange):
2753         (WebInspector.ScriptDetailsTimelineView.prototype.get navigationSidebarTreeOutlineLabel): Deleted.
2754         (WebInspector.ScriptDetailsTimelineView.prototype.treeElementSelected): Deleted.
2755         (WebInspector.ScriptDetailsTimelineView.prototype.dataGridNodeForTreeElement): Deleted.
2756         (WebInspector.ScriptDetailsTimelineView.prototype.populateProfileNodeTreeElement): Deleted.
2757
2758         * UserInterface/Views/TimelineDataGrid.js:
2759         (WebInspector.TimelineDataGrid.prototype.addRowInSortOrder):
2760         Fixed failure when treeElement and parentTreeElementOrDataGridNode are both null.
2761
2762         * UserInterface/Views/TimelineRecordingContentView.js:
2763         (WebInspector.TimelineRecordingContentView):
2764         Removed extraArguments and sidebar panel references.
2765         (WebInspector.TimelineRecordingContentView.prototype.contentBrowserTreeElementForRepresentedObject):
2766         Use icon style from the tab, instead of the sidebar.
2767         (WebInspector.TimelineRecordingContentView.prototype._currentContentViewDidChange):
2768         Removed updates to the sidebar.
2769         (WebInspector.TimelineRecordingContentView.prototype._pathComponentSelected):
2770         (WebInspector.TimelineRecordingContentView.prototype._updateTimes):
2771         (WebInspector.TimelineRecordingContentView.prototype._instrumentAdded):
2772         Removed sidebar reference when creating new TimelineViews.
2773         (WebInspector.TimelineRecordingContentView.prototype._timeRangeSelectionChanged):
2774
2775         * UserInterface/Views/TimelineSidebarPanel.css: Removed.
2776
2777         * UserInterface/Views/TimelineTabContentView.js:
2778         (WebInspector.TimelineTabContentView):
2779         Removed hidden sidebar FIXME.
2780         (WebInspector.TimelineTabContentView.prototype._addRecording):
2781         New location for sidebar style class constant StopwatchIconStyleClass.
2782
2783         * UserInterface/Views/TimelineView.js:
2784         (WebInspector.TimelineView):
2785         (WebInspector.TimelineView.prototype.get navigationItems): Deleted.
2786         (WebInspector.TimelineView.prototype.get navigationSidebarTreeOutline): Deleted.
2787         (WebInspector.TimelineView.prototype.get navigationSidebarTreeOutlineLabel): Deleted.
2788         (WebInspector.TimelineView.prototype.get timelineSidebarPanel): Deleted.
2789         (WebInspector.TimelineView.prototype.treeElementPathComponentSelected): Deleted.
2790         (WebInspector.TimelineView.prototype.treeElementDeselected): Deleted.
2791         (WebInspector.TimelineView.prototype.treeElementSelected): Deleted.
2792         (WebInspector.TimelineView.prototype._treeSelectionDidChange): Deleted.
2793         Sidebar logic for panel and content tree outline removed.
2794
2795 2016-03-10  Joseph Pecoraro  <pecoraro@apple.com>
2796
2797         Web Inspector: Enable Memory Timelines by default if supported
2798         https://bugs.webkit.org/show_bug.cgi?id=155333
2799         <rdar://problem/25097319>
2800
2801         Reviewed by Timothy Hatcher.
2802
2803         * UserInterface/Controllers/TimelineManager.js:
2804         (WebInspector.TimelineManager.defaultInstruments):
2805
2806 2016-03-10  Matt Baker  <mattbaker@apple.com>
2807
2808         Web Inspector: Add "Quick Open" dialog to debugger and resources tabs
2809         https://bugs.webkit.org/show_bug.cgi?id=153028
2810         <rdar://problem/24194239>
2811
2812         Reviewed by Timothy Hatcher.
2813
2814         * Localizations/en.lproj/localizedStrings.js:
2815         New placeholder text for open resource dialog field.
2816
2817         * UserInterface/Base/Main.js:
2818         (WebInspector.contentLoaded):
2819         Keep a reference to the content element to use as global dialog parent,
2820         and create keyboard shortcut for new dialog.
2821
2822         (WebInspector._showOpenResourceDialog):
2823         Create dialog if needed, return if already visible.
2824         (WebInspector.dialogWasDismissed):
2825         Show represented object, if any, when dialog is dismissed.
2826
2827         * UserInterface/Main.html:
2828         New files.
2829
2830         * UserInterface/Views/Dialog.js: Added.
2831         Base class for modal dialog popovers. Implements basic setup and
2832         teardown, and logic for validating and returning a represented object.
2833
2834         (WebInspector.Dialog):
2835         (WebInspector.Dialog.prototype.get visible):
2836         (WebInspector.Dialog.prototype.get delegate):
2837         (WebInspector.Dialog.prototype.get representedObject):
2838         (WebInspector.Dialog.prototype.present):
2839         (WebInspector.Dialog.prototype.dismiss):
2840         (WebInspector.Dialog.prototype.didPresetDialog):
2841         (WebInspector.Dialog.prototype.representedObjectIsValid):
2842
2843         * UserInterface/Views/GoToLineDialog.js:
2844         Subclass the Dialog base class.
2845         (WebInspector.GoToLineDialog):
2846         (WebInspector.GoToLineDialog.prototype.didPresentDialog):
2847         Implement base class behavior hook. Replaces "present".
2848         (WebInspector.GoToLineDialog.prototype._handleInputEvent):
2849         (WebInspector.GoToLineDialog.prototype._handleKeydownEvent):
2850         Line number validation handled by base class/delegate.
2851         (WebInspector.GoToLineDialog.prototype._clear):
2852         (WebInspector.GoToLineDialog.prototype.present): Deleted.
2853         (WebInspector.GoToLineDialog.prototype.dismiss): Deleted.
2854         No longer needed, handled by base class.
2855
2856         * UserInterface/Views/OpenResourceDialog.css: Added.
2857         (.open-resource-dialog):
2858         (.open-resource-dialog > .field):
2859         (.open-resource-dialog > .field > input):
2860         (.open-resource-dialog > .field > input::-webkit-input-placeholder):
2861         (.open-resource-dialog > .field > img):
2862         (.open-resource-dialog > .field > img:active):
2863         (.open-resource-dialog.non-empty > .field > img):
2864         (.open-resource-dialog > .tree-outline):
2865         (.open-resource-dialog > .tree-outline .item):
2866         (.open-resource-dialog > .tree-outline .item:first-child):
2867         (.open-resource-dialog > .tree-outline .item.selected):
2868         (.open-resource-dialog > .tree-outline .item.selected .subtitle):
2869         Styles for "quick open" dialog.
2870
2871         * UserInterface/Views/OpenResourceDialog.js: Added.
2872         New dialog type, based on the Quick Open dialog found in Xcode (and its
2873         equivalent in most modern editors).
2874
2875         (WebInspector.OpenResourceDialog):
2876         (WebInspector.OpenResourceDialog.prototype._populateResourceTreeOutline.createTreeElement):
2877         (WebInspector.OpenResourceDialog.prototype._populateResourceTreeOutline):
2878         Populate the auto-completion tree from the list of filtered resources.
2879
2880         (WebInspector.OpenResourceDialog.prototype.didPresentDialog):
2881         Build resource list once, when the dialog is presented. Update the list
2882         when resources are added/removed in a follow-up: https://webkit.org/b/155321.
2883
2884         (WebInspector.OpenResourceDialog.prototype._handleInputEvent):
2885         (WebInspector.OpenResourceDialog.prototype._handleKeydownEvent):
2886         Escape key: dismiss dialog if input is empty, otherwise clear input.
2887         Enter key: dismiss dialog if object selected.
2888         Key up/down: cycle through auto-completion tree items, if any.
2889
2890         (WebInspector.OpenResourceDialog.prototype._handleKeyupEvent):
2891         (WebInspector.OpenResourceDialog.prototype._handleBlurEvent):
2892         (WebInspector.OpenResourceDialog.prototype._handleMousedownEvent):
2893         (WebInspector.OpenResourceDialog.prototype._handleClickEvent):
2894         (WebInspector.OpenResourceDialog.prototype._clear):
2895         (WebInspector.OpenResourceDialog.prototype._updateFilter):
2896         Rebuild filter regular expressions and apply to all resources. Each
2897         resource is given a weight based on the first matching filter. Filters
2898         are ordered by relevancy, from most to least relevant. Filtered resources
2899         are sorted based on weight. If no matches are found, the tree is hidden.
2900
2901         * UserInterface/Views/ResourceTreeElement.js:
2902         (WebInspector.ResourceTreeElement.prototype.get filterableData):
2903         make filterable resource data more fine-grained. Priority should be given
2904         to the resource's name, before the complete URL.
2905
2906         * UserInterface/Views/SourceCodeTextEditor.js:
2907         (WebInspector.SourceCodeTextEditor.prototype.showGoToLineDialog):
2908         (WebInspector.SourceCodeTextEditor.prototype.dialogWasDismissed):
2909         (WebInspector.SourceCodeTextEditor.prototype.goToLineDialogValueWasValidated): Deleted.
2910         (WebInspector.SourceCodeTextEditor.prototype.goToLineDialogWasDismissed): Deleted.
2911         Updated for new Dialog delegate behavior.
2912
2913         * UserInterface/Views/TreeOutline.css:
2914         (.tree-outline.large .item .titles):
2915         (.tree-outline.large .item .titles.no-subtitle): Deleted.
2916         Styles for tree elements in "quick open" dialog auto-completion tree.
2917
2918 2016-03-10  Matt Baker  <mattbaker@apple.com>
2919
2920         Web Inspector: TreeOutlineDataGridSynchronizer should be optional in TimelineDataGrid
2921         https://bugs.webkit.org/show_bug.cgi?id=155318
2922         <rdar://problem/25091949>
2923
2924         Reviewed by Timothy Hatcher.
2925
2926         * UserInterface/Views/TimelineDataGrid.js:
2927         (WebInspector.TimelineDataGrid):
2928         TreeOutline is optional, and if non-null a tree outline synchronizer is created.
2929
2930         (WebInspector.TimelineDataGrid.prototype.shown):
2931         (WebInspector.TimelineDataGrid.prototype.treeElementForDataGridNode):
2932         (WebInspector.TimelineDataGrid.prototype.dataGridNodeForTreeElement):
2933         (WebInspector.TimelineDataGrid.prototype.treeElementMatchesActiveScopeFilters):
2934         Safety checks for the synchronizer.
2935
2936         (WebInspector.TimelineDataGrid.prototype.addRowInSortOrder):
2937         treeElement is now an optional parameter. If non-null, a tree synchronizer
2938         should exist. The third parameter has been overloaded, to allow passing
2939         a parent tree element or data grid node.
2940
2941         (WebInspector.TimelineDataGrid.prototype._refreshDirtyDataGridNodes):
2942         (WebInspector.TimelineDataGrid.prototype._sort):
2943         Safety checks for the synchronizer.
2944
2945 2016-03-09  Joseph Pecoraro  <pecoraro@apple.com>
2946
2947         Web Inspector: JavaScript Heap Allocations Timeline
2948         https://bugs.webkit.org/show_bug.cgi?id=155287
2949         <rdar://problem/25078088>
2950
2951         Reviewed by Timothy Hatcher.
2952
2953         Initial JavaScript Heap Allocations Timeline includes:
2954
2955             - Snapshot markers in the timeline
2956             - Initial/Periodic/End snapshots during recording
2957             - Ability to manually take a snapshot
2958             - View of all objects in a Snapshot and Diff between snapshots
2959               - Summary view - rough display of the size/count of large objects
2960               - Instances view - view each of the individual objects
2961
2962         * UserInterface/Main.html:
2963         * UserInterface/Test.html:
2964         * UserInterface/Images/Compare.svg: Added.
2965         * UserInterface/Images/HeapSnapshot.svg: Added.
2966         * UserInterface/Images/HeapSnapshotDiff.svg: Added.
2967         * UserInterface/Images/HeapSnapshotInstances.svg: Added.
2968         * UserInterface/Images/HeapSnapshotSummary.svg: Added.
2969         * Localizations/en.lproj/localizedStrings.js:
2970         New resources and strings.
2971
2972         * UserInterface/Controllers/TimelineManager.js:
2973         (WebInspector.TimelineManager.prototype.heapTrackingStarted):
2974         (WebInspector.TimelineManager.prototype.heapTrackingCompleted):
2975         (WebInspector.TimelineManager.prototype.heapSnapshotAdded):
2976         * UserInterface/Protocol/HeapObserver.js:
2977         (WebInspector.HeapObserver.prototype.trackingStart):
2978         (WebInspector.HeapObserver.prototype.trackingComplete):
2979         (WebInspector.HeapObserver):
2980         Add snapshot records to the active recording's timeline.
2981
2982         * UserInterface/Models/HeapAllocationsInstrument.js: Added.
2983         (WebInspector.HeapAllocationsInstrument):
2984         (WebInspector.HeapAllocationsInstrument.supported):
2985         (WebInspector.HeapAllocationsInstrument.prototype.get timelineRecordType):
2986         (WebInspector.HeapAllocationsInstrument.prototype.startInstrumentation):
2987         (WebInspector.HeapAllocationsInstrument.prototype.stopInstrumentation):
2988         (WebInspector.HeapAllocationsInstrument.prototype._takeHeapSnapshot):
2989         Start, stop, and periodic snapshots.
2990
2991         * UserInterface/Models/HeapAllocationsTimelineRecord.js:
2992         (WebInspector.HeapAllocationsTimelineRecord):
2993         (WebInspector.HeapAllocationsTimelineRecord.prototype.get timestamp):
2994         (WebInspector.HeapAllocationsTimelineRecord.prototype.get heapSnapshot):
2995         * UserInterface/Models/TimelineRecord.js:
2996         * UserInterface/Models/TimelineRecording.js:
2997         (WebInspector.TimelineRecording):
2998         (WebInspector.TimelineRecording.prototype.addRecord):
2999         * UserInterface/Views/TimelineOverviewGraph.js:
3000         (WebInspector.TimelineOverviewGraph.createForTimeline):
3001         * UserInterface/Views/TimelineTabContentView.js:
3002         (WebInspector.TimelineTabContentView.displayNameForTimeline):
3003         (WebInspector.TimelineTabContentView.iconClassNameForTimeline):
3004         (WebInspector.TimelineTabContentView.genericClassNameForTimeline):
3005         (WebInspector.TimelineTabContentView.iconClassNameForRecord):
3006         (WebInspector.TimelineTabContentView.displayNameForRecord):
3007         New timeline and record type.
3008
3009         * UserInterface/Models/HeapSnapshotDiff.js: Added.
3010         (WebInspector.HeapSnapshotDiff):
3011         (WebInspector.HeapSnapshotDiff.prototype.get snapshot1):
3012         (WebInspector.HeapSnapshotDiff.prototype.get snapshot2):
3013         (WebInspector.HeapSnapshotDiff.prototype.get addedInstances):
3014         (WebInspector.HeapSnapshotDiff.prototype.get removedInstances):
3015         (WebInspector.HeapSnapshotDiff.prototype.get sizeDifference):
3016         (WebInspector.HeapSnapshotDiff.prototype.get growth):
3017         (WebInspector.HeapSnapshotDiff.prototype.snapshotForDiff):
3018         Compare two snapshots and create a "diff snapshot" which is just
3019         the newly added objects.
3020
3021         * UserInterface/Views/ContentView.js:
3022         (WebInspector.ContentView.createFromRepresentedObject):
3023         (WebInspector.ContentView.isViewable):
3024         A HeapSnapshot creates a HeapSnapshotClusterView.
3025
3026         * UserInterface/Views/HeapAllocationsTimelineDataGridNode.js: Added.
3027         (WebInspector.HeapAllocationsTimelineDataGridNode):
3028         (WebInspector.HeapAllocationsTimelineDataGridNode.prototype.get record):
3029         (WebInspector.HeapAllocationsTimelineDataGridNode.prototype.get data):
3030         (WebInspector.HeapAllocationsTimelineDataGridNode.prototype.createCellContent):
3031         (WebInspector.HeapAllocationsTimelineDataGridNode.prototype.markAsBaseline):
3032         (WebInspector.HeapAllocationsTimelineDataGridNode.prototype.clearBaseline):
3033         * UserInterface/Views/HeapAllocationsTimelineOverviewGraph.css: Copied from Source/WebInspectorUI/UserInterface/Protocol/HeapObserver.js.
3034         (.timeline-overview-graph.heap-allocations):
3035         (.timeline-overview-graph.heap-allocations > img.snapshot):
3036         * UserInterface/Views/HeapAllocationsTimelineOverviewGraph.js: Added.
3037         (WebInspector.HeapAllocationsTimelineOverviewGraph):
3038         (WebInspector.HeapAllocationsTimelineOverviewGraph.prototype.reset):
3039         (WebInspector.HeapAllocationsTimelineOverviewGraph.prototype.layout.xScale):
3040         (WebInspector.HeapAllocationsTimelineOverviewGraph.prototype.layout):
3041         (WebInspector.HeapAllocationsTimelineOverviewGraph.prototype._visibleRecords):
3042         (WebInspector.HeapAllocationsTimelineOverviewGraph.prototype._heapAllocationTimelineRecordAdded):
3043         * UserInterface/Views/HeapAllocationsTimelineView.css: Copied from Source/WebInspectorUI/UserInterface/Protocol/HeapObserver.js.
3044         (.timeline-view.heap-allocations > .data-grid):
3045         (.timeline-view.heap-allocations > .data-grid td .icon.heap-snapshot):
3046         (.timeline-view.heap-allocations > .data-grid tr.baseline):
3047         (.timeline-view.heap-allocations > .content-view-container):
3048         (.timeline-view.heap-allocations > .content-view-container > .content-view):
3049         * UserInterface/Views/HeapAllocationsTimelineView.js: Added.
3050         (WebInspector.HeapAllocationsTimelineView):
3051         (WebInspector.HeapAllocationsTimelineView.prototype.showHeapSnapshotList):
3052         (WebInspector.HeapAllocationsTimelineView.prototype.showHeapSnapshotTimelineRecord):
3053         (WebInspector.HeapAllocationsTimelineView.prototype.showHeapSnapshotDiff):
3054         (WebInspector.HeapAllocationsTimelineView.prototype.get navigationItems):
3055         (WebInspector.HeapAllocationsTimelineView.prototype.get selectionPathComponents):
3056         (WebInspector.HeapAllocationsTimelineView.prototype.get navigationSidebarTreeOutlineLabel):
3057         (WebInspector.HeapAllocationsTimelineView.prototype.treeElementPathComponentSelected):
3058         (WebInspector.HeapAllocationsTimelineView.prototype.userSelectedRecordFromOverview):
3059         (WebInspector.HeapAllocationsTimelineView.prototype.closed):
3060         (WebInspector.HeapAllocationsTimelineView.prototype.layout):
3061         (WebInspector.HeapAllocationsTimelineView.prototype.reset):
3062         (WebInspector.HeapAllocationsTimelineView.prototype._heapAllocationsTimelineRecordAdded):
3063         (WebInspector.HeapAllocationsTimelineView.prototype._snapshotListPathComponentClicked):
3064         (WebInspector.HeapAllocationsTimelineView.prototype._snapshotPathComponentSelected):
3065         (WebInspector.HeapAllocationsTimelineView.prototype._currentContentViewDidChange):
3066         (WebInspector.HeapAllocationsTimelineView.prototype._contentViewSelectionPathComponentDidChange):
3067         (WebInspector.HeapAllocationsTimelineView.prototype._updateCompareHeapSnapshotButton):
3068         (WebInspector.HeapAllocationsTimelineView.prototype._takeHeapSnapshotClicked):
3069         (WebInspector.HeapAllocationsTimelineView.prototype._cancelSelectComparisonHeapSnapshots):
3070         (WebInspector.HeapAllocationsTimelineView.prototype._compareHeapSnapshotsClicked):
3071         (WebInspector.HeapAllocationsTimelineView.prototype._dataGridNodeSelected):
3072         * UserInterface/Views/HeapSnapshotClassDataGridNode.js: Added.
3073         (WebInspector.HeapSnapshotClassDataGridNode):
3074         (WebInspector.HeapSnapshotClassDataGridNode.prototype.get data):
3075         (WebInspector.HeapSnapshotClassDataGridNode.prototype.createCellContent):
3076         (WebInspector.HeapSnapshotClassDataGridNode.prototype.sort):
3077         (WebInspector.HeapSnapshotClassDataGridNode.prototype._populate):
3078         (WebInspector.HeapSnapshotClassDataGridNode.prototype._fetchBatch):
3079         (WebInspector.HeapSnapshotClassDataGridNode.prototype._updateBatchedSort):
3080         (WebInspector.HeapSnapshotClassDataGridNode.prototype._updateBatchedChildren):
3081         (WebInspector.HeapSnapshotClassDataGridNode.prototype._removeFetchMoreDataGridNode):
3082         (WebInspector.HeapSnapshotClassDataGridNode.prototype._appendFetchMoreDataGridNode):
3083         * UserInterface/Views/HeapSnapshotClusterContentView.js: Added.
3084         (WebInspector.HeapSnapshotClusterContentView.createPathComponent):
3085         (WebInspector.HeapSnapshotClusterContentView):
3086         (WebInspector.HeapSnapshotClusterContentView.iconStyleClassNameForClassName):
3087         (WebInspector.HeapSnapshotClusterContentView.prototype.get heapSnapshot):
3088         (WebInspector.HeapSnapshotClusterContentView.prototype.get summaryContentView):
3089         (WebInspector.HeapSnapshotClusterContentView.prototype.get instancesContentView):
3090         (WebInspector.HeapSnapshotClusterContentView.prototype.get navigationItems):
3091         (WebInspector.HeapSnapshotClusterContentView.prototype.get selectionPathComponents):
3092         (WebInspector.HeapSnapshotClusterContentView.prototype.shown):
3093         (WebInspector.HeapSnapshotClusterContentView.prototype.closed):
3094         (WebInspector.HeapSnapshotClusterContentView.prototype.saveToCookie):
3095         (WebInspector.HeapSnapshotClusterContentView.prototype.restoreFromCookie):
3096         (WebInspector.HeapSnapshotClusterContentView.prototype.showSummary):
3097         (WebInspector.HeapSnapshotClusterContentView.prototype.showInstances):
3098         (WebInspector.HeapSnapshotClusterContentView.prototype._contentViewExtraArguments):
3099         (WebInspector.HeapSnapshotClusterContentView.prototype._pathComponentForContentView):
3100         (WebInspector.HeapSnapshotClusterContentView.prototype._identifierForContentView):
3101         (WebInspector.HeapSnapshotClusterContentView.prototype._showContentViewForIdentifier):
3102         (WebInspector.HeapSnapshotClusterContentView.prototype._pathComponentSelected):
3103         (WebInspector.HeapSnapshotClusterContentView.prototype._toggleShowInternalObjectsSetting):
3104         (WebInspector.HeapSnapshotClusterContentView.prototype._updateViewsForShowInternalObjectsSettingValue):
3105         (WebInspector.HeapSnapshotClusterContentView.prototype._updateShowInternalObjectsButtonNavigationItem):
3106         * UserInterface/Views/HeapSnapshotInstanceDataGridNode.js: Added.
3107         (WebInspector.HeapSnapshotInstanceDataGridNode):
3108         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype.get data):
3109         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype.get selectable):
3110         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype.createCells):
3111         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype.createCellContent):
3112         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype.sort):
3113         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._contextMenuHandler.):
3114         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._contextMenuHandler):
3115         * UserInterface/Views/HeapSnapshotInstanceFetchMoreDataGridNode.js: Added.
3116         (WebInspector.HeapSnapshotInstanceFetchMoreDataGridNode):
3117         (WebInspector.HeapSnapshotInstanceFetchMoreDataGridNode.prototype.createCellContent):
3118         (WebInspector.HeapSnapshotInstanceFetchMoreDataGridNode.prototype.sort):
3119         * UserInterface/Views/HeapSnapshotInstancesContentView.css: Added.
3120         * UserInterface/Views/HeapSnapshotInstancesContentView.js: Added.
3121         (WebInspector.HeapSnapshotInstancesContentView):
3122         (WebInspector.HeapSnapshotInstancesContentView.prototype.get showInternalObjects):
3123         (WebInspector.HeapSnapshotInstancesContentView.prototype.set showInternalObjects):
3124         (WebInspector.HeapSnapshotInstancesContentView.prototype._sortDataGrid):
3125         * UserInterface/Views/HeapSnapshotInstancesDataGridTree.js: Added.
3126         (WebInspector.HeapSnapshotInstancesDataGridTree):
3127         (WebInspector.HeapSnapshotInstancesDataGridTree.buildSortComparator):
3128         (WebInspector.HeapSnapshotInstancesDataGridTree.prototype.get heapSnapshot):
3129         (WebInspector.HeapSnapshotInstancesDataGridTree.prototype.get includeInternalObjects):
3130         (WebInspector.HeapSnapshotInstancesDataGridTree.prototype.set includeInternalObjects):
3131         (WebInspector.HeapSnapshotInstancesDataGridTree.prototype.get children):
3132         (WebInspector.HeapSnapshotInstancesDataGridTree.prototype.appendChild):
3133         (WebInspector.HeapSnapshotInstancesDataGridTree.prototype.insertChild):
3134         (WebInspector.HeapSnapshotInstancesDataGridTree.prototype.removeChildren):
3135         (WebInspector.HeapSnapshotInstancesDataGridTree.prototype.set sortComparator):
3136         (WebInspector.HeapSnapshotInstancesDataGridTree.prototype.sort):
3137         (WebInspector.HeapSnapshotInstancesDataGridTree.prototype._populateTopLevel):
3138         * UserInterface/Views/HeapSnapshotSummaryContentView.css: Added.
3139         * UserInterface/Views/HeapSnapshotSummaryContentView.js: Added.
3140         (WebInspector.HeapSnapshotSummaryContentView.createChartContainer):
3141         (WebInspector.HeapSnapshotSummaryContentView.appendLegendRow):
3142         (WebInspector.HeapSnapshotSummaryContentView.appendEmptyMessage):
3143         (WebInspector.HeapSnapshotSummaryContentView):
3144         (WebInspector.HeapSnapshotSummaryContentView.prototype.layout):
3145         * UserInterface/Views/PathComponentIcons.css:
3146         (.heap-snapshot-summary-icon .icon):
3147         (.heap-snapshot-instances-icon .icon):
3148         (.snapshot-list-icon .icon):
3149         (.snapshot-diff-icon .icon):
3150         (body:not(.mac-platform, .windows-platform) .snapshot-diff-icon .icon):
3151         (body:not(.mac-platform, .windows-platform) .call-trees-icon .icon): Deleted.
3152         * UserInterface/Views/TextNavigationItem.css:
3153         (.navigation-bar .item.text):
3154         * UserInterface/Views/TextNavigationItem.js:
3155         (WebInspector.TextNavigationItem):
3156         (WebInspector.TextNavigationItem.prototype.get text):
3157         (WebInspector.TextNavigationItem.prototype.set text):
3158         * UserInterface/Views/TimelineIcons.css:
3159         (.heap-snapshot-record .icon):
3160         * UserInterface/Views/Variables.css:
3161         (:root):
3162         New views.
3163
3164         * UserInterface/Views/FormattedValue.js:
3165         (WebInspector.FormattedValue.createElementForNodePreview):
3166         (WebInspector.FormattedValue.createElementForFunctionWithName):
3167         (WebInspector.FormattedValue.createObjectPreviewOrFormattedValueForObjectPreview):
3168         Better display for a raw object preview.
3169
3170         * UserInterface/Views/TimelineOverview.js:
3171         (WebInspector.TimelineOverview):
3172         (WebInspector.TimelineOverview.prototype.userSelectedRecord):
3173         * UserInterface/Views/TimelineRecordingContentView.js:
3174         (WebInspector.TimelineRecordingContentView):
3175         (WebInspector.TimelineRecordingContentView.prototype.timelineOverviewUserSelectedRecord):
3176         * UserInterface/Views/TimelineRuler.js:
3177         (WebInspector.TimelineRuler.prototype.set allowsTimeRangeSelection):
3178         (WebInspector.TimelineRuler.prototype._handleClick):
3179         (WebInspector.TimelineRuler.prototype._handleMouseDown):
3180         (WebInspector.TimelineRuler.prototype._handleMouseMove):
3181         * UserInterface/Views/TimelineView.js:
3182         (WebInspector.TimelineView.prototype.userSelectedRecordFromOverview):
3183         Hook up a way for clicking in the TimelineOverview / TimelineRuler
3184         to redispatch to an OverviewGraph element, and provide a patch for
3185         the Overview -> RecordingContentView -> TimelineView for records.
3186
3187 2016-03-09  Matt Baker  <mattbaker@apple.com>
3188
3189         Web Inspector: LayoutTimelineView path components should reflect grid row nesting
3190         https://bugs.webkit.org/show_bug.cgi?id=155279
3191         <rdar://problem/25075355>
3192
3193         Reviewed by Timothy Hatcher.
3194
3195         * UserInterface/Views/LayoutTimelineView.js:
3196         (WebInspector.LayoutTimelineView.prototype.get selectionPathComponents):
3197         Walk grid nodes to build path component array.
3198
3199 2016-03-09  Matt Baker  <mattbaker@apple.com>
3200
3201         Web Inspector: Timelines UI redesign: use DataGridNode for TimelineView selection path components
3202         https://bugs.webkit.org/show_bug.cgi?id=154954
3203         <rdar://problem/24947939>
3204
3205         Reviewed by Timothy Hatcher.
3206
3207         This patch adds a new path component, TimelineDataGridNodePathComponent,
3208         for creating a path component from the current grid selection. This is
3209         needed since TimelineViews will no longer have an associated content tree
3210         outline once the navigation sidebar is removed.
3211
3212         TimelineDataGridNode has new protected methods, "displayName" and
3213         "iconClassNames", which are used to populate hierarchical path components,
3214         create grid node data, and create cell content.
3215
3216         TimelineView subclasses share a certain amount of boilerplate code for
3217         getting selection path components and handling path component selection.
3218         In the future we may be able to reduce this code by introducing a new
3219         DataGridTimelineView base class.
3220
3221         * UserInterface/Main.html:
3222         Added/removed files.
3223
3224         * UserInterface/Views/LayoutTimelineDataGridNode.js:
3225         (WebInspector.LayoutTimelineDataGridNode.prototype.get data):
3226         (WebInspector.LayoutTimelineDataGridNode.prototype.createCellContent):
3227         (WebInspector.LayoutTimelineDataGridNode):
3228         (WebInspector.LayoutTimelineDataGridNode.prototype.get record): Deleted.
3229         Moved to base class.
3230
3231         * UserInterface/Views/LayoutTimelineView.js:
3232         (WebInspector.LayoutTimelineView.prototype.get selectionPathComponents):
3233         (WebInspector.LayoutTimelineView.prototype.dataGridNodePathComponentSelected):
3234         (WebInspector.LayoutTimelineView.prototype.treeElementPathComponentSelected): Deleted.
3235         TimelineView tree outlines are going away.
3236
3237         * UserInterface/Views/MemoryTimelineView.js:
3238         (WebInspector.MemoryTimelineView.prototype.treeElementPathComponentSelected): Deleted.
3239         TimelineView tree outlines are going away.
3240
3241         * UserInterface/Views/NetworkTimelineView.js:
3242         (WebInspector.NetworkTimelineView.prototype.get selectionPathComponents):
3243         (WebInspector.NetworkTimelineView.prototype.dataGridNodePathComponentSelected):
3244         (WebInspector.NetworkTimelineView.prototype.treeElementPathComponentSelected): Deleted.
3245         TimelineView tree outlines are going away.
3246
3247         * UserInterface/Views/ProfileNodeDataGridNode.js:
3248         (WebInspector.ProfileNodeDataGridNode.prototype.get data):
3249         (WebInspector.ProfileNodeDataGridNode.prototype.createCellContent):
3250         (WebInspector.ProfileNodeDataGridNode.prototype.displayName):
3251         (WebInspector.ProfileNodeDataGridNode.prototype.iconClassNames):
3252         (WebInspector.ProfileNodeDataGridNode):
3253         (WebInspector.ProfileNodeDataGridNode.prototype._iconClassNameForProfileNode): Deleted.
3254         (WebInspector.ProfileNodeDataGridNode.prototype._titleForProfileNode): Deleted.
3255         Re-implemented as overrides of the base class methods "iconClassNames"
3256         and "displayName".
3257
3258         * UserInterface/Views/RenderingFrameTimelineDataGridNode.js:
3259         (WebInspector.RenderingFrameTimelineDataGridNode.prototype.createCellContent):
3260         (WebInspector.RenderingFrameTimelineDataGridNode):
3261         (WebInspector.RenderingFrameTimelineDataGridNode.prototype.get record): Deleted.
3262         Moved to base class.
3263
3264         * UserInterface/Views/ResourceTimelineDataGridNode.js:
3265         (WebInspector.ResourceTimelineDataGridNode.prototype.createCellContent):
3266         (WebInspector.ResourceTimelineDataGridNode.prototype.displayName):
3267         (WebInspector.ResourceTimelineDataGridNode.prototype.iconClassNames):
3268         Override base class methods, making it possible to remove ResourceTimelineDataGridNodePathComponent,
3269         and treat all TimelineDataGridNodes in a uniform manner.
3270
3271         (WebInspector.ResourceTimelineDataGridNode.prototype._createNameCellDocumentFragment):
3272         Replace duplicated code with call to "displayName".
3273
3274         * UserInterface/Views/ResourceTimelineDataGridNodePathComponent.js: Removed.
3275         Replaced by more generic solution, TimelineDataGridNodePathComponent.
3276
3277         * UserInterface/Views/ScriptDetailsTimelineView.js:
3278         (WebInspector.ScriptDetailsTimelineView.prototype.get selectionPathComponents):
3279         (WebInspector.ScriptDetailsTimelineView.prototype.dataGridNodePathComponentSelected):
3280         (WebInspector.ScriptDetailsTimelineView.prototype.treeElementPathComponentSelected): Deleted.
3281         TimelineView tree outlines are going away.
3282
3283         * UserInterface/Views/ScriptTimelineDataGridNode.js:
3284         (WebInspector.ScriptTimelineDataGridNode.prototype.createCellContent):
3285         (WebInspector.ScriptTimelineDataGridNode.prototype._createNameCellDocumentFragment):
3286         Replace duplicated code with call to "displayName".
3287
3288         (WebInspector.ScriptTimelineDataGridNode):
3289         (WebInspector.ScriptTimelineDataGridNode.prototype.get record): Deleted.
3290         Moved to base class.
3291
3292         * UserInterface/Views/SourceCodeTimelineTimelineDataGridNode.js:
3293         (WebInspector.SourceCodeTimelineTimelineDataGridNode.prototype.createCellContent):
3294         (WebInspector.SourceCodeTimelineTimelineDataGridNode.prototype._createNameCellContent):
3295         Replace duplicated code with call to "displayName".
3296
3297         * UserInterface/Views/TimelineDataGridNode.js:
3298         (WebInspector.TimelineDataGridNode.prototype.get record):
3299         Implemented in terms of the "records" getter, since all subclasses simply returned the
3300         node's first (or only