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