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