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