Web Inspector: add context menu items to copy a resource's HTTP request/response...
[WebKit-https.git] / Source / WebInspectorUI / ChangeLog
1 2019-02-11  Devin Rousso  <drousso@apple.com>
2
3         Web Inspector: add context menu items to copy a resource's HTTP request/response data
4         https://bugs.webkit.org/show_bug.cgi?id=194261
5         <rdar://problem/21693696>
6
7         Reviewed by Joseph Pecoraro.
8
9         * UserInterface/Models/Resource.js:
10         (WI.Resource.prototype.stringifyHTTPRequest): Added.
11         (WI.Resource.prototype.stringifyHTTPResponse): Added.
12         Don't include the request/response data, as that can be very large, and can easily be
13         accessed by actually selecting the resource in the Resources/Network tab.
14
15         * UserInterface/Views/ContextMenuUtilities.js:
16         (WI.appendContextMenuItemsForSourceCode):
17
18         * Localizations/en.lproj/localizedStrings.js:
19
20 2019-02-08  Devin Rousso  <drousso@apple.com>
21
22         Web Inspector: Audit: show keyboard shortcut in export tooltip
23         https://bugs.webkit.org/show_bug.cgi?id=194454
24
25         Reviewed by Matt Baker.
26
27         * UserInterface/Views/AuditTestContentView.js:
28         (WI.AuditTestContentView):
29         (WI.AuditTestContentView.prototype.get saveData):
30         (WI.AuditTestContentView.prototype._exportResult): Added.
31         (WI.AuditTestContentView.prototype._handleExportButtonNavigationItemClicked):
32         (WI.AuditTestContentView.prototype._exportAudit): Deleted.
33
34         * Localizations/en.lproj/localizedStrings.js:
35
36 2019-02-08  Nikita Vasilyev  <nvasilyev@apple.com>
37
38         Web Inspector: Styles: easier way to select a single line
39         https://bugs.webkit.org/show_bug.cgi?id=193305
40
41         Reviewed by Devin Rousso.
42
43         Start property selection after mousedown when mouse cursor moves 8px,
44         which is ~1.5 times the width of a text character in the style editor.
45
46         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
47         (WI.SpreadsheetCSSStyleDeclarationSection):
48         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleMouseDown):
49         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleWindowMouseMove): Added.
50         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._stopSelection):
51
52 2019-02-08  Joseph Pecoraro  <pecoraro@apple.com>
53
54         Web Inspector: Debugger Popover should work with value in template string `${identifier}`
55         https://bugs.webkit.org/show_bug.cgi?id=194459
56         <rdar://problem/47932564>
57
58         Reviewed by Devin Rousso.
59
60         * UserInterface/Controllers/CodeMirrorTokenTrackingController.js:
61         (WI.CodeMirrorTokenTrackingController.prototype._processJavaScriptExpression):
62         When walking backwards to get the full expression we were walking outside
63         of the interpolation group `outside ${inside}`. Stop walking backwards once
64         we cross the boundary.
65
66 2019-02-08  Joseph Pecoraro  <pecoraro@apple.com>
67
68         Web Inspector: Import / Export Heap Snapshots
69         https://bugs.webkit.org/show_bug.cgi?id=194448
70         <rdar://problem/47928093>
71
72         Reviewed by Devin Rousso.
73
74         * Localizations/en.lproj/localizedStrings.js:
75         New strings.
76
77         * UserInterface/Proxies/HeapSnapshotProxy.js:
78         (WI.HeapSnapshotProxy):
79         (WI.HeapSnapshotProxy.deserialize):
80         (WI.HeapSnapshotProxy.prototype.get imported):
81         (WI.HeapSnapshotProxy.prototype.get snapshotStringData):
82         (WI.HeapSnapshotProxy.prototype.set snapshotStringData):
83         Include an "imported" state on the HeapSnapshot and allow for
84         stashing the snapshotStringData on the main thread side.
85
86         * UserInterface/Proxies/HeapSnapshotWorkerProxy.js:
87         (WI.HeapSnapshotWorkerProxy.prototype.createImportedSnapshot):
88         * UserInterface/Workers/HeapSnapshot/HeapSnapshotWorker.js:
89         (HeapSnapshotWorker.prototype.clearSnapshots):
90         (HeapSnapshotWorker.prototype.createSnapshot):
91         Provide a specialized way to create an imported HeapSnapshot.
92         Track imported snapshots separately since they won't want to
93         be searched for live/dead objects due to active recording GCs.
94
95         * UserInterface/Workers/HeapSnapshot/HeapSnapshot.js:
96         (HeapSnapshot):
97         (HeapSnapshot.updateCategoriesAndMetadata):
98         (HeapSnapshot.allocationBucketCounts):
99         (HeapSnapshot.instancesWithClassName):
100         (HeapSnapshot.prototype.nodeWithIdentifier):
101         (HeapSnapshot.prototype.dominatedNodes):
102         (HeapSnapshot.prototype.retainedNodes):
103         (HeapSnapshot.prototype.retainers):
104         (HeapSnapshot.prototype.updateDeadNodesAndGatherCollectionData):
105         (HeapSnapshot.prototype.serialize):
106         (HeapSnapshot.prototype.serializeNode):
107         (HeapSnapshot.prototype._buildPostOrderIndexes):
108         (HeapSnapshot.prototype._buildDominatorIndexes):
109         (HeapSnapshot.prototype._buildRetainedSizes):
110         (HeapSnapshot.prototype._gcRootPathes.visitNode):
111         (HeapSnapshot.prototype._gcRootPathes):
112         Construct a HeapSnapshot knowinng whether or not it is imported.
113         Imported snapshots may be the "GCDebugging" snapshot type which
114         differs from "Inspector" by the number of node fields. So keep
115         the node field count a member instead of a global constant
116         in order to work with both snapshot types.
117
118         * UserInterface/Models/HeapAllocationsInstrument.js:
119         (WI.HeapAllocationsInstrument.prototype._takeHeapSnapshot):
120         * UserInterface/Protocol/ConsoleObserver.js:
121         (WI.ConsoleObserver.prototype.heapSnapshot):
122         * UserInterface/Protocol/HeapObserver.js:
123         (WI.HeapObserver.prototype.trackingStart):
124         (WI.HeapObserver.prototype.trackingComplete):
125         Stash the original string JSON data on the main thread side
126         where we already have the data.
127
128         * UserInterface/Views/HeapAllocationsTimelineOverviewGraph.js:
129         (WI.HeapAllocationsTimelineOverviewGraph.prototype.layout):
130         Don't show [S] icons for imported snapshots with no timestamp.
131
132         * UserInterface/Views/HeapAllocationsTimelineView.js:
133         (WI.HeapAllocationsTimelineView):
134         (WI.HeapAllocationsTimelineView.prototype.get navigationItems):
135         (WI.HeapAllocationsTimelineView.prototype._importButtonNavigationItemClicked):
136         (WI.HeapAllocationsTimelineView.prototype._takeHeapSnapshotClicked):
137         Import button that just creates a new snapshot.
138
139         * UserInterface/Views/HeapSnapshotContentView.js:
140         (WI.HeapSnapshotContentView):
141         (WI.HeapSnapshotContentView.prototype.get navigationItems):
142         (WI.HeapSnapshotContentView.prototype.get supportsSave):
143         (WI.HeapSnapshotContentView.prototype.get saveData):
144         (WI.HeapSnapshotContentView.prototype._exportSnapshot):
145         Export button that saves the original data.
146
147         * UserInterface/Views/TimelineTabContentView.js:
148         (WI.TimelineTabContentView.displayNameForRecord):
149         Specialized display string for imported snapshots.
150
151 2019-02-08  Joseph Pecoraro  <pecoraro@apple.com>
152
153         Web Inspector: Add Debug setting to show Internal Object Classes in Heap Snapshot
154         https://bugs.webkit.org/show_bug.cgi?id=194445
155
156         Reviewed by Devin Rousso.
157
158         * UserInterface/Base/Setting.js:
159         * UserInterface/Views/HeapSnapshotDataGridTree.js:
160         (WI.HeapSnapshotInstancesDataGridTree.prototype.populateTopLevel):
161         * UserInterface/Views/SettingsTabContentView.js:
162         (WI.SettingsTabContentView.prototype._createDebugSettingsView):
163
164 2019-02-08  Nikita Vasilyev  <nvasilyev@apple.com>
165
166         Web Inspector: Styles: close unbalanced quotes and parenthesis when editing values
167         https://bugs.webkit.org/show_bug.cgi?id=182523
168         <rdar://problem/37260209>
169
170         Reviewed by Devin Rousso.
171
172         Close CSS comments, append missing closed quotes and right parenthesis.
173
174         * UserInterface/Models/CSSCompletions.js:
175         (WI.CSSCompletions.completeUnbalancedValue):
176         * UserInterface/Models/CSSProperty.js:
177         (WI.CSSProperty.prototype.set rawValue):
178
179 2019-02-07  Joseph Pecoraro  <pecoraro@apple.com>
180
181         Web Inspector: Make Timeline markers light gray instead of black in dark mode
182         https://bugs.webkit.org/show_bug.cgi?id=194417
183
184         Reviewed by Devin Rousso.
185
186         * UserInterface/Views/RenderingFrameTimelineOverviewGraph.css:
187         (.timeline-overview-graph.rendering-frame > .divider):
188         * UserInterface/Views/TimelineRuler.css:
189         (.timeline-ruler > .markers > .divider):
190
191 2019-02-06  Devin Rousso  <drousso@apple.com>
192
193         Web Inspector: DOM: don't send the entire function string with each event listener
194         https://bugs.webkit.org/show_bug.cgi?id=194293
195         <rdar://problem/47822809>
196
197         Reviewed by Joseph Pecoraro.
198
199         * UserInterface/Views/EventListenerSectionGroup.js:
200         (WI.EventListenerSectionGroup.prototype._functionTextOrLink):
201
202 2019-02-06  Joseph Pecoraro  <pecoraro@apple.com>
203
204         Web Inspector: "Worker not found" uncaught protocol errors
205         https://bugs.webkit.org/show_bug.cgi?id=194319
206
207         Reviewed by Matt Baker.
208
209         * UserInterface/Base/Main.js:
210         (WI.terminatePageTarget):
211         Remove Worker targets associated with the Page on navigation.
212         Eventually we will have to associate Workers with their parent
213         frame, but for now a transition can only happen at the Page
214         level, so we can eliminate all workers on the page.
215
216         * UserInterface/Controllers/WorkerManager.js:
217         (WI.WorkerManager.prototype.workerCreated):
218         * UserInterface/Protocol/Connection.js:
219         (InspectorBackend.WorkerConnection.sendMessageToBackend):
220         Allow any WorkerAgent domain message to fail silently. This can
221         happen if a Worker is created and destroyed before the frontend
222         hears about it and sends messages to the backend for that Worker.
223
224 2019-02-05  Nikita Vasilyev  <nvasilyev@apple.com>
225
226         Web Inspector: Styles: PropertiesChanged shouldn't fire when old and new text are both empty
227         https://bugs.webkit.org/show_bug.cgi?id=194318
228
229         Reviewed by Devin Rousso.
230
231         Previously, WI.CSSStyleDeclaration.Event.PropertiesChanged fired when
232         old text and new text were empty strings.
233
234         * UserInterface/Models/CSSStyleDeclaration.js:
235
236 2019-02-05  Devin Rousso  <drousso@apple.com>
237
238         Web Inspector: Lots of time spent updating related resources in ResourceDetailsSidebar when loading a page with lots of resources
239         https://bugs.webkit.org/show_bug.cgi?id=159577
240         <rdar://problem/27251461>
241
242         Reviewed by Joseph Pecoraro.
243
244         * UserInterface/Views/ResourceDetailsSidebarPanel.js:
245         (WI.ResourceDetailsSidebarPanel.prototype._refreshRelatedResourcesSection):
246         (WI.ResourceDetailsSidebarPanel.prototype._applyResourceEventListeners):
247
248 2019-02-05  Matt Baker  <mattbaker@apple.com>
249
250         Web Inspector: Elements tab: selection is broken after deleting the selected node
251         https://bugs.webkit.org/show_bug.cgi?id=194300
252         <rdar://problem/47829275>
253
254         Reviewed by Devin Rousso.
255
256         Deleting a TreeElement can cause an IndexSet including indexes
257         outside the deleted range to be passed to SelectionController,
258         corrupting the internal selection state.
259
260         * UserInterface/Views/TreeOutline.js:
261         (WI.TreeOutline.prototype._indexesForSubtree.numberOfElementsInSubtree): Added.
262         (WI.TreeOutline.prototype._indexesForSubtree):
263         Finding the last (rightmost leaf) TreeElement in the subtree used
264         TreeElement.prototype.traverseNextElement to do a depth first traversal.
265         This method did not stay within the subtree rooted at `treeElement`.
266
267 2019-02-05  Matt Baker  <mattbaker@apple.com>
268
269         Web Inspector: REGRESSION (r240947): Resources tab: can't select main frame after refreshing page
270         https://bugs.webkit.org/show_bug.cgi?id=194254
271         <rdar://problem/47805023>
272
273         Reviewed by Devin Rousso.
274
275         * UserInterface/Views/TreeOutline.js:
276         (WI.TreeOutline.prototype.selectionControllerSelectionDidChange):
277         TreeOutline should always call the TreeElement `select` and `deselect`
278         methods while processing selection changes. Having notifications
279         suppressed by `this._suppressNextSelectionDidChangeEvent` should only
280         affect the dispatching of TreeOutline events.
281
282 2019-02-05  Nikita Vasilyev  <nvasilyev@apple.com>
283
284         Web Inspector: Styles: remove harmless "property was unlocked" asserts
285         https://bugs.webkit.org/show_bug.cgi?id=194262
286
287         Reviewed by Matt Baker.
288
289         * UserInterface/Views/SpreadsheetStyleProperty.js:
290         (WI.SpreadsheetStyleProperty.prototype.remove):
291         (WI.SpreadsheetStyleProperty.prototype.update):
292         (WI.SpreadsheetStyleProperty.prototype._handleNameChange):
293         (WI.SpreadsheetStyleProperty.prototype._handleValueChange):
294
295 2019-02-04  Devin Rousso  <drousso@apple.com>
296
297         Web Inspector: Uncaught Exception: undefined is not an object (evaluating 'classes.includes')
298         https://bugs.webkit.org/show_bug.cgi?id=194280
299         <rdar://problem/47811159>
300
301         Reviewed by Matt Baker.
302
303         * UserInterface/Views/GeneralStyleDetailsSidebarPanel.js:
304         (WI.GeneralStyleDetailsSidebarPanel.prototype._populateClassToggles):
305         Add a fallback value in case the `class` attribute isn't specified for the selected node.
306
307 2019-02-04  Devin Rousso  <drousso@apple.com>
308
309         Web Inspector: Resources: missing resource data for document on reload
310         https://bugs.webkit.org/show_bug.cgi?id=194243
311         <rdar://problem/47559021>
312
313         Reviewed by Joseph Pecoraro.
314
315         * UserInterface/Views/ResourceDetailsSidebarPanel.js:
316         (WI.ResourceDetailsSidebarPanel.prototype.set resource):
317         (WI.ResourceDetailsSidebarPanel.prototype._applyResourceEventListeners):
318
319         * UserInterface/Base/Object.js:
320         (WI.Object.removeEventListener):
321         Drive-by: there's no need to iterate over the entire table to check if `thisObject` exists,
322         as that is handled for us by `ListMultimap`, which we later call anyways.
323
324 2019-02-04  Matt Baker  <mattbaker@apple.com>
325
326         Web Inspector: REGRESSION: Resources: WI.TreeOutline assertions when refreshing the page
327         https://bugs.webkit.org/show_bug.cgi?id=194242
328         <rdar://problem/47802027>
329
330         Reviewed by Joseph Pecoraro.
331
332         * UserInterface/Views/FolderizedTreeElement.js:
333         (WI.FolderizedTreeElement.prototype.removeChildren):
334         FolderTreeElements are removed by the base class call to removeChildren.
335         Calling `removeChildren` for detached TreeElements is unnecessary.
336
337 2019-02-04  Matt Baker  <mattbaker@apple.com>
338
339         Web Inspector: REGRESSION: clicking a selected call frame doesn't re-scroll
340         https://bugs.webkit.org/show_bug.cgi?id=194169
341         <rdar://problem/47743864>
342
343         Reviewed by Devin Rousso.
344
345         * UserInterface/Views/TreeOutline.js:
346         (WI.TreeOutline.prototype._handleMouseDown):
347         Add a special case for a single-selection TreeOutline with
348         allowsRepeatSelection enabled. Since the element is already
349         selected, bypass the SelectionCongroller and dispatch an
350         event with event.data.selectedByUser set to true.
351
352 2019-02-04  Nikita Vasilyev  <nvasilyev@apple.com>
353
354         Web Inspector: Styles: fix race conditions when editing
355         https://bugs.webkit.org/show_bug.cgi?id=192739
356         <rdar://problem/46752925>
357
358         Reviewed by Devin Rousso.
359
360         Editing CSS property in the style editor syncronously updates CSSStyleDeclaration on the front-end
361         and asyncronously updates the backend by calling CSSAgent.setStyleText. After the new style text is applied
362         on the backend, CSSStyleDeclaration (on the front-end) gets updated.
363
364         Unsure there's no race conditions by introducing `_updatesInProgressCount`:
365
366           - Increment it before calling CSSAgent.setStyleText.
367           - Decrement it after CSSAgent.setStyleText is finished.
368
369         Prevent updates of CSSStyleDeclaration when _updatesInProgressCount isn't 0.
370
371         * UserInterface/Models/CSSProperty.js:
372         (WI.CSSProperty.prototype._updateOwnerStyleText):
373         * UserInterface/Models/CSSStyleDeclaration.js:
374         (WI.CSSStyleDeclaration):
375         (WI.CSSStyleDeclaration.prototype.set text): Removed.
376         (WI.CSSStyleDeclaration.prototype.setText): Added.
377         Change the setter to a method since it has side effects including an asynchronous backend call.
378
379         * UserInterface/Models/DOMNodeStyles.js:
380         (WI.DOMNodeStyles.prototype.changeStyleText):
381
382         * UserInterface/Views/SpreadsheetStyleProperty.js:
383         (WI.SpreadsheetStyleProperty.prototype.get nameTextField): Removed.
384         (WI.SpreadsheetStyleProperty.prototype.get valueTextField): Removed.
385         Drive-by: remove unused code.
386
387 2019-02-01  Devin Rousso  <drousso@apple.com>
388
389         Web Inspector: create icons for media event types instead of using a blue circle
390         https://bugs.webkit.org/show_bug.cgi?id=190381
391         <rdar://problem/45507995>
392
393         Reviewed by Brian Burg.
394
395         * UserInterface/Models/DOMNode.js:
396         (WI.DOMNode.isPlayEvent): Added.
397         (WI.DOMNode.isPauseEvent): Added.
398         (WI.DOMNode.isStopEvent): Added.
399
400         * UserInterface/Views/DOMEventsBreakdownView.js:
401         (WI.DOMEventsBreakdownView.prototype.layout):
402         * UserInterface/Views/DOMEventsBreakdownView.css:
403         (.dom-events-breakdown tr > :matches(th, td)):
404         (.dom-events-breakdown .graph):
405         (.dom-events-breakdown .graph > :matches(img, .area)): Added.
406         (.dom-events-breakdown .graph > img): Added.
407         (.dom-events-breakdown .inherited > .name, .dom-events-breakdown .inherited > .graph > img): Added.
408         (.dom-events-breakdown .graph > :matches(.point, .area)): Deleted.
409         (.dom-events-breakdown .graph > .point): Deleted.
410         (.dom-events-breakdown .inherited > .name, .dom-events-breakdown .inherited > .graph > .point): Deleted.
411
412         * UserInterface/Views/NetworkTableContentView.js:
413         (WI.NetworkTableContentView.prototype._populateWaterfallGraph.createDOMEventLine):
414
415         * UserInterface/Images/EventPause.svg: Added.
416         * UserInterface/Images/EventPlay.svg: Added.
417         * UserInterface/Images/EventProcessing.svg: Added.
418         * UserInterface/Images/EventStop.svg: Added.
419
420 2019-02-01  Joseph Pecoraro  <pecoraro@apple.com>
421
422         Web Inspector: Make WI.ColumnChart a WI.View subclass
423         https://bugs.webkit.org/show_bug.cgi?id=194171
424
425         Rubber-stamped by Devin Rousso.
426
427         * UserInterface/Views/CPUTimelineOverviewGraph.js:
428         (WI.CPUTimelineOverviewGraph):
429         * UserInterface/Views/ColumnChart.js:
430         (WI.ColumnChart):
431         (WI.ColumnChart.prototype.set size):
432         (WI.ColumnChart.prototype.layout):
433         (WI.ColumnChart.prototype.get element): Deleted.
434         (WI.ColumnChart.prototype.needsLayout): Deleted.
435         (WI.ColumnChart.prototype.updateLayout): Deleted.
436
437 2019-02-01  Joseph Pecoraro  <pecoraro@apple.com>
438
439         Web Inspector: Make WI.StackedLineChart a WI.View subclass
440         https://bugs.webkit.org/show_bug.cgi?id=194119
441
442         Rubber-stamped by Devin Rousso.
443
444         * UserInterface/Views/LineChart.js:
445         (WI.LineChart.prototype.layout):
446         (WI.LineChart):
447         * UserInterface/Views/MemoryTimelineOverviewGraph.js:
448         (WI.MemoryTimelineOverviewGraph):
449         * UserInterface/Views/StackedLineChart.js:
450         (WI.StackedLineChart):
451         (WI.StackedLineChart.prototype.set size):
452         (WI.StackedLineChart.prototype.layout):
453         (WI.StackedLineChart.prototype.get element): Deleted.
454         (WI.StackedLineChart.prototype.get points): Deleted.
455         (WI.StackedLineChart.prototype.needsLayout): Deleted.
456         (WI.StackedLineChart.prototype.updateLayout): Deleted.
457
458 2019-02-01  Joseph Pecoraro  <pecoraro@apple.com>
459
460         Web Inspector: Make WI.CircleChart a WI.View subclass
461         https://bugs.webkit.org/show_bug.cgi?id=194118
462
463         Reviewed by Matt Baker.
464
465         * UserInterface/Views/CircleChart.js:
466         (WI.CircleChart.prototype.get centerElement):
467         (WI.CircleChart.prototype.layout):
468         (WI.CircleChart.prototype.get element): Deleted.
469         (WI.CircleChart.prototype.needsLayout): Deleted.
470         (WI.CircleChart.prototype.updateLayout): Deleted.
471         * UserInterface/Views/MemoryTimelineView.js:
472         (WI.MemoryTimelineView):
473
474 2019-02-01  Joseph Pecoraro  <pecoraro@apple.com>
475
476         Web Inspector: Timeline Detail Views do not reset properly when new time range selection contains nothing
477         https://bugs.webkit.org/show_bug.cgi?id=194115
478         <rdar://problem/47716693>
479
480         Rubber-stamped by Devin Rousso.
481
482         * UserInterface/Views/CPUTimelineView.js:
483         (WI.CPUTimelineView.prototype.reset):
484         (WI.CPUTimelineView.prototype.clear):
485         (WI.CPUTimelineView.prototype.layout):
486         * UserInterface/Views/MemoryTimelineView.js:
487         (WI.MemoryTimelineView.prototype.reset):
488         (WI.MemoryTimelineView.prototype.clear):
489         (WI.MemoryTimelineView.prototype.layout):
490         When there are no visible records in the selected range clear our UI.
491         Introduce a `clear` method that clears the UI but keeps
492         non-range-specific values (e.g. maximums).
493
494 2019-02-01  Joseph Pecoraro  <pecoraro@apple.com>
495
496         Web Inspector: Timeline graphs have drawing issues with multiple discontinuities
497         https://bugs.webkit.org/show_bug.cgi?id=194110
498         <rdar://problem/47714356>
499
500         Reviewed by Devin Rousso.
501
502         * UserInterface/Views/CPUTimelineView.js:
503         (WI.CPUTimelineView):
504         (WI.CPUTimelineView.prototype.layout.xScale): Deleted.
505         * UserInterface/Views/MemoryTimelineOverviewGraph.js:
506         (WI.MemoryTimelineOverviewGraph.prototype.layout.insertDiscontinuity):
507         (WI.MemoryTimelineOverviewGraph.prototype.layout):
508         * UserInterface/Views/MemoryTimelineView.js:
509         (WI.MemoryTimelineView.prototype.layout.xScale):
510         (WI.MemoryTimelineView.prototype.layout.yScale):
511         (WI.MemoryTimelineView.prototype.layout):
512         Handle if multiple discontinuities exist between records.
513
514 2019-02-01  Joseph Pecoraro  <pecoraro@apple.com>
515
516         Web Inspector: Timeline time range selection should show duration alongside start and end
517         https://bugs.webkit.org/show_bug.cgi?id=194109
518         <rdar://problem/47714279>
519
520         Reviewed by Devin Rousso.
521
522         * Localizations/en.lproj/localizedStrings.js:
523         * UserInterface/Views/TimelineRecordingContentView.js:
524         (WI.TimelineRecordingContentView.prototype._updateTimeRangePathComponents):
525         Include the duration when not obvious.
526
527 2019-02-01  Joseph Pecoraro  <pecoraro@apple.com>
528
529         Web Inspector: Improve API and documentation of ColumnChart
530         https://bugs.webkit.org/show_bug.cgi?id=193982
531
532         Reviewed by Devin Rousso.
533
534         This used to be named "BarChart". Convert remaining instances
535         of "bar" to "column" and clean up related things.
536
537         * UserInterface/Views/CPUTimelineOverviewGraph.css:
538         (body[dir=rtl] .timeline-overview-graph.cpu > .column-chart):
539         (.timeline-overview-graph.cpu > .column-chart > svg > rect):
540         (body[dir=rtl] .timeline-overview-graph.cpu > .bar-chart): Deleted.
541         (.timeline-overview-graph.cpu > .bar-chart > svg > rect): Deleted.
542         * UserInterface/Views/CPUTimelineOverviewGraph.js:
543         (WI.CPUTimelineOverviewGraph.prototype.layout):
544         * UserInterface/Views/ColumnChart.js:
545         (WI.ColumnChart):
546         (WI.ColumnChart.prototype.get columns):
547         (WI.ColumnChart.prototype.addColumn):
548         (WI.ColumnChart.prototype.clear):
549         (WI.ColumnChart.prototype.updateLayout):
550         (WI.ColumnChart.prototype.get bars): Deleted.
551         (WI.ColumnChart.prototype.addBar): Deleted.
552         * UserInterface/Views/StackedLineChart.js:
553         (WI.StackedLineChart.prototype.get element):
554         (WI.StackedLineChart.prototype.get points):
555
556 2019-01-31  Joseph Pecoraro  <pecoraro@apple.com>
557
558         Web Inspector: Timeline time range selection sometimes shows 0.000, should be just 0
559         https://bugs.webkit.org/show_bug.cgi?id=194108
560         <rdar://problem/47714273>
561
562         Reviewed by Devin Rousso.
563
564         * UserInterface/Base/Utilities.js:
565         Check under epsilon for the zero case.
566
567 2019-01-31  Matt Baker  <mattbaker@apple.com>
568
569         REGRESSION(r?): Web Inspector: Clicking on text doesn't move text caret when editing innerHTML/tagName/attribute
570         https://bugs.webkit.org/show_bug.cgi?id=192652
571         <rdar://problem/46684612>
572
573         Reviewed by Devin Rousso.
574
575         * UserInterface/Views/DOMTreeElement.js:
576         (WI.DOMTreeElement.prototype.canSelectOnMouseDown):
577         Call to Event.preventDefault() should be made here instead of at the
578         TreeOutline level.
579
580         * UserInterface/Views/TreeElement.js:
581         (WI.TreeElement.prototype.selectOnMouseDown): Deleted.
582         Remove dead code.
583
584         * UserInterface/Views/TreeOutline.js:
585         (WI.TreeOutline._handleMouseDown):
586         Do not prevent default event handling when the item cannot be selected.
587         This matches TreeOutline behavior prior to introducing SelectionController.
588
589 2019-01-30  Devin Rousso  <drousso@apple.com>
590
591         Web Inspector: Memory Timeline View should be responsive / resizable
592         https://bugs.webkit.org/show_bug.cgi?id=153758
593         <rdar://problem/24444320>
594
595         Reviewed by Joseph Pecoraro.
596
597         Leverage the SVG `viewBox` (which was misspelled) to scale the graphs when the width of the
598         container changes. The `viewBox` used is equal to the total amount of time that is visible.
599
600         Make `WI.LineChart` (and its container classes) into subclasses of `WI.View` to leverage the
601         existing layout system.
602
603         Prevent any work from being done when resizing, as this is now handled by CSS/SVG.
604
605         * UserInterface/Views/LineChart.js:
606         (WI.LineChart):
607         (WI.LineChart.prototype.set size):
608         (WI.LineChart.prototype.addPoint):
609         (WI.LineChart.prototype.clear):
610         (WI.LineChart.prototype.layout):
611         (WI.LineChart.prototype.get element): Deleted.
612         (WI.LineChart.prototype.get points): Deleted.
613         (WI.LineChart.prototype.needsLayout): Deleted.
614         (WI.LineChart.prototype.updateLayout): Deleted.
615
616         * UserInterface/Views/CPUUsageView.js:
617         (WI.CPUUsageView):
618         (WI.CPUUsageView.prototype.clear):
619         (WI.CPUUsageView.prototype.updateChart): Added.
620         (WI.CPUUsageView.prototype.get element): Deleted.
621         (WI.CPUUsageView.prototype.layoutWithDataPoints): Deleted.
622         * UserInterface/Views/CPUUsageView.css:
623         (.cpu-usage-view):
624         (.cpu-usage-view > .details):
625         (.cpu-usage-view > .graph, .cpu-usage-view > .graph > .line-chart, .cpu-usage-view > .graph > .line-chart > svg): Added.
626         (.cpu-usage-view > .graph): Deleted.
627
628         * UserInterface/Views/CPUTimelineView.js:
629         (WI.CPUTimelineView):
630         (WI.CPUTimelineView.prototype.layout):
631         (WI.CPUTimelineView.prototype.layout.layoutView):
632         (WI.CPUTimelineView.prototype.layout.layoutView.xScale):
633         (WI.CPUTimelineView.prototype.layout.layoutView.yScale):
634         * UserInterface/Views/CPUTimelineView.css:
635         (body .timeline-view.cpu): Added.
636         (.timeline-view.cpu > .content):
637         (.timeline-view.cpu): Deleted.
638
639         * UserInterface/Views/MemoryCategoryView.js:
640         (WI.MemoryCategoryView):
641         (WI.MemoryCategoryView.prototype.clear):
642         (WI.MemoryCategoryView.prototype.updateChart): Added.
643         (WI.MemoryCategoryView.prototype.get element): Deleted.
644         (WI.MemoryCategoryView.prototype.layoutWithDataPoints): Deleted.
645         * UserInterface/Views/MemoryCategoryView.css:
646         (.memory-category-view):
647         (.memory-category-view > .details):
648         (.memory-category-view > .graph, .memory-category-view > .graph > .line-chart, .memory-category-view > .graph > .line-chart > svg): Added.
649         (.memory-category-view > .graph): Deleted.
650
651         * UserInterface/Views/MemoryTimelineView.js:
652         (WI.MemoryTimelineView.prototype.layout):
653         (WI.MemoryTimelineView.prototype.layout.layoutCategoryView):
654         (WI.MemoryTimelineView.prototype.layout.layoutCategoryView.xScale):
655         (WI.MemoryTimelineView.prototype.layout.layoutCategoryView.yScale):
656         (WI.MemoryTimelineView.prototype._initializeCategoryViews):
657         (WI.MemoryTimelineView.prototype._initializeCategoryViews.appendLegendRow):
658         * UserInterface/Views/MemoryTimelineView.css:
659         (.timeline-view.memory > .content > .overview):
660         (.timeline-view.memory > .content > .overview > .divider):
661         (.timeline-view.memory > .content > .overview .total-usage, .timeline-view.memory > .content > .overview .max-percentage, .timeline-view.memory > .content > .overview .legend .size): Added.
662         (.timeline-view.memory .legend):
663         (.timeline-view.memory .legend .row): Added.
664         (.timeline-view.memory .legend .row + .row): Added.
665         (.timeline-view.memory .legend .swatch): Addd.
666         (.timeline-view.memory .legend .swatch.javascript): Addd.
667         (.timeline-view.memory .legend .swatch.images): Addd.
668         (.timeline-view.memory .legend .swatch.layers): Addd.
669         (.timeline-view.memory .legend .swatch.page): Addd.
670         (.timeline-view.memory .legend .swatch.current): Addd.
671         (.timeline-view.memory > .content): Deleted.
672         (.timeline-view.memory > .content > .overview .total-usage, .timeline-view.memory > .content > .overview .max-percentage):
673         (body[dir=ltr] .timeline-view.memory .legend): Deleted.
674         (body[dir=rtl] .timeline-view.memory .legend): Deleted.
675         (.timeline-view.memory .legend > .row): Deleted.
676         (.timeline-view.memory .legend > .row > .swatch): Deleted.
677         (body[dir=ltr] .timeline-view.memory .legend > .row > .swatch): Deleted.
678         (body[dir=rtl] .timeline-view.memory .legend > .row > .swatch): Deleted.
679         (.timeline-view.memory .legend > .row > p): Deleted.
680         (body[dir=ltr] .timeline-view.memory .legend > .row > :matches(.label, .size)): Deleted.
681         (body[dir=rtl] .timeline-view.memory .legend > .row > :matches(.label, .size)): Deleted.
682         (.timeline-view.memory .legend > .row > .label): Deleted.
683         (.timeline-view.memory .legend > .row > .size): Deleted.
684         (.timeline-view.memory .legend > .row > .swatch.javascript): Deleted.
685         (.timeline-view.memory .legend > .row > .swatch.images): Deleted.
686         (.timeline-view.memory .legend > .row > .swatch.layers): Deleted.
687         (.timeline-view.memory .legend > .row > .swatch.page): Deleted.
688         (.timeline-view.memory .legend > .row > .swatch.current): Deleted.
689
690 2019-01-30  Nikita Vasilyev  <nvasilyev@apple.com>
691
692         Web Inspector: Changes: group CSS rules by resource
693         https://bugs.webkit.org/show_bug.cgi?id=193940
694         <rdar://problem/47617785>
695
696         Reviewed by Matt Baker.
697
698         Create resource sections with source links in their headers.
699
700         Also:
701         - Use read-only WI.SpreadsheetStyleProperty to display inline swatches for colors;
702         - Make the red and green background span the entire width of the panel.
703
704         * Localizations/en.lproj/localizedStrings.js:
705         * UserInterface/Views/ChangesDetailsSidebarPanel.css:
706         (.sidebar > .panel.changes-panel):
707         (.sidebar > .panel.changes-panel .css-rule):
708         (.sidebar > .panel.selected.changes-panel.empty):
709         (.changes-panel .resource-section):
710         (.changes-panel .resource-section > .header):
711         (.changes-panel .resource-section > .header > a:hover):
712         (.sidebar > .panel.changes-panel .selector-line,):
713         (.changes-panel .css-property-line > .property):
714         (.changes-panel .css-property-line.unchanged):
715         (.changes-panel .css-property-line.added):
716         (.changes-panel .css-property-line.removed):
717         (.changes-panel .css-property-line.removed::before):
718         (.changes-panel .css-property-line.added::before):
719         (@media (prefers-color-scheme: dark)):
720
721         * UserInterface/Views/ChangesDetailsSidebarPanel.js:
722         (WI.ChangesDetailsSidebarPanel.prototype.layout):
723         (WI.ChangesDetailsSidebarPanel.prototype._createRuleElement):
724         (WI.ChangesDetailsSidebarPanel.prototype._createLocationLink):
725
726         * UserInterface/Views/SpreadsheetStyleProperty.js:
727         (WI.SpreadsheetStyleProperty.prototype._createInlineSwatch):
728         Allow passing `null` as a delegate.
729
730 2019-01-30  Devin Rousso  <drousso@apple.com>
731
732         Web Inspector: change style of device settings override popover content
733         https://bugs.webkit.org/show_bug.cgi?id=194049
734
735         Reviewed by Joseph Pecoraro.
736
737         * UserInterface/Base/Main.js:
738         (WI._handleDeviceSettingsToolbarButtonClicked):
739         (WI._handleDeviceSettingsToolbarButtonClicked.showUserAgentInput):
740         (WI._handleDeviceSettingsToolbarButtonClicked.createContainer): Deleted.
741         * UserInterface/Views/Main.css:
742         (.device-settings-content):
743         (.device-settings-content > tr > td:first-child): Added.
744         (.device-settings-content .container):
745         (.device-settings-content .container > * + *): Added.
746         (.device-settings-content .column): Added.
747         (.device-settings-content .user-agent select): Added.
748         (.device-settings-content .user-agent input): Added.
749         (.device-settings-content label + label): Added.
750         (.device-settings-content label > input): Added.
751         (.device-settings-content .columns): Deleted.
752         (.device-settings-content .columns > .column): Deleted.
753         (.device-settings-content .columns > .column + .column): Deleted.
754         (.device-settings-content .user-agent-value): Deleted.
755         (.device-settings-content .user-agent-value > select): Deleted.
756         (.device-settings-content .user-agent-value > input): Deleted.
757         (body[dir=ltr] .device-settings-content .user-agent-value > input): Deleted.
758         (body[dir=rtl] .device-settings-content .user-agent-value > input): Deleted.
759
760 2019-01-30  Devin Rousso  <drousso@apple.com>
761
762         Web Inspector: Uncaught Exception: null is not an object (evaluating 'url.startsWith')
763         https://bugs.webkit.org/show_bug.cgi?id=194029
764
765         Reviewed by Matt Baker.
766
767         * UserInterface/Views/ConsoleMessageView.js:
768         (WI.ConsoleMessageView.prototype._appendLocationLink):
769
770 2019-01-29  Nikita Vasilyev  <nvasilyev@apple.com>
771
772         Web Inspector: Enabled Changes panel in Elements tab by default
773         https://bugs.webkit.org/show_bug.cgi?id=193986
774         <rdar://problem/47647683>
775
776         Reviewed by Matt Baker.
777
778         * UserInterface/Base/Setting.js:
779         * UserInterface/Views/ElementsTabContentView.js:
780         (WI.ElementsTabContentView):
781         * UserInterface/Views/SettingsTabContentView.js:
782         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
783
784 2019-01-29  Nikita Vasilyev  <nvasilyev@apple.com>
785
786         Web Inspector: Styles: enable computed style cascades by default
787         https://bugs.webkit.org/show_bug.cgi?id=193983
788         <rdar://problem/47645821>
789
790         Reviewed by Matt Baker.
791
792         * Localizations/en.lproj/localizedStrings.js:
793         * UserInterface/Base/Setting.js:
794         * UserInterface/Views/ComputedStyleDetailsPanel.css:
795         (.computed-style-properties):
796         (.computed-style-properties .property .go-to-arrow):
797         (.details-section.computed-style-properties:not(.collapsed) > :matches(.header, .content)):
798         (.details-section.computed-style-properties > .content):
799         (@media (prefers-color-scheme: dark)):
800         (.computed-with-traces .computed-style-properties): Deleted.
801         (.computed-with-traces .details-section.computed-style-properties:not(.collapsed) > :matches(.header, .content)): Deleted.
802         (.computed-with-traces .details-section.computed-style-properties > .content): Deleted.
803         (.computed-with-traces .computed-style-properties .property .go-to-arrow): Deleted.
804         * UserInterface/Views/ComputedStyleDetailsPanel.js:
805         (WI.ComputedStyleDetailsPanel.prototype.refresh):
806         (WI.ComputedStyleDetailsPanel.prototype.initialLayout):
807         * UserInterface/Views/ComputedStyleDetailsSidebarPanel.js:
808         (WI.ComputedStyleDetailsSidebarPanel):
809         * UserInterface/Views/SettingsTabContentView.js:
810         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
811
812 2019-01-28  Joseph Pecoraro  <pecoraro@apple.com>
813
814         Web Inspector: Remove unnecessary promise rejection handlers now that we use the global onunhandledrejection handler
815         https://bugs.webkit.org/show_bug.cgi?id=193921
816
817         Reviewed by Devin Rousso.
818
819         * UserInterface/Base/Utilities.js:
820         * UserInterface/Debug/UncaughtExceptionReporter.js:
821         * UserInterface/Views/NetworkTableContentView.js:
822         (WI.NetworkTableContentView.prototype._exportHAR):
823         * UserInterface/Views/TextEditor.js:
824         (WI.TextEditor.prototype.updateFormattedState):
825
826 2019-01-28  Devin Rousso  <drousso@apple.com>
827
828         Web Inspector: provide a way to edit page WebRTC settings on a remote target
829         https://bugs.webkit.org/show_bug.cgi?id=193863
830         <rdar://problem/47572764>
831
832         Reviewed by Joseph Pecoraro.
833
834         * UserInterface/Base/Main.js:
835         (WI.loaded):
836         (WI.initializeTarget):
837         (WI._handleDeviceSettingsToolbarButtonClicked):
838         (WI._handleDeviceSettingsToolbarButtonClicked.createCheckbox):
839         (WI._handleDeviceSettingsToolbarButtonClicked.createColumns): Deleted.
840         * UserInterface/Views/Main.css:
841         (.device-settings-content .container): Added.
842
843         * Localizations/en.lproj/localizedStrings.js:
844
845 2019-01-28  Matt Baker  <mattbaker@apple.com>
846
847         Web Inspector: Elements tab should toggle visibility for all selected nodes
848         https://bugs.webkit.org/show_bug.cgi?id=193089
849         <rdar://problem/47009256>
850
851         Reviewed by Devin Rousso.
852
853         Update "Toggle Visibility" command in DOM tree for multiple selection.
854         When both visible and hidden elements are selected in the DOM tree,
855         the toggle command behaves contextually. If one or more elements are
856         visible, they are hidden, otherwise they are shown. The context menu
857         shows "Hide Elements" or "Show Elements", respectively.
858
859         When only one element is selected, or the context menu target element
860         is not selected, the command continues to be "Toggle Visibility".
861
862         * Localizations/en.lproj/localizedStrings.js:
863
864         * UserInterface/Views/DOMTreeElement.js:
865         (WI.DOMTreeElement.prototype.get isNodeHidden): Added.
866         (WI.DOMTreeElement.prototype.toggleElementVisibility.inspectedPage_node_injectStyleAndToggleClass):
867         (WI.DOMTreeElement.prototype.toggleElementVisibility):
868         (WI.DOMTreeElement.prototype._populateTagContextMenu):
869
870         * UserInterface/Views/DOMTreeOutline.js:
871         (WI.DOMTreeOutline):
872         (WI.DOMTreeOutline.prototype.toggleSelectedElementsVisibility):  Added.
873         Provide a public method for toggling the visibility of selected DOM nodes.
874         Used by the "H" keyboard shortcut and DOMTreeElement context menu.
875
876         (WI.DOMTreeOutline.prototype._hideElements):
877         (WI.DOMTreeOutline.prototype._hideElement): Deleted.
878         Rename for multiple selection.
879
880 2019-01-28  Commit Queue  <commit-queue@webkit.org>
881
882         Unreviewed, rolling out r240351.
883         https://bugs.webkit.org/show_bug.cgi?id=193918
884
885         Causes overlapping Timeline records, as some record types
886         don't have an endTime (Requested by drousso on #webkit).
887
888         Reverted changeset:
889
890         "WebInspector: Confusingly nested events in the timeline for
891         Mutation Observers"
892         https://bugs.webkit.org/show_bug.cgi?id=192884
893         https://trac.webkit.org/changeset/240351
894
895 2019-01-28  Matt Baker  <mattbaker@apple.com>
896
897         REGRESSION(?): Web Inspector: Can have multiple Timelines selected after edit mode
898         https://bugs.webkit.org/show_bug.cgi?id=193808
899         <rdar://problem/47537734>
900
901         Reviewed by Devin Rousso.
902
903         * UserInterface/Controllers/SelectionController.js:
904         (WI.SelectionController.prototype.didRemoveItems):
905
906         * UserInterface/Views/TreeOutline.js:
907         (WI.TreeOutline.prototype._indexesForSubtree):
908         Fix a bug where no IndexSet was returned when passed a TreeElement with
909         no children. This caused the Timelines tree selection to be corrupted when
910         entering and exiting edit mode, as TreeElements are inserted and removed.
911
912 2019-01-28  Nikita Vasilyev  <nvasilyev@apple.com>
913
914         Web Inspector: Add Changes panel to Elements tab
915         https://bugs.webkit.org/show_bug.cgi?id=193803
916
917         Reviewed by Devin Rousso.
918
919         Introduce the new experimental Changes Panel. It shows a list of CSS changes
920         made via Web Inspector, so the changes could be copied to the source files.
921
922         * Localizations/en.lproj/localizedStrings.js:
923         * UserInterface/Base/Setting.js:
924         * UserInterface/Base/Utilities.js:
925         (Array.diffArrays): Added.
926
927         * UserInterface/Controllers/CSSManager.js:
928         (WI.CSSManager):
929         (WI.CSSManager.prototype.get modifiedCSSRules):
930         (WI.CSSManager.prototype.addModifiedCSSRule):
931         (WI.CSSManager.prototype.removeModifiedCSSRule):
932         (WI.CSSManager.prototype._mainResourceDidChange):
933
934         * UserInterface/Main.html:
935         * UserInterface/Models/CSSProperty.js:
936         (WI.CSSProperty):
937         (WI.CSSProperty.prototype.remove):
938         (WI.CSSProperty.prototype.replaceWithText):
939         (WI.CSSProperty.prototype.commentOut):
940         (WI.CSSProperty.prototype.set text):
941         (WI.CSSProperty.prototype.get modified):
942         (WI.CSSProperty.prototype.set name):
943         (WI.CSSProperty.prototype.set rawValue):
944         (WI.CSSProperty.prototype.get initialState):
945         (WI.CSSProperty.prototype._updateOwnerStyleText):
946         (WI.CSSProperty.prototype._markModified):
947         Mark CSSProperty modified *before* making any changes to copy its initial state.
948
949         * UserInterface/Models/CSSRule.js:
950         (WI.CSSRule):
951         (WI.CSSRule.prototype.get id):
952         (WI.CSSRule.prototype.get initialState):
953         (WI.CSSRule.prototype.get stringId):
954         (WI.CSSRule.prototype.markModified):
955
956         * UserInterface/Models/CSSStyleDeclaration.js:
957         (WI.CSSStyleDeclaration):
958         (WI.CSSStyleDeclaration.prototype.get initialState):
959         (WI.CSSStyleDeclaration.prototype.get enabledProperties):
960         (WI.CSSStyleDeclaration.prototype.get properties):
961         (WI.CSSStyleDeclaration.prototype.set properties):
962         (WI.CSSStyleDeclaration.prototype.propertyForName):
963         (WI.CSSStyleDeclaration.prototype.newBlankProperty):
964         (WI.CSSStyleDeclaration.prototype.markModified):
965
966         * UserInterface/Views/ChangesDetailsSidebarPanel.css: Added.
967         (.sidebar > .panel.changes-panel):
968         (.sidebar > .panel.changes-panel:not(.empty)):
969         (.sidebar > .panel.changes-panel.empty):
970         (.changes-panel ins):
971         (.changes-panel del):
972         (.changes-panel del.css-property::before):
973         (.changes-panel ins.css-property::before):
974         (@media (prefers-color-scheme: dark)):
975
976         * UserInterface/Views/ChangesDetailsSidebarPanel.js: Added.
977         (WI.ChangesDetailsSidebarPanel):
978         (WI.ChangesDetailsSidebarPanel.prototype.inspect):
979         (WI.ChangesDetailsSidebarPanel.prototype.supportsDOMNode):
980         (WI.ChangesDetailsSidebarPanel.prototype.shown):
981         (WI.ChangesDetailsSidebarPanel.prototype.detached):
982         (WI.ChangesDetailsSidebarPanel.prototype.layout):
983         (WI.ChangesDetailsSidebarPanel.prototype._mainResourceDidChange):
984
985         * UserInterface/Views/ElementsTabContentView.js:
986         (WI.ElementsTabContentView):
987
988         * UserInterface/Views/SettingsTabContentView.js:
989         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
990
991         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
992         (.spreadsheet-style-declaration-editor .property):
993         (.spreadsheet-style-declaration-editor .property.modified):
994         (.spreadsheet-style-declaration-editor .property.modified:not(.selected)):
995         (@media (prefers-color-scheme: dark)):
996
997         * UserInterface/Views/SpreadsheetStyleProperty.js:
998         (WI.SpreadsheetStyleProperty.prototype.updateStatus):
999
1000 2019-01-26  Devin Rousso  <drousso@apple.com>
1001
1002         Web Inspector: handle CSS Color 4 color syntaxes
1003         https://bugs.webkit.org/show_bug.cgi?id=193166
1004         <rdar://problem/47062403>
1005
1006         Reviewed by Simon Fraser.
1007
1008         * UserInterface/Models/Color.js:
1009         (WI.Color.fromString):
1010         (WI.Color.fromString.splitFunctionString): Added.
1011         (WI.Color.fromString.parseFunctionAlpha): Added.
1012         (WI.Color.fromString.parseFunctionComponent): Added.
1013         (WI.Color.fromString.parseHueComponent): Added.
1014         (WI.Color.fromString.parsePercentageComponent): Added.
1015
1016 2019-01-26  Devin Rousso  <drousso@apple.com>
1017
1018         Web Inspector: provide a way to edit the user agent of a remote target
1019         https://bugs.webkit.org/show_bug.cgi?id=193862
1020         <rdar://problem/47359292>
1021
1022         Reviewed by Joseph Pecoraro.
1023
1024         * UserInterface/Base/Main.js:
1025         (WI.loaded):
1026         (WI.contentLoaded):
1027         (WI.initializeTarget):
1028         (WI._handleDeviceSettingsToolbarButtonClicked):
1029         (WI._handleDeviceSettingsToolbarButtonClicked.updateActivatedState):
1030         (WI._handleDeviceSettingsToolbarButtonClicked.applyOverriddenUserAgent):
1031         (WI._handleDeviceSettingsToolbarButtonClicked.applyOverriddenSetting):
1032         (WI._handleDeviceSettingsToolbarButtonClicked.createContainer):
1033         (WI._handleDeviceSettingsToolbarButtonClicked.createColumns):
1034         (WI._handleDeviceSettingsToolbarButtonClicked.calculateTargetFrame):
1035         (WI._handleDeviceSettingsToolbarButtonClicked.showUserAgentInput):
1036
1037         * UserInterface/Views/Main.css:
1038         (.device-settings-content):
1039         (.device-settings-content .user-agent-value): Added.
1040         (.device-settings-content .user-agent-value > select): Added.
1041         (.device-settings-content .user-agent-value > input): Added.
1042         (body[dir=ltr] .device-settings-content .user-agent-value > input): Added.
1043         (body[dir=rtl] .device-settings-content .user-agent-value > input): Added.
1044         (.device-settings-content label > input): Added.
1045         (body[dir=ltr] .device-settings-content label > input): Deleted.
1046         (body[dir=rtl] .device-settings-content label > input): Deleted.
1047
1048         * Localizations/en.lproj/localizedStrings.js:
1049
1050 2019-01-25  Devin Rousso  <drousso@apple.com>
1051
1052         Web Inspector: provide a way to edit page settings on a remote target
1053         https://bugs.webkit.org/show_bug.cgi?id=193813
1054         <rdar://problem/47359510>
1055
1056         Reviewed by Joseph Pecoraro.
1057
1058         Add toolbar button that shows a popover with the target's (page's) settings when clicked.
1059
1060         * UserInterface/Base/Main.js:
1061         (WI.loaded):
1062         (WI.contentLoaded):
1063         (WI.initializeTarget): Added.
1064         (WI._handleDeviceSettingsToolbarButtonClicked): Added.
1065         (WI.didDismissPopover): Added.
1066         * UserInterface/Views/Main.css:
1067         (.device-settings-content): Added.
1068         (.device-settings-content .columns): Added.
1069         (.device-settings-content .columns > .column): Added.
1070         (.device-settings-content .columns > .column + .column): Added.
1071         (body[dir=ltr] .device-settings-content label > input): Added.
1072         (body[dir=rtl] .device-settings-content label > input): Added.
1073
1074         * UserInterface/Views/Popover.js:
1075         (WI.Popover.prototype._update.area):
1076         (WI.Popover.prototype._update):
1077         (WI.Popover.prototype._drawBackground):
1078         (WI.Popover.prototype._bestMetricsForEdge):
1079         (WI.Popover.prototype._drawFrame):
1080         If the best area is negative, treat it as the worst area.
1081         Allow areas to be clamped so long as the clamped edge is not the preferred edge.
1082
1083         * UserInterface/Base/Test.js:
1084         (WI.initializeTarget): Added.
1085
1086         * UserInterface/Images/Device.svg: Added.
1087         * Localizations/en.lproj/localizedStrings.js:
1088
1089 2019-01-25  Devin Rousso  <drousso@apple.com>
1090
1091         Web Inspector: Audit: unable to import audits
1092         https://bugs.webkit.org/show_bug.cgi?id=193861
1093
1094         Reviewed by Joseph Pecoraro.
1095
1096         * UserInterface/Controllers/AuditManager.js:
1097         (WI.AuditManager.prototype.async processJSON):
1098
1099 2019-01-25  Devin Rousso  <drousso@apple.com>
1100
1101         Web Inspector: Uncaught Exception: No node with given id found
1102         https://bugs.webkit.org/show_bug.cgi?id=193833
1103
1104         Reviewed by Joseph Pecoraro.
1105
1106         * UserInterface/Views/CanvasContentView.js:
1107         (WI.CanvasContentView):
1108         (WI.CanvasContentView.prototype.initialLayout):
1109         (WI.CanvasContentView.prototype.layout):
1110         (WI.CanvasContentView.prototype._refreshPixelSize):
1111         Drive-by: show the refresh button when viewing a specific canvas.
1112
1113         * UserInterface/Views/CanvasTabContentView.js:
1114         (WI.CanvasTabContentView.prototype._removeCanvas):
1115         Reset to the overview if the canvas is removed.
1116
1117 2019-01-25  Joseph Pecoraro  <pecoraro@apple.com>
1118
1119         Web Inspector: Improve Dark Mode appearance within Memory timeline
1120         https://bugs.webkit.org/show_bug.cgi?id=193804
1121
1122         Reviewed by Matt Baker.
1123
1124         * UserInterface/Views/TimelineOverview.css:
1125         (.timeline-overview.edit-instruments > .tree-outline.timelines .item.selected):
1126         (.timeline-overview > .tree-outline.timelines .item.selected + .item,):
1127         (@media (prefers-color-scheme: dark)):
1128         (.timeline-overview > .tree-outline.timelines .item.selected + .item): Deleted.
1129         (body.window-inactive .timeline-overview > .tree-outline.timelines .item.selected + .item): Deleted.
1130         Fix some colors for Timelines edit mode.
1131
1132         * UserInterface/Views/CPUTimelineOverviewGraph.css:
1133         (.timeline-overview-graph.cpu:nth-child(even) > .legend):
1134         (@media (prefers-color-scheme: dark)):
1135         (.timeline-overview-graph.cpu > .legend):
1136         (.timeline-overview-graph:nth-child(even) > .legend): Deleted.
1137         * UserInterface/Views/MemoryTimelineOverviewGraph.css:
1138         (.timeline-overview-graph.memory:nth-child(even) > .legend):
1139         (@media (prefers-color-scheme: dark)):
1140         (.timeline-overview-graph.memory > .legend):
1141         (.timeline-overview-graph:nth-child(even) > .legend): Deleted.
1142         Improved colors in CPU / Memory overview graph legends.
1143
1144         * UserInterface/Views/CPUUsageView.css:
1145         (.cpu-usage-view > .details):
1146         * UserInterface/Views/CircleChart.css:
1147         (.circle-chart > svg > path.background):
1148         * UserInterface/Views/MemoryCategoryView.css:
1149         (.memory-category-view > .details):
1150         (.memory-category-view > .details > .name):
1151         * UserInterface/Views/MemoryTimelineView.css:
1152         (.timeline-view.memory > .content > .overview .total-usage,):
1153         (.timeline-view.memory .legend > .row > .size):
1154         Improved colors in CPU / Memory detail views.
1155
1156         * UserInterface/Views/Variables.css:
1157         (:root):
1158         Add a default --text-secondary-color which will end up slightly
1159         lighter in dark mode where it was already implemented.
1160
1161         (@media (prefers-color-scheme: dark)):
1162         Improved max-comparison colors.
1163
1164 2019-01-25  Devin Rousso  <drousso@apple.com>
1165
1166         Web Inspector: Timelines: DOMContentLoaded and load event lines need to be more obvious
1167         https://bugs.webkit.org/show_bug.cgi?id=193186
1168         <rdar://problem/45100694>
1169
1170         Reviewed by Joseph Pecoraro.
1171
1172         Shift around z-index values to make Timelines markers appear behind record bars. Widen the
1173         marker hit region to make it easier to see the tooltip.
1174
1175         * UserInterface/Views/Variables.css:
1176         (:root):
1177
1178         * UserInterface/Views/TimelineRuler.css:
1179         (.timeline-ruler):
1180         (.timeline-ruler > .markers):
1181         (.timeline-ruler > .markers > .marker):
1182         (body[dir=ltr] .timeline-ruler > .markers > .marker):
1183         (body[dir=rtl] .timeline-ruler > .markers > .marker):
1184         (.timeline-ruler > .markers > .marker::before):
1185         (body[dir=ltr] .timeline-ruler > .markers > .marker::before):
1186         (body[dir=rtl] .timeline-ruler > .markers > .marker::before):
1187         (.timeline-ruler > .markers > .marker::after): Added.
1188         (body[dir=ltr] .timeline-ruler > .markers > .marker::after): Added.
1189         (body[dir=rtl] .timeline-ruler > .markers > .marker::after): Added.
1190         (.timeline-ruler > .markers > .marker.current-time):
1191         (.timeline-ruler > .markers > .marker.current-time::after): Added.
1192         (.timeline-ruler > .markers > .marker.load-event):
1193         (.timeline-ruler > .markers > .marker.dom-content-event):
1194         (.timeline-ruler > .markers > .marker.timestamp):
1195         (.timeline-ruler > .selection-handle):
1196         (.timeline-ruler.both-handles-clamped > .selection-handle):
1197         (.timeline-ruler > .shaded-area):
1198         (.timeline-ruler > .markers > .marker.current-time::before): Deleted.
1199
1200         * UserInterface/Views/TimelineRecordBar.css:
1201         (.timeline-record-bar):
1202         (.timeline-record-bar > .segment):
1203
1204         * UserInterface/Views/CPUTimelineOverviewGraph.css:
1205         (.timeline-overview-graph.cpu > .legend):
1206         * UserInterface/Views/MemoryTimelineOverviewGraph.css:
1207         (.timeline-overview-graph.memory > .legend):
1208
1209 2019-01-25  Devin Rousso  <drousso@apple.com>
1210
1211         Web Inspector: Audit: remove experimental setting
1212         https://bugs.webkit.org/show_bug.cgi?id=193743
1213         <rdar://problem/28234022>
1214
1215         Reviewed by Joseph Pecoraro.
1216
1217         * UserInterface/Base/Setting.js:
1218         (WI.Setting):
1219         (WI.Setting.localStorageKey): Added.
1220         (WI.Setting.migrateValue):
1221         Drive-by: add the localStorage key prefix to the key passed into `WI.Setting.migrateValue`.
1222
1223         * UserInterface/Base/Main.js:
1224         (WI.loaded):
1225
1226         * UserInterface/Views/AuditTabContentView.js:
1227         (WI.AuditTabContentView.isTabAllowed):
1228
1229         * UserInterface/Views/SettingsTabContentView.js:
1230         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
1231
1232         * Localizations/en.lproj/localizedStrings.js:
1233
1234 2019-01-25  Devin Rousso  <drousso@apple.com>
1235
1236         Web Inspector: show uncaught exception view for unhandled promise rejections
1237         https://bugs.webkit.org/show_bug.cgi?id=193832
1238
1239         Reviewed by Matt Baker.
1240
1241         * UserInterface/Debug/UncaughtExceptionReporter.js:
1242         (handleUnhandledPromiseRejection): Added.
1243
1244 2019-01-25  Devin Rousso  <drousso@apple.com>
1245
1246         Web Inspector: REGRESSION (r237808): offscreen path warning doesn't work
1247         https://bugs.webkit.org/show_bug.cgi?id=193830
1248
1249         Reviewed by Matt Baker.
1250
1251         * UserInterface/Models/RecordingAction.js:
1252         (WI.RecordingAction.prototype.process):
1253
1254 2019-01-25  Joseph Pecoraro  <pecoraro@apple.com>
1255
1256         Web Inspector: Add another Protocol Version (iOS 12.2)
1257         https://bugs.webkit.org/show_bug.cgi?id=193810
1258         <rdar://problem/42981838>
1259
1260         Reviewed by Matt Baker.
1261
1262         * UserInterface/Protocol/Legacy/12.2/InspectorBackendCommands.js: Added.
1263         * Versions/Inspector-iOS-12.2.json: Added.
1264
1265 2019-01-25  Devin Rousso  <drousso@apple.com>
1266
1267         Web Inspector: `WI.Setting.migrateValue` doesn't take into account the key prefix
1268         https://bugs.webkit.org/show_bug.cgi?id=193814
1269
1270         Reviewed by Matt Baker.
1271
1272         * UserInterface/Base/Setting.js:
1273         (WI.Setting):
1274         (WI.Setting.migrateValue):
1275         (WI.Setting._localStorageKey): Added.
1276
1277 2019-01-25  Devin Rousso  <drousso@apple.com>
1278
1279         Web Inspector: improve invalid Audit/Recording JSON error messages
1280         https://bugs.webkit.org/show_bug.cgi?id=193476
1281         <rdar://problem/47303659>
1282
1283         Reviewed by Joseph Pecoraro.
1284
1285         * UserInterface/Models/AuditTestBase.js:
1286         (WI.AuditTestBase):
1287         * UserInterface/Models/AuditTestCase.js:
1288         (WI.AuditTestCase.async fromPayload):
1289         * UserInterface/Models/AuditTestGroup.js:
1290         (WI.AuditTestGroup.async fromPayload):
1291         * UserInterface/Models/AuditTestCaseResult.js:
1292         (WI.AuditTestCaseResult.async fromPayload.checkArray):
1293         (WI.AuditTestCaseResult.async fromPayload):
1294         * UserInterface/Models/AuditTestGroupResult.js:
1295         (WI.AuditTestGroupResult.async fromPayload):
1296         * UserInterface/Controllers/AuditManager.js:
1297         (WI.AuditManager.synthesizeWarning): Added.
1298         (WI.AuditManager.synthesizeError):
1299         (WI.AuditManager.prototype.async processJSON):
1300
1301         * UserInterface/Models/Recording.js:
1302         (WI.Recording.fromPayload):
1303         (WI.Recording.synthesizeWarning): Added.
1304         (WI.Recording.synthesizeError):
1305         * UserInterface/Models/RecordingFrame.js:
1306         (WI.RecordingFrame.fromPayload):
1307         * UserInterface/Models/RecordingAction.js:
1308         (WI.RecordingAction.fromPayload):
1309         (WI.RecordingAction.prototype.async swizzle):
1310         (WI.RecordingAction.prototype.apply):
1311         * UserInterface/Controllers/CanvasManager.js:
1312         (WI.CanvasManager.prototype.processJSON):
1313
1314         * Localizations/en.lproj/localizedStrings.js:
1315
1316 2019-01-24  Devin Rousso  <drousso@apple.com>
1317
1318         Web Inspector: Audit: add supports key to test/group for compatibility
1319         https://bugs.webkit.org/show_bug.cgi?id=193686
1320         <rdar://problem/47460872>
1321
1322         Reviewed by Joseph Pecoraro.
1323
1324         * UserInterface/Models/AuditTestBase.js:
1325         (WI.AuditTestBase):
1326         (WI.AuditTestBase.prototype.get supported): Added.
1327         (WI.AuditTestBase.prototype.set supported): Added.
1328         (WI.AuditTestBase.prototype.set disabled):
1329         (WI.AuditTestBase.prototype.async start):
1330         (WI.AuditTestBase.prototype.stop):
1331         (WI.AuditTestBase.toJSON):
1332         * UserInterface/Models/AuditTestCase.js:
1333         (WI.AuditTestCase.async fromPayload):
1334         * UserInterface/Models/AuditTestGroup.js:
1335         (WI.AuditTestGroup):
1336         (WI.AuditTestGroup.async fromPayload):
1337         (WI.AuditTestGroup.prototype.get supported): Added.
1338         (WI.AuditTestGroup.prototype.set supported): Added.
1339         Add support for a "supports" key in the test JSON that prevents the test from being run if
1340         it's value is lower than the frontend/backend version.
1341
1342         * UserInterface/Views/AuditTreeElement.js:
1343         (WI.AuditTreeElement.prototype.onattach):
1344         (WI.AuditTreeElement.prototype.ondelete):
1345         (WI.AuditTreeElement.prototype.populateContextMenu):
1346         (WI.AuditTreeElement.prototype._updateStatus): Added.
1347         (WI.AuditTreeElement.prototype._showRunningSpinner):
1348         (WI.AuditTreeElement.prototype._showRunningProgress):
1349         (WI.AuditTreeElement.prototype._updateTestGroupDisabled):
1350         (WI.AuditTreeElement.prototype._handleTestCaseCompleted):
1351         (WI.AuditTreeElement.prototype._handleTestResultCleared):
1352         (WI.AuditTreeElement.prototype._handleTestGroupCompleted):
1353         (WI.AuditTreeElement.prototype._handleManagerEditingChanged):
1354         (WI.AuditTreeElement.prototype.canSelectOnMouseDown): Deleted.
1355         (WI.AuditTreeElement.prototype._updateLevel): Deleted.
1356         * UserInterface/Views/AuditTreeElement.css:
1357         (.tree-outline .item.audit:matches(.test-case, .test-group):not(.unsupported, .manager-active) > .status:hover > img): Added.
1358         (.tree-outline .item.audit > .status:not(:hover) > img.show-on-hover, .tree-outline .item.audit.test-group.expanded:not(.unsupported, .editing-audits) > .status:not(:hover)): Added.
1359         (.tree-outline .item.audit.manager-active > .status > img.show-on-hover, .tree-outline .item.audit.test-group.expanded:not(.editing-audits) > .status:hover > :not(img), .tree-outline .item.audit.test-group-result.expanded > .status, .tree-outline .item.audit.unsupported + .children .item.audit.unsupported  > .status > img): Added.
1360         (.tree-outline .item.audit.unsupported:not(.selected) > :matches(.icon, .titles)): Added.
1361         (.tree-outline .item.audit.unsupported > .status > img): Added.
1362         (.tree-outline .item.audit:matches(.test-case, .test-group):not(.manager-active) > .status:hover > img): Deleted.
1363         (.tree-outline .item.audit > .status:not(:hover) > img.show-on-hover, .tree-outline .item.audit.test-group.expanded:not(.editing-audits) > .status:not(:hover)): Deleted.
1364         (.tree-outline .item.audit.manager-active > .status > img.show-on-hover, .tree-outline .item.audit.test-group.expanded:not(.editing-audits) > .status:hover > :not(img), .tree-outline .item.audit.test-group-result.expanded > .status): Deleted.
1365         Hide unsupported tests unless in edit mode, where they are greyed out and cannot be enabled.
1366         Drive-by: only allow tests to be deleted when in edit mode.
1367
1368         * UserInterface/Views/AuditNavigationSidebarPanel.js:
1369         (WI.AuditNavigationSidebarPanel.prototype._treeSelectionDidChange):
1370
1371         * Localizations/en.lproj/localizedStrings.js:
1372
1373 2019-01-24  Joseph Pecoraro  <pecoraro@apple.com>
1374
1375         Web Inspector: CPU Usage Timeline
1376         https://bugs.webkit.org/show_bug.cgi?id=193730
1377         <rdar://problem/46797201>
1378
1379         Reviewed by Devin Rousso.
1380
1381         CPU Usage is gathered in the backend twice a second, the frequency of the
1382         ResourceUsageThread in WebCore. The frontend displays cpu usage in a few
1383         ways in the Timeline.
1384
1385         We use a column chart in the timeline overview to display the frequency and
1386         relative distance of samples. This helps show if the samples were close
1387         together or far apart, which indicates how meaningful they will be at a
1388         particular scale.
1389
1390         We use a line chart in the timeline detail view which will be easier to see
1391         the changes over a particular time range selection.
1392
1393         * Localizations/en.lproj/localizedStrings.js:
1394         New strings.
1395
1396         * UserInterface/Main.html:
1397         * UserInterface/Base/Main.js:
1398         (WI.loaded):
1399         * UserInterface/Test.html:
1400         * UserInterface/Test/Test.js:
1401         (WI.loaded):
1402         * UserInterface/Protocol/CPUProfilerObserver.js:
1403         (WI.CPUProfilerObserver.prototype.trackingStart):
1404         (WI.CPUProfilerObserver.prototype.trackingUpdate):
1405         (WI.CPUProfilerObserver.prototype.trackingComplete):
1406         (WI.CPUProfilerObserver):
1407         New files and default registration.
1408
1409         * UserInterface/Protocol/Target.js:
1410         (WI.Target.prototype.get CPUProfilerAgent):
1411         New Agent.
1412
1413         * UserInterface/Controllers/TimelineManager.js:
1414         (WI.TimelineManager.availableTimelineTypes):
1415         (WI.TimelineManager.prototype.cpuProfilerTrackingStarted):
1416         (WI.TimelineManager.prototype.cpuProfilerTrackingUpdated):
1417         (WI.TimelineManager.prototype.cpuProfilerTrackingCompleted):
1418         (WI.TimelineManager.prototype._updateAutoCaptureInstruments):
1419         (WI.TimelineManager.prototype.memoryTrackingStart): Renamed.
1420         (WI.TimelineManager.prototype.memoryTrackingUpdate): Renamed.
1421         (WI.TimelineManager.prototype.memoryTrackingComplete): Renamed.
1422         * UserInterface/Models/CPUInstrument.js:
1423         (WI.CPUInstrument):
1424         (WI.CPUInstrument.supported):
1425         (WI.CPUInstrument.prototype.get timelineRecordType):
1426         (WI.CPUInstrument.prototype.startInstrumentation):
1427         (WI.CPUInstrument.prototype.stopInstrumentation):
1428         * UserInterface/Models/CPUTimelineRecord.js:
1429         (WI.CPUTimelineRecord):
1430         (WI.CPUTimelineRecord.prototype.get timestamp):
1431         (WI.CPUTimelineRecord.prototype.get usage):
1432         * UserInterface/Models/Instrument.js:
1433         (WI.Instrument.createForTimelineType):
1434         * UserInterface/Models/TimelineRecord.js:
1435         * UserInterface/Models/TimelineRecording.js:
1436         (WI.TimelineRecording.prototype.addRecord):
1437         Expose a new CPU instrument and timeline.
1438
1439         * UserInterface/Views/ColumnChart.js: Added.
1440         (WI.ColumnChart):
1441         (WI.ColumnChart.prototype.get element):
1442         (WI.ColumnChart.prototype.get bars):
1443         (WI.ColumnChart.prototype.get size):
1444         (WI.ColumnChart.prototype.set size):
1445         (WI.ColumnChart.prototype.addBar):
1446         (WI.ColumnChart.prototype.clear):
1447         (WI.ColumnChart.prototype.needsLayout):
1448         (WI.ColumnChart.prototype.updateLayout):
1449         View that will draw vertical bars with independent widths.
1450         This is meant to be used similiar to WI.LineChart.
1451
1452         * UserInterface/Images/CPUInstrument.svg: Added.
1453         * UserInterface/Views/Variables.css:
1454         (:root):
1455         CPU timeline colors and icon.
1456
1457         * UserInterface/Views/CPUTimelineOverviewGraph.css:
1458         (body .sidebar > .panel.navigation.timeline > .timelines-content li.item.cpu,):
1459         (.timeline-overview-graph.cpu):
1460         (.timeline-overview-graph.cpu > .legend):
1461         (body[dir=ltr] .timeline-overview-graph.cpu > .legend):
1462         (body[dir=rtl] .timeline-overview-graph.cpu > .legend):
1463         (.timeline-overview-graph:nth-child(even) > .legend):
1464         (body[dir=rtl] .timeline-overview-graph.cpu > .bar-chart):
1465         (.timeline-overview-graph.cpu > .bar-chart > svg > g > rect):
1466         * UserInterface/Views/CPUTimelineOverviewGraph.js: Added.
1467         (WI.CPUTimelineOverviewGraph):
1468         (WI.CPUTimelineOverviewGraph.prototype.get height):
1469         (WI.CPUTimelineOverviewGraph.prototype.reset):
1470         (WI.CPUTimelineOverviewGraph.prototype.layout.xScale):
1471         (WI.CPUTimelineOverviewGraph.prototype.layout.yScale):
1472         (WI.CPUTimelineOverviewGraph.prototype.layout.yScaleForRecord):
1473         (WI.CPUTimelineOverviewGraph.prototype.layout):
1474         (WI.CPUTimelineOverviewGraph.prototype._updateLegend):
1475         (WI.CPUTimelineOverviewGraph.prototype._cpuTimelineRecordAdded):
1476         * UserInterface/Views/CPUTimelineView.css:
1477         (.timeline-view.cpu):
1478         (.timeline-view.cpu > .content):
1479         (.timeline-view.cpu > .content .subtitle):
1480         (.timeline-view.cpu > .content > .details):
1481         (.timeline-view.cpu > .content > .details > .timeline-ruler):
1482         (body[dir=ltr] .timeline-view.cpu > .content > .details > .timeline-ruler):
1483         (body[dir=rtl] .timeline-view.cpu > .content > .details > .timeline-ruler):
1484         (.timeline-view.cpu > .content > .details > .subtitle):
1485         (.cpu-usage-view .line-chart > svg > path):
1486         (.timeline-view.cpu .legend > .row > .swatch.current):
1487         * UserInterface/Views/CPUTimelineView.js: Added.
1488         (WI.CPUTimelineView):
1489         (WI.CPUTimelineView.prototype.shown):
1490         (WI.CPUTimelineView.prototype.hidden):
1491         (WI.CPUTimelineView.prototype.closed):
1492         (WI.CPUTimelineView.prototype.reset):
1493         (WI.CPUTimelineView.prototype.get scrollableElements):
1494         (WI.CPUTimelineView.prototype.get showsFilterBar):
1495         (WI.CPUTimelineView.prototype.layout.layoutView):
1496         (WI.CPUTimelineView.prototype.layout.xScale):
1497         (WI.CPUTimelineView.prototype.layout.yScale):
1498         (WI.CPUTimelineView.prototype.layout):
1499         (WI.CPUTimelineView.prototype._cpuTimelineRecordAdded):
1500         * UserInterface/Views/CPUUsageView.css:
1501         (.cpu-usage-view):
1502         (.cpu-usage-view > .details):
1503         (body[dir=ltr] .cpu-usage-view > .details):
1504         (body[dir=rtl] .cpu-usage-view > .details):
1505         (.cpu-usage-view > .graph):
1506         (body[dir=rtl] .cpu-usage-view > .graph):
1507         * UserInterface/Views/CPUUsageView.js:
1508         (WI.CPUUsageView):
1509         (WI.CPUUsageView.prototype.get element):
1510         (WI.CPUUsageView.prototype.clear):
1511         (WI.CPUUsageView.prototype.layoutWithDataPoints):
1512         (WI.CPUUsageView.prototype._updateDetails):
1513         * UserInterface/Views/ContentView.js:
1514         (WI.ContentView.createFromRepresentedObject):
1515         * UserInterface/Views/TimelineIcons.css:
1516         (.cpu-icon .icon):
1517         * UserInterface/Views/TimelineOverviewGraph.js:
1518         (WI.TimelineOverviewGraph.createForTimeline):
1519         * UserInterface/Views/TimelineTabContentView.js:
1520         (WI.TimelineTabContentView.displayNameForTimelineType):
1521         (WI.TimelineTabContentView.iconClassNameForTimelineType):
1522         (WI.TimelineTabContentView.genericClassNameForTimelineType):
1523         (WI.TimelineTabContentView.iconClassNameForRecord):
1524         (WI.TimelineTabContentView.displayNameForRecord):
1525         Timeline views for CPU usage.
1526
1527         * UserInterface/Views/MemoryCategoryView.js:
1528         (WI.MemoryCategoryView):
1529         * UserInterface/Views/MemoryTimelineView.js:
1530         (WI.MemoryTimelineView.createChartContainer):
1531         (WI.MemoryTimelineView):
1532         (WI.MemoryTimelineView.prototype._clearMaxComparisonLegend):
1533         Minor updates to style and comments.
1534
1535 2019-01-23  Nikita Vasilyev  <nvasilyev@apple.com>
1536
1537         Web Inspector: Refactor WI.CSSStyleDeclaration.prototype.update
1538         https://bugs.webkit.org/show_bug.cgi?id=193737
1539
1540         Reviewed by Matt Baker.
1541
1542         Remove unused event data from the WI.CSSStyleDeclaration.Event.PropertiesChanged event.
1543
1544         * UserInterface/Models/CSSStyleDeclaration.js:
1545         (WI.CSSStyleDeclaration.prototype.update):
1546
1547 2019-01-23  Devin Rousso  <drousso@apple.com>
1548
1549         WebInspector: Confusingly nested events in the timeline for Mutation Observers
1550         https://bugs.webkit.org/show_bug.cgi?id=192884
1551         <rdar://problem/46854178>
1552
1553         Reviewed by Joseph Pecoraro.
1554
1555         If a microtask event (e.g. `ObserverCallback`) is contained within a `EvaluatedScript`
1556         event, move that microtask event to be a sibling of the `EvaluateScript`, subtracting the
1557         microtask's time taken from the `EvaluateScript`'s time. If there are no other children
1558         after this move, then remove the `EvaluateScript` altogether.
1559
1560         * UserInterface/Controllers/TimelineManager.js:
1561         (WI.TimelineManager.prototype.eventRecorded.fixMicrotaskPlacement): Added.
1562         (WI.TimelineManager.prototype.eventRecorded):
1563         (WI.TimelineManager.prototype._mergeScriptProfileRecords):
1564
1565 2019-01-23  Joseph Pecoraro  <pecoraro@apple.com>
1566
1567         Web Inspector: Network Waterfall column should redraw when adding/removing new columns
1568         https://bugs.webkit.org/show_bug.cgi?id=193696
1569         <rdar://problem/47464149>
1570
1571         Reviewed by Devin Rousso.
1572
1573         * UserInterface/Views/TableColumn.js:
1574         (WI.TableColumn.prototype.get needsReloadOnResize):
1575         * UserInterface/Views/NetworkTableContentView.js:
1576         (WI.NetworkTableContentView.prototype.initialLayout):
1577         Mark the waterfall column as sensitive to any resizes.
1578
1579         * UserInterface/Views/Table.js:
1580         (WI.Table.prototype.showColumn):
1581         (WI.Table.prototype.hideColumn):
1582         Update column widths and reload any columns that may be sensitive to resizes.
1583
1584 2019-01-22  Devin Rousso  <drousso@apple.com>
1585
1586         Web Inspector: InspectorInstrumentation::willEvaluateScript should include column number
1587         https://bugs.webkit.org/show_bug.cgi?id=116191
1588         <rdar://problem/13905910>
1589
1590         Reviewed by Joseph Pecoraro.
1591
1592         * UserInterface/Controllers/TimelineManager.js:
1593         (WI.TimelineManager.prototype._processRecord):
1594
1595 2019-01-22  Devin Rousso  <drousso@apple.com>
1596
1597         Web Inspector: expose Audit and Recording versions to the frontend
1598         https://bugs.webkit.org/show_bug.cgi?id=193262
1599         <rdar://problem/47130684>
1600
1601         Reviewed by Joseph Pecoraro.
1602
1603         * UserInterface/Protocol/InspectorBackend.js:
1604         (InspectorBackendClass.prototype.registerVersion): Added.
1605
1606         * UserInterface/Models/AuditTestCase.js:
1607         * UserInterface/Models/Recording.js:
1608         (WI.Recording.fromPayload):
1609         Add Interface version values.
1610
1611 2019-01-22  Nikita Vasilyev  <nvasilyev@apple.com>
1612
1613         Web Inspector: Styles: refactor properties/allProperties/visibleProperties/allVisibleProperties
1614         https://bugs.webkit.org/show_bug.cgi?id=193615
1615
1616         Reviewed by Devin Rousso.
1617
1618         Remove unused visibleProperties.
1619
1620         Rename:
1621         - properties to enabledProperties;
1622         - allProperties to properties;
1623         - allVisibleProperties to visibleProperties.
1624
1625         * UserInterface/Models/CSSProperty.js:
1626         (WI.CSSProperty.prototype._prependSemicolonIfNeeded):
1627         (WI.CSSProperty):
1628         * UserInterface/Models/CSSStyleDeclaration.js:
1629         (WI.CSSStyleDeclaration):
1630         (WI.CSSStyleDeclaration.prototype.get enabledProperties):
1631         (WI.CSSStyleDeclaration.prototype.get properties):
1632         (WI.CSSStyleDeclaration.prototype.propertyForName):
1633         (WI.CSSStyleDeclaration.prototype.newBlankProperty):
1634         (WI.CSSStyleDeclaration.prototype.shiftPropertiesAfter):
1635         (WI.CSSStyleDeclaration.prototype._rangeAfterPropertyAtIndex):
1636         * UserInterface/Models/DOMNodeStyles.js:
1637         (WI.DOMNodeStyles.prototype._parseStylePropertyPayload):
1638         (WI.DOMNodeStyles.prototype._markOverriddenProperties):
1639         (WI.DOMNodeStyles.prototype._associateRelatedProperties):
1640         (WI.DOMNodeStyles.prototype._isPropertyFoundInMatchingRules):
1641         (WI.DOMNodeStyles):
1642         * UserInterface/Views/BoxModelDetailsSectionRow.js:
1643         (WI.BoxModelDetailsSectionRow.prototype._updateMetrics):
1644         * UserInterface/Views/ComputedStyleDetailsPanel.js:
1645         (WI.ComputedStyleDetailsPanel.prototype._computePropertyTraces):
1646         * UserInterface/Views/ComputedStyleSection.js:
1647         (WI.ComputedStyleSection.prototype.get propertiesToRender):
1648         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
1649         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.get propertiesToRender):
1650         * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
1651         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.layout):
1652         * UserInterface/Views/SpreadsheetStyleProperty.js:
1653         (WI.SpreadsheetStyleProperty.prototype.updateStatus):
1654
1655 2019-01-22  Joseph Pecoraro  <pecoraro@apple.com>
1656
1657         Web Inspector: Network Table appears broken after filter - rows look collapsed
1658         https://bugs.webkit.org/show_bug.cgi?id=192730
1659         <rdar://problem/46853158>
1660
1661         Reviewed by Devin Rousso.
1662
1663         * UserInterface/Views/Table.js:
1664         (WI.Table.prototype._applyColumnWidthsToColumnsIfNeeded):
1665         Affect the filler row like the other applyColumnWidths calls since this
1666         now may be the initial call to size visible columns.
1667
1668 2019-01-22  Devin Rousso  <drousso@apple.com>
1669
1670         Web Inspector: Audit: use plural strings for Passed, Failed, and Unsupported
1671         https://bugs.webkit.org/show_bug.cgi?id=193675
1672         <rdar://problem/46628680>
1673
1674         Reviewed by Joseph Pecoraro.
1675
1676         * UserInterface/Views/AuditTestGroupContentView.js:
1677         (WI.AuditTestGroupContentView.prototype.layout):
1678
1679         * Localizations/en.lproj/localizedStrings.js:
1680
1681 2019-01-18  Jer Noble  <jer.noble@apple.com>
1682
1683         SDK_VARIANT build destinations should be separate from non-SDK_VARIANT builds
1684         https://bugs.webkit.org/show_bug.cgi?id=189553
1685
1686         Reviewed by Tim Horton.
1687
1688         * Configurations/Base.xcconfig:
1689         * Configurations/SDKVariant.xcconfig: Added.
1690
1691 2019-01-18  Devin Rousso  <drousso@apple.com>
1692
1693         Web Inspector: Uncaught Exception: TypeError: undefined is not an object (evaluating 'resource.finished')
1694         https://bugs.webkit.org/show_bug.cgi?id=193589
1695
1696         Reviewed by Joseph Pecoraro.
1697
1698         * UserInterface/Views/NetworkTableContentView.js:
1699         (WI.NetworkTableContentView.prototype.get supportsSave):
1700         (WI.NetworkTableContentView.prototype._HARResources):
1701
1702 2019-01-17  Truitt Savell  <tsavell@apple.com>
1703
1704         Unreviewed, rolling out r240124.
1705
1706         This commit broke an internal build.
1707
1708         Reverted changeset:
1709
1710         "SDK_VARIANT build destinations should be separate from non-
1711         SDK_VARIANT builds"
1712         https://bugs.webkit.org/show_bug.cgi?id=189553
1713         https://trac.webkit.org/changeset/240124
1714
1715 2019-01-17  Jer Noble  <jer.noble@apple.com>
1716
1717         SDK_VARIANT build destinations should be separate from non-SDK_VARIANT builds
1718         https://bugs.webkit.org/show_bug.cgi?id=189553
1719
1720         Reviewed by Tim Horton.
1721
1722         * Configurations/Base.xcconfig:
1723         * Configurations/SDKVariant.xcconfig: Added.
1724
1725 2019-01-16  Matt Baker  <mattbaker@apple.com>
1726
1727         Web Inspector: Fix TreeOutline TypeError:​ this._indexesForSubtree is not a function
1728         https://bugs.webkit.org/show_bug.cgi?id=193501
1729         <rdar://problem/47323967>
1730
1731         Reviewed by Joseph Pecoraro.
1732
1733         * UserInterface/Views/TreeOutline.js:
1734         (WI.TreeOutline.prototype.removeChildAtIndex):
1735
1736 2019-01-15  Devin Rousso  <drousso@apple.com>
1737
1738         Web Inspector: Audit: create new IDL type for exposing special functionality in test context
1739         https://bugs.webkit.org/show_bug.cgi?id=193149
1740         <rdar://problem/46801218>
1741
1742         Reviewed by Joseph Pecoraro.
1743
1744         Add `AuditAgent` getters and plumbing.
1745
1746         * UserInterface/Protocol/Target.js:
1747         (WI.Target.prototype.get AuditAgent): Added.
1748
1749         * UserInterface/Models/AuditTestCase.js:
1750         (WI.AuditTestCase.prototype.async run):
1751
1752         * UserInterface/Controllers/AuditManager.js:
1753         (WI.AuditManager.prototype.async start):
1754
1755         * .eslintrc:
1756
1757 2019-01-14  Devin Rousso  <drousso@apple.com>
1758
1759         Web Inspector: Event breakpoints: typing uppercase "DOM" doesn't show completions for events that start with "DOM"
1760         https://bugs.webkit.org/show_bug.cgi?id=193384
1761
1762         Reviewed by Joseph Pecoraro.
1763
1764         * UserInterface/Views/EventBreakpointPopover.js:
1765         (WI.EventBreakpointPopover.prototype.show):
1766
1767 2019-01-14  Devin Rousso  <drousso@apple.com>
1768
1769         Web Inspector: Event breakpoints: text field and completion popover fonts should match
1770         https://bugs.webkit.org/show_bug.cgi?id=193249
1771
1772         Reviewed by Matt Baker.
1773
1774         * UserInterface/Views/EventBreakpointPopover.css:
1775         (.popover .event-breakpoint-content > .event-type > input): Added.
1776         (.popover .event-breakpoint-content > .event-type > input::placeholder): Added.
1777         * UserInterface/Views/EventBreakpointPopover.js:
1778         (WI.EventBreakpointPopover.prototype.show):
1779         (WI.EventBreakpointPopover.prototype._showSuggestionsView):
1780         Subtract the <input> border and padding from the bounds position so the <input> text lines
1781         up with the `WI.CompletionSuggestionsView` text.
1782
1783         * UserInterface/Views/CompletionSuggestionsView.js:
1784         (WI.CompletionSuggestionsView):
1785         Drive-by: force `dir=ltr` to match the `text-align: left;` CSS styling.
1786
1787 2019-01-14  Nikita Vasilyev  <nvasilyev@apple.com>
1788
1789         Web Inspector: Styles: pressing Down key on empty value field shouldn't discard completion popover
1790         https://bugs.webkit.org/show_bug.cgi?id=193098
1791         <rdar://problem/47016036>
1792
1793         Reviewed by Devin Rousso.
1794
1795         Hide CompletionSuggestionsView when SpreadsheetTextField moves, e.g. by scrolling or resizing the sidebar.
1796         Update CompletionSuggestionsView position after pressing Up or Down key, because SpreadsheetTextField may
1797         move from wrapping text.
1798
1799         * UserInterface/Views/CompletionSuggestionsView.js:
1800         (WI.CompletionSuggestionsView.prototype.hide):
1801         (WI.CompletionSuggestionsView.prototype.show):
1802         (WI.CompletionSuggestionsView.prototype.showUntilAnchorMoves): Removed.
1803         (WI.CompletionSuggestionsView.prototype.hideWhenElementMoves): Added.
1804         (WI.CompletionSuggestionsView.prototype._stopMoveTimer): Added.
1805         (WI.CompletionSuggestionsView):
1806
1807         * UserInterface/Views/SpreadsheetTextField.js:
1808         (WI.SpreadsheetTextField.prototype.set suggestionHint):
1809         (WI.SpreadsheetTextField.prototype.completionSuggestionsSelectedCompletion):
1810         (WI.SpreadsheetTextField.prototype._handleKeyDownForSuggestionView):
1811         (WI.SpreadsheetTextField.prototype._updateCompletions):
1812         (WI.SpreadsheetTextField.prototype._showSuggestionsView): Added.
1813
1814         (WI.SpreadsheetTextField.prototype._reAttachSuggestionHint):
1815         Drive-by: abstract out repeating code into a private method.
1816
1817 2019-01-14  Devin Rousso  <drousso@apple.com>
1818
1819         Web Inspector: Settings: group titles should vertically align with the first editor
1820         https://bugs.webkit.org/show_bug.cgi?id=193391
1821
1822         Reviewed by Dean Jackson.
1823
1824         * UserInterface/Views/SettingsTabContentView.css:
1825         (.content-view.settings > .settings-view > .container):
1826         (.content-view.settings > .settings-view > .container > .editor-group > .editor): Added.
1827         (.content-view.settings > .settings-view > .container > .editor-group > .editor:first-child > *): Added.
1828         (.content-view.settings > .settings-view > .container > .editor-group > .editor select):
1829         (.content-view.settings > .settings-view > .container > .editor-group > .editor input[type="number"]):
1830
1831 2019-01-11  Matt Baker  <mattbaker@apple.com>
1832
1833         Web Inspector: REGRESSION: deleting an audit puts selection in a selected but invisible state
1834         https://bugs.webkit.org/show_bug.cgi?id=192917
1835         <rdar://problem/46875285>
1836
1837         Reviewed by Devin Rousso.
1838
1839         SelectionController should not be notified of removed children until the
1840         child items have been removed from the TreeOutline. Doing so at this stage
1841         is unsafe, since this method checks `this.selectedTreeElement`, which could
1842         return the adjusted index from the SelectionController before anything has
1843         actually been removed from the TreeOutline.
1844
1845         The number of calls to SelectionController.prototype.didRemoveItems is also
1846         reduced somewhat, since we're no longer calling it for every TreeElement.
1847
1848         * UserInterface/Views/TreeOutline.js:
1849         (WI.TreeOutline.prototype.removeChildAtIndex):
1850         (WI.TreeOutline.prototype.removeChildren):
1851         (WI.TreeOutline.prototype._forgetTreeElement):
1852         (WI.TreeOutline.prototype._indexesForSubtree): Added.        
1853
1854 2019-01-10  Devin Rousso  <drousso@apple.com>
1855
1856         Web Inspector: Audit: allow audits to be enabled/disabled
1857         https://bugs.webkit.org/show_bug.cgi?id=192210
1858         <rdar://problem/46423583>
1859
1860         Reviewed by Joseph Pecoraro.
1861
1862         * UserInterface/Controllers/AuditManager.js:
1863         (WI.AuditManager.prototype.get editing): Added.
1864         (WI.AuditManager.prototype.set editing): Added.
1865         (WI.AuditManager.prototype.stop):
1866         (WI.AuditManager.prototype.addDefaultTestsIfNeeded):
1867         Since default audits aren't stored, keep a list of disabled default tests in a `WI.Setting`.
1868
1869         * UserInterface/Models/AuditTestBase.js:
1870         (WI.AuditTestBase):
1871         (WI.AuditTestBase.prototype.get disabled): Added.
1872         (WI.AuditTestBase.prototype.set disabled): Added.
1873         (WI.AuditTestBase.prototype.async start):
1874         (WI.AuditTestBase.prototype.stop):
1875         (WI.AuditTestBase.toJSON):
1876
1877         * UserInterface/Models/AuditTestCase.js:
1878         (WI.AuditTestCase):
1879         (WI.AuditTestCase.async fromPayload):
1880         (WI.AuditTestCase.prototype.toJSON):
1881
1882         * UserInterface/Models/AuditTestGroup.js:
1883         (WI.AuditTestGroup):
1884         (WI.AuditTestGroup.async fromPayload):
1885         (WI.AuditTestGroup.prototype.get disabled): Added.
1886         (WI.AuditTestGroup.prototype.set disabled): Added.
1887         (WI.AuditTestGroup.prototype.toJSON):
1888         (WI.AuditTestGroup.prototype.async run):
1889         (WI.AuditTestGroup.prototype._handleTestDisabledChanged): Added.
1890         (WI.AuditTestGroup.prototype._handleTestProgress):
1891         Propagate `disabled` changes to all sub-tests, unless the change was caused by one of the
1892         sub-tests, in which case we are now in an intermediate state.
1893
1894         * UserInterface/Views/AuditNavigationSidebarPanel.js:
1895         (WI.AuditNavigationSidebarPanel):
1896         (WI.AuditNavigationSidebarPanel.prototype.showDefaultContentView):
1897         (WI.AuditNavigationSidebarPanel.prototype.initialLayout):
1898         (WI.AuditNavigationSidebarPanel.prototype.hasCustomFilters): Added.
1899         (WI.AuditNavigationSidebarPanel.prototype.matchTreeElementAgainstCustomFilters): Added.
1900         (WI.AuditNavigationSidebarPanel.prototype._addTest):
1901         (WI.AuditNavigationSidebarPanel.prototype._addResult):
1902         (WI.AuditNavigationSidebarPanel.prototype._updateStartStopButtonNavigationItemState):
1903         (WI.AuditNavigationSidebarPanel.prototype._updateEditButtonNavigationItemState): Added.
1904         (WI.AuditNavigationSidebarPanel.prototype._handleAuditManagerEditingChanged): Added.
1905         (WI.AuditNavigationSidebarPanel.prototype._handleAuditTestRemoved):
1906         (WI.AuditNavigationSidebarPanel.prototype._handleAuditTestScheduled):
1907         (WI.AuditNavigationSidebarPanel.prototype._treeSelectionDidChange):
1908         (WI.AuditNavigationSidebarPanel.prototype._handleEditButtonNavigationItemClicked): Added.
1909         * UserInterface/Views/AuditNavigationSidebarPanel.css:
1910         (.sidebar > .panel.navigation.audit > .content):
1911         (.sidebar > .panel.navigation.audit > .content > .tree-outline): Added.
1912         (.sidebar > .panel.navigation.audit > .content .edit-audits:not(.disabled):active): Added.
1913         (.sidebar > .panel.navigation.audit > .content .edit-audits:not(.disabled).activated): Added.
1914         (.sidebar > .panel.navigation.audit > .content .edit-audits:not(.disabled).activated:active): Added.
1915         (.sidebar > .panel.navigation.audit > .content .edit-audits.disabled): Added.
1916         (.finish-editing-audits-placeholder.message-text-view .navigation-item-help .navigation-bar): Added.
1917         Leverage custom filters to ensure that disabled audits arent shown when not editing and that
1918         result tree elements aren't shown while editing.
1919
1920         * UserInterface/Views/AuditTestGroupContentView.js:
1921         (WI.AuditTestGroupContentView.prototype.shown):
1922
1923         * UserInterface/Views/AuditTreeElement.js:
1924         (WI.AuditTreeElement.prototype.onattach):
1925         (WI.AuditTreeElement.prototype.canSelectOnMouseDown): Added.
1926         (WI.AuditTreeElement.prototype._updateTestGroupDisabled): Added.
1927         (WI.AuditTreeElement.prototype._handleTestDisabledChanged): Added.
1928         (WI.AuditTreeElement.prototype._handleManagerEditingChanged): Added.
1929         * UserInterface/Views/AuditTreeElement.css:
1930         (.tree-outline .item.audit > .status:not(:hover) > img.show-on-hover, .tree-outline .item.audit.test-group.expanded:not(.editing-audits) > .status:not(:hover)): Added.
1931         (.tree-outline .item.audit.manager-active > .status > img.show-on-hover, .tree-outline .item.audit.test-group.expanded:not(.editing-audits) > .status:hover > :not(img), .tree-outline .item.audit.test-group-result.expanded > .status): Added.
1932         (.tree-outline .item.audit > .status:not(:hover) > img.show-on-hover, .tree-outline .item.audit.test-group.expanded > .status:not(:hover)): Deleted.
1933         (.tree-outline .item.audit.manager-active > .status > img.show-on-hover, .tree-outline .item.audit.test-group.expanded > .status:hover > :not(img), .tree-outline .item.audit.test-group-result.expanded > .status): Deleted.
1934         Prevent selection and running when editing.
1935
1936         * UserInterface/Views/TreeOutline.css:
1937         (.tree-outline .children.expanded:not([hidden])): Added.
1938         (.tree-outline .children.expanded): Deleted.
1939
1940         * UserInterface/Base/ObjectStore.js:
1941         (WI.ObjectStore._open):
1942         Batch operations together to help avoid multiple simultaneous `indexedDB.open` calls. This
1943         should also help preserve the order of operations, as once the database is open, operations
1944         are executed in the order they were enqueued.
1945
1946         (WI.ObjectStore.prototype.async.addObject):
1947         Pass a unique `Symbol` to the `toJSON` call on the given object so that the object can save
1948         additional values that wouldn't normally be saved. This doesn't conflict with normal usage
1949         of `toJSON` (e.g. `JSON.stringify`) because that case also passes in a value:
1950          - `undefined`, if it was called directly on the object
1951          - the key for this object in the containing object
1952          - the index of this object in the containing array
1953         In any case, the value can never equal the unique `Symbol`, so it's guaranteed that the code
1954         will only run for `WI.ObjectStore` operations.
1955
1956         (WI.ObjectStore.prototype.async.clear): Added.
1957
1958         * Localizations/en.lproj/localizedStrings.js:
1959
1960 2019-01-09  Devin Rousso  <drousso@apple.com>
1961
1962         Web Inspector: Protocol Logging: log messages as objects if inspector^2 is open
1963         https://bugs.webkit.org/show_bug.cgi?id=193284
1964
1965         Reviewed by Joseph Pecoraro.
1966
1967         If inspector^2 is closed, stringify all messages.
1968         If inspector^2 is open, log each message JSON object without modifying it.
1969
1970         * UserInterface/Protocol/LoggingProtocolTracer.js:
1971         (WI.LoggingProtocolTracer.prototype._processEntry):
1972
1973 2019-01-09  Nikita Vasilyev  <nvasilyev@apple.com>
1974
1975         Web Inspector: Styles: clicking on property that soon to be discarded shouldn't start selection
1976         https://bugs.webkit.org/show_bug.cgi?id=193218
1977         <rdar://problem/47098303>
1978
1979         Reviewed by Devin Rousso.
1980
1981         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
1982         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleMouseDown):
1983         A style property may get removed on blur event, so propertyElement may get removed from the DOM right when mousedown event happens.
1984
1985         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleWindowClick):
1986         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleClick):
1987         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._stopSelection):
1988
1989 2019-01-08  Nikita Vasilyev  <nvasilyev@apple.com>
1990
1991         Web Inspector: Styles: Undo reverts all changes at once
1992         https://bugs.webkit.org/show_bug.cgi?id=177676
1993         <rdar://problem/34745031>
1994
1995         Reviewed by Devin Rousso.
1996
1997         Command-Z used to revert all changes at once because Web Inspector never
1998         set any history checkpoints in the style editor.
1999
2000         * UserInterface/Views/SpreadsheetStyleProperty.js:
2001         (WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidBlur):
2002         * UserInterface/Views/SpreadsheetTextField.js:
2003         (WI.SpreadsheetTextField.prototype._handleBlur):
2004
2005 2019-01-08  Nikita Vasilyev  <nvasilyev@apple.com>
2006
2007         Web Inspector: Use prefers-color-scheme instead of prefers-dark-interface
2008         https://bugs.webkit.org/show_bug.cgi?id=193265
2009
2010         Reviewed by Timothy Hatcher.
2011
2012         * UserInterface/Views/AuditTestContentView.css:
2013         (@media (prefers-color-scheme: dark)):
2014         * UserInterface/Views/AuditTestGroupContentView.css:
2015         (@media (prefers-color-scheme: dark)):
2016         * UserInterface/Views/BezierEditor.css:
2017         (@media (prefers-color-scheme: dark)):
2018         * UserInterface/Views/BoxModelDetailsSectionRow.css:
2019         (@media (prefers-color-scheme: dark)):
2020         * UserInterface/Views/BreakpointActionView.css:
2021         (@media (prefers-color-scheme: dark)):
2022         * UserInterface/Views/BreakpointPopoverController.css:
2023         (@media (prefers-color-scheme: dark)):
2024         * UserInterface/Views/ButtonNavigationItem.css:
2025         (@media (prefers-color-scheme: dark)):
2026         * UserInterface/Views/ButtonToolbarItem.css:
2027         (@media (prefers-color-scheme: dark)):
2028         * UserInterface/Views/CallFrameView.css:
2029         (@media (prefers-color-scheme: dark)):
2030         * UserInterface/Views/CanvasContentView.css:
2031         (@media (prefers-color-scheme: dark)):
2032         * UserInterface/Views/CanvasOverviewContentView.css:
2033         (@media (prefers-color-scheme: dark)):
2034         * UserInterface/Views/CanvasSidebarPanel.css:
2035         (@media (prefers-color-scheme: dark)):
2036         * UserInterface/Views/CanvasTabContentView.css:
2037         (@media (prefers-color-scheme: dark)):
2038         * UserInterface/Views/CodeMirrorOverrides.css:
2039         (@media (prefers-color-scheme: dark)):
2040         * UserInterface/Views/CompletionSuggestionsView.css:
2041         (@media (prefers-color-scheme: dark)):
2042         * UserInterface/Views/ComputedStyleDetailsPanel.css:
2043         (@media (prefers-color-scheme: dark)):
2044         * UserInterface/Views/ComputedStyleSection.css:
2045         (@media (prefers-color-scheme: dark)):
2046         * UserInterface/Views/ConsoleMessageView.css:
2047         (@media (prefers-color-scheme: dark)):
2048         * UserInterface/Views/ConsolePrompt.css:
2049         (@media (prefers-color-scheme: dark)):
2050         * UserInterface/Views/DOMNodeDetailsSidebarPanel.css:
2051         (@media (prefers-color-scheme: dark)):
2052         * UserInterface/Views/DOMTreeOutline.css:
2053         (@media (prefers-color-scheme: dark)):
2054         * UserInterface/Views/DataGrid.css:
2055         (@media (prefers-color-scheme: dark)):
2056         * UserInterface/Views/DebuggerDashboardView.css:
2057         (@media (prefers-color-scheme: dark)):
2058         * UserInterface/Views/DebuggerSidebarPanel.css:
2059         (@media (prefers-color-scheme: dark)):
2060         * UserInterface/Views/DefaultDashboardView.css:
2061         (@media (prefers-color-scheme: dark)):
2062         * UserInterface/Views/DetailsSection.css:
2063         (@media (prefers-color-scheme: dark)):
2064         * UserInterface/Views/DividerNavigationItem.css:
2065         (@media (prefers-color-scheme: dark)):
2066         * UserInterface/Views/Editing.css:
2067         (@media (prefers-color-scheme: dark)):
2068         * UserInterface/Views/FindBanner.css:
2069         (@media (prefers-color-scheme: dark)):
2070         * UserInterface/Views/FontResourceContentView.css:
2071         (@media (prefers-color-scheme: dark)):
2072         * UserInterface/Views/FormattedValue.css:
2073         (@media (prefers-color-scheme: dark)):
2074         * UserInterface/Views/GeneralStyleDetailsSidebarPanel.css:
2075         (@media (prefers-color-scheme: dark)):
2076         * UserInterface/Views/HoverMenu.css:
2077         (@media (prefers-color-scheme: dark)):
2078         * UserInterface/Views/ImageResourceContentView.css:
2079         (@media (prefers-color-scheme: dark)):
2080         * UserInterface/Views/IndexedDatabaseObjectStoreContentView.css:
2081         (@media (prefers-color-scheme: dark)):
2082         * UserInterface/Views/LogContentView.css:
2083         (@media (prefers-color-scheme: dark)):
2084
2085         * UserInterface/Views/Main.css:
2086         (:root):
2087
2088         (@media (prefers-color-scheme: dark)):
2089         * UserInterface/Views/NetworkDetailView.css:
2090         (@media (prefers-color-scheme: dark)):
2091         * UserInterface/Views/NetworkTableContentView.css:
2092         (@media (prefers-color-scheme: dark)):
2093         * UserInterface/Views/NewTabContentView.css:
2094         (@media (prefers-color-scheme: dark)):
2095         * UserInterface/Views/ObjectPreviewView.css:
2096         (@media (prefers-color-scheme: dark)):
2097         * UserInterface/Views/ObjectTreePropertyTreeElement.css:
2098         (@media (prefers-color-scheme: dark)):
2099         * UserInterface/Views/OpenResourceDialog.css:
2100         (@media (prefers-color-scheme: dark)):
2101         * UserInterface/Views/ProgressView.css:
2102         (@media (prefers-color-scheme: dark)):
2103         * UserInterface/Views/QuickConsole.css:
2104         (@media (prefers-color-scheme: dark)):
2105         * UserInterface/Views/RecordingActionTreeElement.css:
2106         (@media (prefers-color-scheme: dark)):
2107         * UserInterface/Views/RecordingContentView.css:
2108         (@media (prefers-color-scheme: dark)):
2109         * UserInterface/Views/RecordingStateDetailsSidebarPanel.css:
2110         (@media (prefers-color-scheme: dark)):
2111         * UserInterface/Views/ResourceSecurityContentView.css:
2112         (@media (prefers-color-scheme: dark)):
2113         * UserInterface/Views/ResourceSizesContentView.css:
2114         (@media (prefers-color-scheme: dark)):
2115         * UserInterface/Views/ResourceTimingBreakdownView.css:
2116         (@media (prefers-color-scheme: dark)):
2117         * UserInterface/Views/ScopeBar.css:
2118         (@media (prefers-color-scheme: dark)):
2119         * UserInterface/Views/ScopeChainDetailsSidebarPanel.css:
2120         (@media (prefers-color-scheme: dark)):
2121         * UserInterface/Views/SearchBar.css:
2122         (@media (prefers-color-scheme: dark)):
2123         * UserInterface/Views/SearchSidebarPanel.css:
2124         (@media (prefers-color-scheme: dark)):
2125         * UserInterface/Views/SettingsTabContentView.css:
2126         (@media (prefers-color-scheme: dark)):
2127         * UserInterface/Views/ShaderProgramContentView.css:
2128         (@media (prefers-color-scheme: dark)):
2129         * UserInterface/Views/ShaderProgramTreeElement.css:
2130         (@media (prefers-color-scheme: dark)):
2131         * UserInterface/Views/SourceCodeTextEditor.css:
2132         (@media (prefers-color-scheme: dark)):
2133         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
2134         (@media (prefers-color-scheme: dark)):
2135         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.css:
2136         (@media (prefers-color-scheme: dark)):
2137         * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.css:
2138         (@media (prefers-color-scheme: dark)):
2139         * UserInterface/Views/SyntaxHighlightingDefaultTheme.css:
2140         (@media (prefers-color-scheme: dark)):
2141         * UserInterface/Views/TabBar.css:
2142         (@media (prefers-color-scheme: dark)):
2143         * UserInterface/Views/Table.css:
2144         (@media (prefers-color-scheme: dark)):
2145         * UserInterface/Views/TextEditor.css:
2146         (@media (prefers-color-scheme: dark)):
2147         * UserInterface/Views/TimelineDataGrid.css:
2148         (@media (prefers-color-scheme: dark)):
2149         * UserInterface/Views/TimelineIcons.css:
2150         (@media (prefers-color-scheme: dark)):
2151         * UserInterface/Views/TimelineOverview.css:
2152         (@media (prefers-color-scheme: dark)):
2153         * UserInterface/Views/Toolbar.css:
2154         (@media (prefers-color-scheme: dark)):
2155         * UserInterface/Views/TreeOutline.css:
2156         (@media (prefers-color-scheme: dark)):
2157         * UserInterface/Views/URLBreakpointPopover.css:
2158         (@media (prefers-color-scheme: dark)):
2159         * UserInterface/Views/Variables.css:
2160         (@media (prefers-color-scheme: dark)):
2161         * UserInterface/Views/WebSocketContentView.css:
2162         (@media (prefers-color-scheme: dark)):
2163
2164 2019-01-07  Devin Rousso  <drousso@apple.com>
2165
2166         Web Inspector: Audit: run arrow shouldn't be visible when running tests
2167         https://bugs.webkit.org/show_bug.cgi?id=192209
2168         <rdar://problem/46423615>
2169
2170         Reviewed by Brian Burg.
2171
2172         * UserInterface/Views/AuditTreeElement.js:
2173         (WI.AuditTreeElement.prototype.onattach):
2174         (WI.AuditTreeElement.prototype.ondetach):
2175         (WI.AuditTreeElement.prototype._updateLevel):
2176         (WI.AuditTreeElement.prototype._handleAuditManagerTestScheduled): Added.
2177         (WI.AuditTreeElement.prototype._handleAuditManagerTestCompleted): Added.
2178         * UserInterface/Views/AuditTreeElement.css: Added.
2179         (.tree-outline .item.audit:matches(.test-case, .test-group):not(.manager-active) > .status:hover > img): Added.
2180         (.tree-outline .item.audit.manager-active > .status > img.show-on-hover, .tree-outline .item.audit.test-group.expanded > .status:hover > :not(img), .tree-outline .item.audit.test-group-result.expanded > .status): Added.
2181         (.tree-outline .item.audit:matches(.test-case, .test-group) > .status:hover > img): Deleted.
2182         (.tree-outline .item.audit.test-group.expanded > .status:hover > :not(img), .tree-outline .item.audit.test-group-result.expanded > .status): Deleted.
2183
2184 2019-01-07  Devin Rousso  <drousso@apple.com>
2185
2186         Web Inspector: extend XHR breakpoints to work with fetch
2187         https://bugs.webkit.org/show_bug.cgi?id=185843
2188         <rdar://problem/40431027>
2189
2190         Reviewed by Matt Baker.
2191
2192         * UserInterface/Controllers/DOMDebuggerManager.js:
2193         (WI.DOMDebuggerManager):
2194         (WI.DOMDebuggerManager.supportsURLBreakpoints): Added.
2195         (WI.DOMDebuggerManager.prototype.get urlBreakpoints): Added.
2196         (WI.DOMDebuggerManager.prototype.urlBreakpointForURL): Added.
2197         (WI.DOMDebuggerManager.prototype.addURLBreakpoint): Added.
2198         (WI.DOMDebuggerManager.prototype.removeURLBreakpoint): Added.
2199         (WI.DOMDebuggerManager.prototype._speculativelyResolveBreakpoints):
2200         (WI.DOMDebuggerManager.prototype._updateURLBreakpoint): Added.
2201         (WI.DOMDebuggerManager.prototype._resolveURLBreakpoint): Added.
2202         (WI.DOMDebuggerManager.prototype._saveURLBreakpoints): Added.
2203         (WI.DOMDebuggerManager.prototype._urlBreakpointDisabledStateDidChange): Added.
2204         (WI.DOMDebuggerManager.prototype.get xhrBreakpoints): Deleted.
2205         (WI.DOMDebuggerManager.prototype.xhrBreakpointForURL): Deleted.
2206         (WI.DOMDebuggerManager.prototype.addXHRBreakpoint): Deleted.
2207         (WI.DOMDebuggerManager.prototype.removeXHRBreakpoint): Deleted.
2208         (WI.DOMDebuggerManager.prototype._updateXHRBreakpoint.breakpointUpdated): Deleted.
2209         (WI.DOMDebuggerManager.prototype._updateXHRBreakpoint): Deleted.
2210         (WI.DOMDebuggerManager.prototype._resolveXHRBreakpoint): Deleted.
2211         (WI.DOMDebuggerManager.prototype._saveXHRBreakpoints): Deleted.
2212         (WI.DOMDebuggerManager.prototype._xhrBreakpointDisabledStateDidChange): Deleted.
2213
2214         * UserInterface/Controllers/DebuggerManager.js:
2215         (WI.DebuggerManager.prototype._pauseReasonFromPayload):
2216
2217         * UserInterface/Views/DebuggerSidebarPanel.js:
2218         (WI.DebuggerSidebarPanel):
2219         (WI.DebuggerSidebarPanel.prototype.willDismissPopover):
2220         (WI.DebuggerSidebarPanel.prototype._addBreakpoint):
2221         (WI.DebuggerSidebarPanel.prototype._treeSelectionDidChange):
2222         (WI.DebuggerSidebarPanel.prototype._addTreeElement):
2223         (WI.DebuggerSidebarPanel.prototype._updatePauseReasonSection):
2224         (WI.DebuggerSidebarPanel.prototype._handleCreateBreakpointClicked):
2225
2226         * UserInterface/Views/NavigationSidebarPanel.js:
2227         (WI.NavigationSidebarPanel.prototype._isTreeElementWithoutRepresentedObject):
2228
2229         * UserInterface/Models/URLBreakpoint.js: Renamed from Source/WebInspectorUI/UserInterface/Models/XHRBreakpoint.js.
2230         * UserInterface/Views/URLBreakpointPopover.css: Renamed from Source/WebInspectorUI/UserInterface/Views/XHRBreakpointPopover.css.
2231         * UserInterface/Views/URLBreakpointPopover.js: Renamed from Source/WebInspectorUI/UserInterface/Views/XHRBreakpointPopover.js.
2232         * UserInterface/Views/URLBreakpointTreeElement.css: Renamed from Source/WebInspectorUI/UserInterface/Views/XHRBreakpointTreeElement.css.
2233         * UserInterface/Views/URLBreakpointTreeElement.js: Renamed from Source/WebInspectorUI/UserInterface/Views/XHRBreakpointTreeElement.js.
2234
2235         * UserInterface/Base/Setting.js:
2236         (WI.Setting.migrateValue): Added.
2237
2238         * UserInterface/Main.html:
2239         * UserInterface/Test.html:
2240
2241         * Localizations/en.lproj/localizedStrings.js:
2242
2243 2019-01-07  Devin Rousso  <drousso@apple.com>
2244
2245         Web Inspector: Network: show secure connection details per-request
2246         https://bugs.webkit.org/show_bug.cgi?id=191539
2247         <rdar://problem/45979891>
2248
2249         Reviewed by Joseph Pecoraro.
2250
2251         * UserInterface/Models/Resource.js:
2252         (WI.Resource):
2253         (WI.Resource.prototype.get security): Added.
2254         (WI.Resource.prototype.updateForResponse):
2255         (WI.Resource.prototype.updateWithMetrics):
2256         (WI.Resource.prototype.get responseSecurity): Deleted.
2257
2258         * UserInterface/Views/ResourceSecurityContentView.js:
2259         (WI.ResourceSecurityContentView):
2260         (WI.ResourceSecurityContentView.prototype.initialLayout):
2261         (WI.ResourceSecurityContentView.prototype.layout):
2262         (WI.ResourceSecurityContentView.prototype._refreshConnectionSection): Added.
2263         (WI.ResourceSecurityContentView.prototype._refreshCetificateSection):
2264         (WI.ResourceSecurityContentView.prototype._handleResourceMetricsDidChange): Added.
2265         * UserInterface/Views/ResourceSecurityContentView.css:
2266         (body[dir] .resource-security > section:matches(.connection, .certificate) > .details): Added.
2267         (@media (prefers-dark-interface) body[dir] .resource-security > section:matches(.connection, .certificate) > .details): Added.
2268         (body[dir] .resource-security > section.certificate > .details): Deleted.
2269         (@media (prefers-dark-interface) body[dir] .resource-security > section.certificate > .details): Deleted.
2270
2271         * Localizations/en.lproj/localizedStrings.js:
2272
2273 2019-01-07  Nikita Vasilyev  <nvasilyev@apple.com>
2274
2275         Web Inspector: "white" isn't recognized as a color keyword
2276         https://bugs.webkit.org/show_bug.cgi?id=193173
2277         <rdar://problem/47068595>
2278
2279         Reviewed by Joseph Pecoraro.
2280
2281         Attempt to parse "atom" token types as colors.
2282
2283         Display color picker only for color-aware properties. For instance,
2284         display it for "color: white" but not for "-apple-pay-button-style: white".
2285
2286         * UserInterface/Models/CSSKeywordCompletions.js:
2287         (addKeywordsForName):
2288         (WI.CSSKeywordCompletions.forProperty):
2289         (WI.CSSKeywordCompletions.isColorAwareProperty):
2290         * UserInterface/Views/SpreadsheetStyleProperty.js:
2291         (WI.SpreadsheetStyleProperty.prototype._renderValue):
2292         (WI.SpreadsheetStyleProperty.prototype._addColorTokens):
2293
2294 2019-01-04  Joseph Pecoraro  <pecoraro@apple.com>
2295
2296         Web Inspector: subclasses of WI.ClusterContentView don't save/restore content views after the initial view
2297         https://bugs.webkit.org/show_bug.cgi?id=192451
2298         <rdar://problem/46800958>
2299
2300         Reviewed by Devin Rousso.
2301
2302         * UserInterface/Models/BackForwardEntry.js:
2303         (WI.BackForwardEntry.prototype.prepareToHide):
2304         * UserInterface/Views/ClusterContentView.js:
2305         (WI.ClusterContentView.prototype.get shouldSaveStateOnHide):
2306         * UserInterface/Views/ContentView.js:
2307         (WI.ContentView.prototype.get shouldSaveStateOnHide):
2308         Allow ClusterContentViews to save its state whenever its hidden,
2309         this means it can be properly restored to the last state it had
2310         instead of the initial state it was shown with.
2311
2312 2019-01-04  Devin Rousso  <drousso@apple.com>
2313
2314         Web Inspector: Audit: disable breakpoints when running Audit
2315         https://bugs.webkit.org/show_bug.cgi?id=193158
2316         <rdar://problem/47057083>
2317
2318         Reviewed by Joseph Pecoraro.
2319
2320         * UserInterface/Controllers/DebuggerManager.js:
2321         (WI.DebuggerManager):
2322         (WI.DebuggerManager.prototype._startDisablingBreakpointsTemporarily):
2323         (WI.DebuggerManager.prototype._stopDisablingBreakpointsTemporarily):
2324         (WI.DebuggerManager.prototype._handleAuditManagerTestScheduled): Added.
2325         (WI.DebuggerManager.prototype._handleAuditManagerTestCompleted): Added.
2326
2327         * UserInterface/Views/DebuggerSidebarPanel.js:
2328         (WI.DebuggerSidebarPanel.prototype._timelineCapturingWillStart):
2329         (WI.DebuggerSidebarPanel.prototype._timelineCapturingStopped):
2330         (WI.DebuggerSidebarPanel.prototype._handleAuditManagerTestScheduled): Added.
2331         (WI.DebuggerSidebarPanel.prototype._handleAuditManagerTestCompleted): Added.
2332         (WI.DebuggerSidebarPanel.prototype._updateBreakpointsDisabledBanner):
2333         * UserInterface/Views/DebuggerSidebarPanel.css:
2334         (.sidebar > .panel.navigation.debugger .warning-banner + .warning-banner): Added.
2335
2336         * UserInterface/Base/Main.js:
2337         (WI.loaded):
2338         * UserInterface/Test/Test.js:
2339         (WI.loaded):
2340         Move `WI.auditManager` higher in the managers list so that it can be used in
2341         `WI.DebuggerManager`'s constructor.
2342
2343         * Localizations/en.lproj/localizedStrings.js:
2344
2345 2019-01-04  Joseph Pecoraro  <pecoraro@apple.com>
2346
2347         Web Inspector: Add a Setting Toggle for Source Maps
2348         https://bugs.webkit.org/show_bug.cgi?id=193148
2349
2350         Reviewed by Devin Rousso.
2351
2352         * UserInterface/Controllers/NetworkManager.js:
2353         (WI.NetworkManager.prototype.downloadSourceMap):
2354         Don't download source maps if the setting is disabled.
2355
2356         * UserInterface/Base/Setting.js:
2357         * UserInterface/Views/SettingsTabContentView.js:
2358         (WI.SettingsTabContentView.prototype._createGeneralSettingsView):
2359         Settings toggle for source maps. Enabled by default.
2360
2361         * Localizations/en.lproj/localizedStrings.js:
2362
2363 2019-01-04  Joseph Pecoraro  <pecoraro@apple.com>
2364
2365         Web Inspector: Include `globalThis` in default JavaScript completions
2366         https://bugs.webkit.org/show_bug.cgi?id=193147
2367
2368         Reviewed by Devin Rousso.
2369
2370         * UserInterface/Controllers/CodeMirrorCompletionController.js:
2371         Add `globalThis` which is a new global value.
2372
2373 2019-01-03  Devin Rousso  <drousso@apple.com>
2374
2375         Web Inspector: conic-gradient color picker doesn't accurately show color when saturation value is not 100%
2376         https://bugs.webkit.org/show_bug.cgi?id=192729
2377         <rdar://problem/46746815>
2378
2379         Reviewed by Joseph Pecoraro.
2380
2381         Rework `WI.ColorWheel` to use similar canvas drawing logic as `WI.LegacyColorWheel` so that
2382         it's able to adjust the saturation value as the pixels gets closer to the center.
2383
2384         * UserInterface/Models/Color.js:
2385         (WI.Color.rgb2hsl): Added.
2386         (WI.Color.hsl2rgb): Added.
2387         (WI.Color.cmyk2rgb):
2388         (WI.Color.prototype.isKeyword):
2389         (WI.Color.prototype._toRGBString):
2390         (WI.Color.prototype._toRGBAString):
2391         (WI.Color.prototype._toHSLString):
2392         (WI.Color.prototype._toHSLAString):
2393         (WI.Color.prototype._rgbaToHSLA):
2394         (WI.Color.prototype._hslaToRGBA):
2395         (WI.Color.rgb2hsv): Deleted.
2396         (WI.Color.hsv2rgb): Deleted.
2397         (WI.Color.prototype._rgbToHSL): Deleted.
2398         (WI.Color.prototype._hslToRGB): Deleted.
2399         Adjust the conversion functions of `WI.Color` to be more accurate.
2400
2401         * UserInterface/Views/ColorWheel.js:
2402         (WI.ColorWheel):
2403         (WI.ColorWheel.prototype.set dimension):
2404         (WI.ColorWheel.prototype.set brightness):
2405         (WI.ColorWheel.prototype.get tintedColor):
2406         (WI.ColorWheel.prototype.set tintedColor):
2407         (WI.ColorWheel.prototype._updateColorForMouseEvent):
2408         (WI.ColorWheel.prototype._updateCanvas): Added.
2409         (WI.ColorWheel.prototype._updateGradient): Deleted.
2410         * UserInterface/Views/ColorWheel.css:
2411         (.color-wheel > canvas): Added.
2412         (.color-wheel > .gradient): Deleted.
2413
2414         * UserInterface/Views/ColorPicker.js:
2415         (WI.ColorPicker):
2416         (WI.ColorPicker.prototype.set color):
2417         (WI.ColorPicker.prototype.sliderValueDidChange):
2418         (WI.ColorPicker.prototype._updateSliders):
2419         (WI.ColorPicker.prototype._showColorComponentInputs):
2420         (WI.ColorPicker.supportsConicGradient): Deleted.
2421
2422         * UserInterface/Main.html:
2423
2424         * UserInterface/Views/LegacyColorWheel.js: Removed.
2425
2426 2019-01-02  Nikita Vasilyev  <nvasilyev@apple.com>
2427
2428         Web Inspector: Styles: selection lost when inspector is blurred
2429         https://bugs.webkit.org/show_bug.cgi?id=192124
2430         <rdar://problem/46800965>
2431
2432         Reviewed by Devin Rousso.
2433
2434         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
2435         (body:matches(.window-docked-inactive, .window-inactive) .spreadsheet-style-declaration-editor .property.selected):
2436         Selection should be gray when Web Inspector window isn't focused.
2437
2438         * UserInterface/Views/SpreadsheetStyleProperty.js:
2439
2440 2019-01-02  Nikita Vasilyev  <nvasilyev@apple.com>
2441
2442         Web Inspector: Styles: it shouldn't be possible to delete read-only properties
2443         https://bugs.webkit.org/show_bug.cgi?id=193099
2444         <rdar://problem/47016335>
2445
2446         Reviewed by Devin Rousso.
2447
2448         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
2449         (WI.SpreadsheetCSSStyleDeclarationEditor):
2450         Drive-by: Forward Delete should work the same way as Delete (Backspace).
2451
2452 2019-01-02  Devin Rousso  <webkit@devinrousso.com>
2453
2454         Web Inspector: Implement `queryObjects` Command Line API
2455         https://bugs.webkit.org/show_bug.cgi?id=176766
2456         <rdar://problem/34890689>
2457
2458         Reviewed by Joseph Pecoraro.
2459
2460         * UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
2461         (WI.JavaScriptRuntimeCompletionProvider.completionControllerCompletionsNeeded.receivedPropertyNames):
2462         Add `queryObjects` to the list of command line functions.
2463
2464 2018-12-21  Devin Rousso  <drousso@apple.com>
2465
2466         Web Inspector: Styles Redesign: remove unused CSS style icons
2467         https://bugs.webkit.org/show_bug.cgi?id=192999
2468         <rdar://problem/46912094>
2469
2470         Reviewed by Matt Baker.
2471
2472         * UserInterface/Main.html:
2473         * UserInterface/Views/StyleRuleIcons.css: Removed.
2474         * UserInterface/Images/StyleRule.svg: Removed.
2475         * UserInterface/Images/StyleRuleInheritedElement.svg: Removed.
2476         * UserInterface/Images/StyleRulePseudoElement.svg: Removed.
2477
2478         * WebInspectorUI.vcxproj/WebInspectorUI.vcxproj:
2479         * WebInspectorUI.vcxproj/WebInspectorUI.vcxproj.filters:
2480
2481 2018-12-21  Nikita Vasilyev  <nvasilyev@apple.com>
2482
2483         Web Inspector: Styles: editing focus lost when inspector is blurred
2484         https://bugs.webkit.org/show_bug.cgi?id=192123
2485         <rdar://problem/46800966>
2486
2487         Reviewed by Devin Rousso.
2488
2489         * UserInterface/Views/SpreadsheetSelectorField.js:
2490         (WI.SpreadsheetSelectorField.prototype._handleBlur):
2491         * UserInterface/Views/SpreadsheetTextField.js:
2492         (WI.SpreadsheetTextField.prototype._handleBlur):
2493
2494 2018-12-21  Devin Rousso  <drousso@apple.com>
2495
2496         Web Inspector: Settings: experimental setting editors are misaligned in other locales
2497         https://bugs.webkit.org/show_bug.cgi?id=192971
2498         <rdar://problem/46718451>
2499
2500         Reviewed by Joseph Pecoraro.
2501
2502         * UserInterface/Views/SettingsTabContentView.css:
2503         (.content-view.settings > .settings-view > .container):
2504         (.content-view.settings > .settings-view > .container > .title):
2505
2506 2018-12-21  Devin Rousso  <drousso@apple.com>
2507
2508         Web Inspector: update scroll position when revealing a virtualized WI.DataGridNode
2509         https://bugs.webkit.org/show_bug.cgi?id=192992
2510         <rdar://problem/46886427>
2511
2512         Reviewed by Joseph Pecoraro.
2513
2514         When `reveal`ing a `WI.DataGridNode`, if it is not currently in the DOM tree (e.g. it's been
2515         virtualized by it's owner `WI.DataGrid`), we need to scroll to it's position so that it gets
2516         added to the DOM tree before it can be revealed/selected.
2517
2518         * UserInterface/Views/DataGrid.js:
2519         (WI.DataGrid.prototype.layout):
2520         (WI.DataGrid.prototype.updateVisibleRows):
2521         (WI.DataGrid.prototype._updateVisibleRows): Deleted.
2522
2523         * UserInterface/Views/DataGridNode.js:
2524         (WI.DataGridNode.prototype.reveal):
2525
2526 2018-12-20  Nikita Vasilyev  <nvasilyev@apple.com>
2527
2528         Web Inspector: Dark Mode: Type profiler popovers have black text on dark background
2529         https://bugs.webkit.org/show_bug.cgi?id=192916
2530         <rdar://problem/46863518>
2531
2532         Reviewed by Devin Rousso.
2533
2534         * UserInterface/Views/SourceCodeTextEditor.css:
2535         (.popover .debugger-popover-content > .body):
2536         * UserInterface/Views/TypeTreeElement.css:
2537         (.item.type-tree-element.prototype):
2538         (.item.type-tree-element.prototype:hover,):
2539         * UserInterface/Views/TypeTreeView.css:
2540         (.type-tree):
2541         * UserInterface/Views/Variables.css:
2542         (:root):
2543
2544 2018-12-20  Nikita Vasilyev  <nvasilyev@apple.com>
2545
2546         Web Inspector: Styles: Pressing Esc when editing name/value should select entire property
2547         https://bugs.webkit.org/show_bug.cgi?id=192919
2548
2549         Reviewed by Devin Rousso.
2550
2551         - Esc still hides the completion popover.
2552         - Esc still discards changes.
2553         - When there's no completion popover, Esc selects outer scope.
2554           I.e., it goes from editing name/value to selecting the entire property.
2555         - Pressing Esc for newly added properties discards those properties.
2556
2557         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
2558         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyRemoved):
2559         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyDidPressEsc):
2560         * UserInterface/Views/SpreadsheetStyleProperty.js:
2561         (WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidPressEsc):
2562         * UserInterface/Views/SpreadsheetTextField.js:
2563         (WI.SpreadsheetTextField.prototype._discardChange):
2564         (WI.SpreadsheetTextField.prototype._handleKeyDown):
2565
2566 2018-12-20  Joseph Pecoraro  <pecoraro@apple.com>
2567
2568         Web Inspector: Charles Proxy errors opening har files exported from Safari (invalid startedDateTime)
2569         https://bugs.webkit.org/show_bug.cgi?id=192959
2570         <rdar://problem/46863411>
2571
2572         Reviewed by Brian Burg.
2573
2574         * UserInterface/Views/NetworkTableContentView.js:
2575         (WI.NetworkTableContentView.prototype.tableCellContextMenuClicked):
2576         (WI.NetworkTableContentView.prototype._updateExportButton):
2577         (WI.NetworkTableContentView.prototype._canExportHAR):
2578         Disallow HAR export if we don't have load data, such as the requestSentDate for
2579         the main resource or sub-resources.
2580
2581         (WI.NetworkTableContentView.prototype._HARResources):
2582         Only export resources that have load data.
2583
2584 2018-12-20  Joseph Pecoraro  <pecoraro@apple.com>
2585
2586         Web Inspector: Autoformat doesn't work on icloud.com (javascript-packed.js)
2587         https://bugs.webkit.org/show_bug.cgi?id=192946
2588         <rdar://problem/42546126>
2589
2590         Rubber-stamped by Devin Rousso.
2591
2592         * UserInterface/Base/Utilities.js:
2593         (whitespaceRatio):
2594         (isTextLikelyMinified):
2595         Check the first 2500 and the last 2500 characters whitespace ratio.
2596         If either is below 20% then treat as minified.
2597
2598 2018-12-20  Joseph Pecoraro  <pecoraro@apple.com>
2599
2600         ITMLKit Inspector: Elements tab does not show DOM Tree
2601         https://bugs.webkit.org/show_bug.cgi?id=192910
2602         <rdar://problem/46680585>
2603
2604         Reviewed by Brian Burg.
2605
2606         * UserInterface/Protocol/Connection.js:
2607         (InspectorBackend.Connection.prototype._dispatchEvent):
2608         Better logging for errors.
2609
2610         * UserInterface/Base/Main.js:
2611         * UserInterface/Controllers/AppController.js:
2612         (WI.AppController.prototype.activateExtraDomains):
2613         Let Targets get a chance to activate extra domains.
2614         Perform a little more work in these cases.
2615
2616         * UserInterface/Protocol/Target.js:
2617         (WI.Target):
2618         (WI.Target.prototype.activateExtraDomain):
2619         Expose agents for domains that are active.
2620         Expose agents for extra domains when they are activated.
2621
2622 2018-12-20  Joseph Pecoraro  <pecoraro@apple.com>
2623
2624         ITMLKit Inspector: Computed Style Box Model section throws exceptions
2625         https://bugs.webkit.org/show_bug.cgi?id=192911
2626         <rdar://problem/46861112>
2627
2628         Reviewed by Matt Baker.
2629
2630         * UserInterface/Views/BoxModelDetailsSectionRow.js:
2631         (WI.BoxModelDetailsSectionRow.prototype._updateMetrics.createBoxPartElement):
2632         (WI.BoxModelDetailsSectionRow.prototype._updateMetrics.createContentAreaElement):
2633         (WI.BoxModelDetailsSectionRow.prototype._updateMetrics):
2634         ITMLKit doesn't always provide a display/position/width/height etc properties.
2635         Protect against this, and just show an empty message in the box model section
2636         if those properties do not exist.
2637
2638 2018-12-20  Devin Rousso  <drousso@apple.com>
2639
2640         Web Inspector: UIString should take an optional key and description to aid localization
2641         https://bugs.webkit.org/show_bug.cgi?id=153962
2642         <rdar://problem/24542505>
2643
2644         Reviewed by Brian Burg.
2645
2646         * UserInterface/Base/LoadLocalizedStrings.js:
2647         (WI.UIString):
2648
2649         * UserInterface/Test/Test.js:
2650         (WI.UIString):
2651
2652         * UserInterface/Views/AuditTestGroupContentView.js:
2653         (WI.AuditTestGroupContentView.prototype.initialLayout):
2654
2655 2018-12-20  Devin Rousso  <drousso@apple.com>
2656
2657         Web Inspector: Audits: don't cache default audits
2658         https://bugs.webkit.org/show_bug.cgi?id=192918
2659         <rdar://problem/46626543>
2660
2661         Reviewed by Brian Burg.
2662
2663         Instead of adding the default audits to the "audits" `WI.ObjectStore`, which preserves them
2664         across WebInspector sessions, load them every time WebInspector is opened (unless there are
2665         existing audits) so that the localized strings are able to respond to locale changes.
2666
2667         * UserInterface/Controllers/AuditManager.js:
2668         (WI.AuditManager.prototype.removeTest):
2669         (WI.AuditManager.prototype.addDefaultTestsIfNeeded):
2670
2671 2018-12-20  Devin Rousso  <drousso@apple.com>
2672
2673         Web Inspector: Dark Mode: unreadable background color for tables containing object previews
2674         https://bugs.webkit.org/show_bug.cgi?id=192887
2675         <rdar://problem/46855270>
2676
2677         Reviewed by Brian Burg.
2678
2679         * UserInterface/Views/LogContentView.css:
2680         (.console-messages:focus .console-item .data-grid tr.selected td:not(:last-child)): Added.
2681         (@media (prefers-dark-interface) .console-item .data-grid tr.selected): Added.
2682         (@media (prefers-dark-interface) .console-messages:focus .console-item.selected .data-grid tr.selected): Added.
2683         (@media (prefers-dark-interface) .console-messages:focus .console-item .data-grid tr.selected td:not(:last-child)): Added.
2684
2685         * UserInterface/Views/IndexedDatabaseObjectStoreContentView.css:
2686         (.content-view.indexed-database-object-store > .data-grid tr.selected):
2687         (.content-view.indexed-database-object-store > .data-grid:focus tr.selected): Added.
2688         (@media (prefers-dark-interface) .content-view.indexed-database-object-store > .data-grid tr.selected): Added.
2689         (@media (prefers-dark-interface) .content-view.indexed-database-object-store > .data-grid:focus tr.selected): Added.
2690         (@media (prefers-dark-interface) .content-view.indexed-database-object-store > .data-grid:focus tr.selected td:not(:last-child)): Added.
2691
2692 2018-12-19  Devin Rousso  <drousso@apple.com>
2693
2694         Web Inspector: Audit: fix descriptions for default tests
2695         https://bugs.webkit.org/show_bug.cgi?id=192764
2696         <rdar://problem/46729437>
2697
2698         Reviewed by Matt Baker.
2699
2700         * UserInterface/Controllers/AuditManager.js:
2701         (WI.AuditManager.prototype.addDefaultTestsIfNeeded):
2702
2703         * Localizations/en.lproj/localizedStrings.js:
2704
2705 2018-12-19  Nikita Vasilyev  <nvasilyev@apple.com>
2706
2707         Web Inspector: "E" icon on debugger dashboard is too close to current function name
2708         https://bugs.webkit.org/show_bug.cgi?id=192915
2709
2710         Reviewed by Matt Baker.
2711
2712         * UserInterface/Views/DebuggerDashboardView.css:
2713         (.dashboard.debugger > .location):
2714         (body[dir=ltr] .dashboard.debugger > .location :matches(.function-icon, .event-listener-icon)):
2715         (body[dir=rtl] .dashboard.debugger > .location :matches(.function-icon, .event-listener-icon)):
2716         (.dashboard.debugger > .location .function-icon): Deleted.
2717         (body[dir=ltr] .dashboard.debugger > .location .function-icon): Deleted.
2718         (body[dir=rtl] .dashboard.debugger > .location .function-icon): Deleted.
2719
2720 2018-12-19  Nikita Vasilyev  <nvasilyev@apple.com>
2721
2722         Web Inspector: Dark Mode: ThreadTreeElement status icon is hard to see when hovered
2723         https://bugs.webkit.org/show_bug.cgi?id=192097
2724         <rdar://problem/46318421>
2725
2726         Reviewed by Matt Baker.
2727
2728         * UserInterface/Views/ThreadTreeElement.css:
2729         (.tree-outline > .item.thread .status-button.resume):
2730         (.tree-outline > .item.thread .status-button.resume:active):
2731
2732 2018-12-19  Devin Rousso  <drousso@apple.com>
2733
2734         Web Inspector: Uncaught Exception: TypeError: null is not an object (evaluating 'effectiveDOMNode.enabledPseudoClasses')
2735         https://bugs.webkit.org/show_bug.cgi?id=192783
2736
2737         Reviewed by Joseph Pecoraro.
2738
2739         * UserInterface/Views/GeneralStyleDetailsSidebarPanel.js:
2740         (WI.GeneralStyleDetailsSidebarPanel.prototype._forcedPseudoClassCheckboxChanged):
2741         (WI.GeneralStyleDetailsSidebarPanel.prototype._updatePseudoClassCheckboxes):
2742
2743 2018-12-19  Devin Rousso  <drousso@apple.com>
2744
2745         Web Inspector: REGRESSION (r237195): Timelines: selecting a rendering frame row moves the time selection
2746         https://bugs.webkit.org/show_bug.cgi?id=192773
2747         <rdar://problem/46782446>
2748
2749         Reviewed by Joseph Pecoraro.
2750
2751         * UserInterface/Views/TimelineOverview.js:
2752         (WI.TimelineOverview.prototype._recordSelected):
2753         The Frames timeline uses `frameIndex` instead of `startTime`/`endTime`, so when trying to
2754         ensure that the selected record is within the filtered range, use `frameIndex` instead.
2755         The associated `WI.TimelineRuler` will already be using an index-based approach for
2756         selection, so this will match.
2757
2758 2018-12-19  Devin Rousso  <drousso@apple.com>
2759
2760         Web Inspector: Canvas: the recording auto-capture input shouldn't start focused
2761         https://bugs.webkit.org/show_bug.cgi?id=192454
2762
2763         Reviewed by Joseph Pecoraro.
2764
2765         * UserInterface/Views/CanvasOverviewContentView.js:
2766         (WI.CanvasOverviewContentView.prototype._updateRecordingAutoCaptureCheckboxLabel):
2767         (WI.CanvasOverviewContentView.prototype._handleCanvasRecordingAutoCaptureFrameCountChanged):
2768
2769 2018-12-19  Nikita Vasilyev  <nvasilyev@apple.com>
2770
2771         Web Inspector: Styles: shift-clicking a color-swatch to change formats starts editing the color
2772         https://bugs.webkit.org/show_bug.cgi?id=192784
2773         <rdar://problem/46801028>
2774
2775         Reviewed by Devin Rousso.
2776
2777         * UserInterface/Views/SpreadsheetStyleProperty.js:
2778         (WI.SpreadsheetStyleProperty.prototype._createInlineSwatch):
2779
2780 2018-12-19  Matt Baker  <mattbaker@apple.com>
2781
2782         Web Inspector: Elements tab: arrow key after undoing a DOM node delete selects the wrong element
2783         https://bugs.webkit.org/show_bug.cgi?id=192871
2784         <rdar://problem/46849060>
2785
2786         Reviewed by Devin Rousso.
2787
2788         Undoing a DOM node removal reinserts the node into the DOMTreeOutline.
2789         When the reinserted node precedes the selected node in the tree, the
2790         SelectionController should update `_lastSelectedIndex`.
2791
2792         * UserInterface/Controllers/SelectionController.js:
2793         (WI.SelectionController.prototype.didInsertItem):
2794
2795 2018-12-19  Devin Rousso  <drousso@apple.com>
2796
2797         Web Inspector: Audit: provide localization support for % pass display
2798         https://bugs.webkit.org/show_bug.cgi?id=192870
2799         <rdar://problem/46779245>
2800
2801         Reviewed by Brian Burg.
2802
2803         * UserInterface/Views/AuditTestGroupContentView.js:
2804         (WI.AuditTestGroupContentView.prototype.initialLayout):
2805         (WI.AuditTestGroupContentView.prototype.layout):
2806         * UserInterface/Views/AuditTestGroupContentView.css:
2807         (.content-view.audit-test-group > header > .percentage-pass):
2808         (.content-view.audit-test-group > header > .percentage-pass > span): Added.
2809         (@media (prefers-dark-interface) .content-view.audit-test-group > header > .percentage-pass): Added.
2810         (@media (prefers-dark-interface) .content-view.audit-test-group > header > .percentage-pass > span): Added.
2811         (.content-view.audit-test-group > header > .percentage-pass:not(:empty)::after): Deleted.
2812
2813         * Localizations/en.lproj/localizedStrings.js:
2814
2815 2018-12-19  Nikita Vasilyev  <nvasilyev@apple.com>
2816
2817         Web Inspector: Computed: make UI more usable when the panel is narrow
2818         https://bugs.webkit.org/show_bug.cgi?id=192578
2819         <rdar://problem/46615753>
2820
2821         Reviewed by Devin Rousso.
2822
2823         * UserInterface/Views/ComputedStyleSection.css:
2824         (.computed-style-section .computed-property-item .property-traces):
2825         (.computed-style-section .computed-property-item.expanded .disclosure-button):
2826         (.computed-style-section .computed-property-item .property-trace-item):
2827         (.computed-style-section .computed-property-item .property-trace-item::before):
2828         (.computed-style-section .computed-property-item .property):
2829         (.computed-style-section .computed-property-item .property-trace-item .selector):
2830         Allow CSS property values and selectors to take more than one line.
2831
2832         (.computed-style-section .property-trace-item .property .name,):
2833         * UserInterface/Views/ComputedStyleSection.js:
2834         (WI.ComputedStyleSection.prototype._createTrace):
2835         * UserInterface/Views/SpreadsheetStyleProperty.js:
2836         (WI.SpreadsheetStyleProperty.prototype.update):
2837
2838 2018-12-18  Simon Fraser  <simon.fraser@apple.com>
2839
2840         Web Inspector: Timelines: correctly label Intersection Observer callbacks
2841         https://bugs.webkit.org/show_bug.cgi?id=192669
2842         <rdar://problem/46702490>
2843
2844         Reviewed by Joseph Pecoraro.
2845
2846         Add InspectorInstrumentation::willFireObserverCallback() and use it to wrap calls
2847         to Intersection Observer, Performance Observer and Mutation Observer callbacks so 
2848         that they get correctly labeled in the Inspector timeline.
2849
2850         * Localizations/en.lproj/localizedStrings.js:
2851         * UserInterface/Controllers/TimelineManager.js:
2852         (WI.TimelineManager.prototype._processRecord):
2853         * UserInterface/Models/ScriptTimelineRecord.js:
2854         (WI.ScriptTimelineRecord.EventType.displayName):
2855         * UserInterface/Views/TimelineTabContentView.js:
2856         (WI.TimelineTabContentView.iconClassNameForRecord):
2857
2858 2018-12-19  Devin Rousso  <drousso@apple.com>
2859
2860         Web Inspector: Audit: "Clear Filters" button gets clipped when window is vertically small
2861         https://bugs.webkit.org/show_bug.cgi?id=192868
2862         <rdar://problem/46780400>
2863
2864         Reviewed by Matt Baker.
2865
2866         * UserInterface/Views/Main.css:
2867         (.message-text-view):
2868
2869 2018-12-19  Nikita Vasilyev  <nvasilyev@apple.com>
2870
2871         Web Inspector: Dark Mode: selected text is too light when Inspector window is inactive
2872         https://bugs.webkit.org/show_bug.cgi?id=190542
2873         <rdar://problem/45238712>
2874
2875         Reviewed by Devin Rousso.
2876
2877         * UserInterface/Views/CodeMirrorOverrides.css:
2878         (.CodeMirror .CodeMirror-selected):
2879
2880 2018-12-19  Nikita Vasilyev  <nvasilyev@apple.com>
2881
2882         Web Inspector: column sort controls in Layers tab sidebar don't render correctly in dark mode
2883         https://bugs.webkit.org/show_bug.cgi?id=192845
2884
2885         Reviewed by Devin Rousso.
2886
2887         * UserInterface/Views/DataGrid.css:
2888         (@media (prefers-dark-interface)):
2889         (.data-grid th.sortable:active):
2890         Drive-by: replace obnoxiously light background of the pressed header with a more subtle gray.
2891
2892         (.data-grid th.sort-ascending > div:first-child::after, .data-grid th.sort-descending > div:first-child::after):
2893         Invert colors of the arrow glyph.
2894
2895 2018-12-18  Devin Rousso  <drousso@apple.com>
2896
2897         Web Inspector: Layers: increase default column width for other localizations
2898         https://bugs.webkit.org/show_bug.cgi?id=192812
2899         <rdar://problem/46628625>
2900
2901         Reviewed by Brian Burg.
2902
2903         * UserInterface/Views/LayerDetailsSidebarPanel.js:
2904         (WI.LayerDetailsSidebarPanel.prototype._buildDataGrid):
2905         * UserInterface/Views/LayerTreeDetailsSidebarPanel.js:
2906         (WI.LayerTreeDetailsSidebarPanel.prototype._buildDataGridSection):
2907
2908 2018-12-18  Joseph Pecoraro  <pecoraro@apple.com>
2909
2910         Web Inspector: m3u8 content not shown, it should be text
2911         https://bugs.webkit.org/show_bug.cgi?id=192731
2912         <rdar://problem/46747728>
2913
2914         Reviewed by Devin Rousso.
2915
2916         * UserInterface/Base/MIMETypeUtilities.js:
2917         (WI.shouldTreatMIMETypeAsText):
2918         Support m3u8/m3u files as text.
2919
2920 2018-12-17  Devin Rousso  <drousso@apple.com>
2921
2922         Web Inspector: Canvas: path view is misaligned
2923         https://bugs.webkit.org/show_bug.cgi?id=192761
2924
2925         Reviewed by Joseph Pecoraro.
2926
2927         * UserInterface/Views/RecordingContentView.css:
2928         (.content-view:not(.tab).recording :matches(img, canvas)):
2929         (.content-view:not(.tab).recording canvas.path):
2930
2931 2018-12-17  Devin Rousso  <drousso@apple.com>
2932
2933         Web Inspector: Audit: add plural result strings
2934         https://bugs.webkit.org/show_bug.cgi?id=192769
2935         <rdar://problem/46628680>
2936
2937         Reviewed by Brian Burg.
2938
2939         * UserInterface/Views/AuditTestContentView.js:
2940         (WI.AuditTestContentView.prototype.showNoResultDataPlaceholder):
2941
2942         * UserInterface/Views/AuditTestGroupContentView.js:
2943         (WI.AuditTestGroupContentView.prototype.layout):
2944
2945         * Localizations/en.lproj/localizedStrings.js:
2946
2947 2018-12-17  Devin Rousso  <drousso@apple.com>
2948
2949         Web Inspector: Settings: add singular "space" UIString
2950         https://bugs.webkit.org/show_bug.cgi?id=192766
2951         <rdar://problem/46776948>
2952
2953         Reviewed by Brian Burg.
2954
2955         * UserInterface/Views/SettingEditor.js:
2956         (WI.SettingEditor):
2957         (WI.SettingEditor.prototype.get label):
2958         (WI.SettingEditor.prototype.set label): Added.
2959
2960         * UserInterface/Views/SettingsTabContentView.js:
2961         (WI.SettingsTabContentView.prototype._createGeneralSettingsView):
2962         (WI.SettingsTabContentView.prototype._createGeneralSettingsView.addSpacesSetting): Added.
2963         (WI.SettingsTabContentView.prototype._createGeneralSettingsView.addSpacesSetting.updateLabel): Added.
2964
2965         * Localizations/en.lproj/localizedStrings.js:
2966
2967 2018-12-15  Nikita Vasilyev  <nvasilyev@apple.com>
2968
2969         Web Inspector: Styles: toggling selected properties may cause data corruption
2970         https://bugs.webkit.org/show_bug.cgi?id=192396
2971         <rdar://problem/46478383>
2972
2973         Reviewed by Devin Rousso.
2974
2975         Uncommenting a property after a commented out property used to insert an unnecessary semicolon,
2976         and not updating ranges of the following properties.
2977
2978         For example:
2979
2980             /* color: red; */
2981             /* font-size: 12px */
2982
2983         Uncommenting `font-size` would result in something like this:
2984
2985             /* color: red; */; font-size: 12px
2986                              ^
2987                              unnecessary semicolon
2988
2989         Now the semicolon doesn't get inserted and the white space is preserved better:
2990
2991             /* color: red; */
2992             font-size: 12px
2993
2994         * UserInterface/Models/CSSProperty.js:
2995         (WI.CSSProperty.prototype._updateOwnerStyleText):
2996         (WI.CSSProperty.prototype._appendSemicolonIfNeeded): Removed.
2997         (WI.CSSProperty.prototype._prependSemicolonIfNeeded): Added.
2998
2999         * UserInterface/Views/SpreadsheetStyleProperty.js:
3000         (WI.SpreadsheetStyleProperty.prototype.remove):
3001         (WI.SpreadsheetStyleProperty.prototype.update):
3002         (WI.SpreadsheetStyleProperty.prototype._handleNameChange):
3003         (WI.SpreadsheetStyleProperty.prototype._handleValueChange):
3004         Style declaration should be locked while editing. Add asserts to ensure this.
3005
3006 2018-12-14  Matt Baker  <mattbaker@apple.com>
3007
3008         Web Inspector: REGRESSION(r238599): Uncaught Exception: TypeError: null is not an object (evaluating 'treeElement.listItemElement.classList')
3009         https://bugs.webkit.org/show_bug.cgi?id=192090
3010         <rdar://problem/46318614>
3011
3012         Reviewed by Devin Rousso.
3013
3014         * UserInterface/Views/TreeOutline.js:
3015         (WI.TreeOutline.prototype.selectionControllerSelectionDidChange):
3016         Check that `listItemElement` is valid before accessing it to update class
3017         names. The selection can change before the TreeElement has been attached.
3018
3019 2018-12-14  Matt Baker  <mattbaker@apple.com>
3020
3021         Web Inspector: Cookies view should use model objects instead of raw payload data
3022         https://bugs.webkit.org/show_bug.cgi?id=189533
3023         <rdar://problem/44364183>
3024
3025         Reviewed by Joseph Pecoraro and Devin Rousso.
3026
3027         * UserInterface/Models/Cookie.js:
3028         (WI.Cookie):
3029         (WI.Cookie.fromPayload):
3030         (WI.Cookie.parseSetCookieResponseHeader):
3031         (WI.Cookie.prototype.get type):
3032         (WI.Cookie.prototype.get name):
3033         (WI.Cookie.prototype.get value):
3034         (WI.Cookie.prototype.get header):
3035         (WI.Cookie.prototype.get expires):
3036         (WI.Cookie.prototype.get maxAge):
3037         (WI.Cookie.prototype.get path):
3038         (WI.Cookie.prototype.get domain):
3039         (WI.Cookie.prototype.get secure):
3040         (WI.Cookie.prototype.get httpOnly):
3041         (WI.Cookie.prototype.get sameSite):
3042         (WI.Cookie.prototype.get size):
3043         (WI.Cookie.prototype.get url):
3044         (WI.Cookie.prototype.expirationDate):
3045         Cleanup Cookie object; add pubic getters for data, `url` property,
3046         static `fromPayload` method, and calculate `_size` if missing.
3047
3048         * UserInterface/Views/CookieStorageContentView.js:
3049         (WI.CookieStorageContentView.prototype.tableDidRemoveRows):
3050         (WI.CookieStorageContentView.prototype._reloadCookies):
3051         Create Cookie objects from the payload instead of using raw payload data.
3052
3053 2018-12-13  Devin Rousso  <drousso@apple.com>
3054
3055         Web Inspector: remove DOM.BackendNodeId and associated commands/events
3056         https://bugs.webkit.org/show_bug.cgi?id=192478
3057
3058         Reviewed by Matt Baker.
3059
3060         * Versions/Inspector-iOS-8.0.json:
3061         * Versions/Inspector-iOS-9.0.json:
3062         * Versions/Inspector-iOS-9.3.json:
3063         * Versions/Inspector-iOS-10.0.json:
3064         * Versions/Inspector-iOS-10.3.json:
3065         * Versions/Inspector-iOS-11.0.json:
3066         * Versions/Inspector-iOS-11.3.json:
3067         * Versions/Inspector-iOS-12.0.json:
3068         * UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js:
3069         * UserInterface/Protocol/Legacy/9.0/InspectorBackendCommands.js:
3070         * UserInterface/Protocol/Legacy/9.3/InspectorBackendCommands.js:
3071         * UserInterface/Protocol/Legacy/10.0/InspectorBackendCommands.js:
3072         * UserInterface/Protocol/Legacy/10.3/InspectorBackendCommands.js:
3073         * UserInterface/Protocol/Legacy/11.0/InspectorBackendCommands.js:
3074         * UserInterface/Protocol/Legacy/11.3/InspectorBackendCommands.js:
3075         * UserInterface/Protocol/Legacy/12.0/InspectorBackendCommands.js:
3076
3077 2018-12-13  Devin Rousso  <drousso@apple.com>
3078
3079         Web Inspector: experimental settings reload button disappears after changing more than one setting
3080         https://bugs.webkit.org/show_bug.cgi?id=192645
3081         <rdar://problem/46626204>
3082
3083         Reviewed by Joseph Pecoraro.
3084
3085         * UserInterface/Views/SettingsTabContentView.js:
3086         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView.listenForChange):
3087         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
3088
3089 2018-12-13  Matt Baker  <mattbaker@apple.com>
3090
3091         Web Inspector: REGRESSION(r238602): Elements: deleting multiple DOM nodes doesn't select the nearest node after deletion
3092         https://bugs.webkit.org/show_bug.cgi?id=192116
3093         <rdar://problem/46344339>
3094
3095         Reviewed by Devin Rousso.
3096
3097         * UserInterface/Controllers/SelectionController.js:
3098         (WI.SelectionController.prototype.removeSelectedItems):
3099         Finding a new index to select should go through the delegate instead of
3100         naively advancing the index.
3101
3102         * UserInterface/Views/DOMTreeElement.js:
3103         (WI.DOMTreeElement.prototype._populateNodeContextMenu):
3104         (WI.DOMTreeElement.prototype.ondelete): Deleted.
3105         The menu item for removing the DOM node is now managed by the parent
3106         DOMTreeOutline, since its UI and behavior now depend on whether there
3107         are multiple elements selected.
3108
3109         * UserInterface/Views/DOMTreeOutline.js:
3110         (WI.DOMTreeOutline.prototype.populateContextMenu):
3111         (WI.DOMTreeOutline.prototype.ondelete.level):
3112         (WI.DOMTreeOutline.prototype.ondelete):
3113         Implement `ondelete` to remove selected DOM nodes using the delete and
3114         backspace keys. Also used by the DOMTreeOutline's context menu handler.
3115
3116 2018-12-13  Matt Baker  <mattbaker@apple.com>
3117
3118         Web Inspector: Table selection becomes corrupted when deleting selected cookies
3119         https://bugs.webkit.org/show_bug.cgi?id=192388
3120         <rdar://problem/46472364>
3121
3122         Reviewed by Devin Rousso.
3123
3124         * UserInterface/Controllers/SelectionController.js:
3125         (WI.SelectionController):
3126         (WI.SelectionController.prototype.didRemoveItems):
3127         (WI.SelectionController.prototype._updateSelectedItems):
3128         (WI.SelectionController.prototype.didRemoveItem): Deleted.
3129         Replace `didRemoveItem` with a method taking an IndexSet. Calling the
3130         single-index version while iterating over multiple rows in ascending
3131         order is unsafe, a detail best left to the SelectionController.
3132
3133         * UserInterface/Views/Table.js:
3134         (WI.Table.prototype.removeRow):
3135         (WI.Table.prototype._removeRows):
3136         Notify SelectionController of removed rows.
3137
3138         * UserInterface/Views/TreeOutline.js:
3139         (WI.TreeOutline.prototype.insertChild):
3140         (WI.TreeOutline.prototype.removeChildAtIndex):
3141         Remove the child from the element's `children` after calling `_forgetTreeElement`,
3142         which needs to calculate the child's index to pass to the SelectionController.
3143
3144         (WI.TreeOutline.prototype.removeChildren):
3145         Remove child items during iteration so that `children` doesn't contain
3146         detached TreeElements while calling `_forgetTreeElement`.
3147
3148         (WI.TreeOutline.prototype._rememberTreeElement):
3149         (WI.TreeOutline.prototype._forgetTreeElement):
3150
3151 2018-12-10  Matt Baker  <mattbaker@apple.com>
3152
3153         Web Inspector: REGRESSION (r238599): unable to select specific timeline
3154         https://bugs.webkit.org/show_bug.cgi?id=192443
3155         <rdar://problem/46608087>
3156
3157         Reviewed by Joseph Pecoraro.
3158
3159         When determining the trailing horizontal edge for TreeElement mouse
3160         events, TreeOutline should not assume that its containing DOM element
3161         is only as wide as its <ol> element.
3162
3163         * UserInterface/Views/TreeOutline.js:
3164         (WI.TreeOutline.prototype.treeElementFromEvent):
3165
3166 2018-12-10  Matt Baker  <mattbaker@apple.com>
3167
3168         Web Inspector: Move TreeOutlineGroup coordination out of TreeElement
3169         https://bugs.webkit.org/show_bug.cgi?id=192487
3170         <rdar://problem/46543431>
3171
3172         Reviewed by Devin Rousso.
3173
3174         * UserInterface/Views/TreeElement.js:
3175         (WI.TreeElement.prototype.select):
3176         (WI.TreeElement.prototype.deselect):
3177
3178         * UserInterface/Views/TreeOutlineGroup.js:
3179         (WI.TreeOutlineGroup):
3180         (WI.TreeOutlineGroup.prototype.itemAdded):
3181         (WI.TreeOutlineGroup.prototype.itemRemoved):
3182         (WI.TreeOutlineGroup.prototype._removeConflictingTreeSelections):
3183         (WI.TreeOutlineGroup.prototype._treeOutlineSelectionDidChange):
3184         (WI.TreeOutlineGroup.groupForTreeOutline): Deleted.
3185         (WI.TreeOutlineGroup.prototype.didSelectTreeElement): Deleted.
3186         make the group responsible for listening to selection changes from the
3187         TreeOutlines it manages, and synchronizing the selection between them.
3188
3189 2018-12-10  Dean Jackson  <dino@apple.com>
3190
3191         Use text/javascript as recommended by the HTML specification
3192         https://bugs.webkit.org/show_bug.cgi?id=192525
3193         <rdar://problem/46569636>
3194
3195         Reviewed by Jon Lee.
3196
3197         The HTML specification says we should use text/javascript for
3198         JavaScript files:
3199         https://html.spec.whatwg.org/multipage/scripting.html#scriptingLanguages:javascript-mime-type
3200
3201         * UserInterface/Base/MIMETypeUtilities.js:
3202         (WI.mimeTypeForFileExtension):
3203         * UserInterface/Views/TextEditor.js:
3204         (WI.TextEditor.prototype._attemptToDetermineMIMEType):
3205
3206 2018-12-06  Matt Baker  <mattbaker@apple.com>
3207
3208         Web Inspector: REGRESSION(r238602): Elements: collapsing a DOM node with the left arrow doesn't work
3209         https://bugs.webkit.org/show_bug.cgi?id=192353
3210         <rdar://problem/46455019>
3211
3212         Reviewed by Devin Rousso.
3213
3214         * UserInterface/Views/TreeElement.js:
3215         (WI.TreeElement.prototype.deselect):
3216         Don't early return when the element is not the selected tree element.
3217         This condition no longer holds now that TreeOutline supports multiple selection.
3218
3219 2018-12-05  Matt Baker  <mattbaker@apple.com>
3220
3221         Web Inspector: SelectionController should not extend the selection when allowsMultipleSelection is false
3222         https://bugs.webkit.org/show_bug.cgi?id=192390
3223         <rdar://problem/46473624>
3224
3225         Reviewed by Devin Rousso.
3226
3227         * UserInterface/Controllers/SelectionController.js:
3228         (WI.SelectionController.prototype.selectItem):
3229
3230 2018-12-04  Nikita Vasilyev  <nvasilyev@apple.com>
3231
3232         Web Inspector: Add style editing debug mode
3233         https://bugs.webkit.org/show_bug.cgi?id=192282
3234         <rdar://problem/46399176>
3235
3236         Reviewed by Matt Baker.
3237
3238         Introduce a style editing debug mode to help to troubleshoot complex bugs in the style editor.
3239
3240           - Log CSS changes;
3241           - Display red border for locked style declarations.
3242
3243         * UserInterface/Base/Setting.js:
3244         * UserInterface/Models/CSSProperty.js:
3245         (WI.CSSProperty.prototype._updateOwnerStyleText):
3246         * UserInterface/Views/SettingsTabContentView.js:
3247         (WI.SettingsTabContentView.prototype._createDebugSettingsView):
3248         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
3249         (.spreadsheet-style-declaration-editor.debug-style-locked::after):
3250         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
3251         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.layout):
3252         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._updateStyleLock):
3253         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._updateDebugLockStatus):
3254
3255 2018-12-04  Matt Baker  <mattbaker@apple.com>
3256
3257         Web Inspector: REGRESSION(r238602): Elements: changing selection no longer highlights the selected node
3258         https://bugs.webkit.org/show_bug.cgi?id=192354
3259         <rdar://problem/46444438>
3260
3261         Reviewed by Joseph Pecoraro.
3262
3263         * UserInterface/Views/TreeOutline.js:
3264         (WI.TreeOutline.prototype._treeKeyDown):
3265         (WI.TreeOutline.prototype._handleMouseDown):
3266
3267 2018-12-04  Joseph Pecoraro  <pecoraro@apple.com>
3268
3269         Web Inspector: REGRESSION(r238330): Timeline auto-capture does not work after page transition
3270         https://bugs.webkit.org/show_bug.cgi?id=192248
3271         <rdar://problem/46390199>
3272
3273         Reviewed by Devin Rousso.
3274
3275         * UserInterface/Base/Main.js:
3276         (WI.transitionPageTarget):
3277         Let the TimelineManager perform work on page transitions.
3278
3279         * UserInterface/Controllers/TimelineManager.js:
3280         (WI.TimelineManager.prototype.initializeTarget):
3281         Initialize the autocapture state of the target.
3282
3283         (WI.TimelineManager.prototype.transitionPageTarget):
3284         When transitioning pages perform a legacy (frontend based) timeline capture.
3285
3286 2018-12-04  Matt Baker  <mattbaker@apple.com>
3287
3288         Web Inspector: Elements: $0 is shown for all selected elements
3289         https://bugs.webkit.org/show_bug.cgi?id=192119
3290         <rdar://problem/46327554>
3291
3292         Reviewed by Devin Rousso.
3293
3294         * UserInterface/Views/ContentBrowserTabContentView.js:
3295         (WI.ContentBrowserTabContentView.prototype._revealAndSelectRepresentedObject):
3296         * UserInterface/Views/DOMTreeContentView.js:
3297         (WI.DOMTreeContentView):
3298         (WI.DOMTreeContentView.prototype.layout):
3299         (WI.DOMTreeContentView.prototype._domTreeSelectionDidChange):
3300         Update the selected DOM node using the TreeOutline's selection change
3301         event, instead of in `onselect`, which wasn't always called.
3302
3303         * UserInterface/Views/DOMTreeElement.js:
3304         (WI.DOMTreeElement.prototype.onselect): Deleted.
3305         (WI.DOMTreeElement.prototype.ondeselect): Deleted.
3306         Eliminate `onselect` and `ondeselect`. TreeOutline clients should use
3307         the TreeOutline.Event.SelectedDidChange event instead.
3308
3309         * UserInterface/Views/DOMTreeOutline.css:
3310         (.tree-outline.dom li.last-selected > span::after):
3311         (.tree-outline.dom:focus li.last-selected > span::after):
3312         (.tree-outline.dom li.selected > span::after): Deleted.
3313         (.tree-outline.dom:focus li.selected > span::after): Deleted.
3314         * UserInterface/Views/DOMTreeOutline.js:
3315         (WI.DOMTreeOutline.prototype.updateSelection): Deleted.
3316
3317         * UserInterface/Views/DebuggerSidebarPanel.js:
3318         (WI.DebuggerSidebarPanel.prototype._handleDebuggerObjectDisplayLocationDidChange):
3319         * UserInterface/Views/FolderizedTreeElement.js:
3320         (WI.FolderizedTreeElement.prototype._addTreeElement):
3321         * UserInterface/Views/NavigationSidebarPanel.js:
3322         (WI.NavigationSidebarPanel.prototype.showDefaultContentViewForTreeElement):
3323         (WI.NavigationSidebarPanel.prototype._treeElementWasFiltered):
3324         (WI.NavigationSidebarPanel):
3325         * UserInterface/Views/OpenResourceDialog.js:
3326         (WI.OpenResourceDialog.prototype._populateResourceTreeOutline):
3327         (WI.OpenResourceDialog.prototype._handleKeydownEvent):
3328         * UserInterface/Views/SourceCodeTreeElement.js:
3329         (WI.SourceCodeTreeElement.prototype.descendantResourceTreeElementTypeDidChange):
3330         * UserInterface/Views/TreeElement.js:
3331         (WI.TreeElement.prototype.select):
3332         (WI.TreeElement.prototype.revealAndSelect):
3333         (WI.TreeElement.prototype.deselect):
3334         Remove `suppressOnDeselect` and rename `suppressOnSelect` to `suppressNotification`.
3335         Now that `ondeselect` has been removed `suppressOnDeselect` is no longer
3336         meaningful, as TreeOutline generates a single `SelectedDidChange` event
3337         when the selected item changes. In the case of `revealAndSelect`, both
3338         arguments had the same value.
3339
3340         * UserInterface/Views/TreeOutline.js:
3341         (WI.TreeOutline):
3342         (WI.TreeOutline.prototype.selectionControllerSelectionDidChange):
3343         Add a unique class name to the last selected TreeElement to distinguish
3344         it from other selected elements.
3345
3346 2018-12-04  Matt Baker  <mattbaker@apple.com>
3347
3348         Web Inspector: Elements: ⌘-A should select all visible nodes
3349         https://bugs.webkit.org/show_bug.cgi?id=192120
3350         <rdar://problem/46344435>
3351
3352         Reviewed by Devin Rousso.
3353
3354         * UserInterface/Views/TreeOutline.js:
3355         (WI.TreeOutline.prototype._treeKeyDown):
3356         Remove an early return, allowing `WI.SelectionController` to handle ⌘-A
3357         and select all items.
3358
3359 2018-12-04  Devin Rousso  <drousso@apple.com>
3360
3361         Web Inspector: Audit: tests should support async operations
3362         https://bugs.webkit.org/show_bug.cgi?id=192171
3363         <rdar://problem/46423562>
3364
3365         Reviewed by Joseph Pecoraro.
3366
3367         * UserInterface/Controllers/RuntimeManager.js:
3368         (WI.RuntimeManager.supportsAwaitPromise): Added.
3369
3370         * UserInterface/Models/AuditTestCase.js:
3371         (WI.AuditTestCase.prototype.async run.async parseResponse.checkResultProperty.addErrorForValueType): Deleted.
3372         (WI.AuditTestCase.prototype.async run.async parseResponse.checkResultProperty): Deleted.
3373         (WI.AuditTestCase.prototype.async run.async parseResponse.async resultArrayForEach): Deleted.
3374         (WI.AuditTestCase.prototype.async run.async parseResponse): Added.
3375         (WI.AuditTestCase.prototype.async run):
3376         (WI.AuditTestCase.prototype.async run.checkResultProperty.addErrorForValueType): Deleted.
3377         (WI.AuditTestCase.prototype.async run.checkResultProperty): Deleted.
3378         (WI.AuditTestCase.prototype.async run.async resultArrayForEach): Deleted.
3379
3380         * UserInterface/Models/AuditTestCaseResult.js:
3381         (WI.AuditTestCaseResult.async fromPayload):
3382         (WI.AuditTestCaseResult.prototype.toJSON):
3383
3384         * UserInterface/Views/AuditTestCaseContentView.js:
3385         (WI.AuditTestCaseContentView.prototype.layout):
3386
3387 2018-12-03  Devin Rousso  <drousso@apple.com>
3388
3389         Web Inspector: Audit: save the expanded state of test groups
3390         https://bugs.webkit.org/show_bug.cgi?id=192346
3391         <rdar://problem/46440704>
3392
3393         Reviewed by Matt Baker.
3394
3395         * UserInterface/Views/AuditTreeElement.js:
3396         (WI.AuditTreeElement):
3397         (WI.AuditTreeElement.prototype.onattach):
3398         (WI.AuditTreeElement.prototype.onexpand): Added.
3399         (WI.AuditTreeElement.prototype.oncollapse): Added.
3400
3401 2018-12-03  Devin Rousso  <drousso@apple.com>
3402
3403         Web Inspector: Audit: sidebar briefly shows "No Filter Results" before populating default audits
3404         https://bugs.webkit.org/show_bug.cgi?id=192341
3405         <rdar://problem/46436550>
3406
3407         Reviewed by Matt Baker.
3408
3409         * UserInterface/Views/AuditNavigationSidebarPanel.js:
3410         (WI.AuditNavigationSidebarPanel.prototype.initialLayout):
3411         (WI.AuditNavigationSidebarPanel.prototype._addTest):
3412         (WI.AuditNavigationSidebarPanel.prototype._addResult):
3413         (WI.AuditNavigationSidebarPanel.prototype.applyFiltersToTreeElement): Deleted.
3414         Delay the construction of the "Results" folder until it's needed, since adding a hidden
3415         `WI.TreeElement` will cause the placeholder to appear.
3416
3417 2018-12-03  Devin Rousso  <drousso@apple.com>
3418
3419         Web Inspector: Audit: navigating while tests are running should stop and clear all results
3420         https://bugs.webkit.org/show_bug.cgi?id=192317
3421         <rdar://problem/46435222>
3422
3423         Reviewed by Joseph Pecoraro.
3424
3425         * UserInterface/Controllers/AuditManager.js:
3426         (WI.AuditManager.prototype.async start):
3427         (WI.AuditManager.prototype._handleFrameMainResourceDidChange):
3428
3429         * UserInterface/Views/AuditNavigationSidebarPanel.js:
3430         (WI.AuditNavigationSidebarPanel.prototype.initialLayout):
3431         Drive-by: pass the index of the saved result.
3432
3433 2018-12-03  Devin Rousso  <drousso@apple.com>
3434
3435         Web Inspector: Audit: "Add Default Audits" shown when there are no filter results
3436         https://bugs.webkit.org/show_bug.cgi?id=192105
3437
3438         Reviewed by Matt Baker.
3439
3440         * UserInterface/Views/NavigationSidebarPanel.js:
3441         (WI.NavigationSidebarPanel):
3442         (WI.NavigationSidebarPanel.prototype.get hasActiveFilters): Added.
3443         (WI.NavigationSidebarPanel.prototype.suppressFilteringOnTreeElements):
3444         (WI.NavigationSidebarPanel.prototype.showEmptyContentPlaceholder):
3445         (WI.NavigationSidebarPanel.prototype.hideEmptyContentPlaceholder):
3446         (WI.NavigationSidebarPanel.prototype.updateEmptyContentPlaceholder):
3447         (WI.NavigationSidebarPanel.prototype.updateFilter):
3448         (WI.NavigationSidebarPanel.prototype._checkForEmptyFilterResults.checkTreeOutlineForEmptyFilterResults):
3449         (WI.NavigationSidebarPanel.prototype._filterDidChange):
3450         (WI.NavigationSidebarPanel.prototype._updateFilter): Deleted.
3451         (WI.NavigationSidebarPanel.prototype._createEmptyContentPlaceholderIfNeeded): Deleted.
3452
3453         * UserInterface/Views/AuditNavigationSidebarPanel.js:
3454         (WI.AuditNavigationSidebarPanel.prototype._handleAuditTestRemoved):
3455         Drive-by: change capitalization for consistency with other navigation sidebars.
3456
3457         * Localizations/en.lproj/localizedStrings.js:
3458
3459 2018-12-03  Devin Rousso  <drousso@apple.com>
3460
3461         Web Inspector: Canvas: add singular localized string for "Record first %s frames"
3462         https://bugs.webkit.org/show_bug.cgi?id=192189
3463
3464         Reviewed by Joseph Pecoraro.
3465
3466         * UserInterface/Views/CanvasOverviewContentView.js:
3467         (WI.CanvasOverviewContentView):
3468         (WI.CanvasOverviewContentView.prototype._setRecordingAutoCaptureFrameCount):
3469         (WI.CanvasOverviewContentView.prototype._updateRecordingAutoCaptureCheckboxLabel): Added.
3470         (WI.CanvasOverviewContentView.prototype._handleRecordingAutoCaptureInput):
3471         (WI.CanvasOverviewContentView.prototype._handleCanvasRecordingAutoCaptureFrameCountChanged):
3472         (WI.CanvasOverviewContentView.prototype.initialLayout): Deleted.
3473         Drive-by: update the auto-capture navigation item when the view is first created so there is
3474         no flashing of in the navigation bar (before `initialLayout` is called).
3475
3476         * UserInterface/Views/CheckboxNavigationItem.js:
3477         (WI.CheckboxNavigationItem):
3478         (WI.CheckboxNavigationItem.prototype.set label): Added.
3479
3480         * Localizations/en.lproj/localizedStrings.js:
3481
3482 2018-12-03  Matt Baker  <mattbaker@apple.com>
3483
3484         Web Inspector: REGRESSION(r238599): Multiple Selection: restoring selection when opening WebInspector puts the TreeElement into a permanent selected state
3485         https://bugs.webkit.org/show_bug.cgi?id=192091
3486         <rdar://problem/46321795>
3487
3488         Reviewed by Devin Rousso.
3489
3490         * UserInterface/Controllers/SelectionController.js:
3491         (WI.SelectionController.prototype.didInsertItem):
3492         Fix a bug where selected indexes were overwritten by the inserted index.
3493
3494         * UserInterface/Views/TreeOutline.js:
3495         (WI.TreeOutline):
3496         (WI.TreeOutline.prototype.insertChild):
3497         Update the SelectionController with the newly inserted index before
3498         attaching the TreeElement. Attaching the TreeElement can cause it to
3499         become selected, which would add the index to the SelectionController,
3500         only to have it immediately incremented by the call to `didInsertItem`.
3501         Additionally, change `insertionIndex` to be the index of the inserted
3502         item instead of the inserted item's previous sibling.
3503
3504         (WI.TreeOutline.prototype._rememberTreeElement):
3505         (WI.TreeOutline.prototype._forgetTreeElement):
3506         (WI.TreeOutline.prototype._indexOfTreeElement.previousElement): Deleted.
3507         Eliminate TreeElement index caching, which could become stale and cause
3508         the wrong index to be calculated. Additionally, instead of walking up the
3509         parent chain to determine the index, start at the root and use existing
3510         method `traverseNextTreeElement`.
3511
3512 2018-12-03  Devin Rousso  <drousso@apple.com>
3513
3514         Web Inspector: Audit: test tree elements should start out collapsed
3515         https://bugs.webkit.org/show_bug.cgi?id=192107
3516
3517         Reviewed by Matt Baker.
3518
3519         * UserInterface/Views/AuditTreeElement.js:
3520         (WI.AuditTreeElement.prototype.onattach):
3521
3522 2018-12-03  Nikita Vasilyev  <nvasilyev@apple.com>
3523
3524         Web Inspector: Styles: can't select properties of read-only rules
3525         https://bugs.webkit.org/show_bug.cgi?id=192266
3526
3527         Reviewed by Devin Rousso.
3528
3529         Implement multiple properties selection for read-only rules (such as User Agent Stylesheets)
3530         in the Styles panel.
3531
3532         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
3533         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.initialLayout):
3534         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.layout):
3535         Keep selection on layout.
3536
3537         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.startEditingFirstProperty):
3538         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.startEditingLastProperty):
3539         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyBlur):
3540         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyMouseEnter):
3541         SpreadsheetCSSStyleDeclarationEditor is used by ComputedStyleDetailsPanel, which doesn't have:
3542           - spreadsheetCSSStyleDeclarationEditorPropertyBlur
3543           - spreadsheetCSSStyleDeclarationEditorPropertyMouseEnter
3544
3545         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyFocusMoved):
3546         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._handleKeyDown):
3547         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
3548         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.initialLayout):
3549         * UserInterface/Views/SpreadsheetStyleProperty.js:
3550         (WI.SpreadsheetStyleProperty.prototype.startEditingName):
3551         (WI.SpreadsheetStyleProperty.prototype.startEditingValue):
3552
3553 2018-11-30  Brian Burg  <bburg@apple.com>
3554
3555         Web Inspector: resource combining should be more robust against missing WebKitAdditions
3556         https://bugs.webkit.org/show_bug.cgi?id=192255
3557         <rdar://problem/46042879>
3558
3559         Reviewed by Joseph Pecoraro.
3560
3561         * Scripts/copy-user-interface-resources.pl:
3562         (combineOrStripResourcesForWebKitAdditions):
3563
3564 2018-11-30  Nikita Vasilyev  <nvasilyev@apple.com>
3565
3566         Web Inspector: Jumping from Computed to Styles should select property
3567         https://bugs.webkit.org/show_bug.cgi?id=192198
3568
3569         Reviewed by Devin Rousso.
3570
3571         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
3572         (.spreadsheet-style-declaration-editor .property.highlighted): Deleted.
3573         (@keyframes style-property-highlight): Deleted.
3574         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
3575         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.highlightProperty):
3576         Remove unnecessary `__propertyView` property.
3577
3578         * UserInterface/Views/SpreadsheetStyleProperty.js:
3579         (WI.SpreadsheetStyleProperty.prototype.detached):
3580         (WI.SpreadsheetStyleProperty.prototype.highlight): Deleted.
3581
3582 2018-11-30  Matt Baker  <mattbaker@apple.com>
3583
3584         Web Inspector: REGRESSION(r238599): Multiple Selection: selecting a breakpoint will change the selection to it's parent on the first click
3585         https://bugs.webkit.org/show_bug.cgi?id=192093
3586         <rdar://problem/46318466>
3587
3588         Reviewed by Devin Rousso.
3589
3590         * UserInterface/Views/TreeElement.js:
3591         (WI.TreeElement.prototype.select):
3592         TreeElement shouldn't manage the TreeOutline's selection barrier.
3593
3594         * UserInterface/Views/TreeOutline.js:
3595         (WI.TreeOutline):
3596         (WI.TreeOutline.prototype.get processingSelectionChange):
3597         (WI.TreeOutline.prototype.selectionControllerSelectionDidChange):
3598         (WI.TreeOutline.prototype.selectTreeElementInternal):
3599         The selection re-entry barrier `processingSelectionChange` should be
3600         managed internally by TreeOutline, and exposed as a read-only property.
3601         Fix a bug where the barrier was cleared before dispatching the change
3602         notification, which can cause re-entry as a side effect.
3603
3604 2018-11-30  Devin Rousso  <drousso@apple.com>
3605
3606         Web Inspector: Settings: reload button needs horizontal spacing
3607         https://bugs.webkit.org/show_bug.cgi?id=192231
3608         <rdar://problem/46274363>
3609
3610         Reviewed by Matt Baker.
3611
3612         * UserInterface/Views/SettingsTabContentView.css:
3613         (.content-view.settings > .settings-view > .container button):
3614         (.content-view.settings > .settings-view > .container > .title):
3615         (.content-view.settings > .settings-view > .container > .editor-group > .editor input[type="checkbox"]):
3616         (body[dir=ltr] .content-view.settings > .settings-view > .container > .title): Deleted.
3617         (body[dir=rtl] .content-view.settings > .settings-view > .container > .title): Deleted.
3618         (body[dir=ltr] .content-view.settings > .settings-view > .container > .editor-group > .editor input[type="checkbox"]): Deleted.
3619         (body[dir=rtl] .content-view.settings > .settings-view > .container > .editor-group > .editor input[type="checkbox"]): Deleted.
3620         Drive-by: replace `dir=*` attribute rules with `-webkit-margin-*` properties.
3621
3622 2018-11-30  Joseph Pecoraro  <pecoraro@apple.com>
3623
3624         Web Inspector: Uncaught Exception opening Web Inspector to Debugger Tab
3625         https://bugs.webkit.org/show_bug.cgi?id=192174
3626
3627         Reviewed by Devin Rousso.
3628
3629         * UserInterface/Protocol/InspectorBackend.js:
3630         (InspectorBackendClass.prototype.runAfterPendingDispatches):
3631         Dispatch the callback with a timeout if there is no backend target yet
3632         so it doesn't get lost.
3633
3634         * UserInterface/Protocol/Connection.js:
3635         (InspectorBackend.Connection.prototype.runAfterPendingDispatches):
3636         Change the ambiguous name "script" to the more familiar "callback".
3637
3638 2018-11-30  Devin Rousso  <drousso@apple.com>
3639
3640         Web Inspector: replace all unicode characters with the escaped character code
3641         https://bugs.webkit.org/show_bug.cgi?id=192216
3642         <rdar://problem/46275637>
3643
3644         Reviewed by Brian Burg.
3645
3646         * Localizations/en.lproj/localizedStrings.js:
3647         * UserInterface/Controllers/BreakpointPopoverController.js:
3648         * UserInterface/Debug/UncaughtExceptionReporter.js:
3649         * UserInterface/Models/AuditTestCase.js:
3650         * UserInterface/Models/Canvas.js:
3651         * UserInterface/Models/RecordingAction.js:
3652         * UserInterface/Models/ScriptTimelineRecord.js:
3653         * UserInterface/Views/AuditTestCaseContentView.js:
3654         * UserInterface/Views/AuditTestContentView.js:
3655         * UserInterface/Views/AuditTestGroupContentView.js:
3656         * UserInterface/Views/CallFrameView.js:
3657         * UserInterface/Views/CanvasContentView.js:
3658         * UserInterface/Views/CanvasOverviewContentView.css:
3659         * UserInterface/Views/ConsoleMessageView.css:
3660         * UserInterface/Views/ContextMenuUtilities.js:
3661         * UserInterface/Views/DOMEventsBreakdownView.js:
3662         * UserInterface/Views/DataGrid.css:
3663         * UserInterface/Views/DataGrid.js:
3664         * UserInterface/Views/DatabaseTableContentView.js:
3665         * UserInterface/Views/DebuggerDashboardView.css:
3666         * UserInterface/Views/DebuggerSidebarPanel.js:
3667         * UserInterface/Views/ErrorObjectView.js:
3668         * UserInterface/Views/EventBreakpointPopover.js:
3669         * UserInterface/Views/InlineSwatch.js:
3670         * UserInterface/Views/LayerTreeDataGridNode.js:
3671         * UserInterface/Views/LayerTreeDetailsSidebarPanel.js:
3672         * UserInterface/Views/Layers3DContentView.js:
3673         * UserInterface/Views/LayoutTimelineDataGridNode.js:
3674         * UserInterface/Views/NetworkTableContentView.css:
3675         * UserInterface/Views/NetworkTableContentView.js:
3676         * UserInterface/Views/ObjectPreviewView.js:
3677         * UserInterface/Views/ProfileDataGridNode.js:
3678         * UserInterface/Views/ResourceTimelineDataGridNode.js:
3679         * UserInterface/Views/ScriptDetailsTimelineView.css:
3680         * UserInterface/Views/TextEditor.css:
3681         * UserInterface/Views/TreeOutline.css:
3682
3683 2018-11-29  Matt Baker  <mattbaker@apple.com>
3684
3685         Web Inspector: RTL: disclosure triangles should be flipped and aligned right
3686         https://bugs.webkit.org/show_bug.cgi?id=192089
3687         <rdar://problem/46316753>
3688
3689         Reviewed by Devin Rousso.
3690
3691         * UserInterface/Views/ComputedStyleSection.css:
3692         (.computed-style-section .computed-property-item .disclosure-button):
3693         (body[dir=rtl] .computed-style-section .computed-property-item .disclosure-button):
3694
3695         * UserInterface/Views/ConsoleMessageView.css:
3696         (.console-message.expandable .console-top-level-message::before):
3697         (body[dir=rtl] .console-message.expandable .console-top-level-message::before):
3698
3699         * UserInterface/Views/ErrorObjectView.css:
3700         (.error-object > .formatted-error::before):
3701         (body[dir=rtl] .error-object > .formatted-error::before):
3702         (.error-object .content):
3703
3704         * UserInterface/Views/LogContentView.css:
3705         (.console-group-title::before):
3706         (body[dir=ltr] .console-group-title::before):
3707         (body[dir=rtl] .console-group-title::before):
3708
3709         * UserInterface/Views/ObjectTreeView.css:
3710         (body[dir=rtl] .object-tree > :matches(.title, .object-preview)::before):
3711
3712         * UserInterface/Views/TypeTreeElement.css:
3713         (body[dir=rtl] .item.type-tree-element.parent > .disclosure-button):
3714
3715 2018-11-28  Dean Jackson  <dino@apple.com>
3716
3717         [ES Modules] Allow .mjs content when loaded from file://
3718         https://bugs.webkit.org/show_bug.cgi?id=192100
3719         <rdar://problem/46320065>
3720
3721         Reviewed by Sam Weinig.
3722
3723         Add a mapping from .mjs to application/javascript.
3724
3725         * UserInterface/Base/MIMETypeUtilities.js:
3726         (WI.mimeTypeForFileExtension):
3727
3728 2018-11-29  Matt Baker  <mattbaker@apple.com>
3729
3730         Web Inspector: Elements: selecting more than one DOM node causes the scope highlight to contrast
3731         https://bugs.webkit.org/show_bug.cgi?id=192118
3732         <rdar://problem/46325664>
3733
3734         Reviewed by Devin Rousso.
3735
3736         Use an alpha blended border for the "selected" DOM scope highlight,
3737         matching the "hovered" scope highlight.
3738
3739         * UserInterface/Views/DOMTreeOutline.css:
3740         (.tree-outline.dom li.selected + ol.children.expanded):
3741
3742 2018-11-28  Joseph Pecoraro  <pecoraro@apple.com>
3743
3744         Web Inspector: REGRESSION(?): all "Show *" develop menu items cause the page to crash
3745         https://bugs.webkit.org/show_bug.cgi?id=192016
3746         <rdar://problem/46284417>
3747
3748         Reviewed by Devin Rousso.
3749
3750         * UserInterface/Base/Main.js:
3751         (WI.loaded):
3752         (WI.initializeBackendTarget):
3753         (WI.contentLoaded):
3754         (WI.whenTargetsAvailable):
3755         Don't evaluate any InspectorFrontendAPI commands until the frontend
3756         has initialized a main target and the user interface.
3757
3758 2018-11-28  Nikita Vasilyev  <nvasilyev@apple.com>
3759
3760         Web Inspector: Styles: enable selection of multiple properties by default
3761         https://bugs.webkit.org/show_bug.cgi?id=192109
3762         <rdar://problem/46323565>
3763
3764         Reviewed by Devin Rousso.
3765
3766         * UserInterface/Base/Setting.js:
3767         * UserInterface/Views/SettingsTabContentView.js:
3768         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
3769         Remove the checkbox.
3770
3771         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
3772         (.spreadsheet-style-declaration-editor .property):
3773         (.spreadsheet-style-declaration-editor :matches(.name, .value):not(.editing)):
3774         (.spreadsheet-style-declaration-editor .property.selected):
3775         (.spreadsheet-style-declaration-editor .property.selected:focus):
3776         (.multiple-properties-selection .spreadsheet-style-declaration-editor .property): Deleted.
3777         (.multiple-properties-selection .spreadsheet-style-declaration-editor :matches(.name, .value):not(.editing)): Deleted.
3778         (.multiple-properties-selection .spreadsheet-style-declaration-editor .property.selected): Deleted.
3779         (.multiple-properties-selection .spreadsheet-style-declaration-editor .property.selected:focus): Deleted.
3780         Remove `.multiple-properties-selection` class.
3781
3782         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
3783         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.initialLayout):
3784         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
3785         (WI.SpreadsheetCSSStyleDeclarationSection):
3786         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleMouseDown):
3787         * UserInterface/Views/SpreadsheetStyleProperty.js:
3788         (WI.SpreadsheetStyleProperty.prototype._createInlineSwatch):
3789         * UserInterface/Views/SpreadsheetTextField.js:
3790         (WI.SpreadsheetTextField):
3791         (WI.SpreadsheetTextField.prototype._handleFocus): Deleted.
3792
3793 2018-11-28  Devin Rousso  <drousso@apple.com>
3794
3795         Web Inspector: Audit: empty results folder is shown after clearing filters
3796         https://bugs.webkit.org/show_bug.cgi?id=192106
3797
3798         Reviewed by Matt Baker.
3799
3800         * UserInterface/Views/AuditNavigationSidebarPanel.js:
3801         (WI.AuditNavigationSidebarPanel.prototype.applyFiltersToTreeElement): Added.
3802
3803 2018-11-28  Matt Baker  <mattbaker@apple.com>
3804
3805         Web Inspector: Remove unused DataGrid and TreeOutline code
3806         https://bugs.webkit.org/show_bug.cgi?id=191622
3807         <rdar://problem/46052014>
3808
3809         Reviewed by Devin Rousso.
3810
3811         * UserInterface/Views/CanvasDetailsSidebarPanel.js:
3812         (WI.CanvasDetailsSidebarPanel.prototype.initialLayout):
3813
3814         * UserInterface/Views/DOMTreeElement.js:
3815         (WI.DOMTreeElement.prototype.insertChildElement):
3816
3817         * UserInterface/Views/DOMTreeOutline.js:
3818         (WI.DOMTreeOutline):
3819         (WI.DOMTreeOutline.prototype.update):
3820
3821         * UserInterface/Views/DataGrid.js:
3822         (WI.DataGrid.prototype.removeChildrenRecursive): Deleted.
3823
3824         * UserInterface/Views/DataGridNode.js:
3825         (WI.DataGridNode.prototype.removeChildren):
3826         (WI.DataGridNode.prototype.removeChildrenRecursive): Deleted.
3827
3828         * UserInterface/Views/ErrorObjectView.css:
3829         (.error-object:not(.expanded) .content):
3830         (.error-object .content):
3831         (.error-object:not(.expanded) .tree-outline): Deleted.
3832         (.error-object .tree-outline): Deleted.
3833
3834         * UserInterface/Views/ErrorObjectView.js:
3835         (WI.ErrorObjectView):
3836         (WI.ErrorObjectView.prototype.get treeOutline): Deleted.
3837         Use a simple container since TreeOutline features aren't used,
3838         and remove unused property `treeOutline`.
3839
3840         * UserInterface/Views/RecordingTraceDetailsSidebarPanel.js:
3841         (WI.RecordingTraceDetailsSidebarPanel):
3842
3843         * UserInterface/Views/TreeElement.js:
3844         (WI.TreeElement.prototype.removeChildren):
3845         (WI.TreeElement.prototype.removeChildrenRecursive): Deleted.
3846
3847         * UserInterface/Views/TreeOutline.js:
3848         (WI.TreeOutline):
3849         (WI.TreeOutline.prototype.removeChildrenRecursive): Deleted.
3850         (WI.TreeOutline.prototype.reattachIfIndexChanged): Deleted.
3851         Removed `element` parameter now that the only use case has been removed.
3852
3853 2018-11-27  Matt Baker  <mattbaker@apple.com>
3854
3855         Web Inspector: Elements tab should allow selecting/deleting multiple DOM nodes
3856         https://bugs.webkit.org/show_bug.cgi?id=192059
3857         <rdar://problem/46294827>
3858
3859         Reviewed by Devin Rousso.
3860
3861         Enable multiple DOM node selection in the DOMTreeContentView.
3862
3863         * UserInterface/Controllers/SelectionController.js:
3864         (WI.SelectionController):
3865         (WI.SelectionController.prototype.get allowsEmptySelection):
3866         (WI.SelectionController.prototype.set allowsEmptySelection):
3867         Allow clients to control whether the last selected item can be deselected.
3868         (WI.SelectionController.prototype.deselectItem):
3869         (WI.SelectionController.prototype.didInsertItem):
3870         Rewritten to prevent infinite loop.
3871         (WI.SelectionController.prototype.didRemoveItem):
3872         (WI.SelectionController.prototype._updateSelectedItems):
3873         (WI.SelectionController.prototype._adjustIndexesAfter): Deleted.
3874
3875         * UserInterface/Views/DOMTreeContentView.js:
3876         (WI.DOMTreeContentView):
3877
3878         * UserInterface/Views/DOMTreeElement.js:
3879         (WI.DOMTreeElement.prototype.updateSelectionArea):
3880         * UserInterface/Views/DOMTreeOutline.js:
3881         (WI.DOMTreeOutline.prototype.updateSelection):
3882         Updating the selection area DOM element should not assume that only one
3883         TreeElement is selected at a time.
3884
3885         * UserInterface/Views/TreeOutline.js:
3886         (WI.TreeOutline.prototype.get allowsEmptySelection):
3887         (WI.TreeOutline.prototype.set allowsEmptySelection):
3888         (WI.TreeOutline.prototype.set selectedTreeElement):
3889         (WI.TreeOutline.prototype.get selectedTreeElements):
3890         (WI.TreeOutline.prototype._treeKeyDown):
3891
3892         * UserInterface/Views/TreeOutlineGroup.js:
3893         (WI.TreeOutlineGroup):
3894         (WI.TreeOutlineGroup.prototype._removeConflictingTreeSelections):
3895         Eliminate use of `TreeElement.prototype.deselect`.
3896
3897 2018-11-27  Matt Baker  <mattbaker@apple.com>
3898
3899         Web Inspector: TreeOutline should re-use multiple-selection logic from Table
3900         https://bugs.webkit.org/show_bug.cgi?id=191483
3901         <rdar://problem/45953305>
3902
3903         Reviewed by Devin Rousso.
3904
3905         Update TreeOutline to use SelectionController. Adopting SelectionController
3906         in TreeOutline is not as straightforward as it was in Table. Selected items
3907         are tracked by index, and TreeElement lacks an explicit index. As a consequence
3908         TreeElement indexes are calcualted as needed and cached. The cache is cleared
3909         whenever an element is added or removed.
3910
3911         * UserInterface/Controllers/SelectionController.js:
3912         (WI.SelectionController.prototype.didInsertItem):
3913         (WI.SelectionController.prototype.didRemoveItem):
3914         (WI.SelectionController.prototype.handleKeyDown):
3915         Drive-by syntax error fix.
3916         (WI.SelectionController.prototype._adjustIndexesAfter):
3917         (WI.SelectionController):
3918
3919         * UserInterface/Views/DOMTreeElement.js:
3920         (WI.DOMTreeElement.prototype.canSelectOnMouseDown):
3921         (WI.DOMTreeElement.prototype.selectOnMouseDown): Deleted.
3922
3923         * UserInterface/Views/DOMTreeOutline.js:
3924         (WI.DOMTreeOutline.prototype._onmousedown):
3925         Item selection is now handled by SelectionController.
3926
3927         * UserInterface/Views/ShaderProgramTreeElement.js:
3928         (WI.ShaderProgramTreeElement.prototype.canSelectOnMouseDown):
3929         (WI.ShaderProgramTreeElement.prototype.selectOnMouseDown): Deleted.
3930
3931         * UserInterface/Views/TreeElement.js:
3932         (WI.TreeElement.prototype.canSelectOnMouseDown):
3933         (WI.TreeElement.prototype._attach):
3934         (WI.TreeElement.prototype.select):
3935    &