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