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