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