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