Web Inspector: Canvas: send a call stack with each action instead of an array of...
[WebKit-https.git] / Source / WebInspectorUI / ChangeLog
1 2018-11-14  Devin Rousso  <drousso@apple.com>
2
3         Web Inspector: Canvas: send a call stack with each action instead of an array of call frames
4         https://bugs.webkit.org/show_bug.cgi?id=191628
5
6         Reviewed by Dean Jackson.
7
8         * UserInterface/Models/Recording.js:
9         (WI.Recording.prototype.async swizzle):
10
11         * UserInterface/Models/RecordingAction.js:
12         (WI.RecordingAction.fromPayload):
13         (WI.RecordingAction.prototype.async swizzle):
14
15 2018-11-14  Devin Rousso  <drousso@apple.com>
16
17         Web Inspector: add drag+drop for importing Audits and Recordings
18         https://bugs.webkit.org/show_bug.cgi?id=191566
19
20         Reviewed by Joseph Pecoraro.
21
22         Reorganize the file loading logic for the Audit and Canvas tabs/managers. Add "drop" event
23         handlers to the tabs that add and show the corresponding object for the imported data.
24
25         * UserInterface/Views/AuditTabContentView.js:
26         (WI.AuditTabContentView):
27         (WI.AuditTabContentView.prototype._handleDragOver): Added.
28         (WI.AuditTabContentView.prototype._handleDrop): Added.
29         * UserInterface/Views/CanvasTabContentView.js:
30         (WI.CanvasTabContentView):
31         (WI.CanvasTabContentView.prototype._addCanvas):
32         (WI.CanvasTabContentView.prototype._recordingImportedOrStopped):
33         (WI.CanvasTabContentView.prototype._handleDragOver): Added.
34         (WI.CanvasTabContentView.prototype._handleDrop): Added.
35
36         * UserInterface/Controllers/AuditManager.js:
37         (WI.AuditManager.prototype.async processJSON): Added.
38         (WI.AuditManager.prototype.export):
39         (WI.AuditManager.prototype.import): Deleted.
40         * UserInterface/Controllers/CanvasManager.js:
41         (WI.CanvasManager.prototype.processJSON): Added.
42         (WI.CanvasManager.prototype.importRecording): Deleted.
43
44         * UserInterface/Views/AuditNavigationSidebarPanel.js:
45         (WI.AuditNavigationSidebarPanel):
46         (WI.AuditNavigationSidebarPanel.prototype.showDefaultContentView):
47         (WI.AuditNavigationSidebarPanel.prototype._handleImportButtonNavigationItemClicked):
48         * UserInterface/Views/CanvasSidebarPanel.js:
49         (WI.CanvasSidebarPanel):
50         (WI.CanvasSidebarPanel.prototype._handleImportButtonNavigationItemClicked): Added.
51         (WI.CanvasSidebarPanel.prototype._recordingChanged):
52         (WI.CanvasSidebarPanel.prototype._updateRecordNavigationItem):
53
54         * UserInterface/Views/CanvasOverviewContentView.js:
55         (WI.CanvasOverviewContentView):
56         (WI.CanvasOverviewContentView.prototype._handleImportButtonNavigationItemClicked): Added.
57
58         * UserInterface/Base/FileUtilities.js:
59         (WI.FileUtilities.save): Added.
60         (WI.FileUtilities.importText): Added.
61         (WI.FileUtilities.importJSON): Added.
62         (WI.FileUtilities.async readText): Added.
63         (WI.FileUtilities.async readJSON): Added.
64         (WI.saveDataToFile): Deleted.
65         (WI.loadDataFromFile): Deleted.
66         * UserInterface/Base/Main.js:
67         (WI._contextMenuRequested):
68         (WI._save):
69         (WI._saveAs):
70         * UserInterface/Views/ContextMenuUtilities.js:
71         (WI.appendContextMenuItemsForSourceCode):
72         * UserInterface/Views/LogContentView.js:
73         (WI.LogContentView.prototype._handleContextMenuEvent):
74         * UserInterface/Views/NetworkTableContentView.js:
75         (WI.NetworkTableContentView.prototype._exportHAR):
76         * UserInterface/Views/RecordingContentView.js:
77         (WI.RecordingContentView.prototype._exportRecording):
78         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
79         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._save):
80         Move file related functions into a static class container.
81
82         * Localizations/en.lproj/localizedStrings.js:
83
84 2018-11-14  Joseph Pecoraro  <pecoraro@apple.com>
85
86         Web Inspector: Include target identifier in protocol logging
87         https://bugs.webkit.org/show_bug.cgi?id=191478
88
89         Reviewed by Devin Rousso.
90
91         * UserInterface/Protocol/Connection.js:
92         (InspectorBackend.Connection.prototype._dispatchResponse):
93         (InspectorBackend.Connection.prototype._dispatchEvent):
94         (InspectorBackend.Connection.prototype._sendMessageToBackend):
95         Call tracer log methods with the connection.
96
97         * UserInterface/Debug/CapturingProtocolTracer.js:
98         * UserInterface/Protocol/ProtocolTracer.js:
99         * UserInterface/Protocol/LoggingProtocolTracer.js:
100         (WI.LoggingProtocolTracer):
101         (WI.LoggingProtocolTracer.prototype.logFrontendException):
102         (WI.LoggingProtocolTracer.prototype.logFrontendRequest):
103         (WI.LoggingProtocolTracer.prototype.logWillHandleResponse):
104         (WI.LoggingProtocolTracer.prototype.logDidHandleResponse):
105         (WI.LoggingProtocolTracer.prototype.logDidHandleEvent):
106         Include the connection in log methods.
107
108         (WI.LoggingProtocolTracer.prototype.logProtocolError):
109         Removed, this is never called.
110                 
111         (WI.LoggingProtocolTracer.prototype._processEntry):
112         Include the target identifier in entry messages.
113
114 2018-11-14  Joseph Pecoraro  <pecoraro@apple.com>
115
116         Web Inspector: Keep Web Inspector window alive across process swaps (PSON) (Remote Inspector)
117         https://bugs.webkit.org/show_bug.cgi?id=191494
118         <rdar://problem/45469854>
119
120         Reviewed by Devin Rousso.
121
122         This starts introducing multi-target support into the Web Inspector frontend.
123         Specifically a backend connection that is persistent, but has the ability to
124         connect to and transition between Page targets received through that backend
125         connection.
126
127         This patch introduces the concept of a "Backend Target" which is the single
128         connection that the frontend contains to a backend. The old way of connecting
129         directly to a target is still supported. In that case the frontend constructs
130         a DirectBackendTarget for the debuggable type the frontend was spawns for.
131         However, if the frontend opens and has a TargetAgent, then it is likely
132         connected to a multi-target supporting backend and instead constructs a
133         MultiplexingBackendTarget, and will receive further information about
134         sub-targets to connect to. The only sub-target at the moment is a Page
135         sub-target.
136
137         As part of bringing up multi-target support this adds a few measures to
138         handle situations where the frontend is playing fast and loose with agents.
139         When the frontend does `FooAgent.method` it intends that to be performed
140         on the "main" target being debugged. Likewise when the frontend loops
141         over targets it expects them to be the debuggable targets. This patch
142         profiles a new implementation of `WI.mainTarget` and `WI.targets` to
143         match the assumptions being made by the frontend.
144
145           - In a direct-target world, there is a single target which
146             should be used for global agents and in WI.targets.
147
148           - In a multi-target world, the page target is the one that
149             should be used for global agents and WI.targets is the list
150             of sub-targets (excluding the MultiplexingBackendTarget).
151
152         In a multi-target world, there are now commonly two Targets. The
153         MultiplexingBackendTarget and a PageTarget sub-target. In the future
154         this may include more targets, such as ServiceWorkers, DedicatedWorkers,
155         and perhaps even frames.
156
157         In a multi-target world, the frontend is immediately told about targets
158         as soon as it opens (via Target.targetCreated). In order to support
159         this, frontend initialization happens without a main target being available.
160         So this makes a few small changes to frontend initialization to perform
161         a bit of work once we know what the main target is.
162
163         During a page transition the frontend is told to destroy existing targets
164         and is soon after told about any new page targets (via Target.targetDestroyed
165         and Target.targetCreated). The frontend special cases this page transition.
166         It expects only one Page target to be alive at any time, accessible through
167         WI.pageTarget. When a page transition happens the WI.pageTarget changes, and
168         the frontend performs a bit of work to prepare the UI to handle the transition:
169         `<Manager>.transitionPageTarget` / WI.Notification.TransitionPageTarget.
170         For the most part the UI behaves fine as long once there are main frame
171         change and main resource change events, but those other events allow
172         the frontend to respond to the specific page transition cases.
173
174         * UserInterface/Base/Main.js:
175         (WI.loaded):
176         (WI.initializeBackendTarget):
177         (WI.initializePageTarget):
178         (WI.transitionPageTarget):
179         (WI.terminatePageTarget):
180         (WI.resetMainExecutionContext):
181         (WI.redirectGlobalAgentsToConnection):
182         (WI.contentLoaded):
183         New global functions for target initialization
184         and page transitioning.
185
186         * UserInterface/Test/Test.js:
187         (WI.loaded):
188         (WI.initializeBackendTarget):
189         (WI.initializePageTarget):
190         (WI.transitionPageTarget):
191         (WI.terminatePageTarget):
192         (WI.resetMainExecutionContext):
193         (WI.redirectGlobalAgentsToConnection):
194         New global functions for target initialization.
195         Tests continue to be a direct connection to the Page.
196
197         * UserInterface/Protocol/TargetObserver.js:
198         (WI.TargetObserver.prototype.targetCreated):
199         (WI.TargetObserver.prototype.targetDestroyed):
200         (WI.TargetObserver.prototype.dispatchMessageFromTarget):
201         New observer goes to the manager.
202
203         * UserInterface/Controllers/TargetManager.js:
204         (WI.TargetManager):
205         (WI.TargetManager.prototype.get targets):
206         (WI.TargetManager.prototype.get allTargets):
207         (WI.TargetManager.prototype.targetForIdentifier):
208         (WI.TargetManager.prototype.targetCreated):
209         (WI.TargetManager.prototype.targetDestroyed):
210         (WI.TargetManager.prototype.dispatchMessageFromTarget):
211         (WI.TargetManager.prototype.createMultiplexingBackendTarget):
212         (WI.TargetManager.prototype.createDirectBackendTarget):
213         (WI.TargetManager.prototype._addTarget):
214         (WI.TargetManager.prototype._removeTarget):
215         (WI.TargetManager.prototype._createTarget):
216         (WI.TargetManager.prototype._checkAndHandlePageTargetTransition):
217         (WI.TargetManager.prototype._checkAndHandlePageTargetTermination):
218         (WI.TargetManager.prototype.addTarget): Deleted.
219         (WI.TargetManager.prototype.removeTarget): Deleted.
220         (WI.TargetManager.prototype.initializeMainTarget): Deleted.
221         TargetManager is where we handle creating and destroying targets
222         and their connections. In order to simplify things a bit we make
223         `WI.targets`, which goes through `get targets()` an array instead
224         of a Set. And this includes only the sub-targets.
225
226         * UserInterface/Controllers/WorkerManager.js:
227         (WI.WorkerManager.prototype.workerCreated):
228         (WI.WorkerManager.prototype.workerTerminated):
229         Workers are still special-target-like things that multiplex through
230         WorkerAgent instead of TargetAgent. We'd like to promote these to
231         be full targets in the future.
232
233         * UserInterface/Protocol/DirectBackendTarget.js: Renamed from Source/WebInspectorUI/UserInterface/Protocol/MainTarget.js.
234         (WI.DirectBackendTarget):
235         (WI.DirectBackendTarget.connectionInfoForDebuggable):
236         (WI.DirectBackendTarget.prototype.get mainResource):
237         (WI.DirectBackendTarget.prototype.set mainResource):
238         This is the only "MainTarget" class. It is the backend target for a direct connection.
239
240         * UserInterface/Protocol/MultiplexingBackendTarget.js:
241         (WI.MultiplexingBackendTarget):
242         (WI.MultiplexingBackendTarget.prototype.initialize):
243         (WI.MultiplexingBackendTarget.prototype.get name):
244         (WI.MultiplexingBackendTarget.prototype.get executionContext):
245         (WI.MultiplexingBackendTarget.prototype.get mainResource):
246         This is the new backend target for a multi-target connection.
247         We don't expect it to be treated like other targets, so we don't
248         expect anyone to ask it for resources/executionContext/name info.
249
250         * UserInterface/Controllers/RuntimeManager.js:
251         (WI.TargetManager.prototype.evaluateInInspectedWindow):
252         This can be triggered by watch expressions before any target, and
253         therefore execution context, is available. Just return null, when
254         an execution context is available those clients will try again.
255
256         * UserInterface/Debug/Bootstrap.js:
257         Provide an WI.isEngineeringBuild boolean that can be used for various
258         debugging features.
259
260         * UserInterface/Main.html:
261         * UserInterface/Test.html:
262         New resources.
263
264         * UserInterface/Protocol/InspectorBackend.js:
265         (InspectorBackendClass.prototype.dispatch):
266         (InspectorBackendClass.prototype.runAfterPendingDispatches):
267         (InspectorBackend.Agent):
268         `InspectorBackend.mainConnection` was renamed `InspectorBackend.backendConnection`.
269
270         * UserInterface/Protocol/Connection.js:
271         (InspectorBackend.Connection):
272         (InspectorBackend.Connection.prototype._dispatchResponse):
273         (InspectorBackend.Connection.prototype._sendCommandToBackendWithCallback):
274         (InspectorBackend.Connection.prototype._sendCommandToBackendExpectingPromise):
275         (InspectorBackend.BackendConnection):
276         (InspectorBackend.BackendConnection.prototype.sendMessageToBackend):
277         (InspectorBackend.WorkerConnection):
278         (InspectorBackend.TargetConnection):
279         (InspectorBackend.TargetConnection.sendMessageToBackend):
280         Use a global sequence id to make filtering a bit easier in protocol tracing.
281         TargetConnection is identical to WorkerConnection except it uses TargetAgent
282         instead of WorkerAgent to perform multiplexing.
283
284         * UserInterface/Protocol/JavaScriptContextTarget.js:
285         (WI.JavaScriptContextTarget):
286         * UserInterface/Protocol/PageTarget.js:
287         (WI.PageTarget):
288         (WI.PageTarget.prototype.get displayName):
289         Specialized target types.
290
291         * UserInterface/Views/DebuggerSidebarPanel.js:
292         (WI.DebuggerSidebarPanel):
293         (WI.DebuggerSidebarPanel.prototype._targetAdded):
294         (WI.DebuggerSidebarPanel.prototype._targetRemoved):
295         (WI.DebuggerSidebarPanel.prototype._updateCallStackTreeOutline):
296         * UserInterface/Views/SourceCodeTextEditor.js:
297         (WI.SourceCodeTextEditor.prototype._targetAdded):
298         (WI.SourceCodeTextEditor.prototype._targetRemoved):
299         (WI.SourceCodeTextEditor.prototype._callFramesDidChange):
300         (WI.SourceCodeTextEditor.prototype._updateThreadIndicatorWidget):
301         (WI.SourceCodeTextEditor.prototype._reinsertAllThreadIndicators):
302         * UserInterface/Views/QuickConsole.js:
303         (WI.QuickConsole.prototype.initializeMainExecutionContextPathComponent):
304         (WI.QuickConsole.prototype._targetAdded):
305         (WI.QuickConsole.prototype._targetRemoved):
306         We make target added get called with all targets, including the
307         MultiplexingBackendTarget and PageTargets, both of which would
308         not have happened before. Before it was only WorkerTargets. Make
309         these sites a little more robust for the type of target they expect
310         to be able to handle.
311
312         * UserInterface/Base/Object.js:
313         * UserInterface/Controllers/DOMManager.js:
314         (WI.DOMManager):
315         (WI.DOMManager.prototype.transitionPageTarget):
316         (WI.DOMManager.prototype.requestDocument):
317         (WI.DOMManager.prototype._setDocument):
318         * UserInterface/Controllers/NetworkManager.js:
319         (WI.NetworkManager):
320         (WI.NetworkManager.prototype.transitionPageTarget):
321         (WI.NetworkManager.prototype.executionContextCreated):
322         (WI.NetworkManager.prototype._processMainFrameResourceTreePayload):
323         * UserInterface/Models/DefaultDashboard.js:
324         (WI.DefaultDashboard):
325         (WI.DefaultDashboard.prototype._mainResourceDidChange):
326         (WI.DefaultDashboard.prototype._transitionPageTarget):
327         * UserInterface/Views/NetworkTableContentView.js:
328         (WI.NetworkTableContentView):
329         (WI.NetworkTableContentView.prototype._mainResourceDidChange):
330         (WI.NetworkTableContentView.prototype._transitionPageTarget):
331         Special case handling when performing a page transition.
332
333         * UserInterface/Views/SettingsTabContentView.js:
334         * UserInterface/Debug/UncaughtExceptionReporter.js:
335         Document reloads are not supported right now.
336
337 2018-11-14  Devin Rousso  <drousso@apple.com>
338
339         Web Inspector: Canvas: don't start with auto-capture enabled
340         https://bugs.webkit.org/show_bug.cgi?id=191553
341
342         Reviewed by Matt Baker.
343
344         * UserInterface/Views/CanvasOverviewContentView.js:
345         (WI.CanvasOverviewContentView.prototype._setRecordingAutoCaptureFrameCount):
346         (WI.CanvasOverviewContentView.prototype._updateRecordingAutoCaptureInputElementSize):
347         (WI.CanvasOverviewContentView.prototype._handleRecordingAutoCaptureInput):
348         * UserInterface/Views/CanvasOverviewContentView.css:
349         (.navigation-bar > .item.canvas-recording-auto-capture > label > input):
350
351 2018-11-14  Devin Rousso  <drousso@apple.com>
352
353         Web Inspector: Network Graphs are missing minimum sizes, might have no graph at all
354         https://bugs.webkit.org/show_bug.cgi?id=191208
355
356         Reviewed by Joseph Pecoraro.
357
358         `WI.NetworkTableContentView` used to rely on the `WI.timelineManager.persistentNetworkTimeline`
359         for events when a new resource is added. It also listened for `WI.Frame.Event.MainResourceDidChange`
360         on it's own, which was also listened to by `WI.timelineManager.persistentNetworkTimeline`.
361         Due to the order in which these listeners are added, the new main resource would get added
362         to the `WI.timelineManager.persistentNetworkTimeline` (and the `WI.NetworkTableContentView`
363         shortly after), and right after that the `WI.NetworkTableContentView` would reset the graph
364         in it's own listener for `WI.Frame.Event.MainResourceDidChange`.
365
366         This patch removes `WI.timelineManager.persistentNetworkTimeline` and instead makes it so
367         that `WI.NetworkTableContentView` listens for resource added and main frame changed events
368         on its own (similar to other views that follow this pattern), ensuring that there are no
369         event races.
370
371         Also relaxes the "requirement" that prevented 0 width blocks from being drawn, allowing
372         requests served from memory/disk to appear in the graph (their time is effectively 0).
373
374         * UserInterface/Views/NetworkTableContentView.js:
375         (WI.NetworkTableContentView):
376         (WI.NetworkTableContentView.prototype.closed):
377         (WI.NetworkTableContentView.prototype._populateWaterfallGraph):
378         (WI.NetworkTableContentView.prototype._populateWaterfallGraph.appendBlock):
379         (WI.NetworkTableContentView.prototype._updateWaterfallTimeRange): Added.
380         (WI.NetworkTableContentView.prototype._resourceLoadingDidFinish):
381         (WI.NetworkTableContentView.prototype._resourceLoadingDidFail):
382         (WI.NetworkTableContentView.prototype._handleResourceAdded): Added.
383         (WI.NetworkTableContentView.prototype._insertResourceAndReloadTable):
384         (WI.NetworkTableContentView.prototype._handleNodeDidFireEvent):
385         (WI.NetworkTableContentView.prototype._handleNodeLowPowerChanged):
386         * UserInterface/Views/NetworkTableContentView.css:
387         (.network-table .waterfall .block:matches(.mouse-tracking, .filler) + .block:not(.mouse-tracking, .filler)): Added.
388         (.network-table .waterfall .block.filler + .block): Deleted.
389
390         * UserInterface/Controllers/TimelineManager.js:
391         (WI.TimelineManager):
392         (WI.TimelineManager.prototype._mainResourceDidChange):
393         (WI.TimelineManager.prototype._resourceWasAdded):
394         (WI.TimelineManager.prototype.get persistentNetworkTimeline): Deleted.
395
396 2018-11-13  Matt Baker  <mattbaker@apple.com>
397
398         Web Inspector: Table should support select all (Cmd-A)
399         https://bugs.webkit.org/show_bug.cgi?id=190299
400         <rdar://problem/45029170>
401
402         Reviewed by Devin Rousso.
403
404         * UserInterface/Views/Table.js:
405         (WI.Table.prototype.selectAll):
406         (WI.Table.prototype._handleKeyDown):
407
408 2018-11-13  Matt Baker  <mattbaker@apple.com>
409
410         Web Inspector: Table with no selection should select the first/last row on down/up arrow key
411         https://bugs.webkit.org/show_bug.cgi?id=190100
412         <rdar://problem/44879243>
413
414         Reviewed by Devin Rousso.
415
416         Pressing the up or down arrow key when nothing is selected should select
417         the last or first row, respectively. After selecting the row make sure
418         it is visible by calling the new Table method `revealRow`.
419
420         * UserInterface/Views/Table.js:
421         (WI.Table.prototype.revealRow):
422         (WI.Table.prototype._handleKeyDown):
423         (WI.Table.prototype._selectRowsFromArrowKey):
424
425 2018-11-13  Nikita Vasilyev  <nvasilyev@apple.com>
426
427         Web Inspector: Styles: Command-A should select all properties
428         https://bugs.webkit.org/show_bug.cgi?id=191435
429         <rdar://problem/45921373>
430
431         Reviewed by Devin Rousso.
432
433         When focused on a style property, Command-A on Mac (Control-A on other platforms)
434         should select all properties of the style rule.
435
436         * UserInterface/Base/Utilities.js:
437         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
438         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.selectProperties):
439         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._handleKeyDown):
440
441 2018-11-12  Devin Rousso  <drousso@apple.com>
442
443         Web Inspector: Network: show secure certificate details per-request
444         https://bugs.webkit.org/show_bug.cgi?id=191447
445         <rdar://problem/30019476>
446
447         Reviewed by Joseph Pecoraro.
448
449         * UserInterface/Controllers/NetworkManager.js:
450         (WI.NetworkManager.prototype.resourceRequestWasServedFromMemoryCache):
451         (WI.NetworkManager.prototype.resourceRequestDidReceiveResponse):
452
453         * UserInterface/Models/Resource.js:
454         (WI.Resource.prototype.get responseSecurity): Added.
455         (WI.Resource.prototype.get loadedSecurely): Added.
456         (WI.Resource.prototype.updateForResponse):
457
458         * UserInterface/Views/NetworkResourceDetailView.js:
459         (WI.NetworkResourceDetailView):
460         (WI.NetworkResourceDetailView.prototype.initialLayout):
461         (WI.NetworkResourceDetailView.prototype.showContentViewForIdentifier):
462         * UserInterface/Views/NetworkResourceDetailView.css:
463         (.content-view.resource-details .go-to-arrow): Added.
464         (.content-view.resource-details.showing-find-banner .search-highlight): Added.
465
466         * UserInterface/Views/ResourceSecurityContentView.js: Added.
467         (WI.ResourceSecurityContentView):
468         (WI.ResourceSecurityContentView.prototype.initialLayout):
469         (WI.ResourceSecurityContentView.prototype.layout):
470         (WI.ResourceSecurityContentView.prototype.closed):
471         (WI.ResourceSecurityContentView.prototype.get supportsSearch):
472         (WI.ResourceSecurityContentView.prototype.get numberOfSearchResults):
473         (WI.ResourceSecurityContentView.prototype.get hasPerformedSearch):
474         (WI.ResourceSecurityContentView.prototype.set automaticallyRevealFirstSearchResult):
475         (WI.ResourceSecurityContentView.prototype.performSearch):
476         (WI.ResourceSecurityContentView.prototype.searchCleared):
477         (WI.ResourceSecurityContentView.prototype.revealPreviousSearchResult):
478         (WI.ResourceSecurityContentView.prototype.revealNextSearchResult):
479         (WI.ResourceSecurityContentView.prototype._refreshCetificateSection):
480         (WI.ResourceSecurityContentView.prototype._perfomSearchOnKeyValuePairs):
481         (WI.ResourceSecurityContentView.prototype._revealSearchResult):
482         (WI.ResourceSecurityContentView.prototype._handleResourceResponseReceived):
483         * UserInterface/Views/ResourceSecurityContentView.css: Added.
484         (body[dir] .resource-security > section.certificate > .details):
485         (.resource-security .details .key):
486         (.resource-security .dns-name + .dns-name > .key,):
487         (.resource-security .show-more):
488         (@media (prefers-dark-interface) body[dir] .resource-security > section.certificate > .details):
489         (@media (prefers-dark-interface) .resource-security .details .key):
490
491         * UserInterface/Views/ResourceCookiesContentView.js:
492         (WI.ResourceCookiesContentView.prototype._refreshRequestCookiesSection):
493         (WI.ResourceCookiesContentView.prototype._refreshResponseCookiesSection):
494         (WI.ResourceCookiesContentView.prototype._markIncompleteSectionWithMessage): Deleted.
495         (WI.ResourceCookiesContentView.prototype._markIncompleteSectionWithLoadingIndicator): Deleted.
496         * UserInterface/Views/ResourceHeadersContentView.js:
497         (WI.ResourceHeadersContentView.prototype._refreshSummarySection):
498         (WI.ResourceHeadersContentView.prototype._refreshRedirectHeadersSections):
499         (WI.ResourceHeadersContentView.prototype._refreshRequestHeadersSection):
500         (WI.ResourceHeadersContentView.prototype._refreshResponseHeadersSection):
501         (WI.ResourceHeadersContentView.prototype._refreshQueryStringSection):
502         (WI.ResourceHeadersContentView.prototype._refreshRequestDataSection):
503         (WI.ResourceHeadersContentView.prototype._markIncompleteSectionWithMessage): Deleted.
504         (WI.ResourceHeadersContentView.prototype._markIncompleteSectionWithLoadingIndicator): Deleted.
505         (WI.ResourceHeadersContentView.prototype._appendKeyValuePair): Deleted.
506         * UserInterface/Views/ResourceHeadersContentView.css:
507         (.resource-headers .h1-status > .key,):
508         (body[dir] .resource-headers > section.error > .details): Deleted.
509         (.resource-headers > section.error .key): Deleted.
510         (.resource-headers .details): Deleted.
511         (.resource-headers .details .pair): Deleted.
512         (body[dir=rtl] .resource-headers .details .pair): Deleted.
513         (.resource-headers .details .key): Deleted.
514         (.resource-headers .value): Deleted.
515         (.resource-headers .go-to-arrow): Deleted.
516         (.resource-headers.showing-find-banner .search-highlight): Deleted.
517         * UserInterface/Views/ResourceDetailsSection.js:
518         (WI.ResourceDetailsSection.prototype.markIncompleteSectionWithMessage): Added.
519         (WI.ResourceDetailsSection.prototype.markIncompleteSectionWithLoadingIndicator): Added.
520         (WI.ResourceDetailsSection.prototype.appendKeyValuePair): Added.
521         * UserInterface/Views/ResourceDetailsSection.css:
522         (.resource-details > section > .details): Added.
523         (.resource-details > section > .details > .pair): Added.
524         (body[dir=rtl] .resource-details > section > .details > .pair): Added.
525         (.resource-details > section > .details > .pair > .key): Added.
526         (.resource-details > section > .details > .pair > .value): Added.
527         (body[dir] .resource-details > section.error > .details): Added.
528         (.resource-details > section.error > .details > .pair > .key): Added.
529         Move commonly used functions/styles from container classes onto this object.
530
531         * UserInterface/Main.html:
532         * Localizations/en.lproj/localizedStrings.js:
533
534 2018-11-12  Matt Baker  <mattbaker@apple.com>
535
536         Web Inspector: Table should support shift-extending the row selection
537         https://bugs.webkit.org/show_bug.cgi?id=189718
538         <rdar://problem/44577942>
539
540         Reviewed by Devin Rousso.
541
542         Allow the table selection to be extended by shift-clicking a row, or by
543         holding shift and pressing either the up or down arrow key. If both command
544         and shift are pressed, shift is ignored. The selection behavior is modeled
545         after AppKit's NSTableView.
546
547         * UserInterface/Base/IndexSet.js:
548         (WI.IndexSet.prototype.addRange):
549         (WI.IndexSet.prototype.deleteRange):
550         (WI.IndexSet.prototype.equals):
551         (WI.IndexSet.prototype.difference):
552
553         * UserInterface/Views/Table.js:
554         (WI.Table):
555         (WI.Table.prototype.set allowsMultipleSelection):
556         (WI.Table.prototype.reloadData):
557         (WI.Table.prototype.selectRow):
558         (WI.Table.prototype.deselectRow):
559         (WI.Table.prototype._handleKeyDown):
560         Holding shift and pressing either the up or down arrow key extends the
561         selection to the next unselected row adjacent to the anchor row, or causes
562         the anchor row to be deselected, decreasing the selection. The table chooses
563         the action to take based on the direction of movement (up or down), and
564         the currently selected rows.
565
566         (WI.Table.prototype._selectRowsFromArrowKey):
567         (WI.Table.prototype._handleMouseDown.normalizeRange):
568         (WI.Table.prototype._handleMouseDown):
569         Clicking a row while holding down shift extends the selection to include
570         the rows between the anchor row (exclusive) and clicked row (inclusive).
571         The anchor row is equal to the value of `_selectedRowIndex` prior to
572         clicking a new row.
573
574         (WI.Table.prototype._deselectAllAndSelect):
575         (WI.Table.prototype._removeRows):
576         (WI.Table.prototype._toggleSelectedRowStyle):
577         (WI.Table.prototype._updateSelectedRows):
578         Helper method for updating the selection to the specified rows, and updating
579         DOM styles for rows that are added to or removed from the selection.
580
581 2018-11-12  Nikita Vasilyev  <nvasilyev@apple.com>
582
583         Web Inspector: Styles: inline swatches don't work when Multiple Properties Selection is enabled
584         https://bugs.webkit.org/show_bug.cgi?id=191165
585         <rdar://problem/45737972>
586
587         Reviewed by Devin Rousso.
588
589         * UserInterface/Views/SpreadsheetStyleProperty.js:
590         (WI.SpreadsheetStyleProperty.prototype._createInlineSwatch):
591         * UserInterface/Views/SpreadsheetTextField.js:
592         (WI.SpreadsheetTextField):
593         `click` is fired after `mouseup` and inline swatches are activated by `click` event.
594         Changing this to `click` allows swatches to activate before editing starts.
595
596         (WI.SpreadsheetTextField.prototype._handleMouseDown):
597         Clicking on the field that is being edited should't restart editing. It should move the text caret.
598
599 2018-11-12  Don Olmstead  <don.olmstead@sony.com>
600
601         Shipped PNGs include bad profiles: iCCP: known incorrect sRGB profile
602         https://bugs.webkit.org/show_bug.cgi?id=189230
603         <rdar://problem/44050379>
604
605         Reviewed by Joseph Pecoraro.
606
607         Runs all png images through zopflipng. This results in a smaller file
608         size and takes care of this issue as a byproduct.
609
610         * UserInterface/Images/ApplicationCache.png:
611         * UserInterface/Images/ApplicationCache@2x.png:
612         * UserInterface/Images/ApplicationCacheManifest.png:
613         * UserInterface/Images/ApplicationCacheManifest@2x.png:
614         * UserInterface/Images/Breakpoint.png:
615         * UserInterface/Images/Breakpoint@2x.png:
616         * UserInterface/Images/BreakpointInactive.png:
617         * UserInterface/Images/BreakpointInactive@2x.png:
618         * UserInterface/Images/ClippingCSS.png:
619         * UserInterface/Images/ClippingCSS@2x.png:
620         * UserInterface/Images/ClippingCSSLarge.png:
621         * UserInterface/Images/ClippingCSSLarge@2x.png:
622         * UserInterface/Images/ClippingGeneric.png:
623         * UserInterface/Images/ClippingGeneric@2x.png:
624         * UserInterface/Images/ClippingGenericLarge.png:
625         * UserInterface/Images/ClippingGenericLarge@2x.png:
626         * UserInterface/Images/ClippingJS.png:
627         * UserInterface/Images/ClippingJS@2x.png:
628         * UserInterface/Images/ClippingJSLarge.png:
629         * UserInterface/Images/ClippingJSLarge@2x.png:
630         * UserInterface/Images/ColorIcon.png:
631         * UserInterface/Images/ColorIcon@2x.png:
632         * UserInterface/Images/Cookie.png:
633         * UserInterface/Images/Cookie@2x.png:
634         * UserInterface/Images/Database.png:
635         * UserInterface/Images/Database@2x.png:
636         * UserInterface/Images/DatabaseTable.png:
637         * UserInterface/Images/DatabaseTable@2x.png:
638         * UserInterface/Images/DocumentCSS.png:
639         * UserInterface/Images/DocumentCSS@2x.png:
640         * UserInterface/Images/DocumentCSSLarge.png:
641         * UserInterface/Images/DocumentCSSLarge@2x.png:
642         * UserInterface/Images/DocumentFont.png:
643         * UserInterface/Images/DocumentFont@2x.png:
644         * UserInterface/Images/DocumentFontLarge.png:
645         * UserInterface/Images/DocumentFontLarge@2x.png:
646         * UserInterface/Images/DocumentGL.png:
647         * UserInterface/Images/DocumentGL@2x.png:
648         * UserInterface/Images/DocumentGeneric.png:
649         * UserInterface/Images/DocumentGeneric@2x.png:
650         * UserInterface/Images/DocumentGenericLarge.png:
651         * UserInterface/Images/DocumentGenericLarge@2x.png:
652         * UserInterface/Images/DocumentImage.png:
653         * UserInterface/Images/DocumentImage@2x.png:
654         * UserInterface/Images/DocumentImageLarge.png:
655         * UserInterface/Images/DocumentImageLarge@2x.png:
656         * UserInterface/Images/DocumentJS.png:
657         * UserInterface/Images/DocumentJS@2x.png:
658         * UserInterface/Images/DocumentJSLarge.png:
659         * UserInterface/Images/DocumentJSLarge@2x.png:
660         * UserInterface/Images/DocumentMarkup.png:
661         * UserInterface/Images/DocumentMarkup@2x.png:
662         * UserInterface/Images/DocumentMarkupLarge.png:
663         * UserInterface/Images/DocumentMarkupLarge@2x.png:
664         * UserInterface/Images/FolderGeneric.png:
665         * UserInterface/Images/FolderGeneric@2x.png:
666         * UserInterface/Images/GradientStop.png:
667         * UserInterface/Images/GradientStop@2x.png:
668         * UserInterface/Images/GradientStopSelected.png:
669         * UserInterface/Images/GradientStopSelected@2x.png:
670         * UserInterface/Images/HoverMenuButton.png:
671         * UserInterface/Images/HoverMenuButton@2x.png:
672         * UserInterface/Images/InstructionPointer.png:
673         * UserInterface/Images/InstructionPointer@2x.png:
674         * UserInterface/Images/LocalStorage.png:
675         * UserInterface/Images/LocalStorage@2x.png:
676         * UserInterface/Images/SessionStorage.png:
677         * UserInterface/Images/SessionStorage@2x.png:
678         * UserInterface/Images/SliderThumb.png:
679         * UserInterface/Images/SliderThumb@2x.png:
680         * UserInterface/Images/SliderThumbPressed.png:
681         * UserInterface/Images/SliderThumbPressed@2x.png:
682         * UserInterface/Images/WebSocket.png:
683         * UserInterface/Images/WebSocket@2x.png:
684         * UserInterface/Images/WebSocketLarge.png:
685         * UserInterface/Images/WebSocketLarge@2x.png:
686         * UserInterface/Images/WorkerScript.png:
687         * UserInterface/Images/WorkerScript@2x.png:
688         * UserInterface/Images/WorkerScriptLarge.png:
689         * UserInterface/Images/WorkerScriptLarge@2x.png:
690
691 2018-11-12  Nikita Vasilyev  <nvasilyev@apple.com>
692
693         Web Inspector: Styles: Pressing Tab or Enter should start editing focused property
694         https://bugs.webkit.org/show_bug.cgi?id=191510
695         <rdar://problem/45970897>
696
697         Reviewed by Dean Jackson.
698
699         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
700         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._handleKeyDown):
701
702 2018-11-08  Joseph Pecoraro  <pecoraro@apple.com>
703
704         Web Inspector: Start moving toward better multi-target support
705         https://bugs.webkit.org/show_bug.cgi?id=191345
706
707         Reviewed by Devin Rousso.
708
709         This change continues the move toward better multi-target support
710         by explicitly using explicit target agents in more places, and
711         converting generalized feature checks into target agnostic versions
712         that use the new InspectorBackend.domains, which does not vary based
713         on the connected targets / debuggable type.
714
715         I also audited uses of RuntimeAgent, ConsoleAgent, and DebuggerAgent
716         for better multi-target support since these agents should already
717         have complete multi-target support.
718
719         * UserInterface/Protocol/Target.js:
720         (WI.Target.prototype.initialize):
721         Move explicitly to target.Agent feature checks with a known target.
722
723         * UserInterface/Controllers/DebuggerManager.js:
724         (WI.DebuggerManager.prototype.initializeTarget):
725         (WI.DebuggerManager.prototype._pauseForInternalScriptsDidChange):
726         Move explicitly to target.DebuggerAgent for feature checks with a known target.
727
728         * UserInterface/Controllers/NetworkManager.js:
729         (WI.NetworkManager.prototype.initializeTarget):
730         Move explicitly to target.NetworkAgent for feature checks with a known target.
731
732         * UserInterface/Controllers/RuntimeManager.js:
733         (WI.RuntimeManager.prototype.initializeTarget):
734         (WI.RuntimeManager.prototype.saveResult):
735         * UserInterface/Protocol/RemoteObject.js:
736         (WI.RemoteObject.prototype.updatePreview):
737         (WI.RemoteObject.prototype.getDisplayablePropertyDescriptors):
738         (WI.RemoteObject.prototype.deprecatedGetDisplayableProperties):
739         * UserInterface/Views/SourceCodeTextEditor.js:
740         (WI.SourceCodeTextEditor.prototype._createTypeTokenAnnotator):
741         (WI.SourceCodeTextEditor.prototype._createBasicBlockAnnotator):
742         Move explicitly to target.RuntimeAgent for feature checks with a known target.
743
744         * UserInterface/Models/CSSCompletions.js:
745         (WI.CSSCompletions.initializeCSSCompletions):
746         Move explicitly to target.CSSAgent for feature checks with a known target.
747
748         * UserInterface/Views/ContextMenuUtilities.js:
749         Use the DebuggerAgent from the target associated with the DOMNode's
750         remote object instead of assuming the main target.
751
752         * UserInterface/Views/SettingsTabContentView.js:
753         (WI.SettingsTabContentView.prototype._createGeneralSettingsView):
754         Update the ConsoleAgent setting on all targets that support it.
755
756         * UserInterface/Views/BreakpointActionView.js:
757         (WI.BreakpointActionView):
758         All backends support BreakpointActionType, the assertion can go away.
759
760         * UserInterface/Views/LogContentView.js:
761         (WI.LogContentView.prototype.get navigationItems):
762         * UserInterface/Views/DOMTreeContentView.js:
763         (WI.DOMTreeContentView.prototype.get navigationItems):
764         Include additional `window.FooAgent` checks for these since they will need
765         to be revisited in the future.
766
767         * UserInterface/Protocol/InspectorBackend.js:
768         (InspectorBackendClass.prototype.get domains):
769         (InspectorBackendClass.prototype.activateDomain):
770         Expose InspectorBackend.domains.<Domain> for feature checking.
771
772         * UserInterface/Controllers/BreakpointPopoverController.js:
773         (WI.BreakpointPopoverController.prototype._createPopoverContent):
774         * UserInterface/Controllers/CSSManager.js:
775         (WI.CSSManager):
776         (WI.CSSManager.prototype._mainResourceDidChange):
777         * UserInterface/Controllers/TimelineManager.js:
778         (WI.TimelineManager.prototype._attemptAutoCapturingForFrame):
779         (WI.TimelineManager.prototype._updateAutoCaptureInstruments):
780         (WI.TimelineManager):
781         * UserInterface/Models/Canvas.js:
782         (WI.Canvas.prototype.startRecording):
783         (WI.Canvas.prototype.recordingFinished):
784         * UserInterface/Models/ScriptSyntaxTree.js:
785         (WI.ScriptSyntaxTree.functionReturnDivot):
786         * UserInterface/Protocol/DebuggerObserver.js:
787         (WI.DebuggerObserver):
788         * UserInterface/Protocol/NetworkObserver.js:
789         (WI.NetworkObserver.prototype.requestWillBeSent):
790         * UserInterface/Views/DebuggerSidebarPanel.js:
791         (WI.DebuggerSidebarPanel):
792         (WI.DebuggerSidebarPanel.prototype._handleCreateBreakpointClicked):
793         * UserInterface/Views/NetworkTimelineView.js:
794         (WI.NetworkTimelineView):
795         * UserInterface/Views/ResourceDetailsSidebarPanel.js:
796         (WI.ResourceDetailsSidebarPanel.prototype._refreshRequestAndResponse):
797         * UserInterface/Views/WebSocketContentView.js:
798         (WI.WebSocketContentView):
799         (WI.NetworkManager.prototype.webSocketWillSendHandshakeRequest):
800         (WI.DebuggerManager.prototype.debuggerDidResume):
801         Feature check in a target agnostic way.
802
803 2018-11-08  Matt Baker  <mattbaker@apple.com>
804
805         Web Inspector: ResourceQueryController should early return when query is longer than search string
806         https://bugs.webkit.org/show_bug.cgi?id=191436
807
808         Reviewed by Devin Rousso.
809
810         * UserInterface/Controllers/ResourceQueryController.js:
811
812         * UserInterface/Models/ResourceQueryMatch.js:
813         (WI.ResourceQueryMatch):
814         Drive-by fixes.
815
816 2018-11-08  Joseph Pecoraro  <pecoraro@apple.com>
817
818         Uncaught Exception: undefined is not an object (evaluating 'treeElement.parent.removeChild')
819         https://bugs.webkit.org/show_bug.cgi?id=191454
820
821         Reviewed by Matt Baker.
822
823         * UserInterface/Views/ResourceSidebarPanel.js:
824         (WI.ResourceSidebarPanel.prototype._scriptsCleared):
825         This was intending to iterate the Map's values, which are tree elements.
826
827 2018-11-08  Joseph Pecoraro  <pecoraro@apple.com>
828
829         Web Inspector: Potential for watch expressions to never show results
830         https://bugs.webkit.org/show_bug.cgi?id=191438
831
832         Reviewed by Matt Baker.
833
834         * UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
835         (WI.ScopeChainDetailsSidebarPanel.prototype._generateWatchExpressionsSection):
836         If there was no object don't bail, continue and resolve the Promise.
837         In this case we can fallback to show `undefined`. This code might not be
838         reachable right now, but is wrong as is.
839
840 2018-11-08  Joseph Pecoraro  <pecoraro@apple.com>
841
842         Web Inspector: Debugger Popover does not work when paused in Worker
843         https://bugs.webkit.org/show_bug.cgi?id=191342
844
845         Reviewed by Devin Rousso.
846
847         * UserInterface/Views/SourceCodeTextEditor.js:
848         (WI.SourceCodeTextEditor.prototype._tokenTrackingControllerHighlightedJavaScriptExpression.populate):
849         (WI.SourceCodeTextEditor.prototype._tokenTrackingControllerHighlightedJavaScriptExpression):
850         When receiving the result of the popover evaluation associate the RemoteObject with
851         the target we used to evaluate (such as the Debugger call frame), not the target
852         associated with the editor.
853
854 2018-11-08  Joseph Pecoraro  <pecoraro@apple.com>
855
856         Web Inspector: Restrict domains at the target level instead of only at the window level
857         https://bugs.webkit.org/show_bug.cgi?id=191344
858
859         Reviewed by Devin Rousso.
860
861         With this change the list of agents available on the target should accurately
862         reflect the domains that target supports. We should start moving in the direction
863         that if we are checking for, or using, a feature, we should ideally be using
864         code that looks like `target.FooAgent.method` and not `window.FooAgent` or
865         an unprefixed `FooAgent`. More changes to follow.
866
867         * UserInterface/Controllers/AppControllerBase.js:
868         * UserInterface/Base/DebuggableType.js: Added.
869         Extract debuggable type enum out into its own file loaded early on.
870
871         * UserInterface/Main.html:
872         * UserInterface/Test.html:
873         Load DebuggableType.js.
874
875         * UserInterface/Controllers/NetworkManager.js:
876         (WI.NetworkManager.prototype.initializeTarget):
877         With these changes target.ServiceWorker is only exposed on a ServiceWorker target.
878
879         * UserInterface/Protocol/Connection.js:
880         (InspectorBackend.WorkerConnection):
881         With these changes Target.js restricts the domains exposed on the Target so just
882         clone all of the agents (we don't need to do anything special).
883
884         * UserInterface/Protocol/InspectorBackend.js:
885         (InspectorBackendClass.prototype.activateDomain):
886         Update supported domains per-type. If there is no explicit availability
887         then the domain is supported on all types.
888
889         (InspectorBackendClass.prototype.supportedDomainsForDebuggableType):
890         Get supported domains per-type.
891
892         (InspectorBackendClass.prototype.get workerSupportedDomains): Deleted.
893         (InspectorBackendClass.prototype.workerSupportedDomain): Deleted.
894         workerSupportedDomains is now unnecessary.
895
896         * UserInterface/Protocol/Target.js:
897         (WI.Target.prototype._supportedDomainsForTargetType):
898         Restrict supported domains for this target based on its type.
899
900         * UserInterface/Protocol/Legacy/10.3/InspectorBackendCommands.js:
901         * UserInterface/Protocol/Legacy/11.0/InspectorBackendCommands.js:
902         * UserInterface/Protocol/Legacy/11.3/InspectorBackendCommands.js:
903         * UserInterface/Protocol/Legacy/12.0/InspectorBackendCommands.js:
904         * Versions/Inspector-iOS-10.3.json:
905         * Versions/Inspector-iOS-11.0.json:
906         * Versions/Inspector-iOS-11.3.json:
907         * Versions/Inspector-iOS-12.0.json:
908         Regenerate protocol files now that workerSupportedDomains is unnecessary
909         and explicit availability has been added to other domains.
910
911 2018-11-07  Nikita Vasilyev  <nvasilyev@apple.com>
912
913         REGRESSION(r236705): Web Inspector: wrong text color for selected DataGrid row
914         https://bugs.webkit.org/show_bug.cgi?id=191405
915         <rdar://problem/45893283>
916
917         Reviewed by Matt Baker.
918
919         Selection background color for both Dark Mode mode and Light Mode is dark blue.
920         The text color for both cases should be white.
921
922         * UserInterface/Views/DataGrid.css:
923         (body:not(.window-inactive, .window-docked-inactive) .data-grid:focus tr.editable.selected .cell-content > input):
924
925 2018-11-07  Joseph Pecoraro  <pecoraro@apple.com>
926
927         Web Inspector: Fix "Javascript" => "JavaScript" enum in protocol generated objects
928         https://bugs.webkit.org/show_bug.cgi?id=191340
929
930         Reviewed by Devin Rousso.
931
932         * UserInterface/Models/Canvas.js:
933         (WI.Canvas.fromPayload):
934         Insert a missing break statement for the WebGPU case.
935
936         * UserInterface/Models/MemoryTimelineRecord.js:
937         (WI.MemoryTimelineRecord.memoryCategoriesFromProtocol):
938         Use new enum name.
939
940         * UserInterface/Protocol/Legacy/10.0/InspectorBackendCommands.js:
941         * UserInterface/Protocol/Legacy/10.3/InspectorBackendCommands.js:
942         * UserInterface/Protocol/Legacy/11.0/InspectorBackendCommands.js:
943         * UserInterface/Protocol/Legacy/11.3/InspectorBackendCommands.js:
944         * UserInterface/Protocol/Legacy/12.0/InspectorBackendCommands.js:
945         * UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js:
946         * UserInterface/Protocol/Legacy/9.0/InspectorBackendCommands.js:
947         * UserInterface/Protocol/Legacy/9.3/InspectorBackendCommands.js:
948         Update enums with new generator.
949
950 2018-11-06  Joseph Pecoraro  <pecoraro@apple.com>
951
952         REGRESSION: Web Inspector: Popovers drawing incorrectly in Network Tab (clicking between a few items)
953         https://bugs.webkit.org/show_bug.cgi?id=191323
954
955         Reviewed by Devin Rousso.
956
957         * UserInterface/Views/Popover.js:
958         (WI.Popover.prototype._drawBackground):
959         Save and restore the context state between updates. Something
960         was affecting the clearRect, making it so that it didn't actually
961         clear the entire rect each time.
962
963 2018-11-05  Devin Rousso  <drousso@apple.com>
964
965         Web Inspector: Audit: turn off Start button when all tests are removed
966         https://bugs.webkit.org/show_bug.cgi?id=191235
967
968         Reviewed by Matt Baker.
969
970         * UserInterface/Views/AuditNavigationSidebarPanel.js:
971         (WI.AuditNavigationSidebarPanel.prototype._handleAuditTestRemoved):
972
973 2018-11-05  Matt Baker  <mattbaker@apple.com>
974
975         Web Inspector: Table selection should not require that rows be in the cache
976         https://bugs.webkit.org/show_bug.cgi?id=190993
977         <rdar://problem/45613812>
978
979         Reviewed by Devin Rousso.
980
981         Deselecting a table row shouldn't depend on it being in the cache. This
982         allows us to implement select all, and other kinds of bulk selection
983         actions that affect rows that haven't been revealed.
984
985         * UserInterface/Views/Table.js:
986         (WI.Table.prototype.deselectRow):
987
988 2018-11-05  Devin Rousso  <drousso@apple.com>
989
990         Web Inspector: show save/restore stack for recorded 2D Canvases
991         https://bugs.webkit.org/show_bug.cgi?id=175283
992         <rdar://problem/34040756>
993
994         Reviewed by Matt Baker.
995
996         Instead of using plain objects for holding the `WI.Recording`'s state, use a model object
997         so that more data can be passed around. When visualizing the state, show any previously
998         saved states in a `WI.DetailsSection` underneath the current state. If there are no saved
999         states (meaning there is only the current state), don't use a `WI.DetailsSection`.
1000
1001         * UserInterface/Models/RecordingState.js: Added.
1002         (WI.RecordingState):
1003         (WI.RecordingState.fromContext):
1004         (WI.RecordingState.async swizzleInitialState):
1005         (WI.RecordingState.prototype.get source):
1006         (WI.RecordingState.prototype.has):
1007         (WI.RecordingState.prototype.get return):
1008         (WI.RecordingState.prototype.toJSON):
1009         (WI.RecordingState.prototype.[Symbol.iterator]):
1010
1011         * UserInterface/Models/Recording.js:
1012         (WI.Recording.prototype.async _process):
1013         (WI.Recording.prototype.async _swizzleState): Deleted.
1014
1015         * UserInterface/Models/RecordingAction.js:
1016         (WI.RecordingAction.prototype.process):
1017         (WI.RecordingAction.deriveCurrentState): Deleted.
1018
1019         * UserInterface/Views/RecordingContentView.js:
1020         (WI.RecordingContentView.prototype._generateContentCanvas2D):
1021
1022         * UserInterface/Views/RecordingStateDetailsSidebarPanel.js:
1023         (WI.RecordingStateDetailsSidebarPanel):
1024         (WI.RecordingStateDetailsSidebarPanel.prototype.get scrollElement):
1025         (WI.RecordingStateDetailsSidebarPanel.prototype.sizeDidChange): Added.
1026         (WI.RecordingStateDetailsSidebarPanel.prototype._generateDetailsCanvas2D):
1027         (WI.RecordingStateDetailsSidebarPanel.prototype._generateDetailsCanvas2D.isColorProperty): Deleted.
1028         (WI.RecordingStateDetailsSidebarPanel.prototype._generateDetailsCanvas2D.createInlineSwatch): Deleted.
1029         * UserInterface/Views/RecordingStateDetailsSidebarPanel.css:
1030         (.sidebar > .panel.details.recording-state > .content .details-section > .header .source): Added.
1031         (.sidebar > .panel.details.recording-state > .content .data-grid tr.modified): Added.
1032         (.sidebar > .panel.details.recording-state > .content .data-grid tr:not(.selected).non-standard .name-column): Added.
1033         (.sidebar > .panel.details.recording-state > .content .data-grid tr:not(.selected) .unavailable): Added.
1034         (.sidebar > .panel.details.recording-state > .content .data-grid .inline-swatch): Added.
1035         (.sidebar > .panel.details.recording-state > .content > .data-grid tr.modified): Deleted.
1036         (.sidebar > .panel.details.recording-state > .content > .data-grid tr:not(.selected).non-standard): Deleted.
1037         (.sidebar > .panel.details.recording-state > .content > .data-grid tr:not(.selected) .unavailable): Deleted.
1038         (.sidebar > .panel.details.recording-state > .content > .data-grid .inline-swatch): Deleted.
1039
1040         * UserInterface/Main.html:
1041         * UserInterface/Test.html:
1042
1043         * Localizations/en.lproj/localizedStrings.js:
1044
1045 2018-11-03  Devin Rousso  <drousso@apple.com>
1046
1047         Web Inspector: Canvas: capture changes to <canvas> that would affect the recorded context
1048         https://bugs.webkit.org/show_bug.cgi?id=190854
1049
1050         Reviewed by Matt Baker.
1051
1052         * UserInterface/Models/RecordingAction.js:
1053         (WI.RecordingAction):
1054         (WI.RecordingAction.isFunctionForType):
1055         (WI.RecordingAction.constantNameForParameter):
1056         (WI.RecordingAction.prototype.get contextReplacer): Added.
1057         (WI.RecordingAction.prototype.async.swizzle):
1058         (WI.RecordingAction.prototype.apply):
1059         Create a constant list of actions for each recording type that need to replace the context
1060         with a different value before being applied (e.g. `width` should be applied to the
1061         `context`'s `canvas` instead of directly to the `context`).
1062
1063         * UserInterface/Views/RecordingContentView.js:
1064         (WI.RecordingContentView.prototype._generateContentCanvas2D.actionModifiesPath): Added.
1065         (WI.RecordingContentView.prototype._generateContentCanvas2D):
1066         (WI.RecordingContentView._actionModifiesPath): Deleted.
1067         Generate the path context after the actions are applied to the preview context so that the
1068         final width/height are known and can be used. This is needed because changing the
1069         width/height causes the content to be erased.
1070
1071         * UserInterface/Views/RecordingActionTreeElement.js:
1072         (WI.RecordingActionTreeElement._generateDOM):
1073         (WI.RecordingActionTreeElement._classNameForAction):
1074         * UserInterface/Views/RecordingActionTreeElement.css:
1075         (.tree-outline:focus .item.action.selected:not(.invalid, .initial-state, .has-context-replacer) > .icon): Added.
1076         (.item.action > .titles .context-replacer::after): Added.
1077         (.item.action.has-context-replacer > .icon): Added.
1078         (@media (prefers-dark-interface) .item.action:not(.invalid, .initial-state, .has-context-replacer) > .icon): Added.
1079         (.tree-outline:focus .item.action.selected:not(.initial-state, .invalid) > .icon): Deleted.
1080         (@media (prefers-dark-interface) .item.action:not(.initial-state) > .icon): Deleted.
1081         (@media (prefers-dark-interface) .tree-outline:not(.hide-disclosure-buttons) .item.action:not(.initial-state, .parent) > .icon): Deleted.
1082         Add the context replacer text to the beginning of the action's name if it exists.
1083
1084         * UserInterface/Views/CanvasContentView.js:
1085         (WI.CanvasContentView.prototype._refreshPixelSize):
1086         (WI.CanvasContentView.prototype._updatePixelSize): Deleted.
1087         Update preview image when the canvas' size changes.
1088
1089 2018-11-02  Matt Baker  <mattbaker@apple.com>
1090
1091         Web Inspector: support multiple selection/deletion of cookie records
1092         https://bugs.webkit.org/show_bug.cgi?id=66381
1093         <rdar://problem/19281525>
1094
1095         Reviewed by Devin Rousso.
1096
1097         * Localizations/en.lproj/localizedStrings.js:
1098
1099         * UserInterface/Views/CookieStorageContentView.js:
1100         (WI.CookieStorageContentView):
1101         (WI.CookieStorageContentView.prototype.get scrollableElements):
1102         (WI.CookieStorageContentView.prototype.tableNumberOfRows):
1103         (WI.CookieStorageContentView.prototype.tableSortChanged):
1104         (WI.CookieStorageContentView.prototype.tableCellContextMenuClicked):
1105         (WI.CookieStorageContentView.prototype.tableDidRemoveRows):
1106         (WI.CookieStorageContentView.prototype.tablePopulateCell):
1107         (WI.CookieStorageContentView.prototype.initialLayout):
1108         (WI.CookieStorageContentView.prototype._generateSortComparator):
1109         (WI.CookieStorageContentView.prototype._refreshButtonClicked):
1110         (WI.CookieStorageContentView.prototype._reloadCookies):
1111         (WI.CookieStorageContentView.prototype._updateSort):
1112         (WI.CookieStorageContentView.prototype._handleTableKeyDown):
1113         (WI.CookieStorageContentView.prototype.update): Deleted.
1114         (WI.CookieStorageContentView.prototype._rebuildTable): Deleted.
1115         (WI.CookieStorageContentView.prototype._sortDataGrid.localeCompare): Deleted.
1116         (WI.CookieStorageContentView.prototype._sortDataGrid.numberCompare): Deleted.
1117         (WI.CookieStorageContentView.prototype._sortDataGrid.expiresCompare): Deleted.
1118         (WI.CookieStorageContentView.prototype._sortDataGrid): Deleted.
1119         (WI.CookieStorageContentView.prototype._deleteCallback): Deleted.
1120         Replace DataGrid with Table. The content view serves as the table
1121         delegate and data source, and handles delete and backspace key events
1122         to allow deleting the selected cookies. Cookies may also be deleted from
1123         the table context menu and a new button in the navigation bar.
1124
1125         * UserInterface/Views/Table.js:
1126         (WI.Table.prototype.isRowSelected):
1127         (WI.Table.prototype.selectRow):
1128         (WI.Table.prototype.deselectRow):
1129         (WI.Table.prototype.removeRow):
1130         (WI.Table.prototype._getOrCreateRow):
1131         (WI.Table.prototype._handleMouseDown):
1132         (WI.Table.prototype._removeRows):
1133         (WI.Table.prototype._isRowSelected): Deleted.
1134         Make `isSelectedRow` public. It is more convenient and efficient than
1135         calling `Table.prototype.selectedRows.includes(rowIndex)`.
1136
1137 2018-11-01  Devin Rousso  <drousso@apple.com>
1138
1139         Web Inspector: View: introduce a didLayoutSubtree
1140         https://bugs.webkit.org/show_bug.cgi?id=191176
1141
1142         Reviewed by Matt Baker.
1143
1144         Introduce logic to allow subclasses of `WI.View` to perform logic after every `WI.View` in
1145         their subtree has finished `layout`.
1146
1147         * UserInterface/Views/View.js:
1148         (WI.View.prototype.didLayoutSubtree): Added.
1149         (WI.View.prototype._layoutSubtree):
1150
1151         * UserInterface/Views/NetworkTableContentView.js:
1152         (WI.NetworkTableContentView.prototype.layout):
1153         (WI.NetworkTableContentView.prototype.didLayoutSubtree): Added.
1154
1155 2018-11-01  Devin Rousso  <drousso@apple.com>
1156
1157         Web Inspector: Network: remove unnecessary media event tracking
1158         https://bugs.webkit.org/show_bug.cgi?id=191174
1159
1160         Reviewed by Joseph Pecoraro.
1161
1162         Renames "Group by Node" to "Group Media Requests" for clarity.
1163
1164         * UserInterface/Views/NetworkTableContentView.js:
1165         (WI.NetworkTableContentView):
1166         (WI.NetworkTableContentView.prototype.reset):
1167         (WI.NetworkTableContentView.prototype.showRepresentedObject):
1168         (WI.NetworkTableContentView.prototype.networkDetailViewClose):
1169         (WI.NetworkTableContentView.prototype._populateNameCell):
1170         (WI.NetworkTableContentView.prototype._populateWaterfallGraph.createDOMEventLine):
1171         (WI.NetworkTableContentView.prototype._populateWaterfallGraph):
1172         (WI.NetworkTableContentView.prototype.layout):
1173         (WI.NetworkTableContentView.prototype._entryForDOMNode):
1174         (WI.NetworkTableContentView.prototype._handleGroupByDOMNodeCheckedDidChange):
1175         (WI.NetworkTableContentView.prototype._restoreSelectedRow):
1176         (WI.NetworkTableContentView.prototype._handleResourceEntryMousedownWaterfall):
1177         (WI.NetworkTableContentView.prototype._handleNodeEntryMousedownWaterfall):
1178         (WI.NetworkTableContentView.prototype._handleMousedownWaterfall):
1179         * UserInterface/Views/NetworkTableContentView.css:
1180         (.network-table .data-container .cell.name .range): Added.
1181         (.network-table .data-container .cell.name .range::before): Added.
1182         (.network-table:focus .data-container li.selected .cell.name .range): Added.
1183         (@media (prefers-dark-interface) .network-table .data-container .cell.name .range): Added.
1184         Always display the "Byte Range" title as a "subtitle", regardless of the media requests
1185         setting being toggled.
1186         Drive-by: update the position of the waterfall popover whenever the time range changes.
1187         Drive-by: close the details view if a node is selected and the media requests setting is
1188         turned off.
1189
1190         * UserInterface/Views/Popover.js:
1191         (WI.Popover.prototype.resize): Added.
1192         (WI.Popover.prototype.handleEvent):
1193
1194         * Localizations/en.lproj/localizedStrings.js:
1195
1196 2018-11-01  Devin Rousso  <drousso@apple.com>
1197
1198         Web Inspector: Uncaught Exception: TypeError: null is not an object (evaluating 'mouseBlock.addEventListener')
1199         https://bugs.webkit.org/show_bug.cgi?id=191020
1200
1201         Reviewed by Joseph Pecoraro.
1202
1203         * UserInterface/Views/TimelineRuler.js:
1204         (WI.TimelineRuler):
1205         Since `undefined` is not a number, it isn't less than `0`, which caused us to divide by
1206         `undefined` (equivalent to dividing by `0`), resulting in `NaN`.
1207
1208 2018-11-01  Nikita Vasilyev  <nvasilyev@apple.com>
1209
1210         Uncaught Exception: TypeError: undefined is not an object (evaluating 'WI.modifierKeys.metaKey') (at ScopeBarItem.js:87:67)
1211         https://bugs.webkit.org/show_bug.cgi?id=191173
1212
1213         Reviewed by Devin Rousso.
1214
1215         WI.modifierKeys was accessed before it was initialized. Move it from WI.contentLoaded to WI.loaded,
1216         which happens before WI.contentLoaded.
1217
1218         * UserInterface/Base/Main.js:
1219         (WI.loaded):
1220         (WI.contentLoaded):
1221
1222 2018-11-01  Nikita Vasilyev  <nvasilyev@apple.com>
1223
1224         REGRESSION(r237652): Web Inspector: dumpInspectorProtocolMessages is always enabled
1225         https://bugs.webkit.org/show_bug.cgi?id=191161
1226
1227         Reviewed by Joseph Pecoraro.
1228
1229         * UserInterface/Protocol/InspectorBackend.js:
1230         (InspectorBackendClass.prototype.get dumpInspectorProtocolMessages):
1231
1232 2018-11-01  Nikita Vasilyev  <nvasilyev@apple.com>
1233
1234         Web Inspector: Styles: Toggle selected properties by pressing Space or Command+/
1235         https://bugs.webkit.org/show_bug.cgi?id=181145
1236         <rdar://problem/36203388>
1237
1238         Reviewed by Brian Burg.
1239
1240         Pressing Space key or Command-/ toggles (comments out or uncomments) selected properties.
1241
1242         This patch only works with "Enable Selection of Multiple Properties" checked. It shouldn't introduce any
1243         changes when this setting is unchecked.
1244
1245         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
1246         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.get selectionRange):
1247         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.selectProperties):
1248         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyCopy):
1249         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._handleKeyDown):
1250         * UserInterface/Views/SpreadsheetStyleProperty.js:
1251         (WI.SpreadsheetStyleProperty):
1252         (WI.SpreadsheetStyleProperty.prototype.update): Renamed from _update.
1253         (WI.SpreadsheetStyleProperty.prototype.updateStatus):
1254         (WI.SpreadsheetStyleProperty.prototype.applyFilter):
1255         (WI.SpreadsheetStyleProperty.prototype.handleCopyEvent):
1256         Make `update` method public. No other changes were made.
1257
1258 2018-10-31  Devin Rousso  <drousso@apple.com>
1259
1260         Web Inspector: Canvas: create a setting for auto-recording newly created contexts
1261         https://bugs.webkit.org/show_bug.cgi?id=190856
1262
1263         Reviewed by Brian Burg.
1264
1265         * UserInterface/Controllers/CanvasManager.js:
1266         (WI.CanvasManager.supportsRecordingAutoCapture): Added.
1267         (WI.CanvasManager.prototype.setRecordingAutoCaptureFrameCount): Added.
1268
1269         * UserInterface/Models/Canvas.js:
1270         (WI.Canvas.prototype.startRecording):
1271         (WI.Canvas.prototype.recordingStarted):
1272         (WI.Canvas.prototype.recordingFinished):
1273
1274         * UserInterface/Models/Recording.js:
1275
1276         * UserInterface/Views/CanvasOverviewContentView.js:
1277         (WI.CanvasOverviewContentView):
1278         (WI.CanvasOverviewContentView.prototype.get navigationItems):
1279         (WI.CanvasOverviewContentView.prototype.initialLayout): Added.
1280         (WI.CanvasOverviewContentView.prototype.attached):
1281         (WI.CanvasOverviewContentView.prototype.detached):
1282         (WI.CanvasOverviewContentView.prototype._setRecordingAutoCaptureFrameCount): Added.
1283         (WI.CanvasOverviewContentView.prototype._updateRecordingAutoCaptureInputElementSize): Added.
1284         (WI.CanvasOverviewContentView.prototype._handleRecordingAutoCaptureInput): Added.
1285         (WI.CanvasOverviewContentView.prototype._handleRecordingAutoCaptureCheckedDidChange): Added.
1286         (WI.CanvasOverviewContentView.prototype._handleCanvasRecordingAutoCaptureEnabledChanged): Added.
1287         (WI.CanvasOverviewContentView.prototype._handleCanvasRecordingAutoCaptureFrameCountChanged): Added.
1288         * UserInterface/Views/CanvasOverviewContentView.css:
1289         (.navigation-bar > .item.canvas-recording-auto-capture > label): Added.
1290         (.navigation-bar > .item.canvas-recording-auto-capture > label > input): Added.
1291         (.navigation-bar > .item.canvas-recording-auto-capture > label > input::-webkit-inner-spin-button): Added.
1292         (.popover-content > .tree-outline .item.recording > .icon): Deleted.
1293         (.popover-content > .tree-outline .item.recording:hover): Deleted.
1294         (.popover-content > .tree-outline .item.recording:hover > .icon): Deleted.
1295         Drive-by: removed unused CSS rules.
1296
1297         * UserInterface/Views/CanvasContentView.js:
1298         (WI.CanvasContentView.prototype.initialLayout):
1299         (WI.CanvasContentView.prototype._updateProgressView):
1300         (WI.CanvasContentView.prototype._updateViewRelatedItems):
1301
1302         * UserInterface/Views/CanvasTabContentView.js:
1303         (WI.CanvasTabContentView.prototype._recordingImportedOrStopped):
1304
1305         * UserInterface/Views/CheckboxNavigationItem.js:
1306         (WI.CheckboxNavigationItem):
1307         (WI.CheckboxNavigationItem.prototype._handleLabelClick): Added.
1308
1309         * UserInterface/Base/Setting.js:
1310
1311         * Localizations/en.lproj/localizedStrings.js:
1312
1313 2018-10-31  Devin Rousso  <drousso@apple.com>
1314
1315         Web Inspector: display low-power enter/exit events in Timelines and Network node waterfalls
1316         https://bugs.webkit.org/show_bug.cgi?id=190641
1317         <rdar://problem/45319049>
1318
1319         Reviewed by Joseph Pecoraro.
1320
1321         * UserInterface/Protocol/DOMObserver.js:
1322         (WI.DOMObserver.prototype.videoLowPowerChanged): Added.
1323
1324         * UserInterface/Controllers/DOMManager.js:
1325         (WI.DOMManager.prototype.videoLowPowerChanged): Added.
1326
1327         * UserInterface/Models/DOMNode.js:
1328         (WI.DOMNode):
1329         (WI.DOMNode.prototype.get lowPowerRanges): Added.
1330         (WI.DOMNode.prototype.videoLowPowerChanged): Added.
1331         (WI.DOMNode.prototype.canEnterLowPowerMode): Added.
1332
1333         * UserInterface/Views/NetworkTableContentView.js:
1334         (WI.NetworkTableContentView.prototype._populateDomainCell):
1335         (WI.NetworkTableContentView.prototype._tryLinkResourceToDOMNode):
1336         (WI.NetworkTableContentView.prototype._handleNodeLowPowerChanged): Added.
1337         * UserInterface/Views/NetworkTableContentView.css:
1338         (.network-table :not(.header) .cell.waterfall .waterfall-container > .area):
1339         (.network-table :not(.header) .cell.waterfall .waterfall-container > .area.dom-fullscreen): Added.
1340         (.network-table :not(.header) .cell.waterfall .waterfall-container > .area.low-power): Added.
1341         (.network-table :not(.header) .cell.waterfall .waterfall-container > .dom-fullscreen): Deleted.
1342
1343         * UserInterface/Views/DOMNodeEventsContentView.js:
1344         (WI.DOMNodeEventsContentView):
1345         (WI.DOMNodeEventsContentView.prototype.initialLayout):
1346         (WI.DOMNodeEventsContentView.prototype.closed): Deleted.
1347         (WI.DOMNodeEventsContentView.prototype._handleDOMNodeDidFireEvent): Deleted.
1348
1349         * UserInterface/Views/DOMEventsBreakdownView.js:
1350         (WI.DOMEventsBreakdownView):
1351         (WI.DOMEventsBreakdownView.prototype.initialLayout):
1352         (WI.DOMEventsBreakdownView.prototype.layout): Added.
1353         (WI.DOMEventsBreakdownView.prototype._handleDOMNodeDidFireEvent): Added.
1354         (WI.DOMEventsBreakdownView.prototype._handleDOMNodeLowPowerChanged): Added.
1355         (WI.DOMEventsBreakdownView.prototype.addEvent): Deleted.
1356         (WI.DOMEventsBreakdownView.prototype._populateTable.percentOfTotalTime): Deleted.
1357         (WI.DOMEventsBreakdownView.prototype._populateTable): Deleted.
1358         * UserInterface/Views/DOMEventsBreakdownView.css:
1359         (.dom-events-breakdown .graph > .area): Added.
1360         (.dom-events-breakdown .graph > .area.fullscreen):
1361         (.dom-events-breakdown .graph > .area.low-power): Added.
1362
1363         * Localizations/en.lproj/localizedStrings.js:
1364
1365 2018-10-31  Devin Rousso  <drousso@apple.com>
1366
1367         Web Inspector: Audit: save imported audits across WebInspector sessions
1368         https://bugs.webkit.org/show_bug.cgi?id=190858
1369         <rdar://problem/45527625>
1370
1371         Reviewed by Brian Burg.
1372
1373         * UserInterface/Base/ObjectStore.js: Added.
1374         (WI.ObjectStore):
1375         (WI.ObjectStore.supported):
1376         (WI.ObjectStore._open):
1377         (WI.ObjectStore.get _databaseName):
1378         (WI.ObjectStore.prototype.associateObject):
1379         (WI.ObjectStore.prototype.async getAll):
1380         (WI.ObjectStore.prototype.async add):
1381         (WI.ObjectStore.prototype.async addObject):
1382         (WI.ObjectStore.prototype.async delete):
1383         (WI.ObjectStore.prototype.async deleteObject):
1384         (WI.ObjectStore.prototype._resolveKeyPath):
1385         (WI.ObjectStore.prototype.async _operation.listener):
1386         (WI.ObjectStore.prototype.async _operation):
1387         Wrapper for a global `IndexedDB` instance for all of WebInspector (per level). Instances of
1388         `WI.ObjectStore` are able to control a given `IDBObjectStore` using a promise-based API.
1389
1390         *NOTE*: due to the constraint that `IDBObjectStore`s are only able to be created when the
1391         owner `IndexedDB` is "upgrade"d, all `WI.ObjectStore` must be declared before the database
1392         is opened for the first time. Additionally, any time a new `WI.ObjectStore` is added, the
1393         `version` needs to be incremented to ensure that the "upgrade" event fires.
1394
1395         To use any of the `*Object` functions, one must implement a `toJSON` on the object provided.
1396         This is so that `WI.ObjectStore` is able to add the resulting identifier value to the owner
1397         object while storing its `toJSON` value in the IndexedDB (e.g. for objects that have cycles).
1398
1399         * UserInterface/Controllers/AuditManager.js:
1400         (WI.AuditManager.prototype.import):
1401         (WI.AuditManager.prototype.loadStoredTests): Added.
1402         (WI.AuditManager.prototype.removeTest): Added.
1403         (WI.AuditManager.prototype._addTest):
1404
1405         * UserInterface/Views/AuditTabContentView.js:
1406         (WI.AuditTabContentView.prototype.initialLayout): Added.
1407         Attempt to load stored audits when the Audit tab is first shown (lazy-load).
1408
1409         * UserInterface/Views/AuditNavigationSidebarPanel.js:
1410         (WI.AuditNavigationSidebarPanel.prototype.initialLayout):
1411         (WI.AuditNavigationSidebarPanel.prototype._handleAuditTestRemoved): Added.
1412
1413         * UserInterface/Views/AuditTreeElement.js:
1414         (WI.AuditTreeElement.prototype.ondelete):
1415         Only allow top-level audits to be deleted, as that is what matches the `WI.ObjectStore`.
1416
1417         * UserInterface/Main.html:
1418         * UserInterface/Test.html:
1419
1420 2018-10-31  Joseph Pecoraro  <pecoraro@apple.com>
1421
1422         Web Inspector: Move a few remaining global WI settings to WI.settings
1423         https://bugs.webkit.org/show_bug.cgi?id=191137
1424
1425         Reviewed by Brian Burg.
1426
1427         Move and better name some of the WI.settings created in Main.js
1428         to WI.settings, alongside other global settings.
1429
1430         * UserInterface/Base/Main.js:
1431         (WI.loaded):
1432         Move settings, and register for settings changes in contentLoaded.
1433
1434         * UserInterface/Base/Setting.js:
1435         New settings, and sort values.
1436
1437         * UserInterface/Test/Test.js:
1438         (WI.loaded):
1439         Update setting values for tests.
1440
1441         * UserInterface/Controllers/NetworkManager.js:
1442         (WI.NetworkManager.prototype.initializeTarget):
1443         * UserInterface/Controllers/RuntimeManager.js:
1444         (WI.RuntimeManager.prototype.initializeTarget):
1445         * UserInterface/Models/DOMNode.js:
1446         (WI.DOMNode.prototype.get children):
1447         (WI.DOMNode.prototype.get nextSibling):
1448         (WI.DOMNode.prototype.get previousSibling):
1449         (WI.DOMNode.prototype.get childNodeCount):
1450         * UserInterface/Protocol/Target.js:
1451         (WI.Target.prototype.initialize):
1452         * UserInterface/Views/DOMTreeContentView.js:
1453         (WI.DOMTreeContentView):
1454         (WI.DOMTreeContentView.prototype.closed):
1455         (WI.DOMTreeContentView.prototype._togglePaintFlashing):
1456         (WI.DOMTreeContentView.prototype._showPaintRectsSettingChanged):
1457         (WI.DOMTreeContentView.prototype._showShadowDOMSettingChanged):
1458         (WI.DOMTreeContentView.prototype._toggleShowsShadowDOMSetting):
1459         * UserInterface/Views/DOMTreeOutline.js:
1460         (WI.DOMTreeOutline):
1461         (WI.DOMTreeOutline.prototype.close):
1462         (WI.DOMTreeOutline.prototype._revealAndSelectNode):
1463         * UserInterface/Views/LayerTreeDetailsSidebarPanel.js:
1464         (WI.LayerTreeDetailsSidebarPanel.prototype.initialLayout):
1465         (WI.LayerTreeDetailsSidebarPanel.prototype._updateDisplayWithLayers):
1466         * UserInterface/Views/Layers3DContentView.js:
1467         (WI.Layers3DContentView):
1468         (WI.Layers3DContentView.prototype.closed):
1469         (WI.Layers3DContentView.prototype._showPaintRectsSettingChanged):
1470         (WI.Layers3DContentView.prototype._togglePaintFlashing):
1471         * UserInterface/Views/NetworkTableContentView.js:
1472         (WI.NetworkTableContentView):
1473         (WI.NetworkTableContentView.prototype.closed):
1474         (WI.NetworkTableContentView.prototype._resourceCachingDisabledSettingChanged):
1475         (WI.NetworkTableContentView.prototype._toggleDisableResourceCache):
1476         * UserInterface/Views/ScriptContentView.js:
1477         (WI.ScriptContentView):
1478         (WI.ScriptContentView.prototype.closed):
1479         (WI.ScriptContentView.prototype._contentDidPopulate):
1480         (WI.ScriptContentView.prototype._enableControlFlowProfilerSettingChanged):
1481         (WI.ScriptContentView.prototype._showJavaScriptTypeInformationSettingChanged):
1482         * UserInterface/Views/SourceCodeTextEditor.js:
1483         (WI.SourceCodeTextEditor.prototype.shown):
1484         (WI.SourceCodeTextEditor.prototype._proceedPopulateWithContent):
1485         (WI.SourceCodeTextEditor.prototype._setTypeTokenAnnotatorEnabledState):
1486         (WI.SourceCodeTextEditor.prototype.set _basicBlockAnnotatorEnabled):
1487         * UserInterface/Views/TextResourceContentView.js:
1488         (WI.TextResourceContentView):
1489         (WI.TextResourceContentView.prototype.closed):
1490         (WI.TextResourceContentView.prototype._contentDidPopulate):
1491         (WI.TextResourceContentView.prototype._enableControlFlowProfilerSettingChanged):
1492         (WI.TextResourceContentView.prototype._showJavaScriptTypeInformationSettingChanged):
1493         Renamed setting.
1494
1495 2018-10-31  Devin Rousso  <drousso@apple.com>
1496
1497         Web Inspector: Styles: missing contextmenu items for links
1498         https://bugs.webkit.org/show_bug.cgi?id=191021
1499
1500         Reviewed by Joseph Pecoraro.
1501
1502         * UserInterface/Views/SpreadsheetStyleProperty.js:
1503         (WI.SpreadsheetStyleProperty.prototype._renderValue):
1504         (WI.SpreadsheetStyleProperty.prototype._handleLinkContextMenu): Added.
1505         If the token is subtype of "link", add contextmenu items to the wrapper element.
1506
1507         * UserInterface/Views/ContextMenuUtilities.js:
1508         (WI.appendContextMenuItemsForURL.showResourceWithOptions):
1509         (WI.appendContextMenuItemsForURL):
1510         Drive-by: don't assume that `options` will be provided.
1511
1512         * Localizations/en.lproj/localizedStrings.js:
1513
1514 2018-10-31  Nikita Vasilyev  <nvasilyev@apple.com>
1515
1516         Web Inspector: Styles: implement copying and deletion of multiple properties
1517         https://bugs.webkit.org/show_bug.cgi?id=191037
1518         <rdar://problem/45650078>
1519
1520         Reviewed by Brian Burg.
1521
1522         This patch should only work with "Enable Selection of Multiple Properties" checked. It shouldn't introduce any
1523         changes when this setting is unchecked.
1524
1525         Mousedown on a property (1) and moving the mouse cursor to another property (2) should select properties 1, 2, and
1526         all properties between them until mouseup is fired.
1527
1528         Once selected:
1529         - Pressing Command-C should copy the selected properties.
1530         - Pressing Delete should remove the properties.
1531
1532         * UserInterface/Models/CSSProperty.js:
1533         (WI.CSSProperty.prototype.get formattedText):
1534         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
1535         (.spreadsheet-style-declaration-editor):
1536         (.multiple-properties-selection .spreadsheet-style-declaration-editor .property):
1537         (.multiple-properties-selection .spreadsheet-style-declaration-editor :matches(.name, .value):not(.editing)):
1538         (.multiple-properties-selection .spreadsheet-style-declaration-editor .property.selected):
1539         (.multiple-properties-selection .spreadsheet-style-declaration-editor .property.selected:focus):
1540         (@media (prefers-dark-interface)):
1541
1542         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
1543         (WI.SpreadsheetCSSStyleDeclarationEditor):
1544         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.initialLayout):
1545         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.selectProperties):
1546         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.deselectProperties):
1547         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyBlur):
1548         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyMouseEnter):
1549         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyMouseLeave):
1550         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyCopy):
1551         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._handleKeyDown):
1552         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._hasSelectedProperties):
1553         Property selection is defined as two numbers: anchorIndex and focusIndex.
1554         The property with focusIndex is actually focused. The focus outline is replaced by a more subtle left blue border.
1555
1556         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.css:
1557         (.spreadsheet-css-declaration.selecting,):
1558         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
1559         (WI.SpreadsheetCSSStyleDeclarationSection):
1560         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.spreadsheetCSSStyleDeclarationEditorPropertyBlur):
1561         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.spreadsheetCSSStyleDeclarationEditorPropertyMouseEnter):
1562         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.spreadsheetCSSStyleDeclarationEditorPropertyMouseLeave):
1563         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleMouseDown):
1564         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleWindowMouseUp):
1565         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleClick):
1566         * UserInterface/Views/SpreadsheetStyleProperty.js:
1567         (WI.SpreadsheetStyleProperty):
1568         Implement copying the same way it's done for DataGrid: by adding copyHandler property to the focused element.
1569         Add `tabIndex=-1` so the property element can be focused.
1570
1571         (WI.SpreadsheetStyleProperty.prototype.get property):
1572         (WI.SpreadsheetStyleProperty.prototype.get selected):
1573         (WI.SpreadsheetStyleProperty.prototype.set selected):
1574         (WI.SpreadsheetStyleProperty.prototype.remove):
1575         (WI.SpreadsheetStyleProperty.prototype.updateStatus):
1576         (WI.SpreadsheetStyleProperty.prototype.handleCopyEvent):
1577         (WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidCommit):
1578         (WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidBlur):
1579         (WI.SpreadsheetStyleProperty.prototype._handleNamePaste):
1580
1581 2018-10-31  Devin Rousso  <drousso@apple.com>
1582
1583         Web Inspector: Audit: attempt to re-link DOM nodes for imported results
1584         https://bugs.webkit.org/show_bug.cgi?id=191044
1585         <rdar://problem/45687364>
1586
1587         Reviewed by Brian Burg.
1588
1589         When importing a `WI.AuditTestCaseResult`, attempt to `querySelector` for each item in
1590         `data.domNodes`. If a node is found, replace it with that node and show a tree instead.
1591
1592         * UserInterface/Models/AuditTestCase.js:
1593         (WI.AuditTestCase.async fromPayload): Added.
1594         (WI.AuditTestCase.fromPayload): Deleted.
1595
1596         * UserInterface/Models/AuditTestGroup.js:
1597         (WI.AuditTestGroup.async fromPayload): Added.
1598         (WI.AuditTestGroup.fromPayload): Deleted.
1599
1600         * UserInterface/Models/AuditTestCaseResult.js:
1601         (WI.AuditTestCaseResult.async fromPayload): Added.
1602         (WI.AuditTestCaseResult.fromPayload): Deleted.
1603
1604         * UserInterface/Models/AuditTestGroupResult.js:
1605         (WI.AuditTestGroupResult.async fromPayload): Added.
1606         (WI.AuditTestGroupResult.fromPayload): Deleted.
1607
1608         * UserInterface/Controllers/AuditManager.js:
1609         (WI.AuditManager.prototype.import):
1610
1611 2018-10-31  Joseph Pecoraro  <pecoraro@apple.com>
1612
1613         Follow-up review comment to r237652.
1614
1615         Reviewed by Brian Burg.
1616
1617         * UserInterface/Controllers/DebuggerManager.js:
1618         (WI.DebuggerManager):
1619
1620 2018-10-31  Joseph Pecoraro  <pecoraro@apple.com>
1621
1622         Web Inspector: Separate target initialization from frontend initialization
1623         https://bugs.webkit.org/show_bug.cgi?id=191052
1624         <rdar://problem/45658384>
1625
1626         Reviewed by Brian Burg.
1627
1628         * UserInterface/Base/Main.js:
1629         (WI.loaded):
1630         (WI.performOneTimeFrontendInitializationsUsingTarget):
1631         Create the targets after the rest of frontend initialization. This is a step
1632         toward a frontend opening and being told about multiple targets instead of
1633         knowing in advance a single target it is connected to. All backend
1634         messages during frontend initialization now happen with an explicit target.
1635
1636         * UserInterface/Controllers/ApplicationCacheManager.js:
1637         (WI.ApplicationCacheManager):
1638         (WI.ApplicationCacheManager.prototype.initializeTarget):
1639         (WI.ApplicationCacheManager.prototype.initialize):
1640         * UserInterface/Controllers/CSSManager.js:
1641         (WI.CSSManager):
1642         (WI.CSSManager.prototype.initializeTarget):
1643         * UserInterface/Controllers/CanvasManager.js:
1644         (WI.CanvasManager):
1645         (WI.CanvasManager.prototype.initializeTarget):
1646         * UserInterface/Controllers/ConsoleManager.js:
1647         (WI.ConsoleManager):
1648         (WI.ConsoleManager.prototype.initializeLogChannels):
1649         * UserInterface/Controllers/DOMManager.js:
1650         (WI.DOMManager):
1651         (WI.DOMManager.prototype.initializeTarget):
1652         * UserInterface/Controllers/DOMStorageManager.js:
1653         (WI.DOMStorageManager):
1654         (WI.DOMStorageManager.prototype.initializeTarget):
1655         * UserInterface/Controllers/DatabaseManager.js:
1656         (WI.DatabaseManager):
1657         (WI.DatabaseManager.prototype.initializeTarget):
1658         * UserInterface/Controllers/DebuggerManager.js:
1659         (WI.DebuggerManager):
1660         (WI.DebuggerManager.prototype.initializeTarget):
1661         (WI.DebuggerManager.restoreBreakpointsSoon): Deleted.
1662         * UserInterface/Controllers/HeapManager.js:
1663         (WI.HeapManager.prototype.initializeTarget):
1664         * UserInterface/Controllers/IndexedDBManager.js:
1665         (WI.IndexedDBManager):
1666         (WI.IndexedDBManager.prototype.initializeTarget):
1667         * UserInterface/Controllers/LayerTreeManager.js:
1668         (WI.LayerTreeManager.prototype.initializeTarget):
1669         * UserInterface/Controllers/MemoryManager.js:
1670         (WI.MemoryManager.prototype.initializeTarget):
1671         * UserInterface/Controllers/NetworkManager.js:
1672         (WI.NetworkManager):
1673         (WI.NetworkManager.prototype.initializeTarget):
1674         * UserInterface/Controllers/RuntimeManager.js:
1675         (WI.RuntimeManager):
1676         (WI.RuntimeManager.prototype.initializeTarget):
1677         * UserInterface/Controllers/TargetManager.js:
1678         (WI.TargetManager):
1679         (WI.TargetManager.prototype.initializeTargetsWithMainTarget):
1680         * UserInterface/Controllers/TimelineManager.js:
1681         (WI.TimelineManager):
1682         (WI.TimelineManager.prototype.initializeTarget):
1683         (WI.TimelineManager.prototype.set enabledTimelineTypes):
1684         (WI.TimelineManager.prototype._updateAutoCaptureInstruments):
1685         * UserInterface/Controllers/WorkerManager.js:
1686         (WI.WorkerManager):
1687         (WI.WorkerManager.prototype.initializeTarget):
1688         Move Target initialization out of the constructor into a top level
1689         `initializeTarget` function. This will be expected to be called
1690         by any target that the frontend connects to.
1691
1692         (WI.DebuggerManager.prototype._pauseForInternalScriptsDidChange):
1693         Drive-by fix. Update all targets if the setting changes.
1694
1695         (WI.WorkerManager.prototype.workerCreated):
1696         Call initialize on the new target.
1697
1698         * UserInterface/Models/CSSCompletions.js:
1699         (WI.CSSCompletions.initializeCSSCompletions):
1700         (WI.CSSCompletions.requestCSSCompletions): Deleted.
1701         Rename requestCSSCompletions to initializeCSSCompletions to try
1702         and standardize on "initialize" being used for most frontend one
1703         time initialization tasks. This being one such operation that
1704         only needs to be performed once on a target that supports it.
1705
1706         * UserInterface/Protocol/Target.js:
1707         (WI.Target):
1708         (WI.Target.prototype.initialize):
1709         Perform explicit target initialization, such as initializing
1710         the state of all backend domains / agents. This is done by asking
1711         each of the managers to do initialization work for this target.
1712
1713         (WI.Target.prototype.get ApplicationCacheAgent):
1714         (WI.Target.prototype.get CSSAgent):
1715         (WI.Target.prototype.get CanvasAgent):
1716         (WI.Target.prototype.get ConsoleAgent):
1717         (WI.Target.prototype.get DOMAgent):
1718         (WI.Target.prototype.get DOMDebuggerAgent):
1719         (WI.Target.prototype.get DOMStorageAgent):
1720         (WI.Target.prototype.get DatabaseAgent):
1721         (WI.Target.prototype.get DebuggerAgent):
1722         (WI.Target.prototype.get HeapAgent):
1723         (WI.Target.prototype.get IndexedDBAgent):
1724         (WI.Target.prototype.get InspectorAgent):
1725         (WI.Target.prototype.get LayerTreeAgent):
1726         (WI.Target.prototype.get MemoryAgent):
1727         (WI.Target.prototype.get NetworkAgent):
1728         (WI.Target.prototype.get PageAgent):
1729         (WI.Target.prototype.get RecordingAgent):
1730         (WI.Target.prototype.get RuntimeAgent):
1731         (WI.Target.prototype.get ScriptProfilerAgent):
1732         (WI.Target.prototype.get ServiceWorkerAgent):
1733         (WI.Target.prototype.get TargetAgent):
1734         (WI.Target.prototype.get TimelineAgent):
1735         (WI.Target.prototype.get WorkerAgent):
1736         Accessors for all of the agents on a Target.
1737
1738         * UserInterface/Protocol/WorkerTarget.js:
1739         (WI.WorkerTarget):
1740         This is now automatically done in the base class.
1741
1742         * UserInterface/Test/Test.js:
1743         (WI.loaded):
1744         (WI.performOneTimeFrontendInitializationsUsingTarget):
1745         New necessary top level hooks, and initialize more like Main.js.
1746
1747 2018-10-31  Devin Rousso  <drousso@apple.com>
1748
1749         Web Inspector: Audit: show metadata for results
1750         https://bugs.webkit.org/show_bug.cgi?id=190853
1751         <rdar://problem/45527623>
1752
1753         Reviewed by Brian Burg.
1754
1755         * UserInterface/Models/AuditTestCase.js:
1756         (WI.AuditTestCase.prototype.async run):
1757         Capture timestamps around the `RunetimeAgent.evaluate` call, as well as the URL of the page.
1758
1759         * UserInterface/Models/AuditTestCaseResult.js:
1760         (WI.AuditTestCaseResult):
1761         (WI.AuditTestCaseResult.fromPayload):
1762         (WI.AuditTestCaseResult.prototype.get metadata): Added.
1763         (WI.AuditTestCaseResult.prototype.toJSON):
1764
1765         * UserInterface/Views/AuditTestCaseContentView.js:
1766         (WI.AuditTestCaseContentView.prototype.initialLayout):
1767         (WI.AuditTestCaseContentView.prototype.layout):
1768         * UserInterface/Views/AuditTestCaseContentView.css:
1769         (.content-view.audit-test-case > header h1): Added.
1770         (.content-view.audit-test-case > header h1 > img): Added.
1771         (.content-view.audit-test-case > header > .metadata): Added.
1772         (.content-view.audit-test-case > header > .metadata > .source > time): Added.
1773         (.content-view.audit-test-case > header > .metadata > .source > a): Added.
1774         (.content-view.audit-test-case > header > .metadata > .duration): Added.
1775         (.content-view.audit-test-case > header > h1): Deleted.
1776         (.content-view.audit-test-case > header > h1 > img): Deleted.
1777         Display any metadata information where the `WI.ScopeBar` is for `WI.AuditTestGroupContentView`s.
1778
1779         * UserInterface/Views/AuditTestContentView.css:
1780         (.content-view.audit-test > header):
1781         (.content-view.audit-test > header > .information): Added.
1782         * UserInterface/Views/AuditTestGroupContentView.css:
1783         (.content-view.audit-test-group > header):
1784         (.content-view.audit-test-group > header > .percentage-pass):
1785         (.content-view.audit-test-group > header > .information): Deleted.
1786         Move common CSS rules to common parent class.
1787
1788         * UserInterface/Base/Utilities.js:
1789
1790 2018-10-30  Devin Rousso  <drousso@apple.com>
1791
1792         Web Inspector: Audit: create Audit Tab
1793         https://bugs.webkit.org/show_bug.cgi?id=190754
1794
1795         Reviewed by Matt Baker.
1796
1797         Create an Audit tab for running audits on the inspected page. Leverage `Runtime.evaluate`
1798         for running the audit tests (arbitrary JavaScript), and use the returned value to generate
1799         a preview UI of the results. All tests/results can be exported/imported to formatted JSON:
1800
1801         `AuditTestCase` JSON:
1802             {
1803                 "type": "test-case",
1804                 "name": <string>,
1805                 <optional> "description": <string>,
1806                 "test": <stringified JavaScript function>,
1807             }
1808
1809         `AuditTestGroup` JSON:
1810             {
1811                 "type": "test-group",
1812                 "name": <string>,
1813                 <optional> "description": <string>,
1814                 "tests": [...<AuditTestCase, AuditTestGroup>],
1815             }
1816
1817         `AuditTestCaseResult` JSON:
1818             {
1819                 "type": "test-case-result",
1820                 "name": <string>,
1821                 <optional> "description": <string>,
1822                 "level": <"pass", "warn", "fail", "error", "unsupported">,
1823                 "data": {
1824                     "domNodes": [...<stringified CSS path>],
1825                     "domAttributes": [...<string>],
1826                     "errors": [...<string>],
1827                 },
1828             }
1829
1830         `AuditTestGroupResult` JSON:
1831             {
1832                 "type": "test-group-result",
1833                 "name": <string>,
1834                 <optional> "description": <string>,
1835                 "results": [...<AuditTestCaseResult, AuditTestGroupResult>],
1836             }
1837
1838         More keys may be added in the future (especially for `AuditTestCaseResult.data`).
1839
1840         * UserInterface/Controllers/AuditManager.js:
1841         (WI.AuditManager):
1842         (WI.AuditManager.synthesizeError): Added.
1843         (WI.AuditManager.prototype.get tests): Added.
1844         (WI.AuditManager.prototype.get results): Added.
1845         (WI.AuditManager.prototype.get runningState): Added.
1846         (WI.AuditManager.prototype.start): Added.
1847         (WI.AuditManager.prototype.stop): Added.
1848         (WI.AuditManager.prototype.import): Added.
1849         (WI.AuditManager.prototype.export): Added.
1850         (WI.AuditManager.prototype._addTest): Added.
1851         (WI.AuditManager.prototype._addResult): Added.
1852         (WI.AuditManager.prototype.get testSuites): Deleted.
1853         (WI.AuditManager.prototype.get reports): Deleted.
1854         (WI.AuditManager.prototype.async runAuditTestByRepresentedObject): Deleted.
1855         (WI.AuditManager.prototype.reportForId): Deleted.
1856         (WI.AuditManager.prototype.removeAllReports): Deleted.
1857         (WI.AuditManager.prototype.async _runTestCase): Deleted.
1858
1859         * UserInterface/Models/AuditTestBase.js: Added.
1860         (WI.AuditTestBases):
1861         (WI.AuditTestBases.prototype.get name):
1862         (WI.AuditTestBases.prototype.get description):
1863         (WI.AuditTestBases.prototype.get runningState):
1864         (WI.AuditTestBases.prototype.get result):
1865         (WI.AuditTestBases.prototype.async start):
1866         (WI.AuditTestBases.prototype.stop):
1867         (WI.AuditTestBases.prototype.clearResult):
1868         (WI.AuditTestBases.prototype.saveIdentityToCookie):
1869         (WI.AuditTestBases.prototype.toJSON):
1870         (WI.AuditTestBases.prototype.async run):
1871
1872         * UserInterface/Models/AuditTestCase.js:
1873         (WI.AuditTestCase):
1874         (WI.AuditTestCase.fromPayload): Added.
1875         (WI.AuditTestCase.prototype.toJSON): Added.
1876         (WI.AuditTestCase.prototype.async run): Added.
1877         (WI.AuditTestCase.prototype.async run.setLevel): Added.
1878         (WI.AuditTestCase.prototype.async run.addError): Added.
1879         (WI.AuditTestCase.prototype.async run.checkResultProperty.addErrorForValueType): Added.
1880         (WI.AuditTestCase.prototype.async run.checkResultProperty): Added.
1881         (WI.AuditTestCase.prototype.async run.async resultArrayForEach): Added.
1882         (WI.AuditTestCase.prototype.get id): Deleted.
1883         (WI.AuditTestCase.prototype.get name): Deleted.
1884         (WI.AuditTestCase.prototype.get suite): Deleted.
1885         (WI.AuditTestCase.prototype.get setup): Deleted.
1886         (WI.AuditTestCase.prototype.get tearDown): Deleted.
1887         (WI.AuditTestCase.prototype.get errorDetails): Deleted.
1888
1889         * UserInterface/Models/AuditTestGroup.js: Added.
1890         (WI.AuditTestGroup):
1891         (WI.AuditTestGroup.fromPayload):
1892         (WI.AuditTestGroup.prototype.get tests):
1893         (WI.AuditTestGroup.prototype.stop):
1894         (WI.AuditTestGroup.prototype.clearResult):
1895         (WI.AuditTestGroup.prototype.async run):
1896         (WI.AuditTestGroup.prototype.toJSON):
1897         (WI.AuditTestGroup.prototype._updateResult):
1898         (WI.AuditTestGroup.prototype._handleTestCompleted):
1899         (WI.AuditTestGroup.prototype._handleTestProgress):
1900
1901         * UserInterface/Models/AuditTestResultBase.js: Added.
1902         (WI.AuditTestResultBase):
1903         (WI.AuditTestResultBase.prototype.get name):
1904         (WI.AuditTestResultBase.prototype.get description):
1905         (WI.AuditTestResultBase.prototype.get result):
1906         (WI.AuditTestResultBase.prototype.get didPass):
1907         (WI.AuditTestResultBase.prototype.get didWarn):
1908         (WI.AuditTestResultBase.prototype.get didFail):
1909         (WI.AuditTestResultBase.prototype.get didError):
1910         (WI.AuditTestResultBase.prototype.get unsupported):
1911         (WI.AuditTestResultBase.prototype.saveIdentityToCookie):
1912         (WI.AuditTestResultBase.prototype.toJSON):
1913
1914         * UserInterface/Models/AuditTestCaseResult.js: Added.
1915         (WI.AuditTestCaseResult):
1916         (WI.AuditTestCaseResult.fromPayload.checkArray):
1917         (WI.AuditTestCaseResult.fromPayload):
1918         (WI.AuditTestCaseResult.prototype.get level):
1919         (WI.AuditTestCaseResult.prototype.get data):
1920         (WI.AuditTestCaseResult.prototype.get didPass):
1921         (WI.AuditTestCaseResult.prototype.get didWarn):
1922         (WI.AuditTestCaseResult.prototype.get didFail):
1923         (WI.AuditTestCaseResult.prototype.get didError):
1924         (WI.AuditTestCaseResult.prototype.get unsupported):
1925         (WI.AuditTestCaseResult.prototype.toJSON):
1926
1927         * UserInterface/Models/AuditTestGroupResult.js: Added.
1928         (WI.AuditTestGroupResult):
1929         (WI.AuditTestGroupResult.fromPayload):
1930         (WI.AuditTestGroupResult.prototype.get results):
1931         (WI.AuditTestGroupResult.prototype.get levelCounts):
1932         (WI.AuditTestGroupResult.prototype.get didPass):
1933         (WI.AuditTestGroupResult.prototype.get didWarn):
1934         (WI.AuditTestGroupResult.prototype.get didFail):
1935         (WI.AuditTestGroupResult.prototype.get didError):
1936         (WI.AuditTestGroupResult.prototype.get unsupported):
1937         (WI.AuditTestGroupResult.prototype.toJSON):
1938
1939         * UserInterface/Views/AuditTabContentView.js: Added.
1940         (WI.AuditTabContentView):
1941         (WI.AuditTabContentView.tabInfo):
1942         (WI.AuditTabContentView.isTabAllowed):
1943         (WI.AuditTabContentView.prototype.get type):
1944         (WI.AuditTabContentView.prototype.get supportsSplitContentBrowser):
1945         (WI.AuditTabContentView.prototype.canShowRepresentedObject):
1946         (WI.AuditTabContentView.prototype.shown):
1947         (WI.AuditTabContentView.prototype.hidden):
1948         (WI.AuditTabContentView.prototype._handleSpace):
1949
1950         * UserInterface/Views/AuditNavigationSidebarPanel.js: Added.
1951         (WI.AuditNavigationSidebarPanel):
1952         (WI.AuditNavigationSidebarPanel.prototype.showDefaultContentView):
1953         (WI.AuditNavigationSidebarPanel.prototype.initialLayout):
1954         (WI.AuditNavigationSidebarPanel.prototype.closed):
1955         (WI.AuditNavigationSidebarPanel.prototype._addTest):
1956         (WI.AuditNavigationSidebarPanel.prototype._addResult):
1957         (WI.AuditNavigationSidebarPanel.prototype._updateStartStopButtonNavigationItemState):
1958         (WI.AuditNavigationSidebarPanel.prototype._handleAuditTestAdded):
1959         (WI.AuditNavigationSidebarPanel.prototype._handleAuditTestCompleted):
1960         (WI.AuditNavigationSidebarPanel.prototype._handleAuditTestScheduled):
1961         (WI.AuditNavigationSidebarPanel.prototype._treeSelectionDidChange):
1962         (WI.AuditNavigationSidebarPanel.prototype._handleStartStopButtonNavigationItemClicked):
1963         (WI.AuditNavigationSidebarPanel.prototype._handleImportButtonNavigationItemClicked):
1964         * UserInterface/Views/AuditNavigationSidebarPanel.css: Added.
1965         (.sidebar > .panel.navigation.audit > .content):
1966
1967         * UserInterface/Views/AuditTreeElement.js: Added.
1968         (WI.AuditTreeElement):
1969         (WI.AuditTreeElement.prototype.get result):
1970         (WI.AuditTreeElement.prototype.onattach):
1971         (WI.AuditTreeElement.prototype.ondetach):
1972         (WI.AuditTreeElement.prototype.onpopulate):
1973         (WI.AuditTreeElement.prototype.populateContextMenu):
1974         (WI.AuditTreeElement.prototype._start):
1975         (WI.AuditTreeElement.prototype._updateLevel):
1976         (WI.AuditTreeElement.prototype._showRunningSpinner):
1977         (WI.AuditTreeElement.prototype._showRunningProgress):
1978         (WI.AuditTreeElement.prototype._handleTestCaseCompleted):
1979         (WI.AuditTreeElement.prototype._handleTestResultCleared):
1980         (WI.AuditTreeElement.prototype._handleTestCaseScheduled):
1981         (WI.AuditTreeElement.prototype._handleTestGroupCompleted):
1982         (WI.AuditTreeElement.prototype._handleTestGroupProgress):
1983         (WI.AuditTreeElement.prototype._handleTestGroupScheduled):
1984         (WI.AuditTreeElement.prototype._handleStatusClick):
1985         * UserInterface/Views/AuditTreeElement.css: Added.
1986         (.tree-outline .item.audit > .status):
1987         (.tree-outline .item.audit > .status > img):
1988         (.tree-outline .item.audit:matches(.test-case, .test-group) > .status:hover > img):
1989         (.tree-outline .item.audit > .status:not(:hover) > img.show-on-hover, .tree-outline .item.audit.test-group.expanded > .status:not(:hover)):
1990         (.tree-outline .item.audit.test-group.expanded > .status:hover > :not(img), .tree-outline .item.audit.test-group-result.expanded > .status):
1991         (.tree-outline .item.audit > .status > img.pass):
1992         (.tree-outline .item.audit > .status > img.warn):
1993         (.tree-outline .item.audit > .status > img.fail):
1994         (.tree-outline .item.audit > .status > img.error):
1995         (.tree-outline .item.audit > .status > img.unsupported):
1996         (.audit.test-case .icon):
1997         (.audit.test-group .icon):
1998         (.audit.test-case-result .icon):
1999         (.audit.test-group-result .icon):
2000
2001         * UserInterface/Views/AuditTestContentView.js: Added.
2002         (WI.AuditTestContentView):
2003         (WI.AuditTestContentView.prototype.get navigationItems):
2004         (WI.AuditTestContentView.prototype.get headerView):
2005         (WI.AuditTestContentView.prototype.get contentView):
2006         (WI.AuditTestContentView.prototype.get supportsSave):
2007         (WI.AuditTestContentView.prototype.get saveData):
2008         (WI.AuditTestContentView.prototype.initialLayout):
2009         (WI.AuditTestContentView.prototype.layout):
2010         (WI.AuditTestContentView.prototype.shown):
2011         (WI.AuditTestContentView.prototype.hidden):
2012         (WI.AuditTestContentView.prototype.get placeholderElement):
2013         (WI.AuditTestContentView.prototype.set placeholderElement):
2014         (WI.AuditTestContentView.prototype.showRunningPlaceholder):
2015         (WI.AuditTestContentView.prototype.showStoppingPlaceholder):
2016         (WI.AuditTestContentView.prototype.showNoResultPlaceholder):
2017         (WI.AuditTestContentView.prototype.showNoResultDataPlaceholder):
2018         (WI.AuditTestContentView.prototype.showFilteredPlaceholder):
2019         (WI.AuditTestContentView.prototype.hidePlaceholder):
2020         (WI.AuditTestContentView.prototype.applyFilter):
2021         (WI.AuditTestContentView.prototype.resetFilter):
2022         (WI.AuditTestContentView.prototype._exportAudit):
2023         (WI.AuditTestContentView.prototype._updateExportButtonNavigationItemState):
2024         (WI.AuditTestContentView.prototype._showPlaceholder):
2025         (WI.AuditTestContentView.prototype._handleExportButtonNavigationItemClicked):
2026         (WI.AuditTestContentView.prototype._handleTestChanged):
2027         * UserInterface/Views/AuditTestContentView.css: Added.
2028         (.content-view-container > .content-view.audit-test):
2029         (.content-view-container > .content-view.audit-test > header):
2030         (.content-view-container > .content-view.audit-test > header h1):
2031         (.content-view-container > .content-view.audit-test > header p):
2032         (.content-view.audit-test):
2033         (.content-view.audit-test h1):
2034         (.content-view.audit-test > header):
2035         (.content-view.audit-test > header p):
2036         (.content-view.audit-test .audit-test.filtered, .content-view.audit-test .audit-test .message-text-view):
2037         (.content-view.audit-test > section):
2038         (.content-view.audit-test > section > .message-text-view):
2039         (.content-view.audit-test.showing-placeholder):
2040         (.content-view.audit-test.showing-placeholder > section):
2041         (.content-view.audit-test.showing-placeholder > section > :not(.message-text-view)):
2042         (@media (prefers-dark-interface) .content-view.audit-test):
2043
2044         * UserInterface/Views/AuditTestCaseContentView.js: Added.
2045         (WI.AuditTestCaseContentView):
2046         (WI.AuditTestCaseContentView.prototype.initialLayout):
2047         (WI.AuditTestCaseContentView.prototype.layout):
2048         (WI.AuditTestCaseContentView.prototype.showRunningPlaceholder):
2049         * UserInterface/Views/AuditTestCaseContentView.css: Added.
2050         (.content-view-container > .content-view.audit-test-case > header):
2051         (.content-view-container > .content-view.audit-test-case > section > :not(.message-text-view):first-child):
2052         (.content-view.audit-test-case > header > h1):
2053         (.content-view.audit-test-case > header > h1 > img):
2054         (.content-view.audit-test-case > section > :not(.message-text-view)):
2055         (.content-view.audit-test-case > section > :not(.message-text-view):last-child):
2056         (.content-view.audit-test-case > section > :not(.message-text-view) + :not(.message-text-view)):
2057         (.content-view.audit-test-case > section h1):
2058         (.content-view.audit-test-case > section table):
2059         (.content-view.audit-test-case > section table > tr + tr > td):
2060         (.content-view.audit-test-case > section table > tr > td > :not(.tree-outline)):
2061         (.content-view.audit-test-case > section table > tr > td:first-child):
2062         (.content-view.audit-test-case > section > .dom-nodes > table > tr > td:first-child):
2063         (.content-view.audit-test-case > section code):
2064         (.content-view.audit-test-case > section mark):
2065
2066         * UserInterface/Views/AuditTestGroupContentView.js: Added.
2067         (WI.AuditTestGroupContentView):
2068         (WI.AuditTestGroupContentView.prototype.initialLayout):
2069         (WI.AuditTestGroupContentView.prototype.layout):
2070         (WI.AuditTestGroupContentView.prototype.shown):
2071         (WI.AuditTestGroupContentView.prototype.hidden):
2072         (WI.AuditTestGroupContentView.prototype.applyFilter):
2073         (WI.AuditTestGroupContentView.prototype.resetFilter):
2074         (WI.AuditTestGroupContentView.prototype.showRunningPlaceholder):
2075         (WI.AuditTestGroupContentView.prototype._subobjects):
2076         (WI.AuditTestGroupContentView.prototype._updateLevelScopeBar):
2077         (WI.AuditTestGroupContentView.prototype._handleTestGroupCompleted):
2078         (WI.AuditTestGroupContentView.prototype._handleTestGroupProgress):
2079         (WI.AuditTestGroupContentView.prototype._handleTestGroupScheduled):
2080         (WI.AuditTestGroupContentView.prototype._handleLevelScopeBarSelectionChanged):
2081         * UserInterface/Views/AuditTestGroupContentView.css: Added.
2082         (.content-view-container > .content-view.audit-test-group > header):
2083         (.content-view.audit-test-group > header):
2084         (.content-view.audit-test-group.no-matches + .audit-test-group > header):
2085         (.content-view.audit-test-group > header, .content-view.audit-test-group:not(.filtered):last-child > header):
2086         (.content-view.audit-test-group.contains-test-case > header):
2087         (.content-view.audit-test-group.contains-test-case + .audit-test-group.contains-test-case):
2088         (.content-view.audit-test-group.contains-test-case:not(.contains-test-group) > section, .content-view.audit-test-group.contains-test-case.contains-test-group > section > .audit-test-case):
2089         (.content-view.audit-test-group > header > .information):
2090         (.content-view.audit-test-group > header > .information > p):
2091         (.content-view.audit-test-group > header > nav):
2092         (.content-view.audit-test-group > header > nav:empty):
2093         (.content-view.audit-test-group > header > nav:not(:empty):before):
2094         (.content-view.audit-test-group > header > nav > .scope-bar > li):
2095         (.content-view.audit-test-group > header > nav > .scope-bar > li:not(:hover, .selected)):
2096         (.content-view.audit-test-group > header > nav > .scope-bar > li:last-child):
2097         (.content-view.audit-test-group > header > nav > .scope-bar > li::before):
2098         (.content-view.audit-test-group > header > nav > .scope-bar > li.pass::before):
2099         (.content-view.audit-test-group > header > nav > .scope-bar > li.warn::before):
2100         (.content-view.audit-test-group > header > nav > .scope-bar > li.fail::before):
2101         (.content-view.audit-test-group > header > nav > .scope-bar > li.error::before):
2102         (.content-view.audit-test-group > header > nav > .scope-bar > li.unsupported::before):
2103         (.content-view.audit-test-group > header > .percentage-pass):
2104         (.content-view.audit-test-group > header > .percentage-pass:not(:empty)::after):
2105         (.content-view.audit-test-group > section > .audit-test-case:first-child, .content-view.audit-test-group > section > .audit-test-group + .audit-test-case, .content-view.audit-test-group > section > .audit-test-case + .audit-test-group):
2106         (.content-view.audit-test-group > section > .audit-test-case:last-child):
2107
2108         * UserInterface/Views/ScopeBarItem.js:
2109         (WI.ScopeBarItem):
2110         (WI.ScopeBarItem.prototype.set selected):
2111         * UserInterface/Views/MultipleScopeBarItem.js:
2112         (WI.MultipleScopeBarItem.prototype.set selectedScopeBarItem):
2113         Add an `independent` option that prevents selection changes from deselecting other
2114         `WI.ScopeBarItem`s in the same `WI.ScopeBar` (`exclusive` takes precedence).
2115
2116         * UserInterface/Views/DOMTreeElement.js:
2117         (WI.DOMTreeElement):
2118         (WI.DOMTreeElement.prototype.highlightAttribute):
2119         (WI.DOMTreeElement.prototype._buildAttributeDOM):
2120         * UserInterface/Views/DOMTreeOutline.css:
2121         (.tree-outline.dom li .highlight):
2122
2123         * UserInterface/Views/ToggleButtonNavigationItem.js:
2124         (WI.ToggleButtonNavigationItem.prototype.set toggled):
2125         Also change the `label` if the `ButtonStyle` has text.
2126
2127         * UserInterface/Base/Setting.js:
2128         * UserInterface/Views/SettingsTabContentView.js:
2129         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
2130
2131         * UserInterface/Views/DividerNavigationItem.css:
2132         (.navigation-bar .item.divider):
2133
2134         * UserInterface/Base/Utilities.js:
2135         (Promise.chain): Added.
2136
2137         * UserInterface/Views/ContentView.js:
2138         (WI.ContentView.createFromRepresentedObject):
2139         (WI.ContentView.isViewable):
2140
2141         * UserInterface/Main.html:
2142         * UserInterface/Base/Main.js:
2143         (WI.loaded):
2144         (WI.contentLoaded):
2145
2146         * UserInterface/Test.html:
2147         * UserInterface/Base/Test.js:
2148         (WI.loaded):
2149
2150         * UserInterface/Images/Audit.svg: Added.
2151         * UserInterface/Images/AuditStart.svg: Added.
2152         * UserInterface/Images/AuditStop.svg: Added.
2153         * UserInterface/Images/AuditTestCase.svg: Added.
2154         * UserInterface/Images/AuditTestCaseResult.svg: Added.
2155         * UserInterface/Images/AuditTestError.svg: Added.
2156         * UserInterface/Images/AuditTestFail.svg: Added.
2157         * UserInterface/Images/AuditTestGroup.svg: Added.
2158         * UserInterface/Images/AuditTestGroupResult.svg: Added.
2159         * UserInterface/Images/AuditTestNoResult.svg: Added.
2160         * UserInterface/Images/AuditTestPass.svg: Added.
2161         * UserInterface/Images/AuditTestUnsupported.svg: Added.
2162         * UserInterface/Images/AuditTestWarn.svg: Added.
2163
2164         * Localizations/en.lproj/localizedStrings.js:
2165
2166 2018-10-30  Devin Rousso  <drousso@apple.com>
2167
2168         Web Inspector: provide options to WI.cssPath for more verbosity
2169         https://bugs.webkit.org/show_bug.cgi?id=190987
2170
2171         Reviewed by Brian Burg.
2172
2173         * UserInterface/Base/DOMUtilities.js:
2174         (WI.cssPath):
2175         (WI.cssPathComponent):
2176         When the option `full` is true, print every attribute along with every node in the hierarchy
2177         until the root is reached. This partially duplicates the effect of an XPath, but instead
2178         uses CSS selectors, making it much more human readable and recognizable.
2179
2180 2018-10-30  Devin Rousso  <drousso@apple.com>
2181
2182         Web Inspector: change WI.ColorWheel to use conic-gradient()
2183         https://bugs.webkit.org/show_bug.cgi?id=189485
2184
2185         Reviewed by Brian Burg.
2186
2187         Use the ("new") HSL `WI.ColorPicker` if `conic-gradient` is supported. Otherwise, use the
2188         ("old") RGB `WI.LegacyColorPicker`.
2189
2190         * UserInterface/Views/ColorWheel.js:
2191         (WI.ColorWheel):
2192         (WI.ColorWheel.prototype.set dimension):
2193         (WI.ColorWheel.prototype.set brightness):
2194         (WI.ColorWheel.prototype.get tintedColor):
2195         (WI.ColorWheel.prototype.set tintedColor):
2196         (WI.ColorWheel.prototype.get rawColor):
2197         (WI.ColorWheel.prototype.get _hue): Added.
2198         (WI.ColorWheel.prototype.get _saturation): Added.
2199         (WI.ColorWheel.prototype._updateColorForMouseEvent):
2200         (WI.ColorWheel.prototype._setCrosshairPosition):
2201         (WI.ColorWheel.prototype._updateGradient): Added.
2202         (WI.ColorWheel.prototype._pointInCircleForEvent.distance): Deleted.
2203         (WI.ColorWheel.prototype._pointInCircleForEvent.angleFromCenterToPoint): Deleted.
2204         (WI.ColorWheel.prototype._pointInCircleForEvent.pointOnCircumference): Deleted.
2205         (WI.ColorWheel.prototype._pointInCircleForEvent): Deleted.
2206         (WI.ColorWheel.prototype._tintedColorToPointAndBrightness): Deleted.
2207         (WI.ColorWheel.prototype._drawRawCanvas): Deleted.
2208         (WI.ColorWheel.prototype._colorAtPointWithBrightness): Deleted.
2209         (WI.ColorWheel.prototype._drawTintedCanvas): Deleted.
2210         (WI.ColorWheel.prototype._draw): Deleted.
2211         * UserInterface/Views/ColorWheel.css:
2212         (.color-wheel > .gradient): Added.
2213         (.color-wheel > .crosshair): Added.
2214
2215         * UserInterface/Views/LegacyColorWheel.js: Copied from Source/WebInspectorUI/UserInterface/Views/ColorWheel.js.
2216
2217         * UserInterface/Views/ColorPicker.js:
2218         (WI.ColorPicker):
2219         (WI.ColorPicker.supportsConicGradient): Added.
2220         (WI.ColorPicker.prototype._updateSliders):
2221
2222         * UserInterface/Models/Geometry.js:
2223         (WI.Point.prototype.distance):
2224
2225         * UserInterface/Main.html:
2226
2227 2018-10-30  Devin Rousso  <drousso@apple.com>
2228
2229         Web Inspector: make the layers sidebar in the Elements tab always visible
2230         https://bugs.webkit.org/show_bug.cgi?id=190158
2231
2232         Reviewed by Brian Burg.
2233
2234         * UserInterface/Views/ElementsTabContentView.js:
2235         (WI.ElementsTabContentView):
2236         * UserInterface/Views/SearchTabContentView.js:
2237         (WI.SearchTabContentView):
2238
2239 2018-10-30  Devin Rousso  <drousso@apple.com>
2240
2241         Web Inspector: refactor WI.ScopeBarItem for better extensibility
2242         https://bugs.webkit.org/show_bug.cgi?id=190986
2243
2244         Reviewed by Brian Burg.
2245
2246         Renames `withModifier` to `extendSelection` for clarity of usage, and to allow the changes
2247         in <https://webkit.org/b/190754> (adding an option to allow `WI.ScopeBarItem`s to be
2248         selected without deselcting any other `WI.ScopeBarItem`s) to use the same variable.
2249
2250         * UserInterface/Views/ScopeBarItem.js:
2251         (WI.ScopeBarItem):
2252         (WI.ScopeBarItem.prototype.set selected):
2253         (WI.ScopeBarItem.prototype._handleMouseDown):
2254         (WI.ScopeBarItem.prototype.setSelected): Deleted.
2255
2256         * UserInterface/Views/ScopeBar.js:
2257         (WI.ScopeBar):
2258         (WI.ScopeBar.prototype._populate):
2259         (WI.ScopeBar.prototype._itemSelectionDidChange):
2260
2261         * UserInterface/Views/MultipleScopeBarItem.js:
2262         (WI.MultipleScopeBarItem.prototype.set selectedScopeBarItem):
2263
2264         * UserInterface/Views/CanvasSidebarPanel.js:
2265         (WI.CanvasSidebarPanel.prototype._updateRecordingScopeBar):
2266         * UserInterface/Views/LogContentView.js:
2267         (WI.LogContentView):
2268         * UserInterface/Views/NetworkTableContentView.js:
2269         (WI.NetworkTableContentView):
2270         * UserInterface/Views/ResourceSidebarPanel.js:
2271         (WI.ResourceSidebarPanel):
2272         * UserInterface/Views/StorageSidebarPanel.js:
2273         (WI.StorageSidebarPanel):
2274
2275 2018-10-29  Nikita Vasilyev  <nvasilyev@apple.com>
2276
2277         Web Inspector: Flash views with red outline on initial layout
2278         https://bugs.webkit.org/show_bug.cgi?id=191048
2279
2280         Reviewed by Devin Rousso.
2281
2282         * UserInterface/Views/View.js:
2283         (WI.View.prototype._layoutSubtree):
2284         (WI.View.prototype._drawLayoutFlashingOutline):
2285
2286 2018-10-29  Devin Rousso  <drousso@apple.com>
2287
2288         Web Inspector: Canvas: show warning when path moves offscreen
2289         https://bugs.webkit.org/show_bug.cgi?id=191016
2290
2291         Reviewed by Joseph Pecoraro.
2292
2293         * UserInterface/Models/RecordingAction.js:
2294         (WI.RecordingAction):
2295         (WI.RecordingAction.deriveCurrentState):
2296         (WI.RecordingAction.prototype.get isVisual):
2297         (WI.RecordingAction.prototype.get warning): Added.
2298         (WI.RecordingAction.prototype.process.checkInvalidCurrentAxisPoint): Added.
2299         (WI.RecordingAction.prototype.process):
2300         (WI.RecordingAction.prototype.get hasVisibleEffect): Deleted.
2301         Replace `hasVisibleEffect` with a more general `warning` value, so that it can be used for
2302         more types of warnings.
2303
2304         * UserInterface/Views/RecordingActionTreeElement.js:
2305         (WI.RecordingActionTreeElement.prototype.onattach):
2306         * UserInterface/Views/RecordingActionTreeElement.css:
2307         (.item.action.visual.warning:not(.invalid) > .status > .warning): Added.
2308         (.item.action.visual.no-visible-effect:not(.invalid) > .status > .warning): Deleted.
2309
2310         * Localizations/en.lproj/localizedStrings.js:
2311
2312 2018-10-29  Devin Rousso  <drousso@apple.com>
2313
2314         Web Inspector: refactor code for getting properties via WI.RemoteObject
2315         https://bugs.webkit.org/show_bug.cgi?id=190989
2316
2317         Reviewed by Matt Baker.
2318
2319         * UserInterface/Protocol/RemoteObject.js:
2320         (WI.RemoteObject.prototype.getPropertyDescriptors): Added.
2321         (WI.RemoteObject.prototype.getPropertyDescriptorsAsObject): Added.
2322         (WI.RemoteObject.prototype.getOwnPropertyDescriptors): Deleted.
2323         (WI.RemoteObject.prototype.getAllPropertyDescriptors): Deleted.
2324         (WI.RemoteObject.prototype._getPropertyDescriptors): Deleted.
2325         (WI.RemoteObject.prototype.getOwnPropertyDescriptorsAsObject): Deleted.
2326
2327         * UserInterface/Views/ErrorObjectView.js:
2328         (WI.ErrorObjectView.prototype.update):
2329         * UserInterface/Views/ObjectTreePropertyTreeElement.js:
2330         (WI.ObjectTreePropertyTreeElement.prototype._updateChildren):
2331         * UserInterface/Views/ObjectTreeView.js:
2332         (WI.ObjectTreeView.prototype.update):
2333
2334 2018-10-29  Tim Horton  <timothy_horton@apple.com>
2335
2336         Modernize WebKit nibs and lprojs for localization's sake
2337         https://bugs.webkit.org/show_bug.cgi?id=190911
2338         <rdar://problem/45349466>
2339
2340         Reviewed by Dan Bernstein.
2341
2342         * WebInspectorUI.xcodeproj/project.pbxproj:
2343         English->en
2344
2345 2018-10-29  Devin Rousso  <drousso@apple.com>
2346
2347         Web Inspector: prevent Canvas tab from listening for "space" when not visibile
2348         https://bugs.webkit.org/show_bug.cgi?id=190988
2349
2350         Reviewed by Joseph Pecoraro.
2351
2352         * UserInterface/Views/CanvasTabContentView.js:
2353         (WI.CanvasTabContentView):
2354         (WI.CanvasTabContentView.prototype.shown):
2355         (WI.CanvasTabContentView.prototype.hidden): Added.
2356
2357 2018-10-27  Matt Baker  <mattbaker@apple.com>
2358
2359         Web Inspector: Table should support deleting rows
2360         https://bugs.webkit.org/show_bug.cgi?id=189803
2361         <rdar://problem/44655709>
2362
2363         Reviewed by Devin Rousso.
2364
2365         Add methods for removing rows from a Table without reloading the data
2366         source. This patch adds Table.prototype.removeRow for removing a single
2367         row, and Table.prototype.removeSelectedRows for removing the entire selection.
2368         The latter also attempts to select a new row, if possible, before removing
2369         the selection.
2370
2371         * UserInterface/Base/IndexSet.js:
2372         (WI.IndexSet.prototype.copy):
2373
2374         * UserInterface/Views/Table.js:
2375         (WI.Table):
2376         (WI.Table.prototype.get numberOfRows):
2377         Cache the number of rows in the table data source. Invalidate cached
2378         value whenever table data is reloaded. Removing rows immediately updates
2379         cached value, without incurring a potentially expensive reload.
2380
2381         (WI.Table.prototype.reloadData):
2382         (WI.Table.prototype.selectRow):
2383         (WI.Table.prototype.deselectRow):
2384         (WI.Table.prototype.removeRow):
2385         (WI.Table.prototype.removeSelectedRows):
2386         Remove the selected rows and select a new row, if possible.
2387         (WI.Table.prototype._updateVisibleRows):
2388         (WI.Table.prototype._handleKeyDown):
2389         (WI.Table.prototype._deselectAllAndSelect):
2390         Drive-by fix: should work when `rowToSelect` isn't already selected.
2391         (WI.Table.prototype._removeRows):
2392         Remove rows and adjust the indexes of rows that are shifted up as a result
2393         of preceding rows being removed.
2394
2395 2018-10-26  Devin Rousso  <drousso@apple.com>
2396
2397         Web Inspector: simplify some editing code checks
2398         https://bugs.webkit.org/show_bug.cgi?id=190970
2399
2400         Reviewed by Joseph Pecoraro.
2401
2402         * UserInterface/Base/Main.js:
2403         (WI._focusChanged):
2404
2405         * UserInterface/Base/Utilities.js:
2406
2407         * UserInterface/Views/EditingSupport.js:
2408         (WI.enclosingCodeMirror): Added.
2409         (WI.isBeingEdited):
2410         (WI.isEventTargetAnEditableField):
2411
2412         * UserInterface/Views/QuickConsole.js:
2413         (WI.QuickConsole):
2414
2415 2018-10-26  Devin Rousso  <drousso@apple.com>
2416
2417         Web Inspector: Uncaught Exception: undefined is not an object (evaluating 'this._classListContainer.children')
2418         https://bugs.webkit.org/show_bug.cgi?id=190966
2419
2420         Reviewed by Joseph Pecoraro.
2421
2422         * UserInterface/Views/GeneralStyleDetailsSidebarPanel.js:
2423         (WI.GeneralStyleDetailsSidebarPanel.prototype.layout):
2424         (WI.GeneralStyleDetailsSidebarPanel.prototype._classToggleButtonClicked):
2425         (WI.GeneralStyleDetailsSidebarPanel.prototype._populateClassToggles):
2426         Don't try to reload the class toggles if the we haven't `layout` yet, as the element won't
2427         yet exist.
2428
2429 2018-10-25  Devin Rousso  <drousso@apple.com>
2430
2431         Web Inspector: Canvas Recording loading goes significantly slower when "Frame" tree element is expanded
2432         https://bugs.webkit.org/show_bug.cgi?id=190497
2433
2434         Reviewed by Joseph Pecoraro.
2435
2436         Save the `WI.TreeElement` that are in the DOM, and compare that with any `WI.TreeElement`
2437         that would be added to the DOM. If all of the following are true, don't edit the DOM:
2438          - no focused `WI.TreeElement` that isn't currently visible (we would scroll otherwise)
2439          - the set of previously visible `WI.TreeElement`s (e.g. not used for scroll padding) has at
2440            least one of the `WI.TreeElement`s that would be added from this update
2441             - this means that the user hasn't scrolled beyond the padding `WI.TreeElement`
2442          - there are no `WI.TreeElement`s that would be added from this update that were NOT added
2443            in a previous update
2444             - this covers the case that a `WI.TreeElement` is inserted in the visible area
2445
2446         * UserInterface/Base/Utilities.js:
2447
2448         * UserInterface/Views/TreeOutline.js:
2449         (WI.TreeOutline):
2450         (WI.TreeOutline.prototype.registerScrollVirtualizer):
2451         (WI.TreeOutline.prototype.updateVirtualizedElements.walk):
2452         (WI.TreeOutline.prototype.updateVirtualizedElements):
2453
2454 2018-10-25  Joseph Pecoraro  <pecoraro@apple.com>
2455
2456         JSContext Inspector: Broken frontend, DOMAgent is used but does not exist
2457         https://bugs.webkit.org/show_bug.cgi?id=190922
2458         <rdar://problem/45569827>
2459
2460         Reviewed by Devin Rousso.
2461
2462         * UserInterface/Controllers/DOMManager.js:
2463         (WI.DOMManager.prototype.requestDocument):
2464         Feature check for agents that may not exist in a JSContext.
2465
2466 2018-10-25  Devin Rousso  <drousso@apple.com>
2467
2468         Web Inspector: add corner rounding to the network timing "blocks"
2469         https://bugs.webkit.org/show_bug.cgi?id=190379
2470
2471         Reviewed by Timothy Hatcher.
2472
2473         * UserInterface/Views/NetworkTableContentView.css:
2474         (.waterfall .block):
2475         (body[dir=ltr] .waterfall .block): Added.
2476         (body[dir=rtl] .waterfall .block): Added.
2477         (.network-table .waterfall .block + .block): Added.
2478         (.network-table .waterfall .block.filler + .block, .network-table .waterfall .block:not(.request, .response) + :matches(.request, .response)): Added.
2479         (.network-table .waterfall .block:last-child): Added.
2480
2481 2018-10-25  Devin Rousso  <drousso@apple.com>
2482
2483         Web Inspector: display fullscreen enter/exit events in Timelines and Network node waterfalls
2484         https://bugs.webkit.org/show_bug.cgi?id=189874
2485         <rdar://problem/44700000>
2486
2487         Reviewed by Joseph Pecoraro.
2488
2489         * Localizations/en.lproj/localizedStrings.js:
2490
2491         * UserInterface/Protocol/DOMObserver.js:
2492         (WI.DOMObserver.prototype.didFireEvent):
2493         * UserInterface/Controllers/DOMManager.js:
2494         (WI.DOMManager.prototype.didFireEvent):
2495         Allow `data` to be passed to the frontend with `didFireEvent`.
2496
2497         * UserInterface/Models/DOMNode.js:
2498         (WI.DOMNode):
2499         (WI.DOMNode.getFullscreenDOMEvents): Added.
2500         (WI.DOMNode.prototype.didFireEvent):
2501         (WI.DOMNode.prototype._handleDOMNodeDidFireEvent): Added.
2502         (WI.DOMNode.prototype._addDOMEvent):
2503         (WI.DOMNode.prototype._shouldListenForEventListeners): Added.
2504         If an event is fired on an ancestor of this node, also record that event in this node's
2505         `domEvents`, including the `originator` node.
2506
2507         * UserInterface/Views/NetworkTableContentView.js:
2508         (WI.NetworkTableContentView.prototype._populateWaterfallGraph):
2509         * UserInterface/Views/NetworkTableContentView.css:
2510         (.network-table :not(.header) .cell.waterfall .waterfall-container > .dom-fullscreen): Added.
2511
2512         * UserInterface/Views/DOMEventsBreakdownView.js:
2513         (WI.DOMEventsBreakdownView.prototype.initialLayout):
2514         (WI.DOMEventsBreakdownView.prototype._populateTable):
2515         * UserInterface/Views/DOMEventsBreakdownView.css:
2516         (.dom-events-breakdown .graph > .area.fullscreen): Added.
2517         (.dom-events-breakdown .inherited > .name, .dom-events-breakdown .inherited > .graph > .point): Added.
2518         (.dom-events-breakdown:not(.has-inherited) .originator): Added.
2519
2520 2018-10-25  Devin Rousso  <drousso@apple.com>
2521
2522         Web Inspector: Network: more aggressively snap timing blocks together
2523         https://bugs.webkit.org/show_bug.cgi?id=190439
2524
2525         Reviewed by Timothy Hatcher.
2526
2527         * UserInterface/Views/NetworkTableContentView.js:
2528         (WI.NetworkTableContentView.prototype._populateWaterfallGraph.appendBlock):
2529         (WI.NetworkTableContentView.prototype._populateWaterfallGraph):
2530         If the time difference between the end of the previous block and the start of this block
2531         would result in less than 2px of space, extend the next block back to the previous block.
2532
2533 2018-10-24  Devin Rousso  <drousso@apple.com>
2534
2535         Web Inspector: popovers for function source code are malformed
2536         https://bugs.webkit.org/show_bug.cgi?id=190859
2537
2538         Reviewed by Joseph Pecoraro.
2539
2540         Previously, the `WI.Popover` would be drawn twice: once when the
2541         `WI.CodeMirrorTokenTrackingController` determines that the user has hovered on a function
2542         token, and once again when the source for that function is formatted (after being retrieved).
2543         In the case that the formatter is able to return the prettified source within a frame (or
2544         two), the `WI.Popover` is still in the middle of animating to its new size, meaning that the
2545         changes made by the formatted `update` will be overridden on the next rAF (creates a flash).
2546
2547         * UserInterface/Views/Popover.js:
2548         (WI.Popover.prototype):
2549         (WI.Popover.prototype._animateFrame.drawBackground):
2550         (WI.Popover.prototype._drawBackground):
2551         Add a member variable to make sure that there is only ever one rAF firing at a time.
2552         Drive-by: rework the background code to only use one canvas.
2553
2554         * UserInterface/Views/SourceCodeTextEditor.js:
2555         (WI.SourceCodeTextEditor.prototype._showPopoverForFunction.didGetDetails):
2556         Don't show the `WI.Popover` until the formatter has finished prettifying the function's
2557         source code, as otherwise there is brief moment that the popover appears and is empty.
2558
2559 2018-10-24  Devin Rousso  <drousso@apple.com>
2560
2561         Web Inspector: REGRESSION (r237232): changing resources via up/down blurs the TreeOutline in Resources
2562         https://bugs.webkit.org/show_bug.cgi?id=190862
2563
2564         Reviewed by Matt Baker.
2565
2566         * UserInterface/Views/TextEditor.js:
2567         (WI.TextEditor.prototype.set selectedTextRange):
2568         Don't `focus` unless the `activeElement` is not a WebInspector element (e.g. <body>),
2569         meaning that the previously focused element has been removed from the DOM and no longer
2570         needs to keep the focus.
2571
2572 2018-10-24  Devin Rousso  <drousso@apple.com>
2573
2574         Web Inspector: CSP request payload on medium.com is unreadable, should be pretty-printed
2575         https://bugs.webkit.org/show_bug.cgi?id=190354
2576         <rdar://problem/45090894>
2577
2578         Reviewed by Joseph Pecoraro.
2579
2580         * UserInterface/Views/TextEditor.js:
2581         (WI.TextEditor.prototype.set string.update):
2582         (WI.TextEditor.prototype._attemptToDetermineMIMEType): Added.
2583         If the content doesn't already have a MIME type, attempt to determine one by trying to
2584         format it as "javascript" (e.g. request JSON that is simply missing a MIME type).
2585
2586         * UserInterface/Views/TextContentView.js:
2587         (WI.TextContentView):
2588         (WI.TextContentView.prototype._handleTextEditorMIMETypeChanged): Added.
2589         * UserInterface/Views/TextResourceContentView.js:
2590         (WI.TextResourceContentView):
2591         (WI.TextResourceContentView.prototype._handleTextEditorMIMETypeChanged): Added.
2592         * UserInterface/Views/ScriptContentView.js:
2593         (WI.ScriptContentView):
2594         (WI.ScriptContentView.prototype._handleTextEditorMIMETypeChanged): Added.
2595         Enable the "Pretty Print" navigation button if the MIME type changes to something that is
2596         able to be formatted.
2597         Drive-by: reorder the creation of the "Pretty Print" button so that it exists if
2598         `_attemptToDetermineMIMEType` finishes synchronously.
2599
2600 2018-10-23  Devin Rousso  <drousso@apple.com>
2601
2602         Uncaught Exception: TypeError: null is not an object (evaluating 'mouseBlock.addEventListener')
2603         https://bugs.webkit.org/show_bug.cgi?id=190766
2604
2605         Reviewed by Brian Burg.
2606
2607         * UserInterface/Views/NetworkTableContentView.js:
2608         (WI.NetworkTableContentView.prototype._populateWaterfallGraph):
2609         When creating the `mouseBlock`, if the `startTimestamp` and `endTimestamp` are equal, we
2610         don't create an element. If this is true for the total range of the `WI.Resouce` (meaning
2611         its `startTime` and `responseEnd`), don't even try to create blocks.
2612
2613 2018-10-23  Devin Rousso  <drousso@apple.com>
2614
2615         Web Inspector: "Queued NaNms" in Network tab
2616         https://bugs.webkit.org/show_bug.cgi?id=190767
2617         <rdar://problem/45420859>
2618
2619         Reviewed by Brian Burg.
2620
2621         * UserInterface/Models/ResourceTimingData.js:
2622         (WI.ResourceTimingData.prototype.get fetchStart):
2623         If the `WI.ResourceTimingData` has no `fetchStart` use the associated `WI.Resource`'s
2624         `requestSentTimestamp` (just like `startTime`).
2625
2626 2018-10-22  Joseph Pecoraro  <pecoraro@apple.com>
2627
2628         Web Inspector: Open Quickly dialog doesn't show named scripts that appear in the debugger sidebar
2629         https://bugs.webkit.org/show_bug.cgi?id=190649
2630
2631         Reviewed by Devin Rousso.
2632
2633         * UserInterface/Views/OpenResourceDialog.js:
2634         (WI.OpenResourceDialog.prototype.didPresentDialog):
2635         (WI.OpenResourceDialog.prototype._addResourcesForTarget):
2636         (WI.OpenResourceDialog.prototype._addScriptsForTarget):
2637         Include non-resource named scripts from the main target in
2638         the open quickly dialog.
2639
2640 2018-10-19  Joseph Pecoraro  <pecoraro@apple.com>
2641
2642         Web Inspector: Remove unused member variable of DebuggerSidebarPanel
2643         https://bugs.webkit.org/show_bug.cgi?id=190743
2644
2645         Reviewed by Devin Rousso.
2646
2647         * UserInterface/Views/DebuggerSidebarPanel.js:
2648         (WI.DebuggerSidebarPanel):
2649
2650 2018-10-17  Devin Rousso  <drousso@apple.com>
2651
2652         Web Inspector: Quickly Open to line/column does should have caret indicating where the position is
2653         https://bugs.webkit.org/show_bug.cgi?id=190643
2654
2655         Reviewed by Matt Baker.
2656
2657         * UserInterface/Views/TextEditor.js:
2658         (WI.TextEditor.prototype.set selectedTextRange):
2659         (WI.TextEditor.prototype.revealPosition):
2660         Ensure that CodeMirror is focused before attempting to `setSelection`.
2661         Drive-by: allow selections past the "end" of the line (since there is a `\n` or `\r`).
2662
2663         * UserInterface/Views/SourceCodeTextEditor.js:
2664         (WI.SourceCodeTextEditor.prototype.dialogWasDismissedWithRepresentedObject):
2665         Remove the extra `focus` call after dismissing the `WI.GoToLineDialog` since it is now
2666         handled by `WI.TextEditor` via `revealPosition`.
2667
2668 2018-10-16  Joseph Pecoraro  <pecoraro@apple.com>
2669
2670         Web Inspector: ⌃G to jump to line in CSS file wipes the line
2671         https://bugs.webkit.org/show_bug.cgi?id=190645
2672
2673         Reviewed by Devin Rousso.
2674
2675         * UserInterface/Base/Main.js:
2676         * UserInterface/Views/Dialog.js:
2677         (WI.Dialog.prototype.dismiss):
2678         * UserInterface/Views/SourceCodeTextEditor.js:
2679         (WI.SourceCodeTextEditor.prototype.dialogWasDismissed): Deleted.
2680         Rename the handler when dismissing a dialog with a value so that
2681         it is clear this is only on a successful value and not an invalid value.
2682         Dialog now only calls this delegate with a valid value. This addresses
2683         exceptions seen when the GoToLineDialog was dimissed via Escape and
2684         an unexpected `null` value was being handled in the delegate.
2685
2686         * UserInterface/Views/GoToLineDialog.js:
2687         (WI.GoToLineDialog.prototype._handleKeydownEvent):
2688         * UserInterface/Views/OpenResourceDialog.js:
2689         (WI.OpenResourceDialog.prototype._handleKeydownEvent):
2690         Prevent default on the event whenever we dismiss the dialog.
2691         Without this, the key event was also being sent to the editor.
2692         In this case, that meant an "Enter" key was replacing the new
2693         selection in the TextEditor with a newline!
2694
2695 2018-10-16  Devin Rousso  <drousso@apple.com>
2696
2697         Web Inspector: Canvas: capture previously saved states and add them to the recording payload
2698         https://bugs.webkit.org/show_bug.cgi?id=190473
2699
2700         Reviewed by Joseph Pecoraro.
2701
2702         Instead of sending a single object of the current state of the context, send an array of
2703         objects, one for each restore point. When replaying, recreate each restore point before
2704         applying the selected action(s).
2705
2706         * UserInterface/Models/Recording.js:
2707         (WI.Recording):
2708         (WI.Recording.fromPayload):
2709         (WI.Recording.prototype.toJSON):
2710         (WI.Recording.prototype.async._process):
2711         (WI.Recording.prototype.async._swizzleState): Added.
2712         * UserInterface/Models/RecordingAction.js:
2713         (WI.RecordingAction):
2714         (WI.RecordingAction.deriveCurrentState): Added.
2715         (WI.RecordingAction.prototype.get states): Added.
2716         (WI.RecordingAction.prototype.process):
2717         (WI.RecordingAction.prototype.get state): Deleted.
2718         Drive-by: when `process`ing, also check to see if any values in the current state changed
2719         outside of those expected in `_stateModifiers` (e.g. `restore` may modify some state values).
2720
2721         * UserInterface/Views/RecordingContentView.js:
2722         (WI.RecordingContentView.prototype._generateContentCanvas2D):
2723
2724         * UserInterface/Views/RecordingStateDetailsSidebarPanel.js:
2725         (WI.RecordingStateDetailsSidebarPanel.prototype._generateDetailsCanvas2D):
2726         Default to showing the most recent (current) state.
2727
2728         * UserInterface/Views/CanvasTabContentView.js:
2729         (WI.CanvasTabContentView.prototype.initialLayout): Added.
2730         (WI.CanvasTabContentView.prototype._addCanvas):
2731         (WI.CanvasTabContentView.prototype._removeCanvas):
2732         (WI.CanvasTabContentView.prototype._addRecording): Added.
2733         (WI.CanvasTabContentView.prototype._recordingImportedOrStopped):
2734         (WI.CanvasTabContentView.prototype._recordingAdded): Deleted.
2735         * UserInterface/Controllers/CanvasManager.js:
2736         (WI.CanvasManager):
2737         (WI.CanvasManager.prototype.get importedRecordings): Added.
2738         (WI.CanvasManager.prototype.importRecording):
2739         Drive-by: store imported recordings on `WI.CanvasManager` so that if the Canvas tab is
2740         closed we can still show the list of imported recordings.
2741
2742 2018-10-16  Devin Rousso  <drousso@apple.com>
2743
2744         Web Inspector: Canvas recording sidebar scroll position lost after switching tabs
2745         https://bugs.webkit.org/show_bug.cgi?id=190482
2746
2747         Reviewed by Joseph Pecoraro.
2748
2749         * UserInterface/Views/Sidebar.js:
2750         (WI.Sidebar.prototype.removeSidebarPanel):
2751         (WI.Sidebar.prototype.set selectedSidebarPanel):
2752         Call `hidden` before setting `selected` to `false`, as that sets `display: none;` on the
2753         element, which sets the `scrollTop` to `0`.
2754
2755         * UserInterface/Views/SidebarPanel.js:
2756         (WI.SidebarPanel.prototype.shown):
2757         (WI.SidebarPanel.prototype.hidden):
2758         (WI.SidebarPanel.prototype.get scrollElement): Added.
2759         Allow subclasses to specify the scrolling element for saving/restoring the scroll position.
2760
2761         * UserInterface/Views/CanvasSidebarPanel.js:
2762         (WI.CanvasSidebarPanel.prototype.get scrollElement): Added.
2763         * UserInterface/Views/RecordingStateDetailsSidebarPanel.js:
2764         (WI.RecordingStateDetailsSidebarPanel.prototype.get scrollElement): Added.
2765
2766 2018-10-16  Devin Rousso  <drousso@apple.com>
2767
2768         Web Inspector: Should be a way to go directly from an event in the overview view to the specialized timeline for that event
2769         https://bugs.webkit.org/show_bug.cgi?id=135307
2770         <rdar://problem/17273966>
2771
2772         Reviewed by Joseph Pecoraro.
2773
2774         When a `WI.TimelineRecordBar` is clicked, call up the delegate chain to the overview and
2775         adjust the currently selected `WI.TimelineRecordBar` among the `WI.TimelineOverviewGraph`s.
2776         Similarly, selecting a `WI.DataGridNode` in any `WI.TimelineView` subclass will use the same
2777         logic to select the corresponding `WI.TimelineRecordBar`.
2778
2779         * UserInterface/Views/TimelineOverview.js:
2780         (WI.TimelineOverview):
2781         (WI.TimelineOverview.prototype.reset):
2782         (WI.TimelineOverview.prototype._recordSelected):
2783
2784         * UserInterface/Views/TimelineOverviewGraph.js:
2785         (WI.TimelineOverviewGraph):
2786         (WI.TimelineOverviewGraph.prototype.set selectedRecord):
2787         (WI.TimelineOverviewGraph.prototype.get selectedRecordBar): Added.
2788         (WI.TimelineOverviewGraph.prototype.set selectedRecordBar): Added.
2789         (WI.TimelineOverviewGraph.prototype.timelineRecordBarClicked): Added.
2790         (WI.TimelineOverviewGraph.prototype._needsSelectedRecordLayout):
2791
2792         * UserInterface/Views/TimelineRecordBar.js:
2793         (WI.TimelineRecordBar):
2794         (WI.TimelineRecordBar.prototype.get selected): Added.
2795         (WI.TimelineRecordBar.prototype.set selected): Added.
2796         (WI.TimelineRecordBar.prototype._handleClick): Added.
2797         * UserInterface/Views/TimelineRecordBar.css:
2798         (.timeline-record-bar.selected > .segment): Added.
2799         Add a `delegate` that is notified whenever the element is clicked.
2800
2801         * UserInterface/Views/TimelineDataGridNode.js:
2802         (WI.TimelineDataGridNode.prototype.refreshGraph.createBar):
2803         * UserInterface/Views/LayoutTimelineOverviewGraph.js:
2804         (WI.LayoutTimelineOverviewGraph.prototype.updateSelectedRecord):
2805         (WI.LayoutTimelineOverviewGraph.prototype._updateRowLayout.createBar):
2806         * UserInterface/Views/NetworkTimelineOverviewGraph.js:
2807         (WI.NetworkTimelineOverviewGraph.prototype.layout.createBar):
2808         * UserInterface/Views/ScriptTimelineOverviewGraph.js:
2809         (WI.ScriptTimelineOverviewGraph.prototype.layout.createBar):
2810         (WI.ScriptTimelineOverviewGraph.prototype.updateSelectedRecord):
2811
2812         * UserInterface/Views/TimelineRecordingContentView.js:
2813         (WI.TimelineRecordingContentView.prototype.showTimelineViewForTimeline):
2814
2815 2018-10-16  Devin Rousso  <drousso@apple.com>
2816
2817         Web Inspector: sequences of spaces longer than 16 don't show a dot
2818         https://bugs.webkit.org/show_bug.cgi?id=190528
2819
2820         Reviewed by Matt Baker.
2821
2822         * UserInterface/Views/CodeMirrorAdditions.js:
2823         Create a new CSS rule and add it to a unique <style> whenever a whitespace sequence with
2824         a length is seen for the first time.
2825
2826         * UserInterface/Views/CodeMirrorOverrides.css:
2827         (.show-whitespace-characters .CodeMirror .cm-whitespace-1::before): Deleted.
2828         (.show-whitespace-characters .CodeMirror .cm-whitespace-2::before): Deleted.
2829         (.show-whitespace-characters .CodeMirror .cm-whitespace-3::before): Deleted.
2830         (.show-whitespace-characters .CodeMirror .cm-whitespace-4::before): Deleted.
2831         (.show-whitespace-characters .CodeMirror .cm-whitespace-5::before): Deleted.
2832         (.show-whitespace-characters .CodeMirror .cm-whitespace-6::before): Deleted.
2833         (.show-whitespace-characters .CodeMirror .cm-whitespace-7::before): Deleted.
2834         (.show-whitespace-characters .CodeMirror .cm-whitespace-8::before): Deleted.
2835         (.show-whitespace-characters .CodeMirror .cm-whitespace-9::before): Deleted.
2836         (.show-whitespace-characters .CodeMirror .cm-whitespace-10::before): Deleted.
2837         (.show-whitespace-characters .CodeMirror .cm-whitespace-11::before): Deleted.
2838         (.show-whitespace-characters .CodeMirror .cm-whitespace-12::before): Deleted.
2839         (.show-whitespace-characters .CodeMirror .cm-whitespace-13::before): Deleted.
2840         (.show-whitespace-characters .CodeMirror .cm-whitespace-14::before): Deleted.
2841         (.show-whitespace-characters .CodeMirror .cm-whitespace-15::before): Deleted.
2842         (.show-whitespace-characters .CodeMirror .cm-whitespace-16::before): Deleted.
2843
2844 2018-10-15  Charles Vazac  <cvazac@gmail.com>
2845
2846         Web Inspector: Expose Server Timing Response Headers in Network Tab
2847         https://bugs.webkit.org/show_bug.cgi?id=190440
2848
2849         Reviewed by Joseph Pecoraro.
2850
2851         * Localizations/en.lproj/localizedStrings.js: new key "Server Timing:"
2852         * UserInterface/Main.html: add reference to Models/ServerTimingEntry.js
2853         * UserInterface/Models/Resource.js:
2854         (WI.Resource.prototype.get serverTiming):
2855         (WI.Resource.prototype.updateForResponse):
2856         * UserInterface/Models/ServerTimingEntry.js: Added.
2857         (WI.ServerTimingEntry):
2858         (WI.ServerTimingEntry.parseHeaders): parse raw response headers into an array of ServerTimingEntry objects
2859         (WI.ServerTimingEntry.parseHeaders.consumeDelimiter):
2860         (WI.ServerTimingEntry.parseHeaders.consumeToken):
2861         (WI.ServerTimingEntry.):
2862         * UserInterface/Test.html: add reference to Models/ServerTimingEntry.js
2863         * UserInterface/Views/ResourceTimingBreakdownView.js:
2864         (WI.ResourceTimingBreakdownView.prototype._appendServerTimingRow): render a table row per ServerTimingEntry object
2865         (WI.ResourceTimingBreakdownView.prototype.initialLayout):
2866         (WI.ResourceTimingBreakdownView):
2867
2868 2018-10-15  Nikita Vasilyev  <nvasilyev@apple.com>
2869
2870         Web Inspector: Dark Mode: pseudo elements in DOM tree are too dark
2871         https://bugs.webkit.org/show_bug.cgi?id=190541
2872         <rdar://problem/45238443>
2873
2874         Reviewed by Matt Baker.
2875
2876         * UserInterface/Views/DOMTreeOutline.css:
2877         (@media (prefers-dark-interface)):
2878         (.tree-outline.dom .html-pseudo-element):
2879
2880 2018-10-15  Matt Baker  <mattbaker@apple.com>
2881
2882         Web Inspector: REGRESSION (r233824): execution highlight range missing/incorrect in pretty printed code
2883         https://bugs.webkit.org/show_bug.cgi?id=188082
2884         <rdar://problem/42640580>
2885
2886         Reviewed by Joseph Pecoraro.
2887
2888         * UserInterface/Views/SourceCodeTextEditor.js:
2889         (WI.SourceCodeTextEditor.prototype.textEditorExecutionHighlightRange):
2890         TextEditor expects positions returned by the delegate to be relative to
2891         the editor's text content, not the original source code content.
2892
2893         * UserInterface/Views/TextEditor.js:
2894         (WI.TextEditor.prototype._updateExecutionRangeHighlight):
2895         Convert positions to CodeMirror format here rather than in the delegate
2896         method, which is a layer removed from CodeMirror.
2897
2898 2018-10-15  Nikita Vasilyev  <nvasilyev@apple.com>
2899
2900         Web Inspector: Dark Mode: unreadable text when hovering CSS properties while holding Command
2901         https://bugs.webkit.org/show_bug.cgi?id=190548
2902         <rdar://problem/45242098>
2903
2904         Reviewed by Joseph Pecoraro.
2905
2906         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
2907         (.meta-key-pressed .spreadsheet-css-declaration:not(.locked) :matches(.name, .value):not(.editing):hover):
2908         In the light mode the color remained the same.
2909
2910 2018-10-15  Nikita Vasilyev  <nvasilyev@apple.com>
2911
2912         Web Inspector: Dark Mode: style editor warnings should not look like errors
2913         https://bugs.webkit.org/show_bug.cgi?id=190569
2914         <rdar://problem/45261689>
2915
2916         Reviewed by Matt Baker.
2917
2918         Make warnings in the style editor look the same as warnings in the content views.
2919         Unify warning and error background color variables.
2920
2921         * UserInterface/Views/LogContentView.css:
2922         (@media (prefers-dark-interface)):
2923         (.console-error-level):
2924         (.console-warning-level):
2925         * UserInterface/Views/SourceCodeTextEditor.css:
2926         (.source-code.text-editor > .CodeMirror .warning):
2927         (.source-code.text-editor > .CodeMirror .error):
2928         (.source-code.text-editor > .CodeMirror .issue-widget.warning):
2929         (.source-code.text-editor > .CodeMirror .issue-widget.inline.warning):
2930         (.source-code.text-editor > .CodeMirror .issue-widget.error):
2931         (.source-code.text-editor > .CodeMirror .issue-widget.inline.error):
2932         (@media (prefers-dark-interface)):
2933         (.source-code.text-editor > .CodeMirror .issue-widget):
2934         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
2935         (.spreadsheet-style-declaration-editor .property.has-warning):
2936         (.spreadsheet-style-declaration-editor .property.has-warning .warning):
2937         (@media (prefers-dark-interface)):
2938         (.spreadsheet-style-declaration-editor :matches(.name, .value).editing):
2939         * UserInterface/Views/Variables.css:
2940         (:root):
2941         (@media (prefers-dark-interface)):
2942
2943 2018-10-12  Devin Rousso  <drousso@apple.com>
2944
2945         Web Inspector: Canvas: previews aren't removed when the parent view is hidden
2946         https://bugs.webkit.org/show_bug.cgi?id=190525
2947
2948         Reviewed by Matt Baker.
2949
2950         * UserInterface/Views/CanvasTabContentView.js:
2951         (WI.CanvasTabContentView.prototype.attached):
2952
2953         * UserInterface/Controllers/CanvasManager.js:
2954         (WI.CanvasManager.prototype.get canvases):
2955         (WI.CanvasManager.prototype.get shaderPrograms):
2956         Drive-by: simplify these getters.
2957
2958 2018-10-12  Joseph Pecoraro  <pecoraro@apple.com>
2959
2960         Web Inspector: Dark Mode: Highlight text in Network Headers search is too dark
2961         https://bugs.webkit.org/show_bug.cgi?id=190510
2962
2963         Reviewed by Devin Rousso.
2964
2965         * UserInterface/Views/ResourceHeadersContentView.css:
2966         (.resource-headers.showing-find-banner .search-highlight):
2967         Use adaptive text-color.
2968
2969 2018-10-12  Nikita Vasilyev  <nvasilyev@apple.com>
2970
2971         Web Inspector: Dark Mode: wrong color used for "goto arrow" for selected DOM breakpoint tree element
2972         https://bugs.webkit.org/show_bug.cgi?id=190180
2973         <rdar://problem/44927654>
2974
2975         Reviewed by Matt Baker.
2976
2977         * UserInterface/Views/Main.css:
2978         (@media (prefers-dark-interface)):
2979         (:focus .selected .go-to-arrow):
2980
2981 2018-10-11  Devin Rousso  <drousso@apple.com>
2982
2983         Web Inspector: Network: detail view reverts to "Response" when new requests are added
2984         https://bugs.webkit.org/show_bug.cgi?id=190443
2985
2986         Reviewed by Joseph Pecoraro.
2987
2988         * UserInterface/Views/NetworkTableContentView.js:
2989         (WI.NetworkTableContentView.prototype._showDetailView):
2990         Return early if we are already showing a detail view for the selected object.
2991
2992 2018-10-11  Matt Baker  <mattbaker@apple.com>
2993
2994         Web Inspector: remove unused  TreeOutline style .force-focus
2995         https://bugs.webkit.org/show_bug.cgi?id=190480
2996         <rdar://problem/45203484>
2997
2998         Reviewed by Joseph Pecoraro.
2999
3000         * UserInterface/Views/CallFrameTreeElement.css:
3001         (.tree-outline:focus .item.call-frame.selected .status > .status-image):
3002         (.tree-outline:matches(:focus, .force-focus) .item.call-frame.selected .status > .status-image): Deleted.
3003
3004         * UserInterface/Views/CanvasSidebarPanel.css:
3005         (.sidebar > .panel.navigation.canvas > .content > .recording-content > .tree-outline:focus .item.processing.selected .subtitle > progress):
3006         (.sidebar > .panel.navigation.canvas > .content > .recording-content > .tree-outline:matches(:focus, .force-focus) .item.processing.selected .subtitle > progress): Deleted.
3007
3008         * UserInterface/Views/DataGrid.css:
3009         (body[dir=ltr] .data-grid:focus tr.selected td:not(:last-child)):
3010         (body[dir=rtl] .data-grid:focus tr.selected td:not(:last-child)):
3011         (.data-grid:focus tr.parent.selected td.disclosure::before):
3012         (.data-grid:focus tr.parent.expanded.selected td.disclosure::before):
3013         (.data-grid:focus tr.selected):
3014         (.data-grid:focus tr.selected td .subtitle):
3015         (body:not(.window-inactive, .window-docked-inactive) .data-grid:focus tr.editable.selected .cell-content > input):
3016         (@media (prefers-dark-interface)):
3017         (body[dir=ltr] .data-grid:matches(:focus, .force-focus) tr.selected td:not(:last-child)): Deleted.
3018         (body[dir=rtl] .data-grid:matches(:focus, .force-focus) tr.selected td:not(:last-child)): Deleted.
3019         (.data-grid:matches(:focus, .force-focus) tr.parent.selected td.disclosure::before): Deleted.
3020         (.data-grid:matches(:focus, .force-focus) tr.parent.expanded.selected td.disclosure::before): Deleted.
3021         (.data-grid:matches(:focus, .force-focus) tr.selected): Deleted.
3022         (.data-grid:matches(:focus, .force-focus) tr.selected td .subtitle): Deleted.
3023         (body:not(.window-inactive, .window-docked-inactive) .data-grid:matches(:focus, .force-focus) tr.editable.selected .cell-content > input): Deleted.
3024
3025         * UserInterface/Views/Main.css:
3026         (:focus .selected .go-to-arrow):
3027         (:focus .selected .go-to-arrow:active):
3028         (:matches(:focus, .force-focus) .selected .go-to-arrow): Deleted.
3029         (:matches(:focus, .force-focus) .selected .go-to-arrow:active): Deleted.
3030
3031         * UserInterface/Views/ProfileView.css:
3032         (.profile > .data-grid:focus tr.selected td .location):
3033         (.profile > .data-grid:matches(:focus, .force-focus) tr.selected td .location): Deleted.
3034
3035         * UserInterface/Views/RecordingActionTreeElement.css:
3036         (.tree-outline:focus .item.action.selected:not(.initial-state, .invalid) > .icon):
3037         (body:not(.window-inactive, .window-docked-inactive) .tree-outline:focus .item.action.selected > .titles .parameter.swizzled,):
3038         (.tree-outline:matches(:focus, .force-focus) .item.action.selected:not(.initial-state, .invalid) > .icon): Deleted.
3039         (body:not(.window-inactive, .window-docked-inactive) .tree-outline:matches(:focus, .force-focus) .item.action.selected > .titles .parameter.swizzled,): Deleted.
3040
3041         * UserInterface/Views/ScriptDetailsTimelineView.css:
3042         (.tree-outline:focus .item.selected .alternate-subtitle):
3043         (.tree-outline:matches(:focus, .force-focus) .item.selected .alternate-subtitle): Deleted.
3044
3045         * UserInterface/Views/ShaderProgramTreeElement.css:
3046         (.tree-outline:focus .item.shader-program.selected .status > img):
3047         (.tree-outline:matches(:focus, .force-focus) .item.shader-program.selected .status > img): Deleted.
3048
3049         * UserInterface/Views/ThreadTreeElement.css:
3050         (.tree-outline:focus > .item.thread.selected .status-button.resume):
3051         (.tree-outline:matches(:focus, .force-focus) > .item.thread.selected .status-button.resume): Deleted.
3052
3053         * UserInterface/Views/TimelineRecordBar.css:
3054         (:focus .selected .timeline-record-bar > .segment):
3055         (:focus .selected .timeline-record-bar > .segment.inactive):
3056         (body[dir=ltr] :focus .selected .timeline-record-bar.has-inactive-segment > .segment:not(.inactive)):
3057         (body[dir=rtl] :focus .selected .timeline-record-bar.has-inactive-segment > .segment:not(.inactive)):
3058         (:matches(:focus, .force-focus) .selected .timeline-record-bar > .segment): Deleted.
3059         (:matches(:focus, .force-focus) .selected .timeline-record-bar > .segment.inactive): Deleted.
3060         (body[dir=ltr] :matches(:focus, .force-focus) .selected .timeline-record-bar.has-inactive-segment > .segment:not(.inactive)): Deleted.
3061         (body[dir=rtl] :matches(:focus, .force-focus) .selected .timeline-record-bar.has-inactive-segment > .segment:not(.inactive)): Deleted.
3062
3063         * UserInterface/Views/TreeElementStatusButton.css:
3064         (:focus .item.selected > .status > .status-button):
3065         (:matches(:focus, .force-focus) .item.selected > .status > .status-button): Deleted.
3066
3067         * UserInterface/Views/TreeOutline.css:
3068         (.tree-outline:focus .item.selected .disclosure-button):
3069         (.tree-outline:focus .item.selected.expanded .disclosure-button):
3070         (.tree-outline:focus .item.selected):
3071         (.tree-outline:focus .item.selected .subtitle):
3072         (.tree-outline:not(.large):focus .item.selected .status .indeterminate-progress-spinner):
3073         (.tree-outline:matches(:focus, .force-focus) .item.selected .disclosure-button): Deleted.
3074         (.tree-outline:matches(:focus, .force-focus) .item.selected.expanded .disclosure-button): Deleted.
3075         (.tree-outline:matches(:focus, .force-focus) .item.selected): Deleted.
3076         (.tree-outline:matches(:focus, .force-focus) .item.selected .subtitle): Deleted.
3077         (.tree-outline:not(.large):matches(:focus, .force-focus) .item.selected .status .indeterminate-progress-spinner): Deleted.
3078
3079 2018-10-11  Devin Rousso  <drousso@apple.com>
3080
3081         Web Inspector: detail view is not re-shown after sorting the Network table
3082         https://bugs.webkit.org/show_bug.cgi?id=190330
3083         <rdar://problem/45089607>
3084
3085         Reviewed by Matt Baker.
3086
3087         * UserInterface/Views/NetworkTableContentView.js:
3088         (WI.NetworkTableContentView.prototype._restoreSelectedRow):
3089
3090 2018-10-10  Devin Rousso  <drousso@apple.com>
3091
3092         Web Inspector: create special Network waterfall for media events
3093         https://bugs.webkit.org/show_bug.cgi?id=189773
3094         <rdar://problem/44626605>
3095
3096         Reviewed by Joseph Pecoraro.
3097
3098         * Localizations/en.lproj/localizedStrings.js:
3099         * UserInterface/Main.html:
3100         * UserInterface/Base/Utilities.js:
3101
3102         * UserInterface/Protocol/DOMObserver.js:
3103         (WI.DOMObserver.prototype.didFireEvent): Added.
3104         * UserInterface/Controllers/DOMManager.js:
3105         (WI.DOMManager.prototype.didFireEvent): Added.
3106         * UserInterface/Models/DOMNode.js:
3107         (WI.DOMNode):
3108         (WI.DOMNode.prototype.get domEvents): Added.
3109         (WI.DOMNode.prototype.didFireEvent): Added.
3110         (WI.DOMNode.prototype._addDOMEvent): Added.
3111
3112         * UserInterface/Views/NetworkTableContentView.js:
3113         (WI.NetworkTableContentView):
3114         (WI.NetworkTableContentView.prototype.shown):
3115         (WI.NetworkTableContentView.prototype.hidden):
3116         (WI.NetworkTableContentView.prototype.closed):
3117         (WI.NetworkTableContentView.prototype.reset):
3118         (WI.NetworkTableContentView.prototype.showRepresentedObject):
3119         (WI.NetworkTableContentView.prototype.networkDetailViewClose): Added.
3120         (WI.NetworkTableContentView.prototype.tableSortChanged):
3121         (WI.NetworkTableContentView.prototype.tableSelectionDidChange):
3122         (WI.NetworkTableContentView.prototype._populateNameCell):
3123         (WI.NetworkTableContentView.prototype._populateWaterfallGraph.positionByStartOffset): Added.
3124         (WI.NetworkTableContentView.prototype._populateWaterfallGraph.setWidthForDuration): Added.
3125         (WI.NetworkTableContentView.prototype._populateWaterfallGraph.createDOMEventLine): Added.
3126         (WI.NetworkTableContentView.prototype._populateWaterfallGraph.appendBlock):
3127         (WI.NetworkTableContentView.prototype._populateWaterfallGraph):
3128         (WI.NetworkTableContentView.prototype._processPendingEntries):
3129         (WI.NetworkTableContentView.prototype._rowIndexForRepresentedObject): Added.
3130         (WI.NetworkTableContentView.prototype._updateEntryForResource):
3131         (WI.NetworkTableContentView.prototype._hideDetailView): Added.
3132         (WI.NetworkTableContentView.prototype._showDetailView): Added.
3133         (WI.NetworkTableContentView.prototype._positionDetailView): Added.
3134         (WI.NetworkTableContentView.prototype._resourceTransferSizeDidChange):
3135         (WI.NetworkTableContentView.prototype._tryLinkResourceToDOMNode):
3136         (WI.NetworkTableContentView.prototype._handleNodeDidFireEvent): Added.
3137         (WI.NetworkTableContentView.prototype._updateFilteredEntries):
3138         (WI.NetworkTableContentView.prototype._typeFilterScopeBarSelectionChanged):
3139         (WI.NetworkTableContentView.prototype._urlFilterDidChange):
3140         (WI.NetworkTableContentView.prototype._restoreSelectedRow):
3141         (WI.NetworkTableContentView.prototype._waterfallPopoverContent): Added.
3142         (WI.NetworkTableContentView.prototype._waterfallPopoverContentForResourceEntry): Added.
3143         (WI.NetworkTableContentView.prototype._waterfallPopoverContentForNodeEntry): Added.
3144         (WI.NetworkTableContentView.prototype._handleResourceEntryMousedownWaterfall): Added.
3145         (WI.NetworkTableContentView.prototype._handleNodeEntryMousedownWaterfall): Added.
3146         (WI.NetworkTableContentView.prototype._handleMousedownWaterfall): Added.
3147         (WI.NetworkTableContentView.prototype.networkResourceDetailViewClose): Deleted.
3148         (WI.NetworkTableContentView.prototype._rowIndexForResource): Deleted.
3149         (WI.NetworkTableContentView.prototype._hideResourceDetailView): Deleted.
3150         (WI.NetworkTableContentView.prototype._showResourceDetailView): Deleted.
3151         (WI.NetworkTableContentView.prototype._waterfallPopoverContentForResource): Deleted.
3152         * UserInterface/Views/NetworkTableContentView.css:
3153         (.content-view.network .network-table): Added.
3154         (.network-table :not(.header) .cell.waterfall .waterfall-container > .dom-event): Added.
3155         (.network-table :not(.header) .cell.waterfall .waterfall-container > .dom-activity): Added.
3156         (.network-table :not(.header) .cell.waterfall .waterfall-container > .dom-activity.playing): Added.
3157
3158         * UserInterface/Views/NetworkDOMNodeDetailView.js: Added.
3159         (WI.NetworkDOMNodeDetailView):
3160         (WI.NetworkDOMNodeDetailView.prototype.initialLayout):
3161         (WI.NetworkDOMNodeDetailView.prototype.showContentViewForIdentifier):
3162
3163         * UserInterface/Views/NetworkResourceDetailView.css:
3164         (.content-view.resource-details):
3165         (.network-resource-detail): Deleted.
3166         (.network-resource-detail .navigation-bar): Deleted.
3167         (.network-resource-detail .item.close > .glyph): Deleted.
3168         (.network-resource-detail .item.close > .glyph:hover): Deleted.
3169         (.network-resource-detail .item.close > .glyph:active): Deleted.
3170         (.network .network-resource-detail .navigation-bar .item.radio.button.text-only): Deleted.
3171         (.network .network-resource-detail .navigation-bar .item.radio.button.text-only.selected): Deleted.
3172         (.network-resource-detail > .content-browser): Deleted.
3173         (@media (prefers-dark-interface)): Deleted.
3174         * UserInterface/Views/NetworkResourceDetailView.js:
3175         (WI.NetworkResourceDetailView):
3176         (WI.NetworkResourceDetailView.prototype.shown):
3177         (WI.NetworkResourceDetailView.prototype.headersContentViewGoToRequestData):
3178         (WI.NetworkResourceDetailView.prototype.sizesContentViewGoToHeaders):
3179         (WI.NetworkResourceDetailView.prototype.sizesContentViewGoToRequestBody):
3180         (WI.NetworkResourceDetailView.prototype.sizesContentViewGoToResponseBody):
3181         (WI.NetworkResourceDetailView.prototype.initialLayout):
3182         (WI.NetworkResourceDetailView.prototype.showContentViewForIdentifier):
3183         (WI.NetworkResourceDetailView.prototype.get resource): Deleted.
3184         (WI.NetworkResourceDetailView.prototype.hidden): Deleted.
3185         (WI.NetworkResourceDetailView.prototype.dispose): Deleted.
3186         (WI.NetworkResourceDetailView.prototype.willShowWithCookie): Deleted.
3187         (WI.NetworkResourceDetailView.prototype.initialLayout): Deleted.
3188         (WI.NetworkResourceDetailView.prototype._showPreferredContentView): Deleted.
3189         (WI.NetworkResourceDetailView.prototype._showContentViewForNavigationItem): Deleted.
3190         (WI.NetworkResourceDetailView.prototype._navigationItemSelected): Deleted.
3191         (WI.NetworkResourceDetailView.prototype._handleCloseButton): Deleted.
3192
3193         * UserInterface/Views/NetworkDetailView.js: Added.
3194         (WI.NetworkDetailView):
3195         (WI.NetworkDetailView.prototype.get representedObject):
3196         (WI.NetworkDetailView.prototype.shown):
3197         (WI.NetworkDetailView.prototype.hidden):
3198         (WI.NetworkDetailView.prototype.dispose):
3199         (WI.NetworkDetailView.prototype.willShowWithCookie):
3200         (WI.NetworkDetailView.prototype.initialLayout):
3201         (WI.NetworkDetailView.prototype.createDetailNavigationItem):
3202         (WI.NetworkDetailView.prototype.detailNavigationItemForIdentifier):
3203         (WI.NetworkDetailView.prototype.showContentViewForIdentifier):
3204         (WI.NetworkDetailView.prototype._showPreferredContentView):
3205         (WI.NetworkDetailView.prototype._navigationItemSelected):
3206         (WI.NetworkDetailView.prototype._handleCloseButton):
3207         * UserInterface/Views/NetworkDetailView.css: Added.
3208         (.network-detail):
3209         (.network-detail .navigation-bar):
3210         (.network-detail .item.close > .glyph):
3211         (.network-detail .item.close > .glyph:hover):
3212         (.network-detail .item.close > .glyph:active):
3213         (.network .network-detail .navigation-bar .item.radio.button.text-only):
3214         (.network .network-detail .navigation-bar .item.radio.button.text-only.selected):
3215         (.network-detail > .content-browser):
3216         (@media (prefers-dark-interface)):
3217         Create base class for detail views shown in the Network tab.
3218
3219         * UserInterface/Views/DOMNodeEventsContentView.js: Added.
3220         (WI.DOMNodeEventsContentView):
3221         (WI.DOMNodeEventsContentView.prototype.initialLayout):
3222         (WI.DOMNodeEventsContentView.prototype.closed):
3223         (WI.DOMNodeEventsContentView.prototype._handleDOMNodeDidFireEvent):
3224         * UserInterface/Views/DOMNodeEventsContentView.css: Added.
3225         (.dom-node-details.dom-events):
3226
3227         * UserInterface/Views/DOMEventsBreakdownView.js: Added.
3228         (WI.DOMEventsBreakdownView):
3229         (WI.DOMEventsBreakdownView.prototype.addEvent):
3230         (WI.DOMEventsBreakdownView.prototype.initialLayout):
3231         (WI.DOMEventsBreakdownView.prototype._populateTable.percentOfTotalTime):
3232         (WI.DOMEventsBreakdownView.prototype._populateTable):
3233         * UserInterface/Views/DOMEventsBreakdownView.css: Added.
3234         (.waterfall-popover-content .dom-events-breakdown):
3235         (.dom-events-breakdown):
3236         (.dom-events-breakdown table):
3237         (.dom-events-breakdown tr > :matches(th, td)):
3238         (.dom-events-breakdown tbody > tr):
3239         (.dom-events-breakdown .graph):
3240         (.dom-events-breakdown .graph > :matches(.point, .area)):
3241         (.dom-events-breakdown .graph > .point):
3242         (.dom-events-breakdown .time):
3243
3244         * UserInterface/Views/ResourceTimingBreakdownView.css:
3245         (.resource-timing-breakdown > table > tr.header:not(.total-row) > td): Added.
3246         (.popover.waterfall-popover): Deleted.
3247
3248 2018-10-10  Devin Rousso  <drousso@apple.com>
3249
3250         Web Inspector: REGRESSION(r236853): Uncaught Exception: undefined is not an object (evaluating 'entry.resource')
3251         https://bugs.webkit.org/show_bug.cgi?id=190442
3252
3253         Reviewed by Joseph Pecoraro.
3254
3255         * UserInterface/Views/NetworkTableContentView.js:
3256         (WI.NetworkTableContentView.prototype.reset):
3257         It's unnecessary to deselect rows in the `WI.Table` when we're about to remove them.
3258
3259 2018-10-10  Devin Rousso  <drousso@apple.com>
3260
3261         Web Inspector: REGRESSION: selection in network table is lost when new entries are added
3262         https://bugs.webkit.org/show_bug.cgi?id=190362
3263
3264         Reviewed by Matt Baker.
3265
3266         The `_selectedRows` list is cleared each time `reloadData` is called, meaning that
3267         `WI.Table` expects its "owner" to restore the selection (since it doesn't know how). As a
3268         result, `WI.NetworkTableContentView` needs to call `selectRow` _after_ `reloadData` is
3269         called, not before.
3270
3271         * UserInterface/Views/NetworkTableContentView.js:
3272         (WI.NetworkTableContentView.prototype.tableSortChanged):
3273         (WI.NetworkTableContentView.prototype._populateNameCell):
3274         (WI.NetworkTableContentView.prototype._processPendingEntries):
3275         (WI.NetworkTableContentView.prototype._insertResourceAndReloadTable):
3276         (WI.NetworkTableContentView.prototype._updateSort): Added.
3277         (WI.NetworkTableContentView.prototype._updateFilteredEntries):
3278         (WI.NetworkTableContentView.prototype._reloadTable): Added.
3279         (WI.NetworkTableContentView.prototype._resetFilters):
3280         (WI.NetworkTableContentView.prototype._typeFilterScopeBarSelectionChanged):
3281         (WI.NetworkTableContentView.prototype._handleGroupByDOMNodeCheckedDidChange):
3282         (WI.NetworkTableContentView.prototype._urlFilterDidChange):
3283         (WI.NetworkTableContentView.prototype._updateSortAndFilteredEntries): Deleted.
3284
3285         * UserInterface/Views/Table.js:
3286         (WI.Table.prototype.reloadData):
3287         Ensure that the `_selectedRowIndex` is also reset.
3288
3289 2018-10-10  Devin Rousso  <drousso@apple.com>
3290
3291         Web Inspector: notify the frontend when a canvas has started recording via console.record
3292         https://bugs.webkit.org/show_bug.cgi?id=190306
3293