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