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