27eaaacc9139400c2b3088360b999cf0cf5ac220
[WebKit-https.git] / Source / WebInspectorUI / ChangeLog
1 2016-06-30  Matt Baker  <mattbaker@apple.com>
2
3         Web Inspector: add pixel area column to layout timeline view
4         https://bugs.webkit.org/show_bug.cgi?id=148677
5         <rdar://problem/22518762>
6
7         Reviewed by Timothy Hatcher.
8
9         The view can simply add the column. LayoutTimelineDataGridNode
10         already includes area data and cell formatting.
11
12         * UserInterface/Views/LayoutTimelineView.js:
13         (WebInspector.LayoutTimelineView):
14
15 2016-06-30  Brian Burg  <bburg@apple.com>
16
17         Web Inspector: the last normal tab cannot be closed with "Close Tab" context menu item
18         https://bugs.webkit.org/show_bug.cgi?id=159317
19         <rdar://problem/27042491>
20
21         Reviewed by Timothy Hatcher.
22
23         * UserInterface/Views/TabBarItem.js:
24         (WebInspector.TabBarItem.prototype._handleContextMenuEvent):
25         (WebInspector.TabBarItem): fix the expression that controls whether the item is disabled.
26
27 2016-06-30  Nikita Vasilyev  <nvasilyev@apple.com>
28
29         Web Inspector: Add "spring" to transition-timing-function value autocompletion
30         https://bugs.webkit.org/show_bug.cgi?id=159313
31         <rdar://problem/27114269>
32
33         Reviewed by Timothy Hatcher.
34
35         * UserInterface/Models/CSSKeywordCompletions.js:
36
37 2016-06-30  Commit Queue  <commit-queue@webkit.org>
38
39         Unreviewed, rolling out r202659.
40         https://bugs.webkit.org/show_bug.cgi?id=159305
41
42         The test for this change times out on mac-wk2 debug and caused
43         an existing test to crash. (Requested by ryanhaddad on
44         #webkit).
45
46         Reverted changeset:
47
48         "Web Inspector: Wrong function name next to scope"
49         https://bugs.webkit.org/show_bug.cgi?id=158210
50         http://trac.webkit.org/changeset/202659
51
52 2016-06-29  Joseph Pecoraro  <pecoraro@apple.com>
53
54         Web Inspector: Wrong function name next to scope
55         https://bugs.webkit.org/show_bug.cgi?id=158210
56         <rdar://problem/26543093>
57
58         Reviewed by Brian Burg.
59
60         * UserInterface/Controllers/DebuggerManager.js:
61         (WebInspector.DebuggerManager.prototype._scopeChainNodeFromPayload):
62         Include new payload data in the construction call.
63         All the new data is optional, so we gracefully handle
64         legacy backends.
65
66         * UserInterface/Models/ScopeChainNode.js:
67         (WebInspector.ScopeChainNode):
68         (WebInspector.ScopeChainNode.prototype.get type):
69         (WebInspector.ScopeChainNode.prototype.get objects):
70         (WebInspector.ScopeChainNode.prototype.get name):
71         (WebInspector.ScopeChainNode.prototype.get location):
72         (WebInspector.ScopeChainNode.prototype.get hash):
73         Hash is a rough (name:sourceId:line:column) string for quick comparisons.
74
75         (WebInspector.ScopeChainNode.prototype.makeLocalScope):
76         Make this an action you take on a scope, to avoid having to
77         do it at construction time, or making it a generic setting.
78
79         * UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
80         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateCallFramesSection):
81         This was wrong before. Move the work to CallFrame
82         and change it to be correct.
83
84         * UserInterface/CallFrame.js:
85         (WebInspector.CallFrame.prototype.mergedScopeChain):
86
87         This transforms the scope chain for a call frame from:
88         
89              scope1  scope2  scope3  scope4  scope5  scope6  scope7
90               foo     foo     foo     bar     bar      -       -
91              Block  Closure Closure Closure Closure   GLE     GBL
92
93         To:
94              scope1  scope2&3   scope4&5  scope6  scope7
95               foo      foo*       bar*      -       -
96              Block    Local     Closure    GLE     GBL
97
98         Doing a few things:
99
100             - Merge the first two Closure scopes sharing a location.
101               These are the "var" and "let" Closure scopes in a function,
102               and it is better to present these together in the UI.
103
104             - Mark the first Closure scope within a function (*). When
105               this is displayed in the UI, we can provide the name of
106               the function: "Closure Scope (name)", and we even have
107               location information that we can use to display a goto
108               arrow if needed.
109
110             - Make the first Closure scope the Local scope if it
111               matches the Call Frame's function name. This lets us
112               display the section as "Local Variables".
113
114 2016-06-29  Brian Burg  <bburg@apple.com>
115
116         Web Inspector: Uncaught Exception page never shows if exception is thrown while processing a protocol event
117         https://bugs.webkit.org/show_bug.cgi?id=159182
118
119         Reviewed by Joseph Pecoraro.
120
121         Since we catch exceptions raised during the handling of protocol responses and events, there
122         is no way for these exceptions to trigger the global exception handler that shows the Uncaught
123         Exception Reporter sheet. We should show these in the sheet because it makes them get fixed faster.
124
125         Add a new entry point, WebInspector.reportInternalError, that takes an error or string and
126         a free-form map of strings to strings for storing additional information such as message data.
127         Pass the error and any other relevant details to this entry point, which decides whether to
128         show the uncaught exception reporter or quietly log the error to Inspector^2 console.
129
130         In future patches, I would like to do the following once the common errors are fixed:
131          - enable reporting via Uncaught Exception Reporter for all engineering builds
132          - move internal console.error call sites to use WebInspector.reportInternalError
133
134         * UserInterface/Base/Main.js: Add reportInternalError, which redirects to the uncaught
135         exception reporter sheet or does console.error. It also adds a console.assert that could
136         cause the debugger to pause if desired.
137
138         * UserInterface/Debug/UncaughtExceptionReporter.css:
139         (.sheet-container): Make the report scrollable now that we could potentially show a lot of text.
140
141         * UserInterface/Debug/UncaughtExceptionReporter.js:
142         (handleError): Also pass along the 'details' poperty.
143         (formattedEntry): Refactor the code so it additionally prints out the keys and values of
144         the 'details' property. It does not do any coercions, so callers must convert values to strings.
145
146         * UserInterface/Protocol/InspectorBackend.js:
147         (InspectorBackendClass.prototype._dispatchResponse): Inlined a function.
148         (InspectorBackendClass.prototype._dispatchResponseToCallback):
149         (InspectorBackendClass.prototype._dispatchEvent):
150         Report uncaught exceptions via WebInspector.reportInternalError.
151
152         (InspectorBackendClass.prototype._reportProtocolError): Deleted, inlined into the single use site.
153
154 2016-06-29  Joseph Pecoraro  <pecoraro@apple.com>
155
156         Web Inspector: Show Shadow Root type in DOM Tree
157         https://bugs.webkit.org/show_bug.cgi?id=159236
158         <rdar://problem/27068521>
159
160         Reviewed by Timothy Hatcher.
161
162         * Localizations/en.lproj/localizedStrings.js:
163         "Shadow Content (type)" string.
164
165         * UserInterface/Models/DOMNode.js:
166         (WebInspector.DOMNode):
167         (WebInspector.DOMNode.prototype.shadowRoots):
168         (WebInspector.DOMNode.prototype.shadowRootType):
169         Initialize state and add accessors.
170
171         * UserInterface/Views/DOMTreeElement.js:
172         (WebInspector.DOMTreeElement.shadowRootTypeDisplayName):
173         (WebInspector.DOMTreeElement.prototype._nodeTitleInfo):
174         Better string when an element is a Shadow Root.
175
176         * UserInterface/Views/DOMTreeElementPathComponent.js:
177         (WebInspector.DOMTreeElementPathComponent):
178         Better to check the Shadow Root type.
179
180         * UserInterface/Views/DOMTreeOutline.css:
181         (.tree-outline.dom .html-fragment.shadow):
182         Opacity looks poor when there is a selection. Switch to gray.
183
184 2016-06-28  Nikita Vasilyev  <nvasilyev@apple.com>
185
186         REGRESSION (r188730): Web Inspector: Warning icons incorrectly positioned in CSS Rules sidebar
187         https://bugs.webkit.org/show_bug.cgi?id=157869
188         <rdar://problem/26356520>
189
190         Reviewed by Timothy Hatcher.
191
192         Before r188730, CSS text always had a line break as a prefix. r188730 started trimming text.
193         This patch keeps trimming unnecessary whitespace but brings back required line break prefix.
194
195         * UserInterface/Models/CSSStyleDeclaration.js:
196         (WebInspector.CSSStyleDeclaration.prototype.set text):
197         * UserInterface/Views/CSSStyleDeclarationTextEditor.js:
198         Make PrefixWhitespace and SuffixWhitespace public.
199
200         (WebInspector.CSSStyleDeclarationTextEditor.prototype._formattedContent):
201         (WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkers.update):
202         (WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkers):
203         Remove an if conditional as it's always true.
204
205 2016-06-28  Brian Burg  <bburg@apple.com>
206
207         Web Inspector: QuickConsole should update its selection when RuntimeManager.defaultExecutionContextIdentifier changes
208         https://bugs.webkit.org/show_bug.cgi?id=159183
209
210         Reviewed by Timothy Hatcher.
211
212         Currently, the UI listens for state changes in the Frame tree to decide when to reset
213         the selected execution context back to its default value. This is no good, because this
214         should happen even if we have no UI (i.e., testing models only). The UI should simply
215         display changes to the model rather than driving them based on other model changes.
216
217         Move the logic to reset the execution context into RuntimeManager. When the selected
218         context changes, an event is fired which causes the QuickConsole to rebuild its path components.
219
220         * UserInterface/Controllers/RuntimeManager.js:
221         (WebInspector.RuntimeManager):
222         (WebInspector.RuntimeManager.prototype.set defaultExecutionContextIdentifier):
223         Fire an event when the execution context actually changes.
224
225         (WebInspector.RuntimeManager.prototype._frameExecutionContextsCleared):
226         Added. If the selected context was cleared, reset back to default.
227
228         * UserInterface/Models/Frame.js:
229         (WebInspector.Frame.prototype.clearExecutionContexts):
230         Include the contexts that were cleared so clients can match against them.
231
232         * UserInterface/Views/QuickConsole.js:
233         (WebInspector.QuickConsole):
234         Use the proper constant name. Both the old and new names evaluated to `undefined`.
235         No need to keep track of the selected path component, it will always match the
236         defaultExecutionContextIdentifier in RuntimeManager.
237
238         (WebInspector.QuickConsole.prototype.get selectedExecutionContextIdentifier):
239         (WebInspector.QuickConsole.prototype.set selectedExecutionContextIdentifier):
240         Forward to RuntimeManager. This name is less awkward for the UI code that manages selections.
241
242         (WebInspector.QuickConsole.prototype._executionContextPathComponentsToDisplay):
243         Special-case for the main frame execution context.
244
245         (WebInspector.QuickConsole.prototype._framePageExecutionContextsChanged):
246         Remove indirection.
247
248         (WebInspector.QuickConsole.prototype._frameExecutionContextsCleared):
249         Fix the guard to handle undefined execution contexts in the case where it represents the main frame (undefined).
250
251         (WebInspector.QuickConsole.prototype._defaultExecutionContextChanged):
252         Rebuild when the model changes.
253
254         (WebInspector.QuickConsole.prototype._pathComponentSelected): Simplify.
255         (WebInspector.QuickConsole.prototype.get executionContextIdentifier):
256         (WebInspector.QuickConsole.prototype._removeExecutionContextPathComponentForFrame):
257         Move the fallback selection behavior into RuntimeManager.
258
259         (WebInspector.QuickConsole.prototype._updateExecutionContextPathComponentForFrame): Deleted.
260         This has been dead code ever since we removed iOS 6 legacy support.
261
262 2016-06-27  Joseph Pecoraro  <pecoraro@apple.com>
263
264         Web Inspector: When modifying sessionStorage, localStorage gets updated
265         https://bugs.webkit.org/show_bug.cgi?id=159181
266         <rdar://problem/27043447>
267
268         Reviewed by Timothy Hatcher.
269
270         * UserInterface/Test/Test.js:
271         (WebInspector.loaded):
272         Add registration for StorageManager and StorageObserver.
273
274 2016-06-27  Brian Burg  <bburg@apple.com>
275
276         Web Inspector: RuntimeManager should not use view object WebInspector.quickConsole
277         https://bugs.webkit.org/show_bug.cgi?id=128092
278         <rdar://problem/15966526>
279
280         Reviewed by Timothy Hatcher.
281
282         This is a layering violation which makes it harder to use RuntimeManager.evaluateInInspectedWindow
283         from a testing context where the QuickConsole view does not exist.
284
285         Store the selected execution context identifier on RuntimeManager and use it
286         when doing subsequent evaluations that act on the currently selected frame.
287
288         * UserInterface/Controllers/RuntimeManager.js:
289         (WebInspector.RuntimeManager.prototype.evaluateInInspectedWindow):
290         (WebInspector.RuntimeManager.prototype.saveResult):
291         Use local state.
292
293         (WebInspector.RuntimeManager.prototype.get defaultExecutionContextIdentifier):
294         (WebInspector.RuntimeManager.prototype.set defaultExecutionContextIdentifier):
295         Added.
296
297         (WebInspector.RuntimeManager):
298         * UserInterface/Models/ExecutionContext.js:
299         (WebInspector.ExecutionContext):
300         Move the symbolic name for the top level execution context to RuntimeManager.
301
302         * UserInterface/Test/Test.js:
303         (WebInspector.loaded): No need to stub out WebInspector.QuickConsole any more.
304
305         * UserInterface/Views/QuickConsole.js:
306         (WebInspector.QuickConsole.prototype._framePageExecutionContextsChanged):
307         (WebInspector.QuickConsole.prototype._removeExecutionContextPathComponentForFrame):
308         (WebInspector.QuickConsole.prototype._updateExecutionContextPathComponentForFrame):
309         (WebInspector.QuickConsole.prototype._pathComponentSelected):
310         For now, set RuntimeManager's selected execution context whenever we set the
311         selected path component. In a future patch, we should invert the dependency and have
312         the selected component change whenever RuntimeManager.defaultExecutionContext changes.
313
314 2016-06-23  Joseph Pecoraro  <pecoraro@apple.com>
315
316         Web Inspector: first heap snapshot taken when a page is reloaded happens before the reload navigation
317         https://bugs.webkit.org/show_bug.cgi?id=158995
318         <rdar://problem/26923778>
319
320         Reviewed by Brian Burg.
321
322         Let instruments decide to do work or not based on programmatic
323         (backend initiated) starts and stop.
324
325         Programmatic start can happen due to Auto Capture or console.profile.
326         Programmatic stop can happen due to console.profileEnd.
327
328         For example, this allows the frontend to avoid sending agents start/stop
329         messages when the backend would have already started/stopped the agents.
330
331         * UserInterface/Controllers/TimelineManager.js:
332         (WebInspector.TimelineManager):
333         (WebInspector.TimelineManager.prototype.startCapturing):
334         (WebInspector.TimelineManager.prototype.capturingStopped):
335         (WebInspector.TimelineManager.prototype.autoCaptureStarted):
336         (WebInspector.TimelineManager.prototype.programmaticCaptureStarted):
337         Call Recording.start/stop with a programmatic flag so the frontend
338         instruments can perform a more informed start/stop.
339
340         * UserInterface/Models/TimelineRecording.js:
341         (WebInspector.TimelineRecording.prototype.start):
342         (WebInspector.TimelineRecording.prototype.stop):
343         Let the instruments decide to do work based on the start/stop
344         being initiated by the backend or not.
345
346         * UserInterface/Models/HeapAllocationsInstrument.js:
347         (WebInspector.HeapAllocationsInstrument.prototype.startInstrumentation):
348         (WebInspector.HeapAllocationsInstrument.prototype.stopInstrumentation):
349         * UserInterface/Models/Instrument.js:
350         (WebInspector.Instrument.startLegacyTimelineAgent):
351         (WebInspector.Instrument.prototype.startInstrumentation):
352         (WebInspector.Instrument.prototype.stopInstrumentation):
353         (WebInspector.Instrument):
354         * UserInterface/Models/MemoryInstrument.js:
355         (WebInspector.MemoryInstrument.prototype.startInstrumentation):
356         (WebInspector.MemoryInstrument.prototype.stopInstrumentation):
357         (WebInspector.MemoryInstrument):
358         * UserInterface/Models/NetworkInstrument.js:
359         * UserInterface/Models/ScriptInstrument.js:
360         (WebInspector.ScriptInstrument.prototype.startInstrumentation):
361         (WebInspector.ScriptInstrument.prototype.stopInstrumentation):
362         (WebInspector.ScriptInstrument):
363         Avoid sending start/stop tracking messages when programmatic.
364         This still allows the instruments to do their own frontend tracking,
365         such as the Heap agent triggering periodic snapshots.
366
367 2016-06-23  Joseph Pecoraro  <pecoraro@apple.com>
368
369         Web Inspector: Snapshots should be cleared at some point
370         https://bugs.webkit.org/show_bug.cgi?id=157907
371         <rdar://problem/26373610>
372
373         Reviewed by Timothy Hatcher.
374
375         Invalidate HeapSnapshotProxy objects when the page navigates.
376         This allows us to clear our frontend data for the snapshots.
377         When a snapshot is invalidated, it is disabled in the UI.
378         This means you cannot select the snapshot or see content
379         views for the snapshot. If you are in a snapshot when it is
380         invalidated, you are taken out to the snapshot list.
381
382         * UserInterface/Main.html:
383         New files.
384
385         * UserInterface/Proxies/HeapSnapshotProxy.js:
386         (WebInspector.HeapSnapshotProxy):
387         (WebInspector.HeapSnapshotProxy.invalidateSnapshotProxies):
388         (WebInspector.HeapSnapshotProxy.prototype.get invalid):
389         (WebInspector.HeapSnapshotProxy.prototype._invalidate):
390         Keep track of valid snapshots, and provide a static method to invalidate them.
391
392         (WebInspector.HeapSnapshotProxy.prototype.updateForCollectionEvent):
393         (WebInspector.HeapSnapshotProxy.prototype.allocationBucketCounts):
394         (WebInspector.HeapSnapshotProxy.prototype.instancesWithClassName):
395         (WebInspector.HeapSnapshotProxy.prototype.update):
396         (WebInspector.HeapSnapshotProxy.prototype.nodeWithIdentifier):
397         UI should only act on valid snapshots.
398
399         * UserInterface/Proxies/HeapSnapshotDiffProxy.js:
400         (WebInspector.HeapSnapshotDiffProxy.prototype.get invalid):
401         (WebInspector.HeapSnapshotDiffProxy.prototype.updateForCollectionEvent):
402         (WebInspector.HeapSnapshotDiffProxy.prototype.allocationBucketCounts):
403         (WebInspector.HeapSnapshotDiffProxy.prototype.instancesWithClassName):
404         (WebInspector.HeapSnapshotDiffProxy.prototype.update):
405         (WebInspector.HeapSnapshotDiffProxy.prototype.nodeWithIdentifier):
406         UI should only act on valid snapshots.
407
408         * UserInterface/Proxies/HeapSnapshotWorkerProxy.js:
409         (WebInspector.HeapSnapshotWorkerProxy.prototype._mainResourceDidChange):
410         Invalidate and discard snapshots when the main frame navigates.
411
412         (WebInspector.HeapSnapshotWorkerProxy.prototype._handleMessage):
413         (WebInspector.HeapSnapshotWorkerProxy):
414         * UserInterface/Workers/HeapSnapshot/HeapSnapshotWorker.js:
415         (HeapSnapshotWorker.prototype.clearSnapshots):
416         (HeapSnapshotWorker.prototype._handleMessage):
417         (HeapSnapshotWorker):
418         A message may come in for a snapshot before it has been cleared.
419         If that is the case, the object may not exist. Return an error so
420         that the callback can be deleted on the calling side.
421
422         * UserInterface/Views/HeapAllocationsTimelineDataGridNodePathComponent.js:
423         (WebInspector.HeapAllocationsTimelineDataGridNodePathComponent.prototype.get previousSibling):
424         (WebInspector.HeapAllocationsTimelineDataGridNodePathComponent.prototype.get nextSibling):
425         (WebInspector.HeapAllocationsTimelineDataGridNodePathComponent):
426         Don't show invalid snapshots in page component picker.
427
428         * UserInterface/Views/HeapAllocationsTimelineOverviewGraph.css:
429         (.timeline-overview-graph.heap-allocations > img.snapshot.invalid):
430         * UserInterface/Views/HeapAllocationsTimelineDataGridNode.js:
431         (WebInspector.HeapAllocationsTimelineDataGridNode):
432         (WebInspector.HeapAllocationsTimelineDataGridNode.prototype.createCellContent):
433         (WebInspector.HeapAllocationsTimelineDataGridNode.prototype.createCells):
434         (WebInspector.HeapAllocationsTimelineDataGridNode.prototype._heapSnapshotInvalidated):
435         Give invalid snapshots an invalidated appearance in the snapshot list.
436
437         * UserInterface/Views/HeapAllocationsTimelineOverviewGraph.js:
438         (WebInspector.HeapAllocationsTimelineOverviewGraph.prototype.layout):
439         * UserInterface/Views/HeapAllocationsTimelineView.css:
440         (.timeline-view.heap-allocations > .data-grid tr.invalid):
441         (.timeline-view.heap-allocations > .data-grid:not(:focus, .force-focus) tr.selected.invalid):
442         Give invalid snapshots an invalidated appearance in the overview graph.
443
444         * UserInterface/Views/HeapAllocationsTimelineView.js:
445         (WebInspector.HeapAllocationsTimelineView):
446         (WebInspector.HeapAllocationsTimelineView.prototype.get selectionPathComponents):
447         (WebInspector.HeapAllocationsTimelineView.prototype.closed):
448         (WebInspector.HeapAllocationsTimelineView.prototype._heapSnapshotCollectionEvent.updateHeapSnapshotForEvent):
449         (WebInspector.HeapAllocationsTimelineView.prototype._heapSnapshotCollectionEvent):
450         (WebInspector.HeapAllocationsTimelineView.prototype._heapSnapshotInvalidated):
451         (WebInspector.HeapAllocationsTimelineView.prototype._updateCompareHeapSnapshotButton):
452         (WebInspector.HeapAllocationsTimelineView.prototype._dataGridNodeSelected):
453         Handle interactions when snapshots in the list are invalidated.
454
455 2016-06-22  Brian Burg  <bburg@apple.com>
456
457         Web Inspector: don't start auto capturing if the Inspector window is not visible
458         https://bugs.webkit.org/show_bug.cgi?id=159014
459
460         Reviewed by Joseph Pecoraro.
461         <rdar://problem/26931269>
462
463         Followup, add a missing super.closed() call mentioned in review comments.
464
465         * UserInterface/Views/TimelineTabContentView.js:
466         (WebInspector.TimelineTabContentView.prototype.closed):
467
468 2016-06-22  Brian Burg  <bburg@apple.com>
469
470         Web Inspector: don't start auto capturing if the Inspector window is not visible
471         https://bugs.webkit.org/show_bug.cgi?id=159014
472         <rdar://problem/26931269>
473
474         Reviewed by Joseph Pecoraro.
475
476         TimelineTabContentView should not tell the timeline manager to enable
477         auto-capturing unless the Web Inspector UI is visible. If it is preloaded
478         but not shown to the user, then auto-capturing may inadvertently disable
479         the debugger, causing it to miss `debugger` statements and not bring the
480         inspector to front.
481
482         * UserInterface/Controllers/TimelineManager.js:
483         (WebInspector.TimelineManager.prototype.set autoCaptureOnPageLoad):
484         Bail out if nothing changed. Coerce to a boolean since the backend requires a boolean.
485
486         * UserInterface/Views/TimelineTabContentView.js:
487         (WebInspector.TimelineTabContentView): Listen for UI visibility changes.
488         (WebInspector.TimelineTabContentView.prototype.shown):
489         Enable auto-capturing if the UI is visible.
490
491         (WebInspector.TimelineTabContentView.prototype.closed): Added.
492         Remove listeners on global objects so this tab doesn't leak.
493
494         (WebInspector.TimelineTabContentView.prototype._inspectorVisibilityChanged):
495         Update the auto-capturing setting if the UI became visible or not visible.
496
497 2016-06-22  Nikita Vasilyev  <nvasilyev@apple.com>
498
499         Web Inspector: Simplify CSS rule for ContentBrowser navigation bar items
500         https://bugs.webkit.org/show_bug.cgi?id=159000
501
502         Reviewed by Timothy Hatcher.
503
504         * UserInterface/Views/ContentBrowser.css:
505         (.content-browser > .navigation-bar > .item):
506         Both these values result in 28px, but `100%` is simplier.
507
508 2016-06-21  Nikita Vasilyev  <nvasilyev@apple.com>
509
510         REGRESSION(r201177): Web Inspector: ContentBrowser navigation bar should fit on a single line
511         https://bugs.webkit.org/show_bug.cgi?id=158700
512         <rdar://problem/26772058>
513
514         Reviewed by Joseph Pecoraro.
515
516         * UserInterface/Views/ContentBrowser.css:
517         (.content-browser > .navigation-bar > .item):
518         Set the height to 28px, as it was before r201177.
519         Make it one pixel shorter than the navigation bar for better vertical alignment.
520
521 2016-06-20  Joseph Pecoraro  <pecoraro@apple.com>
522
523         Web Inspector: UncaughtExceptionReporter should handle null event.error
524         https://bugs.webkit.org/show_bug.cgi?id=158971
525
526         Reviewed by Brian Burg.
527
528         * UserInterface/Debug/UncaughtExceptionReporter.js:
529         Since `typeof null === "object"` handle uncaught exceptions where the
530         Error object itself is null.
531
532 2016-06-20  Joseph Pecoraro  <pecoraro@apple.com>
533
534         Web Inspector: Snapshot List should show the total size and the total live size
535         https://bugs.webkit.org/show_bug.cgi?id=157904
536         <rdar://problem/26372833>
537
538         Reviewed by Brian Burg.
539
540         Include the live size of a snapshot in the snapshot list.
541
542         * Localizations/en.lproj/localizedStrings.js:
543         New "Live Size" string.
544
545         * UserInterface/Workers/HeapSnapshot/HeapSnapshot.js:
546         (HeapSnapshot):
547         (HeapSnapshot.updateCategoriesAndMetadata):
548         (HeapSnapshot.prototype.update):
549         (HeapSnapshot.prototype.serialize):
550         (HeapSnapshotDiff):
551         (HeapSnapshotDiff.prototype.update):
552         (HeapSnapshot.buildCategories): Deleted.
553         (HeapSnapshot.prototype.updateCategories): Deleted.
554         (HeapSnapshotDiff.prototype.updateCategories): Deleted.
555         * UserInterface/Proxies/HeapSnapshotDiffProxy.js:
556         (WebInspector.HeapSnapshotDiffProxy.prototype.updateForCollectionEvent):
557         (WebInspector.HeapSnapshotDiffProxy.prototype.update):
558         (WebInspector.HeapSnapshotDiffProxy.prototype.updateCategories): Deleted.
559         * UserInterface/Proxies/HeapSnapshotProxy.js:
560         (WebInspector.HeapSnapshotProxy):
561         (WebInspector.HeapSnapshotProxy.deserialize):
562         (WebInspector.HeapSnapshotProxy.prototype.get liveSize):
563         (WebInspector.HeapSnapshotProxy.prototype.updateForCollectionEvent):
564         (WebInspector.HeapSnapshotProxy.prototype.update):
565         (WebInspector.HeapSnapshotProxy.prototype.updateCategories): Deleted.
566         Rename "updateCategories" to "update" and update both categories
567         and metadata, like the liveSize.
568
569         * UserInterface/Views/HeapAllocationsTimelineDataGridNode.js:
570         (WebInspector.HeapAllocationsTimelineDataGridNode):
571         (WebInspector.HeapAllocationsTimelineDataGridNode.prototype.createCellContent):
572         (WebInspector.HeapAllocationsTimelineDataGridNode.prototype._heapSnapshotCollectedNodes):
573         Update live size after collection.
574
575         * UserInterface/Views/HeapAllocationsTimelineView.js:
576         (WebInspector.HeapAllocationsTimelineView):
577         Include a live size column in the DataGrid.
578         (WebInspector.HeapAllocationsTimelineView.prototype.closed):
579         Cleanup listeners appropriately.
580
581 2016-06-20  Joseph Pecoraro  <pecoraro@apple.com>
582
583         Web Inspector: console.profile should use the new Sampling Profiler
584         https://bugs.webkit.org/show_bug.cgi?id=153499
585         <rdar://problem/24352431>
586
587         Reviewed by Timothy Hatcher.
588
589         * UserInterface/Controllers/TimelineManager.js:
590         (WebInspector.TimelineManager.prototype.programmaticCaptureStarted):
591         (WebInspector.TimelineManager.prototype.programmaticCaptureStopped):
592         (WebInspector.TimelineManager.prototype.scriptProfilerProgrammaticCaptureStarted):
593         (WebInspector.TimelineManager.prototype.scriptProfilerProgrammaticCaptureStopped):
594         For programmatic captures, automatically show the Script Timeline, since
595         that is guarenteed to have been started by the backend. Start capturing
596         without creating a new recording.
597
598         * UserInterface/Models/TimelineRecording.js:
599         (WebInspector.TimelineRecording.prototype.stop):
600         (WebInspector.TimelineRecording.prototype.addScriptInstrumentForProgrammaticCapture):
601         When stopping for programmatic capture we don't need to disable
602         instruments, the backend would have already done this.
603
604         * UserInterface/Protocol/ScriptProfilerObserver.js:
605         (WebInspector.ScriptProfilerObserver.prototype.programmaticCaptureStarted):
606         (WebInspector.ScriptProfilerObserver.prototype.programmaticCaptureStopped):
607         (WebInspector.ScriptProfilerObserver):
608         * UserInterface/Protocol/TimelineObserver.js:
609         (WebInspector.TimelineObserver.prototype.programmaticCaptureStarted):
610         (WebInspector.TimelineObserver.prototype.programmaticCaptureStopped):
611         (WebInspector.TimelineObserver):
612         Pass through Web and JSContext programmatic capture events.
613
614 2016-06-19  Nikita Vasilyev  <nvasilyev@apple.com>
615
616         Web Inspector: Remove Sidebar z-index:0 workaround for scrollbars and position:sticky section headers
617         https://bugs.webkit.org/show_bug.cgi?id=158882
618
619         Reviewed by Darin Adler.
620
621         The z-index:0 workaround is no longer needed as it doesn't change anything.
622
623         * UserInterface/Views/Sidebar.css:
624         (.sidebar > .panel): Deleted.
625
626 2016-06-17  Commit Queue  <commit-queue@webkit.org>
627
628         Unreviewed, rolling out r202152.
629         https://bugs.webkit.org/show_bug.cgi?id=158897
630
631         The new test is very unstable, timing out frequently
632         (Requested by ap on #webkit).
633
634         Reverted changeset:
635
636         "Web Inspector: console.profile should use the new Sampling
637         Profiler"
638         https://bugs.webkit.org/show_bug.cgi?id=153499
639         http://trac.webkit.org/changeset/202152
640
641 2016-06-16  Joseph Pecoraro  <pecoraro@apple.com>
642
643         Web Inspector: console.profile should use the new Sampling Profiler
644         https://bugs.webkit.org/show_bug.cgi?id=153499
645         <rdar://problem/24352431>
646
647         Reviewed by Timothy Hatcher.
648
649         * UserInterface/Controllers/TimelineManager.js:
650         (WebInspector.TimelineManager.prototype.programmaticCaptureStarted):
651         (WebInspector.TimelineManager.prototype.programmaticCaptureStopped):
652         (WebInspector.TimelineManager.prototype.scriptProfilerProgrammaticCaptureStarted):
653         (WebInspector.TimelineManager.prototype.scriptProfilerProgrammaticCaptureStopped):
654         For programmatic captures, automatically show the Script Timeline, since
655         that is guarenteed to have been started by the backend. Start capturing
656         without creating a new recording.
657
658         * UserInterface/Models/TimelineRecording.js:
659         (WebInspector.TimelineRecording.prototype.stop):
660         (WebInspector.TimelineRecording.prototype.addScriptInstrumentForProgrammaticCapture):
661         When stopping for programmatic capture we don't need to disable
662         instruments, the backend would have already done this.
663
664         * UserInterface/Protocol/ScriptProfilerObserver.js:
665         (WebInspector.ScriptProfilerObserver.prototype.programmaticCaptureStarted):
666         (WebInspector.ScriptProfilerObserver.prototype.programmaticCaptureStopped):
667         (WebInspector.ScriptProfilerObserver):
668         * UserInterface/Protocol/TimelineObserver.js:
669         (WebInspector.TimelineObserver.prototype.programmaticCaptureStarted):
670         (WebInspector.TimelineObserver.prototype.programmaticCaptureStopped):
671         (WebInspector.TimelineObserver):
672         Pass through Web and JSContext programmatic capture events.
673
674 2016-06-16  Joseph Pecoraro  <pecoraro@apple.com>
675
676         REGRESSION (r201538): Web Inspector: Border over Allocations Views is too thick
677         https://bugs.webkit.org/show_bug.cgi?id=158846
678
679         Reviewed by Timothy Hatcher.
680
681         * UserInterface/Views/HeapAllocationsTimelineView.css:
682         (.timeline-view.heap-allocations > .content-view-container > .content-view): Deleted.
683
684 2016-06-16  Matt Baker  <mattbaker@apple.com>
685
686         Unreviewed build fix.
687
688         * UserInterface/Views/DataGrid.js:
689         (WebInspector.DataGrid.prototype.createSettings):
690         "showColumn" -> "setColumnVisible".
691
692 2016-06-16  Matt Baker  <mattbaker@apple.com>
693
694         Web Inspector: DataGrid should manage its own settings
695         https://bugs.webkit.org/show_bug.cgi?id=158675
696         <rdar://problem/26761338>
697
698         Reviewed by Timothy Hatcher.
699
700         Move grid sorting settings (sort order, column identifier) into DataGrid,
701         removing duplicated code from various views. A new grid method, "createSettings",
702         takes an identifier which is used as a prefix for naming the grid's settings.
703
704         So that the new behavior is easy to use and hard to misuse, default values
705         for each setting are set to the current value of the associated property.
706         The result is that:
707
708             grid.sortColumnIdentifier = "columnA";
709             grid.createSettings("myGrid");
710
711         will use "columnA" as the default value the first time the setting is created.
712
713         * UserInterface/Views/ApplicationCacheFrameContentView.js:
714         (WebInspector.ApplicationCacheFrameContentView.prototype._createDataGrid):
715         * UserInterface/Views/CookieStorageContentView.js:
716         (WebInspector.CookieStorageContentView.prototype._rebuildTable):
717         * UserInterface/Views/DOMStorageContentView.js:
718         (WebInspector.DOMStorageContentView):
719         * UserInterface/Views/DataGrid.js:
720         (WebInspector.DataGrid):
721         (WebInspector.DataGrid.prototype.createSettings):
722         (WebInspector.DataGrid.prototype.get identifier): Deleted.
723         (WebInspector.DataGrid.prototype.set identifier): Deleted.
724         (WebInspector.DataGrid.prototype.set sortOrderSetting): Deleted.
725         (WebInspector.DataGrid.prototype.set sortColumnIdentifierSetting): Deleted.
726         * UserInterface/Views/HeapAllocationsTimelineView.js:
727         (WebInspector.HeapAllocationsTimelineView):
728         * UserInterface/Views/HeapSnapshotContentView.js:
729         (WebInspector.HeapSnapshotContentView):
730         * UserInterface/Views/LayerTreeDetailsSidebarPanel.js:
731         (WebInspector.LayerTreeDetailsSidebarPanel.prototype._buildDataGridSection):
732         * UserInterface/Views/LayoutTimelineView.js:
733         (WebInspector.LayoutTimelineView):
734         * UserInterface/Views/NetworkGridContentView.js:
735         (WebInspector.NetworkGridContentView):
736         * UserInterface/Views/NetworkTimelineView.js:
737         (WebInspector.NetworkTimelineView):
738         * UserInterface/Views/ProfileView.js:
739         (WebInspector.ProfileView):
740         * UserInterface/Views/RenderingFrameTimelineView.js:
741         (WebInspector.RenderingFrameTimelineView):
742         * UserInterface/Views/ScriptDetailsTimelineView.js:
743         (WebInspector.ScriptDetailsTimelineView):
744
745 2016-06-15  Joseph Pecoraro  <pecoraro@apple.com>
746
747         Uncaught Exception: TypeError: undefined is not an object (evaluating 'imageElement.classList')
748         https://bugs.webkit.org/show_bug.cgi?id=158808
749         <rdar://problem/26821034>
750
751         Reviewed by Brian Burg.
752
753         * UserInterface/Views/HeapAllocationsTimelineOverviewGraph.js:
754         (WebInspector.HeapAllocationsTimelineOverviewGraph.prototype._updateSnapshotMarkers):
755         If the record is out of the layout bounds of the overview graph, the overview graph
756         may not have created an image element yet, so bail. Later, when the image element
757         is created, it would get the appropriate style if the record is selected.
758
759 2016-06-14  Matt Baker  <mattbaker@apple.com>
760
761         Web Inspector: Rename DataGrid.showColumn to setColumnVisible
762         https://bugs.webkit.org/show_bug.cgi?id=158764
763         <rdar://problem/26801448>
764
765         Reviewed by Joseph Pecoraro.
766
767         * UserInterface/Views/DataGrid.js:
768         (WebInspector.DataGrid):
769         Drive-by update to initialize "this._columnChooserEnabled".
770
771         (WebInspector.DataGrid.prototype.set identifier):
772         (WebInspector.DataGrid.prototype.insertColumn):
773         (WebInspector.DataGrid.prototype._collapseColumnGroupWithCell):
774         Use new method name.
775
776         (WebInspector.DataGrid.prototype._contextMenuInHeader):
777         Drive-by style update.
778
779 2016-06-14  Matt Baker  <mattbaker@apple.com>
780
781         Web Inspector: Storage tab should allow hiding columns in the cookies grid
782         https://bugs.webkit.org/show_bug.cgi?id=158767
783         <rdar://problem/26803568>
784
785         Reviewed by Joseph Pecoraro.
786
787         * UserInterface/Views/CookieStorageContentView.js:
788         (WebInspector.CookieStorageContentView.prototype._rebuildTable):
789         Enable column chooser, exclude Name and Value columns.
790
791 2016-06-14  Nikita Vasilyev  <nvasilyev@apple.com>
792
793         Web Inspector: Visual Sidebar: Remove "Text -> Content" subsection
794         https://bugs.webkit.org/show_bug.cgi?id=158758
795         <rdar://problem/26799628>
796
797         Reviewed by Timothy Hatcher.
798
799         "content" CSS property only works with pseudo elements ::before and ::after.
800         It doesn't do anything for regular (non pseudo) elements. Remove it to
801         reduce UI clutter.
802
803         * UserInterface/Views/VisualStyleDetailsPanel.js:
804         (WebInspector.VisualStyleDetailsPanel.prototype.initialLayout):
805         (WebInspector.VisualStyleDetailsPanel.prototype._populateContentSection): Deleted.
806         * UserInterface/Views/VisualStylePropertyEditor.css:
807         (.visual-style-property-container > *:first-child:matches(.visual-style-property-value-container)): Deleted.
808
809 2016-06-14  Joseph Pecoraro  <pecoraro@apple.com>
810
811         Web Inspector: Rename Timeline.setAutoCaptureInstruments to Timeline.setInstruments
812         https://bugs.webkit.org/show_bug.cgi?id=158762
813
814         Reviewed by Timothy Hatcher.
815
816         * UserInterface/Controllers/TimelineManager.js:
817         (WebInspector.TimelineManager.prototype._updateAutoCaptureInstruments):
818         (WebInspector.TimelineManager):
819
820 2016-06-14  Benjamin Poulain  <bpoulain@apple.com>
821
822         Add the unprefixed version of the pseudo element ::placeholder
823         https://bugs.webkit.org/show_bug.cgi?id=158653
824
825         Reviewed by Dean Jackson.
826
827         * UserInterface/Views/FilterBar.css:
828         (.filter-bar > input[type="search"]::placeholder):
829         (.filter-bar > input[type="search"]::-webkit-input-placeholder): Deleted.
830         * UserInterface/Views/FindBanner.css:
831         (.find-banner.console-find-banner > input[type="search"]::placeholder):
832         (.find-banner.console-find-banner > input[type="search"]::-webkit-input-placeholder): Deleted.
833         * UserInterface/Views/GoToLineDialog.css:
834         (.go-to-line-dialog > div > input::placeholder):
835         (.go-to-line-dialog > div > input::-webkit-input-placeholder): Deleted.
836         * UserInterface/Views/OpenResourceDialog.css:
837         (.open-resource-dialog > .field > input::placeholder):
838         (.open-resource-dialog > .field > input::-webkit-input-placeholder): Deleted.
839         * UserInterface/Views/SearchBar.css:
840         (.search-bar > input[type="search"]::placeholder):
841         (.search-bar > input[type="search"]::-webkit-input-placeholder): Deleted.
842         * UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.css:
843
844 2016-06-14  Nikita Vasilyev  <nvasilyev@apple.com>
845
846         Web Inspector: Introduce --navigation-bar-height CSS variable
847         https://bugs.webkit.org/show_bug.cgi?id=158752
848
849         Reviewed by Timothy Hatcher.
850
851         Abstract a commonly repeated height value (29px) into a variable.
852
853         * UserInterface/Views/CSSStyleDetailsSidebarPanel.css:
854         (.sidebar > .panel.details.css-style > .content.has-filter-bar):
855         * UserInterface/Views/DebuggerSidebarPanel.css:
856         (.sidebar > .panel.navigation.debugger > :matches(.content, .empty-content-placeholder)):
857         * UserInterface/Views/FilterBar.css:
858         (.filter-bar):
859         * UserInterface/Views/NavigationBar.css:
860         (.navigation-bar):
861         * UserInterface/Views/NavigationSidebarPanel.css:
862         (.sidebar > .panel.navigation > .content):
863         (.sidebar > .panel.navigation > .overflow-shadow.top):
864         * UserInterface/Views/NetworkSidebarPanel.css:
865         (.sidebar > .panel.navigation.network > .title-bar):
866         * UserInterface/Views/ResourceSidebarPanel.css:
867         (.sidebar > .panel.navigation.resource > :matches(.content, .empty-content-placeholder)):
868         * UserInterface/Views/SearchSidebarPanel.css:
869         (.sidebar > .panel.navigation.search > :matches(.content, .empty-content-placeholder)):
870         (.sidebar > .panel.navigation.search > .search-bar):
871         * UserInterface/Views/Sidebar.css:
872         (.sidebar.has-navigation-bar > .panel):
873         * UserInterface/Views/StorageSidebarPanel.css:
874         (.sidebar > .panel.navigation.storage > :matches(.content, .empty-content-placeholder)):
875         * UserInterface/Views/TimelineRecordingContentView.css:
876         (.content-view.timeline-recording > .content-browser .recording-progress):
877         * UserInterface/Views/Variables.css:
878         (:root):
879
880 2016-06-14  Saam Barati  <sbarati@apple.com>
881
882         Follow up to: Web Inspector: Call Trees view should have a 'Top Functions'-like mode
883         https://bugs.webkit.org/show_bug.cgi?id=158555
884         <rdar://problem/26712544>
885
886         Unreviewed follow up patch.
887
888         - Move a long if-else sequence to a switch statement.
889         - Fix a copy-paste typo in a Symbol(.) enum.
890
891         * UserInterface/Models/CallingContextTree.js:
892         (WebInspector.CallingContextTree.prototype.updateTreeWithStackTrace):
893
894 2016-06-13  Joseph Pecoraro  <pecoraro@apple.com>
895
896         Web Inspector: Show Exception Stack in UncaughtExceptionReporter view
897         https://bugs.webkit.org/show_bug.cgi?id=158657
898         <rdar://problem/26754441>
899
900         Reviewed by Darin Adler.
901
902         * UserInterface/Debug/UncaughtExceptionReporter.css:
903         (.uncaught-exception-sheet li):
904         Make newlines significant.
905
906         * UserInterface/Debug/UncaughtExceptionReporter.js:
907         (unblockEventHandlers):
908         (handleError):
909         (handleLinkClick):
910         (formattedEntry):
911         Format the exception and a possible stack with a bit of sanitizing.
912
913 2016-06-13  Matt Baker  <mattbaker@apple.com>
914
915         Web Inspector: Filter Records not applying to new records
916         https://bugs.webkit.org/show_bug.cgi?id=158213
917         <rdar://problem/26543912>
918
919         Reviewed by Timothy Hatcher.
920
921         This patch makes the following improvements to timeline grid filtering:
922
923             - Records are filtered as they are added to the grid.
924             - Timeline view no longer triggers a filter refresh while the
925               current time changes while recording.
926             - Filters are refreshed whenever the current timeline view changes.
927
928         * UserInterface/Views/DataGrid.js:
929         (WebInspector.DataGrid.prototype.hasFilters):
930         Helper function to check for custom and text filters.
931
932         (WebInspector.DataGrid.prototype._applyFiltersToNodeAndDispatchEvent):
933         Encapsulate node state change and event dispatch, which was previously
934         done in multiple places.
935
936         (WebInspector.DataGrid.prototype.insertChild):
937         Filter incoming node if needed.
938
939         (WebInspector.DataGrid.prototype._updateFilter.createIteratorForNodesToBeFiltered):
940         (WebInspector.DataGrid.prototype._updateFilter):
941         (WebInspector.DataGrid.prototype.yieldableTaskWillProcessItem):
942         Use new convenience functions.
943
944         (WebInspector.DataGrid.prototype.hasCustomFilters): Deleted.
945         Renamed `hasFilters`.
946
947         * UserInterface/Views/TimelineRecordingContentView.js:
948         (WebInspector.TimelineRecordingContentView.prototype._currentContentViewDidChange):
949         Refresh grid filters on view change.
950
951         * UserInterface/Views/TimelineView.js:
952         (WebInspector.TimelineView.prototype.set startTime):
953         (WebInspector.TimelineView.prototype.set endTime):
954         Schedule filter change notification when selection bounds changes.
955
956         (WebInspector.TimelineView.prototype._timesDidChange):
957         (WebInspector.TimelineView.prototype._scheduleFilterDidChange):
958         (WebInspector.TimelineView):
959
960 2016-06-13  Saam Barati  <sbarati@apple.com>
961
962         Web Inspector: Call Trees view should have a 'Top Functions'-like mode
963         https://bugs.webkit.org/show_bug.cgi?id=158555
964         <rdar://problem/26712544>
965
966         Reviewed by Timothy Hatcher.
967
968         This patch adds a Top Functions view that is similar to Instruments'
969         Top Functions view. I really wanted to add this view because I've
970         been doing a lot of performance debugging and I've exclusively 
971         used the Top Functions view and I want the Inspector to also have
972         this view. I like to think of it as a more sophisticated version of the bottom-up view.
973         
974         Top Functions works by treating every frame as a root in the tree.
975         Top functions view then presents a list of "roots". This is the same
976         as all other views, which also present a list of roots, but in this case,
977         every frame is a root. Bottom Up is great for nailing in specific performance
978         problems in exactly one frame. But Bottom Up doesn't give you good context about where
979         a specific frame is in the call tree and how frames are related by having
980         a caller or some path of shared callers. For example, consider this call tree:
981                  (program)
982                  /        \
983                 /          \
984            (many nodes...)  
985               / 
986              /
987             (parent)
988             /   \
989            /     \
990          (leaf1)  (leaf2)
991         
992         Suppose that 'leaf1' is super hot, and 'leaf2' is moderately hot.
993         If we look at this through Bottom Up view, we will see 'leaf1'
994         is super hot, but it will take more scrolling to see that 'leaf2'
995         is moderately hot. Lets say that 'parent' is also moderately hot,
996         but that the majority of its time isn't self time. With Bottom Up view,
997         there is no good way to see that 'leaf1' and 'leaf2' are both nodes under 'parent'.
998         With Top Down, you can find this information, but it requires a ton of drilling down into
999         the tree (i.e, you must expand past the 'many nodes...' I drew above). It's inconvenient to
1000         use Top Down here for indentation alone. Bottom up will tell you that 'leaf1' is super hot,
1001         and that 'leaf2' and 'parent' are moderately hot, but it doesn't show how they're related
1002         in the original tree. It's important to see that 'parent's total time is very high
1003         because it itself is moderately hot, and it has a child node that is super hot, and
1004         another child that's moderately 'hot'. For the sake of this example, let's pretend
1005         that 85% of the program's time is spent inside 'parent'. Seeing this information through
1006         'Top Functions' is easy because this information filters to the top of the list. Specifically,
1007         when using 'Top Functions' sorted by Total Time. Because every node is a root, there will be
1008         a top-level entry for every frame in the program. Specifically, there will be a top-level node
1009         for 'parent' in my above example. Because I've sorted this view by Total Time, I will see '(program)'
1010         first. That's because 100% of execution time is under the '(program)' frame. Then, I might see
1011         a few other nodes that also run the entire time because '(program)' calls them, and they eventually
1012         call into other things that never leave the stack. These will also have time ranges near 100%.
1013         But, only a few nodes after that, I'll see 'parent' in the list because it accounts for 85% of
1014         execution time. Immediately, I will see that it has some self time, and that it has two child
1015         nodes that have self time. This is really helpful.
1016         
1017         Let's consider another example where it's not easy in Top Down to get the full picture of 'parent':
1018                    (program)
1019                     /  |  \
1020                  (... many nodes...)
1021                   /           \
1022             (many nodes...)   (many nodes...)
1023                  /             \
1024                parent         parent
1025                  |              |
1026                 leaf1          leaf2
1027         
1028         
1029         If we viewed this program in Top Down, we don't get a full picture of 'parent'
1030         because it has its time distributed in two different subsections of the tree.
1031         Specifically, lets say it has 70% of time in the leaf1 path, and 30% of the
1032         time in the leaf2 path. We want a way to see these things together. It's impossible
1033         to do this in Top Down or Bottom Up. But, in Top Functions view, we get the view that
1034         we want to see because we treat 'parent' as a root of the tree. Because we do this,
1035         we will create the following sub tree in the Top Functions view:
1036                 parent
1037                /      \
1038              leaf1   leaf2
1039         This happens naturally because when 'parent' is a root, we add all its children
1040         to its subtree.
1041         
1042         Constructing this tree is really easy. What we do is take any arbitrary stack
1043         trace of length n, and treat is as n separate stack traces. Specifically, we
1044         perform the following operation for any stack trace S.
1045         
1046         S = [A, B, C, D]
1047         (A is the entry frame, and D is the top of the stack).
1048         We will transform this into a list of stack traces S' like so:
1049         S' = [[A, B, C, D], [B, C, D], [C, D], [D]]
1050         
1051         If we then run the normal top down tree algorithm on this set of stack
1052         traces, all nodes get treated as roots, and voila, we get the Top Functions view.
1053
1054         * Localizations/en.lproj/localizedStrings.js:
1055         * UserInterface/Controllers/TimelineManager.js:
1056         * UserInterface/Main.html:
1057         * UserInterface/Models/CallingContextTree.js:
1058         * UserInterface/Models/TimelineRecording.js:
1059         * UserInterface/Views/ScriptProfileTimelineView.js:
1060         * UserInterface/Views/TextToggleButtonNavigationItem.css: Added.
1061         * UserInterface/Views/TextToggleButtonNavigationItem.js: Added.
1062
1063 2016-06-13  Matt Baker  <mattbaker@apple.com>
1064
1065         Web Inspector: Add ability to show/hide DataGird columns
1066         https://bugs.webkit.org/show_bug.cgi?id=158676
1067         <rdar://problem/26761573>
1068
1069         Reviewed by Timothy Hatcher.
1070
1071         Make it possible to show/hide grid columns using the grid header
1072         context menu. This patch enables the new behavior for most of the
1073         timeline grids.
1074
1075         * UserInterface/Views/DataGrid.js:
1076         (WebInspector.DataGrid):
1077         (WebInspector.DataGrid.prototype.get identifier):
1078         (WebInspector.DataGrid.prototype.set identifier):
1079         An identifier for the grid instance, for managing per-grid settings.
1080         Setting the id causes settings to be created, and their values to be
1081         applied to the grid.
1082
1083         (WebInspector.DataGrid.prototype.get columnChooserEnabled):
1084         (WebInspector.DataGrid.prototype.set columnChooserEnabled):
1085         Enable showing/hiding columns via the grid header.
1086
1087         (WebInspector.DataGrid.prototype.insertColumn):
1088         (WebInspector.DataGrid.prototype.showColumn):
1089         Set column visibility and hidden column setting, then perform layout.
1090
1091         (WebInspector.DataGrid.prototype._collapseColumnGroupWithCell):
1092         (WebInspector.DataGrid.prototype._contextMenuInHeader):
1093         Create column chooser menu items if necessary.
1094
1095         (WebInspector.DataGrid.prototype._showColumn): Deleted.
1096         (WebInspector.DataGrid.prototype._hideColumn): Deleted.
1097         Replaced by `showColumn`.
1098
1099         * UserInterface/Views/LayoutTimelineView.js:
1100         (WebInspector.LayoutTimelineView):
1101         Always show "type" and "name" columns.
1102
1103         * UserInterface/Views/NetworkTimelineView.js:
1104         (WebInspector.NetworkTimelineView):
1105         * UserInterface/Views/RenderingFrameTimelineView.js:
1106         (WebInspector.RenderingFrameTimelineView):
1107         * UserInterface/Views/ScriptDetailsTimelineView.js:
1108         (WebInspector.ScriptDetailsTimelineView):
1109         Always show "name" column.
1110
1111         * UserInterface/Views/TimelineDataGrid.js:
1112         (WebInspector.TimelineDataGrid):
1113         Enable column chooser.
1114
1115 2016-06-10  Joseph Pecoraro  <pecoraro@apple.com>
1116
1117         Web Inspector: <template> content should not be hidden as Shadow Content
1118         https://bugs.webkit.org/show_bug.cgi?id=158654
1119
1120         Reviewed by Ryosuke Niwa.
1121
1122         * Localizations/en.lproj/localizedStrings.js:
1123         New "Template Content" string.
1124
1125         * UserInterface/Models/DOMNode.js:
1126         (WebInspector.DOMNode):
1127         Don't treat template content as shadow content.
1128
1129         * UserInterface/Views/DOMTreeElement.js:
1130         (WebInspector.DOMTreeElement.prototype._nodeTitleInfo):
1131         Custom string for template content fragment.
1132
1133 2016-06-10  Matt Baker  <mattbaker@apple.com>
1134
1135         Web Inspector: heap snapshot comparison view shows nothing if later snapshot is chosen first
1136         https://bugs.webkit.org/show_bug.cgi?id=158584
1137         <rdar://problem/26727849>
1138
1139         Reviewed by Timothy Hatcher.
1140
1141         ALways compare the the later snapshot to the earlier snapshot,
1142         regardless of selection order.
1143
1144         * UserInterface/Views/HeapAllocationsTimelineView.js:
1145         (WebInspector.HeapAllocationsTimelineView):
1146         (WebInspector.HeapAllocationsTimelineView.prototype._dataGridNodeSelected):
1147         Swap shapshots if the first has a greater identifier than the second.
1148         Drive-by cleanup: null out `_baselineDataGridNode` since it isn't used
1149         after the comparison completes.
1150
1151 2016-06-10  Matt Baker  <mattbaker@apple.com>
1152
1153         Web Inspector: rendering frames timeline "60fps" horizontal guide is mispositioned after switching timeline modes
1154         https://bugs.webkit.org/show_bug.cgi?id=158587
1155         <rdar://problem/26728174>
1156
1157         Reviewed by Timothy Hatcher.
1158
1159         When the view mode changes we iterate over all overview graphs, updating
1160         their visibility as needed. Graphs being shown perform layout, even though
1161         the overview's state is in transition: its offset height may still change.
1162
1163         A simple fix is to use TimelineOverviewGraph.height instead of the graph
1164         element's offset height when performing layout.
1165
1166         * UserInterface/Views/RenderingFrameTimelineOverviewGraph.js:
1167         (WebInspector.RenderingFrameTimelineOverviewGraph.prototype.layout):
1168
1169 2016-06-10  Matt Baker  <mattbaker@apple.com>
1170
1171         REGRESSION (r201538): Web Inspector: 1px gap above timeline progress view
1172         https://bugs.webkit.org/show_bug.cgi?id=158626
1173
1174         Reviewed by Joseph Pecoraro.
1175
1176         Adjust progress view top position to account for grid border changes.
1177
1178         * UserInterface/Views/TimelineRecordingContentView.css:
1179         (.content-view.timeline-recording > .content-browser .recording-progress):
1180
1181 2016-06-10  Matt Baker  <mattbaker@apple.com>
1182
1183         Web Inspector: REGRESSION (r201538): Web Inspector: Border under JS Call Trees content view is too thick
1184         https://bugs.webkit.org/show_bug.cgi?id=158624
1185         <rdar://problem/26743633>
1186
1187         Reviewed by Joseph Pecoraro.
1188
1189         Remove top border from <th> elements.
1190
1191         * UserInterface/Views/ProfileView.css:
1192         (.profile > .data-grid th): Deleted.
1193
1194 2016-06-09  Joseph Pecoraro  <pecoraro@apple.com>
1195
1196         REGRESSION: Web Inspector: IndexedDB does not show ObjectStore data
1197         https://bugs.webkit.org/show_bug.cgi?id=158592
1198         <rdar://problem/26730696>
1199
1200         Reviewed by Timothy Hatcher.
1201
1202         * UserInterface/Views/DataGrid.js:
1203         (WebInspector.DataGrid.prototype._noteRowRemoved):
1204         (WebInspector.DataGridNode.prototype._detach):
1205         When rows are removed in the non-Virtual DataGrids, we should
1206         actually remove the row.
1207
1208         * UserInterface/Views/IndexedDatabaseObjectStoreContentView.js:
1209         (WebInspector.IndexedDatabaseObjectStoreContentView):
1210         (WebInspector.IndexedDatabaseObjectStoreContentView.prototype._fetchMoreData.processEntries):
1211         (WebInspector.IndexedDatabaseObjectStoreContentView.prototype._fetchMoreData):
1212         Don't use the delete operator. Use a boolean.
1213
1214 2016-06-09  Nikita Vasilyev  <nvasilyev@apple.com>
1215
1216         Web Inspector: Support Command-P for quick open
1217         https://bugs.webkit.org/show_bug.cgi?id=158579
1218         <rdar://problem/26726751>
1219
1220         Reviewed by Timothy Hatcher.
1221
1222         * UserInterface/Base/Main.js:
1223         (WebInspector.contentLoaded):
1224
1225 2016-06-09  Nikita Vasilyev  <nvasilyev@apple.com>
1226
1227         REGRESSION (r194717): Web Inspector: Elements tab: an element loses focus when selected by Up/Down key
1228         https://bugs.webkit.org/show_bug.cgi?id=157768
1229         <rdar://problem/26311155>
1230
1231         Reviewed by Timothy Hatcher.
1232
1233         Remove _previousFocusedSection and _newInspectorRuleSelector since it was used only
1234         to focus on a newly created section (added by clicking on "+" button).
1235
1236         Introduce _inspectorSection and _isInspectorSectionPendingFocus.
1237
1238         * UserInterface/Views/CSSStyleDeclarationSection.js:
1239         (WebInspector.CSSStyleDeclarationSection.prototype.cssStyleDeclarationTextEditorBlurActiveEditor): Deleted.
1240         (WebInspector.CSSStyleDeclarationSection.prototype._handleSelectorPaste): Deleted.
1241         No longer needed, it was only used by _previousFocusedSection and _newInspectorRuleSelector.
1242
1243         * UserInterface/Views/CSSStyleDeclarationTextEditor.js:
1244         (WebInspector.CSSStyleDeclarationTextEditor.): Deleted.
1245         No londer needed, it was only used by _previousFocusedSection.
1246
1247         * UserInterface/Views/RulesStyleDetailsPanel.js:
1248         (WebInspector.RulesStyleDetailsPanel):
1249         (WebInspector.RulesStyleDetailsPanel.prototype.refresh.appendStyleSection):
1250         (WebInspector.RulesStyleDetailsPanel.prototype.newRuleButtonClicked):
1251         (WebInspector.RulesStyleDetailsPanel.prototype.nodeStylesRefreshed):
1252         (WebInspector.RulesStyleDetailsPanel.prototype.cssStyleDeclarationSectionEditorFocused): Deleted.
1253         (WebInspector.RulesStyleDetailsPanel.prototype.cssStyleDeclarationSectionBlurActiveEditor): Deleted.
1254         (WebInspector.RulesStyleDetailsPanel.prototype.cssStyleDeclarationSectionFocusNewInspectorRuleWithSelector): Deleted.
1255
1256 2016-06-08  Joseph Pecoraro  <pecoraro@apple.com>
1257
1258         REGRESSION: Web Inspector: Should be able to evaluate "{a:1, b:2}" in the console
1259         https://bugs.webkit.org/show_bug.cgi?id=158548
1260         <rdar://problem/26708513>
1261
1262         Reviewed by Timothy Hatcher.
1263
1264         * UserInterface/Controllers/RuntimeManager.js:
1265         (WebInspector.RuntimeManager.prototype.evaluateInInspectedWindow):
1266         Switch the many parameters to an options dictionary.
1267         Include a new option for sourceURL appender, so that
1268         Console evaluations can have its own append.
1269
1270         * UserInterface/Controllers/JavaScriptLogViewController.js:
1271         (WebInspector.JavaScriptLogViewController.prototype.consolePromptTextCommitted):
1272         Use the appendWebInspectorConsoleEvaluationSourceURL appender.
1273
1274         * UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
1275         (WebInspector.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.evaluated):
1276         * UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
1277         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateWatchExpressionsSection.):
1278         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateWatchExpressionsSection):
1279         Use the new options dictionary.
1280
1281 2016-06-08  Brian Burg  <bburg@apple.com>
1282
1283         Web Inspector: an error is encountered when trying to delete nodes that have children
1284         https://bugs.webkit.org/show_bug.cgi?id=158541
1285         <rdar://problem/26705901>
1286
1287         Reviewed by Timothy Hatcher.
1288
1289         * UserInterface/Views/DOMTreeElement.js:
1290         (WebInspector.DOMTreeElement.prototype.adjustCollapsedRange):
1291         Offset into the array variable instead of a variable holding its length.
1292
1293 2016-06-08  Brian Burg  <bburg@apple.com>
1294
1295         Web Inspector: DOMTreeOutline selection areas should be created and updated lazily
1296         https://bugs.webkit.org/show_bug.cgi?id=158513
1297         <rdar://problem/26689646>
1298
1299         Reviewed by Timothy Hatcher.
1300
1301         Selection areas for DOMTreeElements are used for several things: drag markers,
1302         element hover styles, element selection styles, and showing forced pseudo states
1303         for an element. Fortunately it's easy to tell when any of these things is necessary.
1304
1305         Change DOMTreeOutline and DOMTreeElement so they don't create selection areas
1306         unless they are needed for one of these tasks. This significantly reduces
1307         forced layouts that are required to update the selection area height in case the
1308         element has new attributes that cause the tag to become more or less wrapped.
1309
1310         * UserInterface/Views/DOMTreeElement.js:
1311         (WebInspector.DOMTreeElement.prototype.set hovered):
1312         Modernize this method a bit.
1313
1314         (WebInspector.DOMTreeElement.prototype.updateSelectionArea):
1315         If a selection area is not necessary, don't create one.
1316         If one exists and it's not needed, then remove it.
1317
1318         (WebInspector.DOMTreeElement.prototype.onattach):
1319         Remove redundant calls to updateSelection(). This is already called in
1320         updateTitle().
1321
1322         (WebInspector.DOMTreeElement.prototype.onselect):
1323         Ask the DOMTreeOutline to update the selection rather than forcing the
1324         element to do it. This is consistent with other updates to user selection.
1325
1326         (WebInspector.DOMTreeElement.prototype._insertInLastAttributePosition):
1327         (WebInspector.DOMTreeElement.prototype._startEditingAsHTML.dispose):
1328         (WebInspector.DOMTreeElement.prototype._startEditingAsHTML):
1329         Use renamed method.
1330
1331         (WebInspector.DOMTreeElement.prototype.updateTitle):
1332         Add a comment to explain why the selection area is nulled out here.
1333
1334         (WebInspector.DOMTreeElement.prototype.get pseudoClassesEnabled):
1335         (WebInspector.DOMTreeElement.prototype._nodePseudoClassesDidChange):
1336         Update the selection area in case one does not exist for this tree element.
1337         The indicator for forced pseudo classes is a pseudo element of the selection area.
1338
1339         (WebInspector.DOMTreeElement.prototype.updateSelection): Renamed.
1340         (WebInspector.DOMTreeElement.prototype.onexpand):
1341         (WebInspector.DOMTreeElement.prototype.oncollapse):
1342         Remove redundant calls to updateSelection(). This is already called in
1343         updateTitle().
1344
1345         * UserInterface/Views/DOMTreeOutline.css:
1346         (.tree-outline.dom):
1347         (.tree-outline.dom li.hovered:not(.selected) .selection-area):
1348         (.tree-outline.dom li .selection-area):
1349         (.tree-outline.dom li.selected .selection-area):
1350         (.tree-outline.dom li.elements-drag-over .selection-area):
1351         (.tree-outline.dom:focus li.selected .selection-area):
1352         (.tree-outline.dom li.pseudo-class-enabled > .selection-area::before):
1353         (.tree-outline.dom:focus li.selected.pseudo-class-enabled > .selection-area::before):
1354         (.tree-outline.dom li.hovered:not(.selected) .selection): Deleted.
1355         (.tree-outline.dom li .selection): Deleted.
1356         (.tree-outline.dom li.selected .selection): Deleted.
1357         (.tree-outline.dom li.elements-drag-over .selection): Deleted.
1358         (.tree-outline.dom:focus li.selected .selection): Deleted.
1359         (.tree-outline.dom li.pseudo-class-enabled > .selection::before): Deleted.
1360         (.tree-outline.dom:focus li.selected.pseudo-class-enabled > .selection::before): Deleted.
1361         Rename the selector to be less ambiguous.
1362
1363         * UserInterface/Views/DOMTreeOutline.js:
1364         (WebInspector.DOMTreeOutline.prototype.updateSelection): Simplify. The call
1365         to update the selection area will bail out if there is nothing to be done.
1366
1367         (WebInspector.DOMTreeOutline.prototype.findTreeElement):
1368         (WebInspector.DOMTreeOutline.prototype._onmousemove):
1369         (WebInspector.DOMTreeOutline.prototype._onmouseout):
1370         Clean up and use let and arrow functions.
1371
1372         (WebInspector.DOMTreeOutline.prototype._ondragover):
1373         (WebInspector.DOMTreeOutline.prototype._clearDragOverTreeElementMarker):
1374         Clear the dragging element before updating the selection area since it looks at
1375         the dragging element to determine whether anything needs to be done.
1376
1377         * UserInterface/Views/FormattedValue.css:
1378         (.formatted-node > .tree-outline.dom li.hovered:not(.selected) .selection-area):
1379         (.formatted-node > .tree-outline.dom li.hovered:not(.selected) .selection): Deleted.
1380         Rename the selector to be less ambiguous.
1381
1382 2016-06-08  Brian Burg  <bburg@apple.com>
1383
1384         Uncaught Exception in TimelineDataGrid._updatePopoverForSelectedNode()
1385         https://bugs.webkit.org/show_bug.cgi?id=158502
1386         <rdar://problem/26687038>
1387
1388         Reviewed by Joseph Pecoraro.
1389
1390         * UserInterface/Views/TimelineDataGrid.js:
1391         (WebInspector.TimelineDataGrid.prototype._updatePopoverForSelectedNode):
1392         It appears that this expression was moved around since it accesses
1393         targetFrame before it's initialized. Check rect.size.height directly.
1394
1395 2016-06-08  Brian Burg  <bburg@apple.com>
1396
1397         Web Inspector: reduce redundant attribute modification updates in DOMTreeUpdater and DOMTreeElement
1398         https://bugs.webkit.org/show_bug.cgi?id=158504
1399         <rdar://problem/25561452>
1400
1401         Reviewed by Timothy Hatcher.
1402
1403         When the frontend gets lots of DOM.attributeModified events, it forwards these on to
1404         DOMTreeUpdater, which pushes a record for every single modification. It then updates
1405         the DOM elements with the attibute changes on an animation frame. However, since it
1406         doesn't do any deduplication of the modification records, a lot of time is wasted
1407         on updating DOMTreeElements with intermediate (non-final) attribute values.
1408
1409         This patch rewrites DOMTreeUpdater to precisely track which nodes and attributes
1410         of each node need to be updated on the next animation frame. This is done using
1411         Sets and Maps that only hold onto the most recent attribute values rather than
1412         pushing a record object for every single mutation.
1413
1414         This improves the performance of the Elements tab on an SVG particle simulator
1415         dramatically so that the Inspector will not immediately hang. It still only achieves
1416         a few updates per second in this case, so there is still optimization to be done on
1417         the frontend and throttling to be done on the backend.
1418
1419         * UserInterface/Views/DOMTreeElement.js:
1420         (WebInspector.DOMTreeElement):
1421         (WebInspector.DOMTreeElement.prototype.attributeDidChange):
1422         (WebInspector.DOMTreeElement.prototype._buildAttributeDOM):
1423         (WebInspector.DOMTreeElement.prototype._markNodeChanged):
1424         (WebInspector.DOMTreeElement.prototype._nodeChangedAnimationEnd):
1425         (WebInspector.DOMTreeElement.prototype._fireDidChange):
1426         (WebInspector.DOMTreeElement.prototype.nodeStateChanged): Deleted.
1427         Simplify the list of modified attributes a little bit. This still uses a worklist
1428         approach, so it's possible that duplicate updates for the same attribute could accumulate
1429         if DOMTreeUpdater pushes updates faster than DOMTreeElement can render them.
1430
1431         * UserInterface/Views/DOMTreeUpdater.js:
1432         (WebInspector.DOMTreeUpdater):
1433         (WebInspector.DOMTreeUpdater.prototype._attributesUpdated):
1434         (WebInspector.DOMTreeUpdater.prototype._characterDataModified):
1435         (WebInspector.DOMTreeUpdater.prototype._nodeAttributeModified):
1436         (WebInspector.DOMTreeUpdater.prototype._nodeInserted):
1437         (WebInspector.DOMTreeUpdater.prototype._nodeRemoved):
1438         (WebInspector.DOMTreeUpdater.prototype._childNodeCountUpdated):
1439         (WebInspector.DOMTreeUpdater.prototype._updateModifiedNodes):
1440         (WebInspector.DOMTreeUpdater.prototype._reset):
1441         Rewrite this class to separately track insertions, deletions, and modifications. Use
1442         Sets and Maps so redundant entries are not kept around. Split the main work loop
1443         and use fewer enum-like properties to control how each DOM element change is handled.
1444
1445         Attempt to update all inserted children before modifying their attributes. This
1446         wasn't done previously, but enough duplicate attribute modifications occurred that
1447         usually some of them would be processed after being added to the tree. There is only
1448         one chance to do this now.
1449
1450 2016-06-08  Nikita Vasilyev  <nvasilyev@apple.com>
1451
1452         REGRESSION (r158219): Web Inspector: Border under the default Timeline content view is too thick
1453         https://bugs.webkit.org/show_bug.cgi?id=158533
1454
1455         Reviewed by Timothy Hatcher.
1456
1457         * UserInterface/Views/OverviewTimelineView.css:
1458         (.timeline-view.overview > .data-grid th): Deleted.
1459
1460 2016-06-08  Timothy Hatcher  <timothy@apple.com>
1461
1462         Web Inspector: Command-W should not close Web Inspector tabs; it should close the window
1463         https://bugs.webkit.org/show_bug.cgi?id=158538
1464         rdar://problem/26699215
1465
1466         Reviewed by Brian Burg.
1467
1468         * UserInterface/Views/TabBrowser.js:
1469         (WebInspector.TabBrowser): Change shortcut to Command-Shift-W.
1470
1471 2016-06-07  Brian Burg  <bburg@apple.com>
1472
1473         Web Inspector: reduce timer churn when processing many DOM.attributeModified messages
1474         https://bugs.webkit.org/show_bug.cgi?id=158491
1475         <rdar://problem/25561452>
1476
1477         Reviewed by Timothy Hatcher.
1478
1479         When the backend sends thousands of DOM.attributeModified events to the frontend, it
1480         slows to a crawl. This is partly because redundant messages are being sent, and
1481         because the frontend is taking too long to render attribute updates in the elements tab.
1482
1483         This patch is a first step to improve performance by reducing unnecessary work. It
1484         coalesces all attribute state updates to only happen once per animation frame. This
1485         reduces timer churn because we previously used a debouncing timer with interval of 0ms,
1486         and that had to be cleared and restarted on every call. This change also eliminates
1487         forced layouts when updating the selection highlights, since the DOM tree outline has
1488         been reflowed by the time we start updating selections in a requestAnimationFrame callback.
1489
1490         There is still a lot of optimization to be done here, but this reduces the problem
1491         considerably by keeping the event loop clear and making it obvious which selection
1492         update operations are still too expensive.
1493
1494         * UserInterface/Base/Utilities.js:
1495         Add a 'onNextFrame' proxy to Object. It works like debounce, except it coalesces calls
1496         up until the next animation frame rather than a fixed timeout. It also does not extend
1497         the timeout interval for each call.
1498
1499         * UserInterface/Views/DOMTreeUpdater.js:
1500         (WebInspector.DOMTreeUpdater.prototype._attributesUpdated):
1501         (WebInspector.DOMTreeUpdater.prototype._characterDataModified):
1502         (WebInspector.DOMTreeUpdater.prototype._nodeInserted):
1503         (WebInspector.DOMTreeUpdater.prototype._nodeRemoved):
1504         (WebInspector.DOMTreeUpdater.prototype._updateModifiedNodes):
1505         Update on the next frame rather than on a zero delay timeout.
1506
1507         * UserInterface/Views/TreeOutline.js:
1508         (WebInspector.TreeOutline.WebInspector.TreeElement.prototype.didChange):
1509         (WebInspector.TreeOutline.WebInspector.TreeElement.prototype._fireDidChange):
1510         Update on the next frame rather than on a zero delay timeout.
1511
1512 2016-06-07  Nikita Vasilyev  <nvasilyev@apple.com>
1513
1514         REGRESSION (r158219): Web Inspector: Border under Memory content view is too thick
1515         https://bugs.webkit.org/show_bug.cgi?id=158495
1516         <rdar://problem/26683428>
1517
1518         Reviewed by Timothy Hatcher.
1519
1520         * UserInterface/Views/MemoryTimelineView.css:
1521         (.timeline-view.memory): Deleted.
1522
1523 2016-06-07  Brian Burg  <bburg@apple.com>
1524
1525         Web Inspector: add a keyboard shortcut to open the new tab tab
1526         https://bugs.webkit.org/show_bug.cgi?id=158365
1527         <rdar://problem/26631897>
1528
1529         Unreviewed, fix a typo introduced in r201692.
1530         This caused the new tab button to stop working.
1531
1532         * UserInterface/Base/Main.js:
1533         (WebInspector._updateNewTabButtonState):
1534
1535 2016-06-05  Matt Baker  <mattbaker@apple.com>
1536
1537         REGRESSION (r201686): Web Inspector: Fix typo causing an internal error
1538         https://bugs.webkit.org/show_bug.cgi?id=158392
1539         <rdar://problem/26640467>
1540
1541         Reviewed by Joseph Pecoraro.
1542
1543         * UserInterface/Views/HeapAllocationsTimelineOverviewGraph.js:
1544         Fixed typo.
1545
1546 2016-06-04  Brian Burg  <bburg@apple.com>
1547
1548         Web Inspector: add a keyboard shortcut to open the new tab tab
1549         https://bugs.webkit.org/show_bug.cgi?id=158365
1550         <rdar://problem/26631897>
1551
1552         Reviewed by Timothy Hatcher.
1553
1554         Make Cmd-t show the new tab tab if it's not already open and
1555         there is at least one tab type that's not currently in the tab bar.
1556
1557         * UserInterface/Base/Main.js:
1558         (WebInspector.contentLoaded):
1559         (WebInspector._updateNewTabButtonState):
1560         (WebInspector.showNewTabTab):
1561         (WebInspector.isNewTabWithTypeAllowed):
1562         Clean up the code that decides whether we can show the new tab tab.
1563         It is now a special case inside WebInspector.isNewTabWithTypeAllowed.
1564
1565         * UserInterface/Views/NewTabContentView.js:
1566         (WebInspector.NewTabContentView.prototype._updateShownTabs):
1567         Use Array.from.
1568
1569 2016-06-04  Matt Baker  <mattbaker@apple.com>
1570
1571         Web Inspector: discontinuous recordings should have discontinuities in the timeline memory graph
1572         https://bugs.webkit.org/show_bug.cgi?id=158052
1573         <rdar://problem/26516695>
1574
1575         Reviewed by Joseph Pecoraro.
1576
1577         Add gaps to the overview and category line charts where discontinuities
1578         exist in the timeline recording.
1579
1580         * UserInterface/Models/Timeline.js:
1581         (WebInspector.Timeline.prototype.recordsInTimeRange):
1582         Replaces `_visibleRecords` methods found in various views.
1583
1584         * UserInterface/Models/TimelineRecording.js:
1585         (WebInspector.TimelineRecording.prototype.reset):
1586         (WebInspector.TimelineRecording.prototype.addDiscontinuity):
1587         (WebInspector.TimelineRecording.prototype.discontinuitiesInTimeRange):
1588         Allow discontinuities to be added to the recording, and have a means to
1589         look up gaps within a time range.
1590
1591         * UserInterface/Views/HeapAllocationsTimelineOverviewGraph.js:
1592         (WebInspector.HeapAllocationsTimelineOverviewGraph.prototype._visibleRecords): Deleted.
1593         Replaced by Timeline helper method.
1594
1595         * UserInterface/Views/MemoryTimelineOverviewGraph.js:
1596         (WebInspector.MemoryTimelineOverviewGraph.prototype.layout.insertDiscontinuity):
1597         (WebInspector.MemoryTimelineOverviewGraph.prototype.layout):
1598         Insert zero-points into the chart at discontinuity boundaries to create
1599         gaps. Data points for records immediately before or after a gap are extended
1600         to the edge of the discontinuity.
1601
1602         (WebInspector.MemoryTimelineOverviewGraph.prototype._visibleRecords): Deleted.
1603         Replaced by Timeline helper method.
1604
1605         * UserInterface/Views/MemoryTimelineView.js:
1606         (WebInspector.MemoryTimelineView.prototype.layout):
1607         Insert zero-points into each category chart at discontinuity boundaries
1608         to create gaps.
1609
1610         Insert zero-points into the chart to create gaps.
1611         (WebInspector.MemoryTimelineView.prototype._visibleRecords): Deleted.
1612         Replaced by Timeline helper method.
1613
1614         * UserInterface/Views/TimelineOverview.js:
1615         (WebInspector.TimelineOverview.prototype.discontinuitiesInTimeRange):
1616         Forward to the TimelineRecording, which isn't exposed to clients.
1617
1618         * UserInterface/Views/TimelineRecordingContentView.js:
1619         (WebInspector.TimelineRecordingContentView):
1620         (WebInspector.TimelineRecordingContentView.prototype._capturingStarted):
1621         (WebInspector.TimelineRecordingContentView.prototype._capturingStopped):
1622         (WebInspector.TimelineRecordingContentView.prototype._recordingReset):
1623         Track discontinuities (recording stop followed by a start) and add them
1624         to the current recording.
1625
1626 2016-06-03  Brian Burg  <bburg@apple.com>
1627
1628         Web Inspector: add a keyboard shortcut to close the current tab bar item
1629         https://bugs.webkit.org/show_bug.cgi?id=158363
1630         <rdar://problem/22677254>
1631
1632         Reviewed by Timothy Hatcher.
1633
1634         Make Cmd-w close the current tab. This matches Safari's keyboard shortcut.
1635
1636         * UserInterface/Views/TabBrowser.js:
1637         (WebInspector.TabBrowser):
1638         Don't do anything if the New Tab tab is the only tab bar item besides the
1639         pinned "new tab" button.
1640
1641 2016-06-03  Brian Burg  <bburg@apple.com>
1642
1643         Web Inspector: setter for debugging flag InspectorBackend.dumpInspectorTimeStats does not work
1644         https://bugs.webkit.org/show_bug.cgi?id=158366
1645
1646         Reviewed by Timothy Hatcher.
1647
1648         * UserInterface/Protocol/InspectorBackend.js:
1649         (InspectorBackendClass.prototype.set dumpInspectorTimeStats):
1650         Actually update the backing member when the setter is called.
1651
1652 2016-06-03  Nikita Vasilyev  <nvasilyev@apple.com>
1653
1654         Web Inspector: Remove unused WebInspector.CSSCompletions methods
1655         https://bugs.webkit.org/show_bug.cgi?id=158352
1656
1657         Reviewed by Joseph Pecoraro.
1658
1659         * UserInterface/Models/CSSCompletions.js:
1660         (WebInspector.CSSCompletions.prototype.firstStartsWith): Deleted.
1661         (WebInspector.CSSCompletions.prototype.isLonghandPropertyName): Deleted.
1662         (WebInspector.CSSCompletions.prototype.longhandsForShorthand): Deleted.
1663
1664 2016-06-03  Joseph Pecoraro  <pecoraro@apple.com>
1665
1666         Web Inspector: Update NativeFunctionParameters (FontFaceSet, HTMLSlotElement, EventTarget)
1667         https://bugs.webkit.org/show_bug.cgi?id=158333
1668
1669         Reviewed by Brian Burg.
1670
1671         * UserInterface/Models/NativeFunctionParameters.js:
1672         Replace FontLoader with FontFaceSet. Add HTMLSlotElement API.
1673         EventTarget is now actually in the prototype chain, so add it as
1674         a first class citizen and keep mixing it in for legacy backends.
1675
1676 2016-06-02  Joseph Pecoraro  <pecoraro@apple.com>
1677
1678         Web Inspector: Modernize Array.prototype.every/some callsites to arrow functions
1679         https://bugs.webkit.org/show_bug.cgi?id=158330
1680
1681         Reviewed by Brian Burg.
1682
1683         * UserInterface/Controllers/DOMTreeManager.js:
1684         (WebInspector.DOMTreeManager.prototype._updateContentFlowFromPayload):
1685         * UserInterface/Models/ProfileNode.js:
1686         (WebInspector.ProfileNode):
1687         * UserInterface/Models/ScopeChainNode.js:
1688         (WebInspector.ScopeChainNode):
1689         * UserInterface/Models/StackTrace.js:
1690         (WebInspector.StackTrace):
1691         * UserInterface/Models/StructureDescription.js:
1692         (WebInspector.StructureDescription):
1693         * UserInterface/Models/TypeDescription.js:
1694         (WebInspector.TypeDescription):
1695         * UserInterface/Protocol/InspectorBackend.js:
1696         (InspectorBackend.Command.prototype.supports):
1697         * UserInterface/Views/ContentViewContainer.js:
1698         (WebInspector.ContentViewContainer.prototype.showContentView):
1699         * UserInterface/Views/NavigationSidebarPanel.js:
1700         (WebInspector.NavigationSidebarPanel.prototype._checkElementsForPendingViewStateCookie.treeElementMatchesCookie):
1701         (WebInspector.NavigationSidebarPanel.prototype._checkElementsForPendingViewStateCookie):
1702         * UserInterface/Views/ScopeBar.js:
1703         (WebInspector.ScopeBar.prototype.get selectedItems):
1704         (WebInspector.ScopeBar.prototype.hasNonDefaultItemSelected):
1705         * UserInterface/Views/TabContentView.js:
1706         (WebInspector.TabContentView):
1707         (WebInspector.TabContentView.console.assert): Deleted.
1708
1709 2016-06-02  Joseph Pecoraro  <pecoraro@apple.com>
1710
1711         Web Inspector: Modernize some function expressions that bind(this) to arrow functions
1712         https://bugs.webkit.org/show_bug.cgi?id=158315
1713
1714         Reviewed by Brian Burg.
1715
1716         Convert a common "function(x) { ... }.bind(this)" pattern to use arrow
1717         functions "(x) => { ... }", which lexically binds `this`, slightly faster,
1718         and uses less memory.
1719
1720         * UserInterface/Base/Main.js:
1721         (WebInspector._updateNewTabButtonState):
1722         * UserInterface/Controllers/BreakpointPopoverController.js:
1723         (WebInspector.BreakpointPopoverController.prototype._createPopoverContent):
1724         * UserInterface/Controllers/TypeTokenAnnotator.js:
1725         (WebInspector.TypeTokenAnnotator.prototype.insertAnnotations):
1726         (WebInspector.TypeTokenAnnotator.prototype.insertAnnotations.): Deleted.
1727         * UserInterface/Models/RenderingFrameTimelineRecord.js:
1728         (WebInspector.RenderingFrameTimelineRecord.prototype._calculateDurationRemainder):
1729         (WebInspector.RenderingFrameTimelineRecord):
1730         * UserInterface/Models/Resource.js:
1731         (WebInspector.Resource.prototype.requestContent):
1732         * UserInterface/Models/Script.js:
1733         (WebInspector.Script.prototype.requestScriptSyntaxTree):
1734         (WebInspector.Script.prototype.requestScriptSyntaxTree.makeSyntaxTreeAndCallCallback): Deleted.
1735         * UserInterface/Models/SourceCodeLocation.js:
1736         (WebInspector.SourceCodeLocation.prototype.populateLiveDisplayLocationString):
1737         * UserInterface/Models/WrappedPromise.js:
1738         (WebInspector.WrappedPromise):
1739         * UserInterface/Views/BreakpointActionView.js:
1740         (WebInspector.BreakpointActionView.prototype._updateBody):
1741         * UserInterface/Views/BreakpointTreeElement.js:
1742         (WebInspector.BreakpointTreeElement.prototype._dataUpdated):
1743         * UserInterface/Views/CSSStyleDeclarationTextEditor.js:
1744         (WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkers.update):
1745         (WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkers):
1746         * UserInterface/Views/DefaultDashboardView.js:
1747         (WebInspector.DefaultDashboardView.prototype._appendElementForNamedItem.set item):
1748         (WebInspector.DefaultDashboardView.prototype._appendElementForNamedItem):
1749         * UserInterface/Views/ErrorObjectView.js:
1750         (WebInspector.ErrorObjectView.prototype.update):
1751         * UserInterface/Views/GeneralTreeElement.js:
1752         (WebInspector.GeneralTreeElement.prototype.onattach):
1753         (WebInspector.GeneralTreeElement.prototype.onattach.this._boundContextMenuEventHandler): Deleted.
1754         * UserInterface/Views/InlineSwatch.js:
1755         (WebInspector.InlineSwatch.prototype._getNextValidHEXFormat):
1756         (WebInspector.InlineSwatch):
1757         * UserInterface/Views/LayerTreeDetailsSidebarPanel.js:
1758         (WebInspector.LayerTreeDetailsSidebarPanel.prototype.refresh):
1759         (WebInspector.LayerTreeDetailsSidebarPanel.prototype._showPopoverForSelectedNode):
1760         (WebInspector.LayerTreeDetailsSidebarPanel.prototype._contentForPopover):
1761         * UserInterface/Views/LogContentView.js:
1762         (WebInspector.LogContentView.prototype._mouseup):
1763         * UserInterface/Views/NavigationSidebarPanel.js:
1764         (WebInspector.NavigationSidebarPanel.prototype._checkElementsForPendingViewStateCookie):
1765         * UserInterface/Views/ObjectTreeBaseTreeElement.js:
1766         (WebInspector.ObjectTreeBaseTreeElement.prototype.createGetterElement):
1767         (WebInspector.ObjectTreeBaseTreeElement.prototype.createGetterElement.): Deleted.
1768         * UserInterface/Views/ObjectTreePropertyTreeElement.js:
1769         (WebInspector.ObjectTreePropertyTreeElement.prototype._updateEntries):
1770         * UserInterface/Views/ObjectTreeView.js:
1771         (WebInspector.ObjectTreeView.prototype._updateEntries):
1772         * UserInterface/Views/ResourceDetailsSidebarPanel.js:
1773         (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshImageSizeSection):
1774         * UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
1775         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._addWatchExpressionButtonClicked):
1776         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._objectTreeElementAddContextMenuItems):
1777         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._addWatchExpressionButtonClicked.this._codeMirror.addKeyMap): Deleted.
1778         * UserInterface/Views/TabBar.js:
1779         * UserInterface/Views/VisualStylePropertyEditor.js:
1780         (WebInspector.VisualStylePropertyEditor.prototype._checkDependencies):
1781
1782 2016-05-31  Nikita Vasilyev  <nvasilyev@apple.com>
1783
1784         Web Inspector: Storage DataGrids have a half-pixel transparent/white border below the header
1785         https://bugs.webkit.org/show_bug.cgi?id=156699
1786         <rdar://problem/25778260>
1787
1788         Reviewed by Timothy Hatcher.
1789
1790         Increase the width of the border below the DataGrid's header to match the border in the left sidebar.
1791
1792         * UserInterface/Views/DataGrid.css:
1793         (.data-grid > .header-wrapper):
1794
1795 2016-05-31  Nikita Vasilyev  <nvasilyev@apple.com>
1796
1797         Web Inspector: Snapshot List scroll bar occludes border of containing view in top-right
1798         https://bugs.webkit.org/show_bug.cgi?id=158219
1799         <rdar://problem/26545018>
1800
1801         Reviewed by Timothy Hatcher.
1802
1803         * UserInterface/Views/TimelineDataGrid.css:
1804         (.data-grid.timeline th): Deleted.
1805         * UserInterface/Views/TimelineRecordingContentView.css:
1806         (.content-view.timeline-recording > .content-browser > .navigation-bar):
1807         Make the border line span across the whole navigation bar, not just its table cells.
1808
1809 2016-05-30  Brian Burg  <bburg@apple.com>
1810
1811         Web Inspector: Timelines: "-0.000ms" in Self Time
1812         https://bugs.webkit.org/show_bug.cgi?id=158162
1813         <rdar://problem/26523350>
1814
1815         Reviewed by Darin Adler.
1816
1817         Values such as -0.0000 and +0.00001 seem to indicate there is
1818         some floating point error accumulating in profile node data.
1819         Since the sampling profiler isn't accurate to that precision,
1820         let's clean up the data so near-zero numbers are simply zero.
1821
1822         * UserInterface/Models/ProfileNode.js:
1823         Round selfTime down to zero if it's less than the
1824         smallest value we would show in the user interface.
1825
1826 2016-05-30  Brian Burg  <bburg@apple.com>
1827
1828         Web Inspector: Uncaught exception page should pre-populate the bug's URL with the inspected page URL
1829         https://bugs.webkit.org/show_bug.cgi?id=158055
1830         <rdar://problem/26516693>
1831
1832         Reviewed by Saam Barati.
1833
1834         * UserInterface/Debug/UncaughtExceptionReporter.js:
1835         Include the encoded URL in the query string if it is not empty.
1836
1837 2016-05-30  Matt Baker  <mattbaker@apple.com>
1838
1839         Web Inspector: Right-clicking in Snapshot's DataGrid throws an exception
1840         https://bugs.webkit.org/show_bug.cgi?id=157934
1841         <rdar://problem/26380910>
1842
1843         Reviewed by Brian Burg.
1844
1845         Check that click event target is actually a cell, as it can be a row
1846         when focusing the table after dismissing a popup menu.
1847
1848         * UserInterface/Views/DataGrid.js:
1849         (WebInspector.DataGridNode.prototype.isEventWithinDisclosureTriangle):
1850
1851 2016-05-27  Joseph Pecoraro  <pecoraro@apple.com>
1852
1853         Web Inspector: Not all transitively dominated nodes display their retained size
1854         https://bugs.webkit.org/show_bug.cgi?id=158174
1855
1856         Reviewed by Timothy Hatcher.
1857
1858         * UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
1859         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._isDominatedByNonBaseParent):
1860         Use the parent reference changing in the loop instead of always using the same parent.
1861
1862 2016-05-27  Devin Rousso  <dcrousso+webkit@gmail.com>
1863
1864         Web Inspector: Add indicators to show nesting levels inside DOM Tree
1865         https://bugs.webkit.org/show_bug.cgi?id=157468
1866         <rdar://problem/26162640>
1867
1868         Reviewed by Timothy Hatcher.
1869
1870         Add CSS rules to give all expanded node children lists a small line on the
1871         left border indicating that all items under the line are descendants.
1872
1873         * UserInterface/Views/DOMTreeOutline.css:
1874         (.tree-outline.dom li .selection):
1875         (.tree-outline.dom li > span):
1876         (.tree-outline.dom ol):
1877         (.tree-outline.dom .tree-outline.dom li:matches(.hovered, .selected) + ol.children.expanded):
1878         (.tree-outline.dom li.selected + ol.children.expanded):
1879         (.tree-outline.dom li.parent::before):
1880
1881 2016-05-26  Matt Baker  <mattbaker@apple.com>
1882
1883         Uncaught Exception: TypeError: undefined is not an object (evaluating 'records[endIndex].endTime')
1884         https://bugs.webkit.org/show_bug.cgi?id=158057
1885
1886         Reviewed by Timothy Hatcher.
1887
1888         * UserInterface/Views/TimelineRecordingContentView.js:
1889         (WebInspector.TimelineRecordingContentView.prototype._updateTimelineViewTimes):
1890         When the entire recording is selected, rendering frames should use the
1891         record count as its end time instead of the recording's end time.
1892
1893 2016-05-25  Joseph Pecoraro  <pecoraro@apple.com>
1894
1895         Web Inspector: Uncaught Exception: TypeError: undefined is not an object (evaluating 'collectionData.affectedSnapshots')
1896         https://bugs.webkit.org/show_bug.cgi?id=158051
1897
1898         Reviewed by Brian Burg.
1899
1900         * UserInterface/Workers/HeapSnapshot/HeapSnapshot.js:
1901         (HeapSnapshot.prototype.updateDeadNodesAndGatherCollectionData):
1902         * UserInterface/Workers/HeapSnapshot/HeapSnapshotWorker.js:
1903         (HeapSnapshotWorker.prototype.createSnapshot):
1904         If by the time the timeout fires we had cleared our snapshot list, then
1905         updateDeadNodesAndGatherCollectionData could bail. Handle gracefully.
1906
1907 2016-05-23  Nikita Vasilyev  <nvasilyev@apple.com>
1908
1909         Web Inspector: Split console navigation bar doesn't wrap as expected
1910         https://bugs.webkit.org/show_bug.cgi?id=157950
1911         <rdar://problem/26395573>
1912
1913         Reviewed by Timothy Hatcher.
1914
1915         * UserInterface/Views/Main.css:
1916         (#split-content-browser > .navigation-bar .item):
1917         Fix the split console and don't touch any other navigation bars.
1918
1919 2016-05-22  Brady Eidson  <beidson@apple.com>
1920
1921         Move to C++14.
1922         https://bugs.webkit.org/show_bug.cgi?id=157948
1923
1924         Reviewed by Michael Catanzaro.
1925
1926         * Configurations/Base.xcconfig:
1927
1928 2016-05-21  Matt Baker  <mattbaker@apple.com>
1929
1930         Web Inspector: Creating the CSSStyleDetailsSidebarPanel takes about 50ms (20%) of main load
1931         https://bugs.webkit.org/show_bug.cgi?id=156707
1932         <rdar://problem/25780404>
1933
1934         Reviewed by Timothy Hatcher.
1935
1936         This patch adds new View concepts, `initialLayout` and `widthDidChange`,
1937         making it possible for hidden views to postpone the creation of their
1938         UI subtree until they are shown for the first time.
1939
1940         Sidebar panels get this performance improvement by virtue of SidebarPanel
1941         and StyleDetailsPanel, which trigger a layout when shown. This can be
1942         removed once <https://webkit.org/b/150741> is fixed, and this is done
1943         automatically by View.
1944
1945         * UserInterface/Views/CSSStyleDeclarationTextEditor.js:
1946         (WebInspector.CSSStyleDeclarationTextEditor):
1947         Should subclass View.
1948         (WebInspector.CSSStyleDeclarationTextEditor.prototype.layout):
1949         (WebInspector.CSSStyleDeclarationTextEditor.prototype.get element): Deleted.
1950         Handled in View base class.
1951         (WebInspector.CSSStyleDeclarationTextEditor.prototype.updateLayout): Deleted.
1952         Relocate to `layout` override, ignore unused parameter `force`.
1953
1954         * UserInterface/Views/CSSStyleDetailsSidebarPanel.js:
1955         (WebInspector.CSSStyleDetailsSidebarPanel):
1956         Create the minimum required initial state and UI elements. Relocate
1957         anything that can be lazy loaded to `initialLayout`.
1958
1959         (WebInspector.CSSStyleDetailsSidebarPanel.prototype.initialLayout):
1960         (WebInspector.CSSStyleDetailsSidebarPanel.prototype.sizeDidChange):
1961         (WebInspector.CSSStyleDetailsSidebarPanel.prototype.widthDidChange): Deleted.
1962
1963         * UserInterface/Views/ComputedStyleDetailsPanel.js:
1964         (WebInspector.ComputedStyleDetailsPanel):
1965         Relocate anything that can be lazy loaded to `initialLayout`.
1966         (WebInspector.ComputedStyleDetailsPanel.prototype.initialLayout):
1967         (WebInspector.ComputedStyleDetailsPanel.prototype.shown): Deleted.
1968         (WebInspector.ComputedStyleDetailsPanel.prototype.widthDidChange): Deleted.
1969         Handled in View base class.
1970
1971         * UserInterface/Views/DataGrid.js:
1972         (WebInspector.DataGrid.prototype.layout):
1973         Resize logic can be safely moved to `sizeDidChange`, since columns are
1974         always initialized when the width changes.
1975         (WebInspector.DataGrid.prototype.sizeDidChange):
1976         Reposition headers, scrollbars.
1977         (WebInspector.DataGrid.prototype._updateHeaderAndScrollbar):
1978         Broke out header repositioning, which needs to be called whenever
1979         column widths are initialized or the view size changes.
1980
1981         * UserInterface/Views/NavigationBar.js:
1982         (WebInspector.NavigationBar.prototype.layout):
1983
1984         * UserInterface/Views/RulesStyleDetailsPanel.js:
1985         (WebInspector.RulesStyleDetailsPanel.prototype.sizeDidChange):
1986         (WebInspector.RulesStyleDetailsPanel.prototype.widthDidChange): Deleted.
1987
1988         * UserInterface/Views/Sidebar.js:
1989         (WebInspector.Sidebar.prototype._recalculateWidth):
1990         Width changes need to be coordinated by the View base class, since the
1991         initial layout must have occurred before handling a width change.
1992         Force a layout with a resize layout reason.
1993
1994         * UserInterface/Views/SidebarPanel.js:
1995         (WebInspector.SidebarPanel.prototype.get displayName):
1996         Drive-by style fix: add getter so that CSSStyleDetailsSidebarPanel
1997         doesn't have to read the private property directly.
1998
1999         (WebInspector.SidebarPanel.prototype.shown):
2000         Force a layout whenever the panel is shown.
2001         (WebInspector.SidebarPanel.prototype.sizeDidChange):
2002         (WebInspector.SidebarPanel):
2003         (WebInspector.SidebarPanel.prototype.widthDidChange): Deleted.
2004
2005         * UserInterface/Views/StyleDetailsPanel.js:
2006         (WebInspector.StyleDetailsPanel.prototype.shown):
2007         Schedule a layout when shown. A forced layout isn't necessary.
2008         Unlike SidebarPanels, the initial state of style panels doesn't depend
2009         on its layout, and can be safely initialized by the next rAF.
2010
2011         (WebInspector.StyleDetailsPanel.prototype.hidden):
2012         Cancel a pending layout if the panel is hidden before the next AF.
2013         (WebInspector.StyleDetailsPanel.prototype.widthDidChange): Deleted.
2014         Not needed, defined in View base class.
2015
2016         * UserInterface/Views/TimelineOverview.js:
2017         (WebInspector.TimelineOverview.prototype.sizeDidChange):
2018         (WebInspector.TimelineOverview.prototype.layout):
2019         Moved resize logic to `sizeDidChange`.
2020
2021         * UserInterface/Views/TimelineRuler.js:
2022         (WebInspector.TimelineRuler.prototype.sizeDidChange):
2023         (WebInspector.TimelineRuler.prototype.layout):
2024         Moved resize logic to `sizeDidChange`.
2025
2026         * UserInterface/Views/View.js:
2027         (WebInspector.View):
2028         (WebInspector.View.prototype.updateLayout):
2029         (WebInspector.View.prototype.cancelLayout):
2030         Allow a pending layout to be canceled. Useful when a view with a
2031         pending layout is hidden before the layout occurs.
2032
2033         (WebInspector.View.prototype.get layoutReason):
2034         Protected getter for subclasses that need to check the layout reason
2035         outside `sizeDidChange`.
2036
2037         (WebInspector.View.prototype.initialLayout):
2038         Subclass hook to create UI subtree the first time a layout occurs.
2039         Called only once during the lifetime of the View.
2040
2041         (WebInspector.View.prototype.layout):
2042         Drive-by comment fix.
2043         (WebInspector.View.prototype.sizeDidChange):
2044         New layout cycle hook for subclasses.
2045         (WebInspector.View.prototype._layoutSubtree):
2046         Do an initial layout the first time layout is called.
2047         Call the `sizeDidChange` hook so that subclasses can update state
2048         which depends on size/position before doing layout.
2049
2050         * UserInterface/Views/VisualStyleDetailsPanel.js:
2051         (WebInspector.VisualStyleDetailsPanel):
2052         Create the minimum required initial state and UI elements. Relocate
2053         anything that can be lazy loaded to `initialLayout`.
2054
2055         (WebInspector.VisualStyleDetailsPanel.prototype.refresh):
2056         No changes, shifting line numbers confused the diff.
2057         (WebInspector.VisualStyleDetailsPanel.prototype.initialLayout):
2058         (WebInspector.VisualStyleDetailsPanel.prototype.sizeDidChange):
2059         (WebInspector.VisualStyleDetailsPanel.prototype.widthDidChange): Deleted.
2060
2061 2016-05-21  Matt Baker  <mattbaker@apple.com>
2062
2063         Assertion Failed: StyleDetailsPanel.markAsNeedsRefresh() called with null domNode
2064         https://bugs.webkit.org/show_bug.cgi?id=157955
2065         <rdar://problem/26398943>
2066
2067         Reviewed by Timothy Hatcher.
2068
2069         CSSStyleDetailsSidebarPanel `visible` is true while the panel is being
2070         removed from the details sidebar, even after calling `hidden()`. This
2071         causes it to refresh its current StyleDetailsPanel with a null DOM node.
2072
2073         Unfortunately, SidebarPanel.visible isn't toggled by calling shown/hidden.
2074         Since SidebarPanel.visible is only true if the panel is selected, we should
2075         deselect panels before removing them.
2076
2077         * UserInterface/Views/Sidebar.js:
2078         (WebInspector.Sidebar.prototype.removeSidebarPanel):
2079         Deselect the panel being removed before calling visibiltyDidChange.
2080
2081         * UserInterface/Views/SidebarPanel.js:
2082         (WebInspector.SidebarPanel.prototype.toggle): Deleted.
2083         (WebInspector.SidebarPanel.prototype.willRemove): Deleted.
2084         Drive-by update to remove some unused methods.
2085
2086 2016-05-20  Joseph Pecoraro  <pecoraro@apple.com>
2087
2088         REGRESSION(r200740): Web Inspector: TimelineRecordBar class lists not properly cleared, bleeding colors when zooming in and out
2089         https://bugs.webkit.org/show_bug.cgi?id=157959
2090         <rdar://problem/26393067>
2091
2092         Reviewed by Brian Burg.
2093
2094         * UserInterface/Views/TimelineRecordBar.js:
2095         (WebInspector.TimelineRecordBar.prototype.set records):
2096         When records are cleared, clear all classes.
2097
2098 2016-05-20  Nikita Vasilyev  <nvasilyev@apple.com>
2099
2100         Web Inspector: Split Console is auto opening all the time when using Inspect Element context menu
2101         https://bugs.webkit.org/show_bug.cgi?id=157910
2102         <rdar://problem/26374066>
2103
2104         Reviewed by Timothy Hatcher.
2105
2106         Currently, "synthetic" property is only used to decide whether adding a console message should
2107         open the console or not. Replace it with "shouldRevealConsole".
2108
2109         * UserInterface/Controllers/DOMTreeManager.js:
2110         (WebInspector.DOMTreeManager.prototype.inspectNodeObject.nodeAvailable):
2111         (WebInspector.DOMTreeManager.prototype.inspectNodeObject):
2112         * UserInterface/Controllers/JavaScriptLogViewController.js:
2113         (WebInspector.JavaScriptLogViewController.prototype.appendImmediateExecutionWithResult.saveResultCallback):
2114         (WebInspector.JavaScriptLogViewController.prototype.appendImmediateExecutionWithResult):
2115         (WebInspector.JavaScriptLogViewController.prototype.consolePromptTextCommitted.printResult):
2116         (WebInspector.JavaScriptLogViewController.prototype.consolePromptTextCommitted):
2117         (WebInspector.JavaScriptLogViewController.prototype._appendConsoleMessageView):
2118         * UserInterface/Models/ConsoleCommandResultMessage.js:
2119         (WebInspector.ConsoleCommandResultMessage):
2120         (WebInspector.ConsoleCommandResultMessage.prototype.get shouldRevealConsole):
2121         (WebInspector.ConsoleCommandResultMessage.prototype.get synthetic): Deleted.
2122         * UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
2123         (WebInspector.HeapSnapshotInstanceDataGridNode.logHeapSnapshotNode.node.shortestGCRootPath.):
2124         (WebInspector.HeapSnapshotInstanceDataGridNode.logHeapSnapshotNode):
2125
2126 2016-05-19  Joseph Pecoraro  <pecoraro@apple.com>
2127
2128         Web Inspector: Can't resume Debugger after breaking on exception in Promise
2129         https://bugs.webkit.org/show_bug.cgi?id=157240
2130         <rdar://problem/26030890>
2131
2132         Reviewed by Timothy Hatcher.
2133
2134         If we pause but have no source code to show we paused in purely internal
2135         code. In such cases we were attempting to resume without actually
2136         telling the backend to resume, so the backend and frontend were out of
2137         sync. The frontend thinking it is "paused" without an activeCallFrame
2138         and the backend actually being paused.
2139
2140         This change more gracefully handles this situation. It actually resumes
2141         both the frontend and the backend.
2142
2143         * UserInterface/Controllers/DebuggerManager.js:
2144         (WebInspector.DebuggerManager.prototype.debuggerDidPause):
2145         Resume the backend and the frontend.
2146
2147         (WebInspector.DebuggerManager.prototype._didResumeInternal):
2148         Don't look at the active call frame, look at the paused state.
2149         This may issue a Resumed event without actually triggering a
2150         Paused event if this was the only pause, but that is harmless.
2151
2152 2016-05-19  Joseph Pecoraro  <pecoraro@apple.com>
2153
2154         Web Inspector: Main Resource with <scripts> not showing up in debugger sidebar after reload
2155         https://bugs.webkit.org/show_bug.cgi?id=157939
2156         <rdar://problem/26385691>
2157
2158         Reviewed by Timothy Hatcher.
2159
2160         The order of events on a reload are:
2161
2162             - MainResourceChanged, add main resource
2163             - ScriptsCleared, remove all elements
2164
2165         This change makes it so ScriptsCleared add the main resource (and
2166         potentially other resources). This also avoids the work in
2167         MainResourceChanged on reloads / navigations that would be wasted if
2168         ScriptsCleared were to just remove it. However, this is still needed
2169         for initial load where ScriptsCleared does not happen.
2170
2171         * UserInterface/Views/DebuggerSidebarPanel.js:
2172         (WebInspector.DebuggerSidebarPanel.prototype._mainResourceDidChange):
2173         Only add the main resource tree here when we are first loading.
2174
2175         (WebInspector.DebuggerSidebarPanel.prototype._scriptsCleared):
2176         Add the main resource tree after we remove all children in navigations.
2177
2178         * UserInterface/Views/NavigationSidebarPanel.js:
2179         (WebInspector.NavigationSidebarPanel.prototype._contentTreeOutlineTreeSelectionDidChange):
2180         This was not gracefully handling if there was no selected tree element.
2181
2182 2016-05-19  Joseph Pecoraro  <pecoraro@apple.com>
2183
2184         Web Inspector: Visual Style connectors are not always centered properly
2185         https://bugs.webkit.org/show_bug.cgi?id=157932
2186
2187         Reviewed by Timothy Hatcher.
2188
2189         * UserInterface/Views/VisualStylePropertyEditorLink.css:
2190         (.visual-style-property-editor-link):
2191         Remove the 1px margin on @2x that would cause jitter at different
2192         sidebar widths. It is however needed on @1x.
2193
2194         (.visual-style-property-editor-link:not(.link-all)):
2195         Make the height 20 so these both move closer to the center of the
2196         <select> elements they are next to. They are not perfectly centered
2197         as that would require a half pixel.
2198
2199         (.visual-style-property-editor-link.link-vertical):
2200         Move the top line up a pixel so it is "up 0.5" from center and
2201         the bottom one is already "down 0.5" from the center.
2202
2203 2016-05-19  Nikita Vasilyev  <nvasilyev@apple.com>
2204
2205         REGRESSION (r189385): Web Inspector: CSS properties modified via JS don't update in the Styles sidebar
2206         https://bugs.webkit.org/show_bug.cgi?id=157918
2207
2208         Reviewed by Timothy Hatcher.
2209
2210         * UserInterface/Controllers/DOMTreeManager.js:
2211         (WebInspector.DOMTreeManager):
2212         (WebInspector.DOMTreeManager.prototype._inlineStyleInvalidated):
2213         (WebInspector.DOMTreeManager.prototype._loadNodeAttributes):
2214         Set the initial value of _loadNodeAttributesTimeout to be 0,
2215         as setTimeout always returns a positive integer.
2216
2217 2016-05-19  Joseph Pecoraro  <pecoraro@apple.com>
2218
2219         Web Inspector: Heap Snapshots taken before timeline view has a zero time do not get shown
2220         https://bugs.webkit.org/show_bug.cgi?id=157923
2221         <rdar://problem/26377366>
2222
2223         Reviewed by Timothy Hatcher.
2224
2225         * UserInterface/Views/HeapAllocationsTimelineDataGridNode.js:
2226         (WebInspector.HeapAllocationsTimelineDataGridNode):
2227         (WebInspector.HeapAllocationsTimelineDataGridNode.prototype.createCellContent):
2228         (WebInspector.HeapAllocationsTimelineDataGridNode.prototype.updateTimestamp):
2229         Show emDash for the timestamp if we don't yet have a zero time.
2230         Update when we get a zero time.
2231
2232         * UserInterface/Views/HeapAllocationsTimelineView.js:
2233         (WebInspector.HeapAllocationsTimelineView):
2234         (WebInspector.HeapAllocationsTimelineView.prototype.layout):
2235         (WebInspector.HeapAllocationsTimelineView.prototype.reset):
2236         Save a list of nodes pre-zero time and update them when we get a zero time.
2237
2238 2016-05-19  Joseph Pecoraro  <pecoraro@apple.com>
2239
2240         Web Inspector: HeapSnapshot Instances view should remove dead objects
2241         https://bugs.webkit.org/show_bug.cgi?id=157920
2242         <rdar://problem/26375866>
2243
2244         Reviewed by Timothy Hatcher.
2245
2246         * UserInterface/Workers/HeapSnapshot/HeapSnapshotWorker.js:
2247         (HeapSnapshotWorker):
2248         (HeapSnapshotWorker.prototype.clearSnapshots):
2249         (HeapSnapshotWorker.prototype.createSnapshot):
2250         Preserve a list of snapshots for this page's session. When
2251         new snapshots come in we can determine which nodes have died
2252         and update previous snapshots. Emit a CollectionEvent
2253         containing the nodes that were deleted and affected snapshots.
2254
2255         * UserInterface/Workers/HeapSnapshot/HeapSnapshot.js:
2256         (HeapSnapshot):
2257         Stash the largest node identifier.
2258         Create a byte-per-node list to mark it as dead or alive.
2259         All snapshots start with all live nodes.
2260
2261         (HeapSnapshot.prototype.updateDeadNodesAndGatherCollectionData):
2262         (HeapSnapshot.prototype._markDeadNodes):
2263         When we get a new snapshot we can mark dead nodes in previous
2264         snapshots. Determine the nodeIdentifiers of dead nodes, and
2265         mark them as dead if they existed in previous snapshots.
2266
2267         (HeapSnapshot.buildCategories):
2268         (HeapSnapshot.prototype.updateCategories):
2269         (HeapSnapshotDiff.prototype.updateCategories):
2270         Include a "deadCount" in category data. And provide a method
2271         to return an updated category list.
2272
2273         (HeapSnapshot.prototype.serializeNode):
2274         Include a "dead" property on nodes when they are first fetched.
2275
2276         * UserInterface/Proxies/HeapSnapshotDiffProxy.js:
2277         (WebInspector.HeapSnapshotDiffProxy.prototype.updateForCollectionEvent):
2278         (WebInspector.HeapSnapshotDiffProxy.prototype.updateCategories):
2279         * UserInterface/Proxies/HeapSnapshotNodeProxy.js:
2280         (WebInspector.HeapSnapshotNodeProxy):
2281         (WebInspector.HeapSnapshotNodeProxy.deserialize):
2282         * UserInterface/Proxies/HeapSnapshotProxy.js:
2283         (WebInspector.HeapSnapshotProxy.prototype.updateForCollectionEvent):
2284         (WebInspector.HeapSnapshotProxy.prototype.updateCategories):
2285         Update snapshot proxies from a collection event by updating properties
2286         and dispatching an event from the model object.
2287
2288         * UserInterface/Proxies/HeapSnapshotWorkerProxy.js:
2289         (WebInspector.HeapSnapshotWorkerProxy):
2290         (WebInspector.HeapSnapshotWorkerProxy.prototype.clearSnapshots):
2291         (WebInspector.HeapSnapshotWorkerProxy.prototype._mainResourceDidChange):
2292         Clear the session snapshot list when the main resource changes.
2293         However we can't yet clear the HeapSnapshot objects on the worker
2294         because we may still have UI that interact with them.
2295
2296         * UserInterface/Views/HeapAllocationsTimelineView.js:
2297         (WebInspector.HeapAllocationsTimelineView):
2298         (WebInspector.HeapAllocationsTimelineView.prototype.closed):
2299         Register and unregister for HeapSnapshot collection events.
2300
2301         (WebInspector.HeapAllocationsTimelineView.prototype._heapSnapshotCollectionEvent.updateHeapSnapshotForEvent):
2302         (WebInspector.HeapAllocationsTimelineView.prototype._heapSnapshotCollectionEvent):
2303         Update all the snapshots we know about when a collection event happens.
2304
2305         * UserInterface/Views/HeapSnapshotClassDataGridNode.js:
2306         (WebInspector.HeapSnapshotClassDataGridNode.prototype.removeCollectedNodes):
2307         (WebInspector.HeapSnapshotClassDataGridNode.prototype.updateCount):
2308         (WebInspector.HeapSnapshotClassDataGridNode.prototype._populate):
2309         (WebInspector.HeapSnapshotClassDataGridNode.prototype._fetchBatch):
2310         * UserInterface/Views/HeapSnapshotContentView.js:
2311         (WebInspector.HeapSnapshotContentView.prototype._heapSnapshotDataGridTreeDidPopulate):
2312         (WebInspector.HeapSnapshotContentView):
2313         * UserInterface/Views/HeapSnapshotDataGridTree.js:
2314         (WebInspector.HeapSnapshotDataGridTree):
2315         (WebInspector.HeapSnapshotDataGridTree.prototype.removeChild):
2316         (WebInspector.HeapSnapshotDataGridTree.prototype.removeCollectedNodes):
2317         (WebInspector.HeapSnapshotDataGridTree.prototype._heapSnapshotCollectedNodes):
2318         (WebInspector.HeapSnapshotInstancesDataGridTree.prototype.populateTopLevel):
2319         (WebInspector.HeapSnapshotInstancesDataGridTree.prototype.removeCollectedNodes):
2320         (WebInspector.HeapSnapshotInstancesDataGridTree):
2321         Update the Instances DataGridTree UI when a collection event happens.
2322         Remove any top level InstanceDataGridNodes that may be showing for collected nodes.
2323         Update the category counts on the ClassDataGridNodes.
2324         Update FetchMoreDataGridNodes to have updated counts (and replace removed nodes).
2325
2326 2016-05-19  Timothy Hatcher  <timothy@apple.com>
2327
2328         Web Inspector: REGRESSION: Search magnifying glass shifted in Search tab input field
2329         https://bugs.webkit.org/show_bug.cgi?id=157913
2330         rdar://problem/26374424
2331
2332         Reviewed by Joseph Pecoraro.
2333
2334         * UserInterface/Views/SearchSidebarPanel.css:
2335         (.sidebar > .panel.navigation.search > .search-bar > input[type="search"]): Removed padding-left.
2336         (.sidebar > .panel.navigation.search > .search-bar > input[type="search"]::-webkit-search-results-button):
2337         Added. Add margin-right here instead.
2338
2339 2016-05-19  Timothy Hatcher  <timothy@apple.com>
2340
2341         Web Inspector: Timelines "Edit" button should be right-aligned
2342         https://bugs.webkit.org/show_bug.cgi?id=157909
2343         rdar://problem/26373969
2344
2345         Reviewed by Joseph Pecoraro.
2346
2347         * UserInterface/Views/ButtonNavigationItem.css:
2348         (.navigation-bar .item.button.text-only): Deleted height: auto. Now inherited.
2349         * UserInterface/Views/NavigationBar.css:
2350         (.navigation-bar .item): Change height to auto to support any NavigationBar height.
2351         This is needed since the Timelines tab has a shorter NavigationBar height, and
2352         flexible items were overflowing.
2353         * UserInterface/Views/TextNavigationItem.css:
2354         (.navigation-bar .item.text): Deleted height: auto. Now inherited.
2355         * UserInterface/Views/TimelineOverview.js:
2356         (WebInspector.TimelineOverview): Add a FlexibleSpaceNavigationItem before the Edit button.
2357
2358 2016-05-19  Brian Burg  <bburg@apple.com>
2359
2360         Web Inspector: timelines should not update via requestAnimationFrame unless Web Inspector is visible
2361         https://bugs.webkit.org/show_bug.cgi?id=157897
2362         <rdar://problem/26330802>
2363
2364         Reviewed by Timothy Hatcher.
2365
2366         The timelines overview tries to animate using requestAnimationFrame, even if the
2367         inspector frontend is not really visible. When it does this, requestAnimationFrame
2368         simply stalls out until the inspector becomes visible. If a recording is started
2369         while the inspector is not visible, then when it is shown again, the timeline will
2370         start to animate from 0s instead of the current time. This happens because the
2371         requestAnimationFrame was requested when the current time actually was 0, and it
2372         finally executes some time later, when the current time is no longer accurate.
2373         Since the timelines animate by calculating time elapsed since the previous frame
2374         rather than using event timestamps, there is no way for the timelines to skip forward
2375         in their animations in scenarios where the current time becomes arbitrarily skewed.
2376
2377         To fix this, consider the visibility state of the frontend as reported by the UIProcess.
2378         Fire a global notification when visibility state changes, and start or stop updating
2379         the current time as the frontend becomes visible or not shown.
2380
2381         This does not affect most other uses of requestAnimationFrame, which are used as
2382         timers to call updateLayout at an appropriate time. The timelines case is different
2383         because the current time is fixed prior to requesting an animation frame, and
2384         later animation frames are only triggered by earlier requests, so there's nothing to
2385         coalesce.
2386
2387         * UserInterface/Base/Main.js:
2388         (WebInspector.loaded): Initialize WebInspector.visible.
2389
2390         * UserInterface/Base/Object.js: Add new event.
2391
2392         * UserInterface/Protocol/InspectorFrontendAPI.js:
2393         (InspectorFrontendAPI.setIsVisible): Added.
2394
2395         * UserInterface/Test/Test.js:
2396         (WebInspector.updateVisibilityState): Add a stub.
2397
2398         * UserInterface/Views/TimelineRecordingContentView.js:
2399         (WebInspector.TimelineRecordingContentView):
2400         (WebInspector.TimelineRecordingContentView.prototype._inspectorVisibilityStateChanged):
2401         If visibility state changes while capturing, then start or stop updating the
2402         current time as appropriate. Otherwise, refresh the timelines with updated
2403         times so that they know about the recording's updated start/current/end time.
2404
2405         (WebInspector.TimelineRecordingContentView.prototype._startUpdatingCurrentTime):
2406         Bail out if the Web Inspector frontend is not visible to the user and won't be
2407         able to service requestAnimationFrames immediately.
2408
2409 2016-05-18  Timothy Hatcher  <timothy@apple.com>
2410
2411         Web Inspector: Classes toggle wraps in some localizations
2412         https://bugs.webkit.org/show_bug.cgi?id=157878
2413         rdar://problem/26108859
2414
2415         Reviewed by Brian Burg.
2416
2417         * UserInterface/Views/CSSStyleDetailsSidebarPanel.css:
2418         (.sidebar > .panel.details.css-style > .content ~ .options-container > .toggle-class-toggle):
2419         Add white-space: nowrap.
2420
2421 2016-05-18  Matt Baker  <mattbaker@apple.com>
2422
2423         Web Inspector: unable to switch between navigation tree outlines using up/down arrow keys
2424         https://bugs.webkit.org/show_bug.cgi?id=157713
2425         <rdar://problem/26287086>
2426
2427         Reviewed by Timothy Hatcher.
2428
2429         * UserInterface/Views/NavigationSidebarPanel.js:
2430         (WebInspector.NavigationSidebarPanel.prototype.createContentTreeOutline):
2431         Listen for TreeOutline focus changes, and associate trees and their DOM
2432         elements for quick lookup when handling focus events.
2433
2434         (WebInspector.NavigationSidebarPanel.prototype._contentTreeOutlineDidFocus):
2435         (WebInspector.NavigationSidebarPanel.prototype._contentTreeOutlineTreeSelectionDidChange):
2436         When selecting a tree element causes an element in a different tree outline
2437         to be deselected, remember the old selection so that it can be restored
2438         the next time the tree outline get the focus.
2439
2440 2016-05-18  Matt Baker  <mattbaker@apple.com>
2441
2442         Web Inspector: Checkbox disappears when unchecking CSS property with value containing a semicolon
2443         https://bugs.webkit.org/show_bug.cgi?id=157862
2444         <rdar://problem/16214480>
2445
2446         Reviewed by Timothy Hatcher.
2447
2448         * UserInterface/Views/CSSStyleDeclarationTextEditor.js:
2449         (WebInspector.CSSStyleDeclarationTextEditor.prototype._createCommentedCheckboxMarker):
2450         Modify regex to match CSS properties with url() and quoted values,
2451         which can contain semicolons.
2452
2453 2016-05-18  Nikita Vasilyev  <nvasilyev@apple.com>
2454
2455         Web Inspector: ugly gaps in Call Trees data grid when expanding more than one level
2456         https://bugs.webkit.org/show_bug.cgi?id=157829
2457         <rdar://problem/26339922>
2458
2459         Reviewed by Timothy Hatcher.
2460
2461         Make a more specific CSS selector to avoid style conflicts.
2462
2463         * UserInterface/Views/DataGrid.css:
2464         (.data-grid:not(.variable-height-rows) > .data-container > table.data > tbody > tr > td > div): Deleted.
2465         (.data-grid:not(.variable-height-rows) > .data-container > table.data > tbody > tr > td > .cell-content):
2466         * UserInterface/Views/DataGrid.js:
2467         (WebInspector.DataGridNode.prototype.createCell):
2468
2469 2016-05-18  Brian Burg  <bburg@apple.com>
2470
2471         Web Inspector: InspectorFrontendAPI.setTimelineProfilingEnabled should not implicitly show Timelines tab
2472         https://bugs.webkit.org/show_bug.cgi?id=157846
2473
2474         Reviewed by Timothy Hatcher.
2475
2476         Currently, if the Web Inspector opens for an in-progress or finished automation session,
2477         it will always show the Timelines tab, disregarding any previous user view state. This
2478         is annoying and is a bad user experience when trying to debug the same test repeatedly.
2479
2480         * UserInterface/Protocol/InspectorFrontendAPI.js:
2481         (InspectorFrontendAPI.setTimelineProfilingEnabled): Don't implicitly show Timelines tab.
2482         (InspectorFrontendAPI.showTimelines): Added. This is called explicitly when desired.
2483
2484 2016-05-18  Brian Burg  <bburg@apple.com>
2485
2486         Web Inspector: DebuggerSidebarPanel doesn't need to help manage temporarily disabling breakpoints while capturing
2487         https://bugs.webkit.org/show_bug.cgi?id=157854
2488
2489         Reviewed by Timothy Hatcher.
2490
2491         Duplicate the event listeners in DebuggerManager and move non-view-related
2492         state updates out of DebuggerSidebarPanel's listeners into DebuggerManager's listeners.
2493         This allows a test to exercise the temporary-disablement code paths during capturing.
2494
2495         * UserInterface/Controllers/DebuggerManager.js:
2496         (WebInspector.DebuggerManager.prototype.get breakpointsDisabledTemporarily):
2497         Use this to make the code a bit more readable.
2498
2499         (WebInspector.DebuggerManager.prototype._startDisablingBreakpointsTemporarily):
2500         (WebInspector.DebuggerManager.prototype._stopDisablingBreakpointsTemporarily):
2501         (WebInspector.DebuggerManager.prototype.startDisablingBreakpointsTemporarily): Deleted.
2502         (WebInspector.DebuggerManager.prototype.stopDisablingBreakpointsTemporarily): Deleted.
2503         Make this private since it's not used by other classes anymore.
2504
2505         (WebInspector.DebuggerManager.prototype._timelineCapturingWillStart): Added.
2506         (WebInspector.DebuggerManager.prototype._timelineCapturingStopped): Added.
2507
2508         * UserInterface/Views/DebuggerSidebarPanel.js:
2509         (WebInspector.DebuggerSidebarPanel.prototype._timelineRecordingWillStart): Deleted.
2510         (WebInspector.DebuggerSidebarPanel.prototype._timelineRecordingStopped): Deleted.
2511         (WebInspector.DebuggerSidebarPanel.prototype._timelineCapturingWillStart): Added.
2512         (WebInspector.DebuggerSidebarPanel.prototype._timelineCapturingStopped): Added.
2513         Make the listener names consistent with TimelineManager: timelineCapturing{WillStart,Stopped}.
2514
2515 2016-05-18  Joseph Pecoraro  <pecoraro@apple.com>
2516
2517         Web Inspector: Improve console.takeHeapSnapshot documentation in console
2518         https://bugs.webkit.org/show_bug.cgi?id=157853
2519
2520         Reviewed by Timothy Hatcher.
2521
2522         * UserInterface/Models/NativeFunctionParameters.js:
2523         Mention optional label argument.
2524
2525 2016-05-18  Brian Burg  <bburg@apple.com>
2526
2527         Web Inspector: race between frontend and backend both starting timeline recordings causes console assert
2528         https://bugs.webkit.org/show_bug.cgi?id=157850
2529         <rdar://problem/26349229>
2530
2531         Reviewed by Joseph Pecoraro.
2532
2533         If TimelineManager has created a fresh recording and the Timeline.autoCaptureStarted
2534         event comes before Timeline.recordingStarted, then the manager will try to start the
2535         same recording twice. In this scenario, the manager should just wait until the
2536         Timeline.recordingStarted event comes, since it causes TimelineMangare to set up
2537         the isCapturing flag and other state.
2538
2539         * UserInterface/Controllers/TimelineManager.js:
2540         (WebInspector.TimelineManager):
2541         (WebInspector.TimelineManager.prototype.startCapturing):
2542         (WebInspector.TimelineManager.prototype.capturingStarted):
2543         (WebInspector.TimelineManager.prototype.autoCaptureStarted):
2544         Add a new flag, this._waitingForCapturingStartedEvent. If true, don't start the
2545         recording in response to this event.
2546
2547 2016-05-18  Matt Baker  <mattbaker@apple.com>
2548
2549         Web Inspector: REGRESSION(r197488): Incorrect start time in Rendering Frames timeline grid
2550         https://bugs.webkit.org/show_bug.cgi?id=157840
2551         <rdar://problem/26344937>
2552
2553         Reviewed by Brian Burg.
2554
2555         * UserInterface/Views/TimelineRecordingContentView.js:
2556         (WebInspector.TimelineRecordingContentView.prototype._updateTimes):
2557         The Rendering Frames timeline view needs a valid zero time.
2558         (WebInspector.TimelineRecordingContentView.prototype._timeRangeSelectionChanged):
2559         Adjust ruler selection path component values by the zero time unless
2560         the current view is the Rendering Frames timeline view.
2561
2562 2016-05-17  Matt Baker  <mattbaker@apple.com>
2563
2564         Web Inspector: NavigationSidebarPanel should coordinate item selection between its tree outlines
2565         https://bugs.webkit.org/show_bug.cgi?id=157813
2566         <rdar://problem/26331779>
2567
2568         Reviewed by Timothy Hatcher.
2569
2570         * UserInterface/Views/DebuggerSidebarPanel.js:
2571         (WebInspector.DebuggerSidebarPanel.prototype._treeSelectionDidChange):
2572         Deselecting elements in other tree outlines is now done in the base class.
2573
2574         * UserInterface/Views/NavigationSidebarPanel.js:
2575         (WebInspector.NavigationSidebarPanel.prototype.createContentTreeOutline):
2576         Listen for selection changed events on all content tree outlines.
2577         (WebInspector.NavigationSidebarPanel.prototype.treeElementAddedOrChanged):
2578         Moved stub from the public section to the protected section.
2579         (WebInspector.NavigationSidebarPanel.prototype._contentTreeOutlineTreeSelectionDidChange):
2580         Deselect tree elements in any content tree outline that is not the
2581         parent of the selected element.
2582
2583         (WebInspector.NavigationSidebarPanel.prototype._treeSelectionDidChange): Deleted.
2584         Rename _contentTreeOutlineTreeSelectionDidChange, to prevent being
2585         shadowed by subclasses with _treeSelectionDidChange event handlers.
2586
2587 2016-05-17  Matt Baker  <mattbaker@apple.com>
2588
2589         Web Inspector: Remove TimelineSidebarPanel.js as it's no longer referenced anywhere
2590         https://bugs.webkit.org/show_bug.cgi?id=157819
2591
2592         Reviewed by Timothy Hatcher.
2593
2594         * UserInterface/Views/TimelineSidebarPanel.js: Removed.
2595         Removed unused file.
2596
2597 2016-05-17  Brian Burg  <bburg@apple.com>
2598
2599         Web Inspector: inspector tests should redirect and log console.trace() calls in test output
2600         https://bugs.webkit.org/show_bug.cgi?id=157802
2601         <rdar://problem/26325671>
2602
2603         Reviewed by Timothy Hatcher.
2604
2605         * UserInterface/Test/FrontendTestHarness.js:
2606         (FrontendTestHarness.prototype.redirectConsoleToTestOutput.createProxyConsoleHandler):
2607         Remove bind() that is now unnecessary. Also redirect console.warn.
2608
2609         (FrontendTestHarness.prototype.redirectConsoleToTestOutput):
2610         For console.trace(), throw and catch a dummy Error to get a stack trace.
2611         Do some post processing on it to remove useless frames and sanitize file paths.
2612
2613 2016-05-17  Brian Burg  <bburg@apple.com>
2614
2615         Web Inspector: Filtering huge data grids should yield occasionally so the UI remains responsive
2616         https://bugs.webkit.org/show_bug.cgi?id=157702
2617         <rdar://problem/26282898>
2618
2619         Based on a patch by Matt Baker <mattbaker@apple.com> on 2016-05-16
2620         Reviewed by Timothy Hatcher.
2621
2622         This patch adds a new class, YieldableTask, for processing large
2623         data sets without starving the runloop. A yieldable task takes a delegate,
2624         an iterator that produces the items to be processed by the delegate, and
2625         the "work interval" time slice and "idle interval" to wait between time slices.
2626         It works by using `yield` to suspend processing when the current time
2627         slice is exceeded, and setting a timeout to wait out the idle interval.
2628
2629         The iterator is responsible for deciding a good traversal order for items,
2630         and the delegate is responsible for processing each item in turn. Tasks
2631         cannot be reused once cancelled or processing completes.
2632
2633         Change DataGrid to use a yieldable task for filtering data grid nodes.
2634         When the filtering criteria changes, cancel the task and run a new task.
2635
2636         * UserInterface/Base/YieldableTask.js: Added.
2637         (WebInspector.YieldableTask.prototype.get processing):
2638         (WebInspector.YieldableTask.prototype.get cancelled):
2639         (WebInspector.YieldableTask.prototype.get idleInterval):
2640         (WebInspector.YieldableTask.prototype.get workInterval):
2641         Add getters.
2642
2643         (WebInspector.YieldableTask.prototype.start.createIteratorForProcessingItems):
2644         (WebInspector.YieldableTask.prototype.start):
2645         Set up an iterator that cranks through items to be processed until the
2646         time slice is exceeded. Check to see if the task is cancelled before and
2647         after calling out to the delegate to perform processing on the item.
2648
2649         (WebInspector.YieldableTask.prototype.cancel):
2650         Set the cancel flag. Tell the delegate the task is finished soon.
2651
2652         (WebInspector.YieldableTask.prototype._processPendingItems):
2653         Request the next item from the cranking iterator so it tries to process
2654         more items. If it yields but still has more items to process, set a timeout
2655         and continue processing more items after the idle interval.
2656
2657         (WebInspector.YieldableTask.prototype._willYield): Notify the delegate.
2658         (WebInspector.YieldableTask.prototype._didFinish): Clear state and notify.
2659         (WebInspector.YieldableTask):
2660
2661         * UserInterface/Main.html:
2662         * UserInterface/Test.html: Add new file.
2663
2664         * UserInterface/Views/DataGrid.js:
2665         (WebInspector.DataGrid):
2666         (WebInspector.DataGrid.prototype.filterDidChange):
2667         Cancel the currently running filter task, if any exists.
2668
2669         (WebInspector.DataGrid.prototype._updateFilter.createIteratorForNodesToBeFiltered):
2670         (WebInspector.DataGrid.prototype._updateFilter):
2671         Set up and start a new filtering task when the filter updates.
2672
2673         (WebInspector.DataGrid.prototype.yieldableTaskWillProcessItem):
2674         (WebInspector.DataGrid.prototype.yieldableTaskDidYield):
2675         (WebInspector.DataGrid.prototype.yieldableTaskDidFinish):
2676         Batch up notifications about filtered nodes changing since this can
2677         cause a lot of unnecessary work by event listeners.
2678
2679 2016-05-17  Brian Burg  <bburg@apple.com>
2680
2681         Web Inspector: breakpoints in sourceURL named scripts are not persisted
2682         https://bugs.webkit.org/show_bug.cgi?id=157714
2683         <rdar://problem/26287099>
2684
2685         Reviewed by Joseph Pecoraro.
2686
2687         The Inspector frontend doesn't try to persist a breakpoint that
2688         lacks a URL, even if the breakpoint has a sourceURL. Similarly, for
2689         breakpoints without a URL, the frontend asks the backend to create
2690         the breakpoint for a specific script identifier rather than a
2691         URL-based breakpoint. This prevents breakpoints in injected scripts
2692         from being resolved if the page is reloaded.
2693
2694         The Inspector backend knows how to resolve URL-based breakpoints
2695         by matching against the script's URL or sourceURL, so we just need
2696         to teach the frontend when either is appropriate to use.
2697
2698         This patch adds SourceCode.contentIdentifier, which is roughly
2699         `url || sourceURL` for content that is not emphemeral, such as
2700         console evaluations. Change breakpoint and debugger code to use
2701         `contentIdentifier` rather than `url`, and pass contentIdentifier
2702         to the backend when setting a breakpoint by URL.
2703
2704         * UserInterface/Controllers/DebuggerManager.js:
2705         (WebInspector.DebuggerManager.prototype.breakpointsForSourceCode):
2706         (WebInspector.DebuggerManager.prototype.scriptsForURL):
2707         (WebInspector.DebuggerManager.prototype.get searchableScripts):
2708         (WebInspector.DebuggerManager.prototype.removeBreakpoint):
2709         (WebInspector.DebuggerManager.prototype.reset):
2710         (WebInspector.DebuggerManager.prototype.scriptDidParse):
2711         (WebInspector.DebuggerManager.prototype._setBreakpoint):
2712         (WebInspector.DebuggerManager.prototype._saveBreakpoints):
2713         (WebInspector.DebuggerManager.prototype._associateBreakpointsWithSourceCode):
2714
2715         * UserInterface/Models/Breakpoint.js:
2716         (WebInspector.Breakpoint):
2717         (WebInspector.Breakpoint.prototype.get contentIdentifier):
2718         (WebInspector.Breakpoint.prototype.get info):
2719         (WebInspector.Breakpoint.prototype.saveIdentityToCookie):
2720         (WebInspector.Breakpoint.prototype.get url): Deleted.
2721         Replace uses of Breakpoint.prototype.get url with
2722         contentIdentifier inside the class and at all callsites.
2723
2724         * UserInterface/Models/Script.js:
2725         (WebInspector.Script.prototype.get contentIdentifier):
2726         Added. Use the URL, or the sourceURL unless the script is
2727         ephemeral and only run once, like as a console evaluation.
2728
2729         * UserInterface/Models/SourceCode.js:
2730         (WebInspector.SourceCode.prototype.get url): Added.
2731         All subclasses already override this getter. Add it here so that
2732         the default implementation of contentIdentifier can use it.
2733
2734         (WebInspector.SourceCode.prototype.get contentIdentifier): Added.
2735
2736         * UserInterface/Views/BreakpointTreeElement.js:
2737         (WebInspector.BreakpointTreeElement.prototype.get filterableData):
2738         * UserInterface/Views/ProbeSetDetailsSection.js:
2739         (WebInspector.ProbeSetDetailsSection.prototype._updateLinkElement):
2740         * UserInterface/Views/SourceCodeTextEditor.js:
2741         (WebInspector.SourceCodeTextEditor.prototype._matchesBreakpoint):
2742         * UserInterface/Views/TextResourceContentView.js:
2743         (WebInspector.TextResourceContentView.prototype.get supplementalRepresentedObjects):
2744
2745 2016-05-16  Joseph Pecoraro  <pecoraro@apple.com>
2746
2747         Uncaught Exception: TypeError: null is not an object (evaluating 'event.data.pathComponent.domTreeElement')
2748         https://bugs.webkit.org/show_bug.cgi?id=157759
2749         <rdar://problem/26309427>
2750
2751         Reviewed by Timothy Hatcher.
2752
2753         * UserInterface/Views/DOMTreeContentView.js:
2754         (WebInspector.DOMTreeContentView.prototype._pathComponentSelected):
2755         Handle possible null path components.
2756
2757         * UserInterface/Views/HierarchicalPathComponent.js:
2758         (WebInspector.HierarchicalPathComponent.prototype.get selectedPathComponent):
2759         When there is a list of just one that is triggered, the Clicked
2760         event should produce that one, to be consistent with clicking
2761         on a list of multiple elements and selecting the same value.
2762
2763 2016-05-16  Saam barati  <sbarati@apple.com>
2764
2765         Hook up ShadowChicken to the debugger to show tail deleted frames
2766         https://bugs.webkit.org/show_bug.cgi?id=156685
2767         <rdar://problem/25770521>
2768
2769         Reviewed by Filip Pizlo and Mark Lam and Joseph Pecoraro.
2770
2771         This patch makes the WebInspector display tail deleted frames.
2772         We show tail deleted frames with a gray [f] instead of a green
2773         [f]. We also put text in the tooltip to indicate that the frame
2774         is tail deleted. Other than that, tail deleted frames behave like
2775         normal frames. You can evaluate in them, inspect their scope, etc.
2776
2777         * Localizations/en.lproj/localizedStrings.js:
2778         * UserInterface/Images/TailDeletedFunction.svg: Added.
2779         * UserInterface/Images/gtk/TailDeletedFunction.svg: Added.
2780         * UserInterface/Models/CallFrame.js:
2781         * UserInterface/Views/CallFrameIcons.css:
2782         * UserInterface/Views/CallFrameTreeElement.js:
2783         * UserInterface/Views/CallFrameView.js:
2784
2785 2016-05-16  Nikita Vasilyev  <nvasilyev@apple.com>
2786
2787         Web Inspector: Contents of Duration column are covered by always on (legacy) scroll bars
2788         https://bugs.webkit.org/show_bug.cgi?id=157590
2789
2790         Reviewed by Timothy Hatcher.
2791
2792         Set the right padding of the DataGrid header to match the scrollbar width.
2793
2794         * UserInterface/Views/DataGrid.css:
2795         (.data-grid .data-container):
2796         (.data-grid.inline .data-container):
2797         Don't show scrollbars for inline data grids.
2798
2799         (.data-grid > .header-wrapper):
2800         (.data-grid.no-header > .header-wrapper > table.header):
2801         (.data-grid.no-header > table.header): Deleted.
2802         (.data-grid th): Deleted.
2803         * UserInterface/Views/DataGrid.js:
2804         (WebInspector.DataGrid):
2805         We can't add padding-rigth to a table. Wrap the table in div.header-wrapper.
2806
2807         (WebInspector.DataGrid.prototype._updateScrollbarPadding):
2808         (WebInspector.DataGrid.prototype.layout):
2809
2810 2016-05-16  Nikita Vasilyev  <nvasilyev@apple.com>
2811
2812         Web Inspector: Background stripes don't span the width of Network sidebar
2813         https://bugs.webkit.org/show_bug.cgi?id=157744
2814
2815         Reviewed by Timothy Hatcher.
2816
2817         * UserInterface/Views/NetworkSidebarPanel.css:
2818         (.sidebar > .panel.navigation.network.network-grid-content-view-showing > .content):
2819
2820 2016-05-16  Antoine Quint  <graouts@apple.com>
2821
2822         Web Inspector: Computed style shows both prefixed and unprefixed variants of properties
2823         https://bugs.webkit.org/show_bug.cgi?id=157674
2824         <rdar://problem/24339756>
2825
2826         Reviewed by Timothy Hatcher.
2827
2828         We make the CSSProperty `implicit` property read-write, and in the case where a computed style
2829         has a property marked as explicit, we also check that it's found in matching rules to consider
2830         it non-implicit. This correctly filters out variants of properties set explicitly.
2831
2832         * UserInterface/Models/CSSProperty.js:
2833         (WebInspector.CSSProperty.prototype.set implicit):
2834         * UserInterface/Models/DOMNodeStyles.js:
2835         (WebInspector.DOMNodeStyles.prototype.refresh.fetchedComputedStyle):
2836         (WebInspector.DOMNodeStyles.prototype.refresh):
2837         (WebInspector.DOMNodeStyles.prototype._isPropertyFoundInMatchingRules):
2838         (WebInspector.DOMNodeStyles):
2839
2840 2016-05-14  Timothy Hatcher  <timothy@apple.com>
2841
2842         Web Inspector: DataGrid _updateVisibleRows dominates profiles of timeline recordings when data grid (Overview or TimelineDataGrids) is showing
2843         https://bugs.webkit.org/show_bug.cgi?id=157664
2844         rdar://problem/26262219
2845
2846         Reviewed by Joseph Pecoraro.
2847
2848         * UserInterface/Views/DataGrid.js:
2849         (WebInspector.DataGrid): Added new members.
2850         (WebInspector.DataGrid.prototype.layout): Reset _cachedScrollTop and _cachedScrollHeight on resize.
2851         (WebInspector.DataGrid.prototype._noteScrollPositionChanged): Added.
2852         (WebInspector.DataGrid.prototype._updateVisibleRows): Cache sizes and positions when possible.
2853         (WebInspector.DataGridNode.prototype.set hidden): Added call to _noteRowsChanged.
2854         (WebInspector.DataGridNode.prototype.collapse): Call _noteRowsChanged instead of needsLayout.
2855         (WebInspector.DataGridNode.prototype.expand): Call _noteRowsChanged instead of needsLayout.
2856         (WebInspector.DataGrid.prototype._updateFilter): Removed direct call to _updateVisibleRows, this is
2857         better handled by DataGridNode's hidden setter.
2858
2859 2016-05-14  Timothy Hatcher  <timothy@apple.com>
2860
2861         Web Inspector: Many DataGrid instances do not save/restore their scroll position
2862         https://bugs.webkit.org/show_bug.cgi?id=157709
2863         rdar://problem/26286090
2864
2865         Reviewed by Brian Burg.
2866
2867         * UserInterface/Models/BackForwardEntry.js:
2868         (WebInspector.BackForwardEntry.prototype.makeCopy): Added.
2869         * UserInterface/Views/ContentViewContainer.js:
2870         (WebInspector.ContentViewContainer.prototype.showContentView): Copy the last entry for the view.
2871         * UserInterface/Views/DOMStorageContentView.js:
2872         (WebInspector.DOMStorageContentView.prototype.get scrollableElements): Added.
2873         * UserInterface/Views/HeapSnapshotContentView.js:
2874         (WebInspector.HeapSnapshotContentView.prototype.get scrollableElements): Added.
2875         * UserInterface/Views/IndexedDatabaseObjectStoreContentView.js:
2876         (WebInspector.IndexedDatabaseObjectStoreContentView.prototype.get scrollableElements): Added.
2877         * UserInterface/Views/MemoryTimelineView.js:
2878         (WebInspector.MemoryTimelineView.prototype.get scrollableElements): Added.
2879         * UserInterface/Views/ProfileView.js:
2880         (WebInspector.ProfileView.prototype.get scrollableElements): Added.
2881         (WebInspector.ProfileView.prototype._repopulateDataGridFromTree): Removed unused skipRefresh argument.
2882         * UserInterface/Views/ScriptClusterTimelineView.js:
2883         (WebInspector.ScriptClusterTimelineView.prototype.get scrollableElements): Added.
2884         * UserInterface/Views/ScriptProfileTimelineView.js:
2885         (WebInspector.ScriptProfileTimelineView.prototype.get scrollableElements): Added.
2886         * UserInterface/Views/TimelineView.js:
2887         (WebInspector.TimelineView.prototype.get scrollableElements): Added.
2888
2889 2016-05-14  Nikita Vasilyev  <nvasilyev@apple.com>
2890
2891         Web Inspector: Empty line shows arrow when hovering over Animation Frame Requested in timeline recording
2892         https://bugs.webkit.org/show_bug.cgi?id=157707
2893
2894         Reviewed by Timothy Hatcher.
2895
2896         * UserInterface/Views/DataGrid.css:
2897         (.data-grid:not(.variable-height-rows) > .data-container > table.data > tbody > tr > td > div):
2898
2899 2016-05-13  Simon Fraser  <simon.fraser@apple.com>
2900
2901         Unprefix -webkit-cross-fade()
2902         https://bugs.webkit.org/show_bug.cgi?id=157632
2903
2904         Reviewed by Darin Adler.
2905
2906         * UserInterface/Models/CSSKeywordCompletions.js:
2907
2908 2016-05-13  Matt Baker  <mattbaker@apple.com>
2909
2910         Web Inspector: Typing "layout" in filter for Layout and Rendering Timeline matches everything
2911         https://bugs.webkit.org/show_bug.cgi?id=157684
2912         <rdar://problem/26276588>
2913
2914         Reviewed by Joseph Pecoraro.
2915
2916         Hidden columns should not participate in built-in grid filtering
2917         using DataGrid.filterText. Hidden columns can still be custom filtered,
2918         which is how TimelineDataGrid filters scopebar columns.
2919
2920         * UserInterface/Views/DataGrid.js:
2921         (WebInspector.DataGridNode.prototype.get filterableData):
2922         Skip hidden columns.
2923
2924 2016-05-13  Matt Baker  <mattbaker@apple.com>
2925
2926         Web Inspector: Script ProfileViews should be searchable
2927         https://bugs.webkit.org/show_bug.cgi?id=157581
2928         <rdar://problem/26228530>
2929
2930         Reviewed by Joseph Pecoraro.
2931
2932         * UserInterface/Views/DataGrid.js:
2933         (WebInspector.DataGrid.prototype.get filterText):
2934         Make filterText readable.
2935
2936         * UserInterface/Views/ProfileDataGridNode.js:
2937         (WebInspector.ProfileDataGridNode.prototype.get callingContextTreeNode):
2938         (WebInspector.ProfileDataGridNode.prototype.filterableDataForColumn):
2939         Add filterable data for the "function" column.
2940         (WebInspector.ProfileDataGridNode.prototype._updateChildrenForModifiers):
2941         (WebInspector.ProfileDataGridNode.prototype.get node): Deleted.
2942         Renamed callingContextTreeNode to be less ambiguous.
2943
2944         * UserInterface/Views/ProfileDataGridTree.js:
2945         (WebInspector.ProfileDataGridTree.prototype._updateCurrentFocusDetails):
2946
2947         * UserInterface/Views/ProfileView.js:
2948         (WebInspector.ProfileView.prototype.get dataGrid):
2949         Expose data grid for use in parent view.
2950
2951         * UserInterface/Views/ScriptClusterTimelineView.js:
2952         (WebInspector.ScriptClusterTimelineView.prototype.selectRecord):
2953         Drive-by fix: forward property to current child TimelineView.
2954
2955         * UserInterface/Views/ScriptProfileTimelineView.js:
2956         (WebInspector.ScriptProfileTimelineView):
2957         (WebInspector.ScriptProfileTimelineView.prototype._scopeBarSelectionDidChange):
2958         (WebInspector.ScriptProfileTimelineView.prototype._showProfileViewForOrientation):
2959         Helper function to switch profile views. Persist filter text when
2960         switching to the new profile view.
2961
2962         (WebInspector.ScriptProfileTimelineView.prototype.get showsFilterBar): Deleted.
2963         Remove FIXME and show filter bar.
2964
2965         * UserInterface/Views/TimelineView.js:
2966         (WebInspector.TimelineView.prototype.setupDataGrid):
2967         Support switching to a new data grid.
2968         (WebInspector.TimelineView.prototype.dataGridMatchNodeAgainstCustomFilters):
2969         Hooking up filtering causes data grid nodes to be filtered based on the
2970         ruler selection. Although ScriptProfileTimelineView performs its own
2971         time-based filtering, this is necessary to prevent an assert.
2972
2973         (WebInspector.TimelineView.prototype._timelineDataGridSelectedNodeChanged):
2974         (WebInspector.TimelineView.prototype._timelineDataGridNodeWasFiltered):
2975         Converted arrow functions to member functions to allow unregistering
2976         event listeners on outgoing data grid when swapping grids.
2977
2978 2016-05-12  Matt Baker  <mattbaker@apple.com>
2979
2980         Web Inspector: Remove "Extra Scripts" folder from Resources sidebar if all children removed
2981         https://bugs.webkit.org/show_bug.cgi?id=157656
2982
2983         Reviewed by Timothy Hatcher.
2984
2985         * UserInterface/Views/ResourceSidebarPanel.js:
2986         (WebInspector.ResourceSidebarPanel.prototype._scriptWasRemoved):
2987         Remove parent folder after last script tree element removed.
2988
2989 2016-05-12  Matt Baker  <mattbaker@apple.com>
2990
2991         Web Inspector: Can't filter Rendering Frames by duration
2992         https://bugs.webkit.org/show_bug.cgi?id=157654
2993
2994         Reviewed by Timothy Hatcher.
2995
2996         * UserInterface/Views/RenderingFrameTimelineView.js:
2997         (WebInspector.RenderingFrameTimelineView.prototype._scopeBarSelectionDidChange):
2998         Call filterDidChange on the grid, not the base class.
2999         TimelineView.filterDidChange exists to let TimelineViews perform
3000         additional work when the grid filter changes (see LayoutTimelineView).
3001         (WebInspector.RenderingFrameTimelineView):
3002
3003 2016-05-12  Joseph Pecoraro  <pecoraro@apple.com>
3004
3005         Web Inspector: Deleting nodes in DOM Tree sometimes changes selection to parent instead of sibling
3006         https://bugs.webkit.org/show_bug.cgi?id=157649
3007
3008         Reviewed by Timothy Hatcher.
3009
3010         * UserInterface/Views/DOMTreeElement.js:
3011         (WebInspector.DOMTreeElement.prototype._updateChildren): Deleted.
3012         When pressing delete, we remove the node via DOM.removeNode()
3013         and remove the DOMTreeElement when we receive a successful response.
3014         However, the backend could send a DOM.childNodeRemoved event before
3015         the response from DOM.removeNode, and the frontend would have a race
3016         between DOMTreeUpdater's timeout and the removeNode callback.
3017
3018         In DOMTreeUpdater's path, DOMTreeElement updateChildren would notice
3019         a removed node and set the selection to the parent node.
3020
3021         In the DOM.removeNode path, TreeOutline would update the selection
3022         based on availability of a previousSibling/nextSibling/parent.
3023
3024         Remove the custom code in DOMTreeElement updateChildren, so that it
3025         can just do the normal TreeOutline behavior via removeChildAtIndex.
3026
3027 2016-05-12  Joseph Pecoraro  <pecoraro@apple.com>
3028
3029         REGRESSION: Web Inspector: Fails to load sourceMappingURL with relative URL
3030         https://bugs.webkit.org/show_bug.cgi?id=157650
3031         <rdar://problem/26133763>
3032
3033         Reviewed by Timothy Hatcher.
3034
3035         * UserInterface/Controllers/SourceMapManager.js:
3036         Wrong order of arguments. The intent was to pass the incoming
3037         baseURL as the partialURL, because if it was not absolute by
3038         that point we could make it relative to the main resource.
3039         However we accidentally put the main resource as the partial
3040         portion, which would just always return the main resource url.
3041         Swap the order, so that if the incoming base is absolute
3042         (such as a resource.url) that will be used, but if the
3043         incoming base is relative (e.g. an incomplete sourceURL) we
3044         can make it absolute with the main resource.
3045
3046 2016-05-12  Matt Baker  <mattbaker@apple.com>
3047
3048         Web Inspector: Uncaught exception when removing selected Timeline instrument
3049         https://bugs.webkit.org/show_bug.cgi?id=157639
3050         <rdar://problem/26252938>
3051
3052         Reviewed by Timothy Hatcher.
3053
3054         * UserInterface/Views/TimelineOverview.js:
3055         (WebInspector.TimelineOverview.prototype._instrumentRemoved):
3056         Remove timeline tree element before modifying state. Removing the tree
3057         element triggers a SelectionDidChange event, which can have side effects.
3058
3059 2016-05-12  Joseph Pecoraro  <pecoraro@apple.com>
3060
3061         Web Inspector: Timeline Reset button only resets the one active Script TimelineView
3062         https://bugs.webkit.org/show_bug.cgi?id=157638
3063
3064         Reviewed by Timothy Hatcher.
3065
3066         * UserInterface/Views/ScriptClusterTimelineView.js:
3067         (WebInspector.ScriptClusterTimelineView.prototype.reset):
3068         Reset should reset all the views.
3069
3070         (WebInspector.ScriptClusterTimelineView.prototype.get navigationSidebarTreeOutline): Deleted.
3071         * UserInterface/Views/NetworkGridContentView.js:
3072         (WebInspector.NetworkGridContentView.prototype.get navigationSidebarTreeOutline): Deleted.
3073         * UserInterface/Views/TimelineView.js:
3074         (WebInspector.TimelineView.prototype.get navigationSidebarTreeOutlineScopeBar): Deleted.
3075         Remove dead code. Nobody calls these getters.
3076
3077 2016-05-12  Joseph Pecoraro  <pecoraro@apple.com>
3078
3079         Web Inspector: Layout timeline popovers are inconsistently shown
3080         https://bugs.webkit.org/show_bug.cgi?id=157640
3081         <rdar://problem/26253394>
3082
3083         Reviewed by Timothy Hatcher.
3084
3085         * UserInterface/Views/TimelineDataGrid.js:
3086         (WebInspector.TimelineDataGrid.prototype._showPopoverForSelectedNodeSoon):
3087         Fix the bug by clearing _showPopoverTimeout when we show the popover.
3088
3089         (WebInspector.TimelineDataGrid.prototype._hidePopover):
3090         Modernize the code to use arrow functions and avoid binds.
3091
3092         (WebInspector.TimelineDataGrid.prototype._updatePopoverForSelectedNode):
3093         Updating with presentNewContentWithFrame animates the popover to the correct
3094         position instead of jumping and ending up at the wrong location.
3095
3096 2016-05-12  Joseph Pecoraro  <pecoraro@apple.com>
3097
3098         Web Inspector: Remove forced layouts caused by DOMTreeElement during Timeline recording
3099         https://bugs.webkit.org/show_bug.cgi?id=157641
3100
3101         Reviewed by Timothy Hatcher.
3102
3103         * UserInterface/Views/DOMTreeElement.js:
3104         (WebInspector.DOMTreeElement.prototype.updateSelection): Deleted.
3105         This triggers forced layout and I could never actually get it to trigger anyways.
3106         Its history is from the original import, so I don't know why it was added to begin with.
3107         Just remove it.
3108
3109 2016-05-12  Commit Queue  <commit-queue@webkit.org>
3110
3111         Unreviewed, rolling out r200718.
3112         https://bugs.webkit.org/show_bug.cgi?id=157637
3113
3114         Data grid column dividers are misaligned (Requested by NVI on
3115         #webkit).
3116
3117         Reverted changeset:
3118
3119         "Web Inspector: Contents of Duration column are covered by
3120         always on (legacy) scroll bars"
3121         https://bugs.webkit.org/show_bug.cgi?id=157590
3122         http://trac.webkit.org/changeset/200718
3123
3124 2016-05-12  Matt Baker  <mattbaker@apple.com>
3125
3126         Web Inspector: 11% of time in TimelineRecording spent updating DataGrid that is not visible
3127         https://bugs.webkit.org/show_bug.cgi?id=157612
3128         <rdar://problem/26239051>
3129
3130         Reviewed by Timothy Hatcher.
3131
3132         During recording, a timeline view is constantly having its cached time
3133         values updated. These updates should only trigger forced layouts if the
3134         view supports live data.
3135
3136         * UserInterface/Views/TimelineView.js:
3137         (WebInspector.TimelineView.prototype.set zeroTime):
3138         Drive-by fix, add call to _filterTimesDidChange.
3139         (WebInspector.TimelineView.prototype.set startTime):
3140         (WebInspector.TimelineView.prototype.set endTime):
3141         (WebInspector.TimelineView.prototype.set currentTime):
3142         Don't update layout directly.
3143         (WebInspector.TimelineView.prototype._timesDidChange):
3144         Force a layout if the view supports live data. When not recording,
3145         a layout is always performed.
3146         (WebInspector.TimelineView):
3147         (WebInspector.TimelineView.prototype._filterTimesDidChange.delayedWork): Deleted.
3148         Changed to an arrow function.
3149         (WebInspector.TimelineView.prototype._filterTimesDidChange): Deleted.
3150         Renamed _timesDidChange, since the method now does more than throttle
3151         a filterDidChange call.
3152
3153 2016-05-12  Fujii Hironori  <Hironori.Fujii@sony.com>
3154
3155         Web Inspector: Windows Perl fails to run copy-user-interface-resources.pl
3156         https://bugs.webkit.org/show_bug.cgi?id=157620
3157         <rdar://problem/26241548>
3158
3159         Reviewed by Timothy Hatcher.
3160
3161         There are two problems on Windows platform. 'cat' command is
3162         missing and can not execute shebang.
3163
3164         * Scripts/copy-user-interface-resources.pl: Invoke Perl scripts
3165         with explicitly specifying Perl command instead of relying on
3166         shebang.  Add a new subroutine 'appendFile' to concatenate files
3167         instread of 'cat' command.
3168
3169 2016-05-12  Joseph Pecoraro  <pecoraro@apple.com>
3170
3171         Web Inspector: 3.8% of timeline recording spent in NavigationSidebarPanel _updateContentOverflowShadowVisibility for background tab
3172         https://bugs.webkit.org/show_bug.cgi?id=157616
3173
3174         Reviewed by Timothy Hatcher.
3175
3176         * UserInterface/Views/NavigationSidebarPanel.js:
3177         (WebInspector.NavigationSidebarPanel.prototype._updateContentOverflowShadowVisibility):
3178         (WebInspector.NavigationSidebarPanel.prototype._treeElementAddedOrChanged):
3179         Don't update or schedule and update if we aren't visible.
3180         When we are shown we will force an update.
3181
3182 2016-05-12  Joseph Pecoraro  <pecoraro@apple.com>
3183
3184         Web Inspector: Reduce rAF churn in DefaultDashboardView on pages with lots of resources
3185         https://bugs.webkit.org/show_bug.cgi?id=157618
3186
3187         Reviewed by Timothy Hatcher.
3188
3189         * UserInterface/Views/DefaultDashboardView.js:
3190         (WebInspector.DefaultDashboardView):
3191         (WebInspector.DefaultDashboardView.prototype._updateDisplaySoon):
3192         (WebInspector.DefaultDashboardView.prototype._updateDisplay):
3193         Previously we were scheduling multiple rAFs that would all fire with
3194         the same data, each time a resource was added. Coalesce into one.
3195
3196 2016-05-12  Matt Baker  <mattbaker@apple.com>
3197
3198         Web Inspector: Improve snapshot selection in heap allocations overview graph
3199         https://bugs.webkit.org/show_bug.cgi?id=157588
3200         <rdar://problem/26231245>
3201
3202         Reviewed by Joseph Pecoraro.
3203
3204         Heap snapshot icon selection now uses the built-in record selection
3205         behavior provided by TimelineOverview/TimelineOverviewGraph. The marker
3206         representing the selected heap snapshot now has a "selected" style, and
3207         clicking an icon when the HeapAllocationsTimeline is not selected causes
3208         the timeline to become selected.
3209
3210         * UserInterface/Images/HeapSnapshotSelected.svg: Added.
3211         New art for selected snapshot icon.
3212
3213         * UserInterface/Views/HeapAllocationsTimelineOverviewGraph.css:
3214         (.timeline-overview-graph.heap-allocations > img.snapshot.selected):
3215         (.timeline-overview-graph.heap-allocations:not(.selected) > img.snapshot.selected):
3216         Selected icon styles for selected/unselected overview graph.
3217
3218         * UserInterface/Views/HeapAllocationsTimelineOverviewGraph.js:
3219         (WebInspector.HeapAllocationsTimelineOverviewGraph):
3220         Track selected image element.
3221
3222         (WebInspector.HeapAllocationsTimelineOverviewGraph.prototype.layout):
3223         Associate image elements with their snapshot record, and reuse image
3224         elements between layouts. Image element click handler can just set the
3225         selectedRecord in the TimelineOverviewGraph base class.
3226
3227         (WebInspector.HeapAllocationsTimelineOverviewGraph.prototype.updateSelectedRecord):
3228         (WebInspector.HeapAllocationsTimelineOverviewGraph.prototype._updateSnapshotMarkers):
3229         Refresh snapshot icon styles when selected record changes.
3230
3231         * UserInterface/Views/HeapAllocationsTimelineView.js:
3232         (WebInspector.HeapAllocationsTimelineView.prototype.selectRecord):
3233         Show snapshot list if no record selected.
3234         (WebInspector.HeapAllocationsTimelineView.prototype.userSelectedRecordFromOverview): Deleted.
3235         No longer needed.
3236
3237         * UserInterface/Views/RenderingFrameTimelineOverviewGraph.js:
3238         (WebInspector.RenderingFrameTimelineOverviewGraph.prototype._updateFrameMarker):
3239         No need to call dispatchSelectedRecordChangedEvent manually anymore,
3240         method has been removed from base class.
3241
3242         * UserInterface/Views/TimelineOverviewGraph.js:
3243         (WebInspector.TimelineOverviewGraph.prototype._needsSelectedRecordLayout):
3244         (WebInspector.TimelineOverviewGraph):
3245         (WebInspector.TimelineOverviewGraph.prototype.dispatchSelectedRecordChangedEvent): Deleted.
3246         No longer needed. Event dispatched automatically by the rAF callback.
3247
3248         * UserInterface/Views/TimelineRecordingContentView.js:
3249         (WebInspector.TimelineRecordingContentView.prototype._recordSelected):
3250         Allow switching to another timeline, if the selected record does not
3251         belong to the current timeline.
3252
3253 2016-05-12  Joseph Pecoraro  <pecoraro@apple.com>
3254
3255         Web Inspector: 3.5% of time in toFixed in TimelineRecordBar updating element positions
3256         https://bugs.webkit.org/show_bug.cgi?id=157608
3257
3258         Reviewed by Timothy Hatcher.
3259
3260         Avoid using toFixed to do an approximation comparison of two floating point numbers.
3261         Instead keep in Numbers by just doing the approximation with Math.round(num * 100).
3262         Since toFixed was doing stringification it was very expensive.
3263
3264         * UserInterface/Views/TimelineRecordBar.js:
3265         (WebInspector.TimelineRecordBar.prototype._updateElementPosition):
3266         (WebInspector.TimelineRecordBar):
3267         * UserInterface/Views/TimelineRecordFrame.js:
3268         (WebInspector.TimelineRecordFrame.prototype._updateElementPosition):
3269         (WebInspector.TimelineRecordFrame):
3270         * UserInterface/Views/TimelineRuler.js:
3271         (WebInspector.TimelineRuler.prototype._updatePositionOfElement):
3272
3273 2016-05-11  Joseph Pecoraro  <pecoraro@apple.com>
3274
3275         Web Inspector: 4% of time in TimelineOverviewGraph adding/removing classList styles on TimelineRecordBar
3276         https://bugs.webkit.org/show_bug.cgi?id=157607
3277
3278         Reviewed by Brian Burg.
3279
3280         This gets us down to about 0.5% of time.
3281
3282         * UserInterface/Views/TimelineRecordBar.js:
3283         (WebInspector.TimelineRecordBar.prototype.set records):
3284         Only modify the classLists when the record changes.
3285
3286         (WebInspector.TimelineRecordBar.prototype.refresh):
3287         Set unfinished once for either the uses active or not uses active cases.
3288
3289 2016-05-11  Joseph Pecoraro  <pecoraro@apple.com>
3290
3291         Web Inspector: Unexpected unread notification icon next to Log after clearing via clear()
3292         https://bugs.webkit.org/show_bug.cgi?id=157598
3293
3294         Reviewed by Timothy Hatcher.
3295
3296         We always show ConsoleCommand and ConsoleCommandResult messages no matter
3297         what the filter is. So it doesn't make sense to mark the "log" filter
3298         as having an unread notification for a ConsoleCommandResult when we can
3299         see the result.
3300
3301         * UserInterface/Views/LogContentView.js:
3302         (WebInspector.LogContentView.prototype.didAppendConsoleMessageView):
3303         (WebInspector.LogContentView.prototype._markScopeBarItemUnread):
3304
3305 2016-05-11  Joseph Pecoraro  <pecoraro@apple.com>
3306
3307         Web Inspector: Console unread indicators should be cleared however the console clears
3308         https://bugs.webkit.org/show_bug.cgi?id=157594
3309
3310         Reviewed by Timothy Hatcher.