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