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