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