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