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